From 030cb58ca385d6d74052acac717a5b7f592ec279 Mon Sep 17 00:00:00 2001 From: jchen293 Date: Wed, 28 Sep 2022 16:13:36 -0400 Subject: [PATCH 001/208] Remove all instances of message and carrier from address verification (#186) --- CHANGELOG.md | 5 ++ src/main/java/com/easypost/model/Address.java | 77 ------------------- 2 files changed, 5 insertions(+), 77 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd8c9c32f..2348c6008 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## V6 (Next release) + +- Remove `createAndVerifyWithCarrier` function +- Remove `verifyWithCarrier` function + ## v5.10.0 (2022-09-21) - Adds support to pass an `EndShipper ID` when buying a shipment diff --git a/src/main/java/com/easypost/model/Address.java b/src/main/java/com/easypost/model/Address.java index 3de21013f..fba41723e 100644 --- a/src/main/java/com/easypost/model/Address.java +++ b/src/main/java/com/easypost/model/Address.java @@ -235,46 +235,6 @@ public static Address createAndVerify(final Map params, final St return response.getAddress(); } - /** - * Create Address object from parameter map - * and immediately verify it with a specific carrier. - * - * @param params Map of address parameters. - * @param carrier Carrier to verify address with. - * @return Address object. - * @throws EasyPostException when the request fails. - */ - public static Address createAndVerifyWithCarrier(final Map params, final String carrier) - throws EasyPostException { - return createAndVerifyWithCarrier(params, carrier, null); - } - - /** - * Create Address object from parameter map - * and immediately verify it with a specific carrier. - * - * @param params Map of address parameters. - * @param carrier Carrier to verify address with. - * @param apiKey API key to use in request (overrides default API key). - * @return Address object. - * @throws EasyPostException when the request fails. - */ - public static Address createAndVerifyWithCarrier(final Map params, final String carrier, - final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("address", params); - wrappedParams.put("carrier", carrier); - - AddressVerifyResponse response; - response = request(RequestMethod.POST, String.format("%s/create_and_verify", classURL(Address.class)), - wrappedParams, AddressVerifyResponse.class, apiKey); - - if (response.getMessage() != null) { - response.getAddress().setMessage(response.getMessage()); - } - return response.getAddress(); - } - /** * Verify this Address object. * @@ -298,43 +258,6 @@ public Address verify(final String apiKey) throws EasyPostException { request(RequestMethod.GET, String.format("%s/verify", instanceURL(Address.class, this.getId())), null, AddressVerifyResponse.class, apiKey); - if (response.getMessage() != null) { - response.getAddress().setMessage(response.getMessage()); - } - return response.getAddress(); - } - - /** - * Verify this Address object with a specific carrier. - * - * @param carrier Carrier to verify address with. - * @return Address object. - * @throws EasyPostException when the request fails. - */ - public Address verifyWithCarrier(final String carrier) throws EasyPostException { - return this.verifyWithCarrier(carrier, null); - } - - /** - * Verify this Address object with a specific carrier. - * - * @param carrier Carrier to verify address with. - * @param apiKey API key to use in request (overrides default API key). - * @return Address object. - * @throws EasyPostException when the request fails. - */ - public Address verifyWithCarrier(final String carrier, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("carrier", carrier); - - AddressVerifyResponse response; - response = - request(RequestMethod.GET, String.format("%s/verify", instanceURL(Address.class, this.getId())), null, - AddressVerifyResponse.class, apiKey); - - if (response.getMessage() != null) { - response.getAddress().setMessage(response.getMessage()); - } return response.getAddress(); } } From 6312f482e1b0f5b43b237383cfb7903cbb2a187e Mon Sep 17 00:00:00 2001 From: jchen293 Date: Wed, 28 Sep 2022 16:53:02 -0400 Subject: [PATCH 002/208] Insurance type (#187) --- CHANGELOG.md | 5 +++-- src/main/java/com/easypost/model/Insurance.java | 6 +++--- src/test/java/com/easypost/InsuranceTest.java | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2348c6008..1d561c151 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,9 @@ ## V6 (Next release) -- Remove `createAndVerifyWithCarrier` function -- Remove `verifyWithCarrier` function +- Removes `createAndVerifyWithCarrier` function +- Removes `verifyWithCarrier` function +- Changes the type of Insurance `Amount` from Float to String ## v5.10.0 (2022-09-21) diff --git a/src/main/java/com/easypost/model/Insurance.java b/src/main/java/com/easypost/model/Insurance.java index b223247f4..a6319eb7e 100644 --- a/src/main/java/com/easypost/model/Insurance.java +++ b/src/main/java/com/easypost/model/Insurance.java @@ -19,7 +19,7 @@ public final class Insurance extends EasyPostResource { private String trackingCode; private String status; private String shipmentId; - private Float amount; + private String amount; private List messages; /** @@ -27,7 +27,7 @@ public final class Insurance extends EasyPostResource { * * @return the amount of the Insurance */ - public Float getAmount() { + public String getAmount() { return amount; } @@ -36,7 +36,7 @@ public Float getAmount() { * * @param amount the amount of the Insurance */ - public void setAmount(final Float amount) { + public void setAmount(final String amount) { this.amount = amount; } diff --git a/src/test/java/com/easypost/InsuranceTest.java b/src/test/java/com/easypost/InsuranceTest.java index 3e002e9aa..9cbf5a88d 100644 --- a/src/test/java/com/easypost/InsuranceTest.java +++ b/src/test/java/com/easypost/InsuranceTest.java @@ -42,7 +42,7 @@ public void testCreate() throws EasyPostException { assertInstanceOf(Insurance.class, insurance); assertTrue(insurance.getId().startsWith("ins_")); - assertEquals(100.0, insurance.getAmount(), 0.01); + assertEquals("100.00000", insurance.getAmount()); } /** From 6288992a648a701b6c9f42db38d91d90cded6533 Mon Sep 17 00:00:00 2001 From: jchen293 Date: Fri, 30 Sep 2022 12:33:25 -0600 Subject: [PATCH 003/208] remove getUpdate and setUpdate from Tracker class and beat features (#189) --- CHANGELOG.md | 2 + src/main/java/com/easypost/model/Tracker.java | 19 - .../com/easypost/model/beta/CreditCard.java | 11 - .../com/easypost/model/beta/EndShipper.java | 126 ------- .../easypost/model/beta/ReferralCustomer.java | 335 ------------------ .../beta/ReferralCustomerCollection.java | 49 --- .../com/easypost/model/beta/package-info.java | 9 - src/test/cassettes/beta_referral/all.json | 92 ----- src/test/cassettes/beta_referral/create.json | 95 ----- src/test/cassettes/beta_referral/update.json | 188 ---------- .../java/com/easypost/beta/ReferralTest.java | 122 ------- .../java/com/easypost/beta/package-info.java | 9 - 12 files changed, 2 insertions(+), 1055 deletions(-) delete mode 100644 src/main/java/com/easypost/model/beta/CreditCard.java delete mode 100644 src/main/java/com/easypost/model/beta/EndShipper.java delete mode 100644 src/main/java/com/easypost/model/beta/ReferralCustomer.java delete mode 100644 src/main/java/com/easypost/model/beta/ReferralCustomerCollection.java delete mode 100644 src/main/java/com/easypost/model/beta/package-info.java delete mode 100644 src/test/cassettes/beta_referral/all.json delete mode 100644 src/test/cassettes/beta_referral/create.json delete mode 100644 src/test/cassettes/beta_referral/update.json delete mode 100644 src/test/java/com/easypost/beta/ReferralTest.java delete mode 100644 src/test/java/com/easypost/beta/package-info.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d561c151..d77ee9d24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ - Removes `createAndVerifyWithCarrier` function - Removes `verifyWithCarrier` function - Changes the type of Insurance `Amount` from Float to String +- Removes `getUpdate` and `setUpdate` from Tracker class +- Removes all beta features and corrsponding unit tests ## v5.10.0 (2022-09-21) diff --git a/src/main/java/com/easypost/model/Tracker.java b/src/main/java/com/easypost/model/Tracker.java index e4c8c7514..eed2f6bf4 100644 --- a/src/main/java/com/easypost/model/Tracker.java +++ b/src/main/java/com/easypost/model/Tracker.java @@ -239,25 +239,6 @@ public void setStatusDetail(final String statusDetail) { this.statusDetail = statusDetail; } - /** - * Get when the tracker was updated. - * - * @return when the tracker was updated. - */ - // This method is a misspelling, but it persists to avoid breaking backwards compatibility - public Date getUpdateAt() { - return getUpdatedAt(); - } - - /** - * Set when the tracker was updated. - * - * @param updatedAt when the tracker was updated. - */ - public void setUpdateAt(final Date updatedAt) { - setUpdatedAt(updatedAt); - } - /** * Get the weight of the Tracker. * diff --git a/src/main/java/com/easypost/model/beta/CreditCard.java b/src/main/java/com/easypost/model/beta/CreditCard.java deleted file mode 100644 index 10b201de6..000000000 --- a/src/main/java/com/easypost/model/beta/CreditCard.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.easypost.model.beta; - -import com.easypost.model.BaseCreditCard; - -/** - * CreditCard is a model class that represents a credit card. - * - * @deprecated Use {@link com.easypost.model.PaymentMethodObject} instead. - */ -@Deprecated -public class CreditCard extends BaseCreditCard {} diff --git a/src/main/java/com/easypost/model/beta/EndShipper.java b/src/main/java/com/easypost/model/beta/EndShipper.java deleted file mode 100644 index 49f92d674..000000000 --- a/src/main/java/com/easypost/model/beta/EndShipper.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.easypost.model.beta; - -import com.easypost.EasyPost; -import com.easypost.exception.EasyPostException; -import com.easypost.model.BaseAddress; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @deprecated Use {@link com.easypost.model.EndShipper} instead. - */ -public final class EndShipper extends BaseAddress { - /** - * Create EndShipper object from parameter map. - * - * @param params Map of EndShipper parameters. - * @return EndShipper object. - * @throws EasyPostException when the request fails. - */ - public static EndShipper create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create EndShipper object from parameter map. - * - * @param params Map of EndShipper parameters. - * @param apiKey Optional API key to use for this request. - * @return EndShipper object. - * @throws EasyPostException when the request fails. - */ - public static EndShipper create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - - wrappedParams.put("address", params); - - return request(RequestMethod.POST, String.format("%s/%s", EasyPost.BETA_API_BASE, "end_shippers"), - wrappedParams, EndShipper.class, apiKey); - } - - /** - * Retrieve EndShipper object from API. - * - * @param id ID of EndShipper to retrieve. - * @return EndShipper object. - * @throws EasyPostException when the request fails. - */ - public static EndShipper retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve EndShipper object from API. - * - * @param id ID of EndShipper to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return EndShipper object. - * @throws EasyPostException when the request fails. - */ - public static EndShipper retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, String.format("%s/%s/%s", EasyPost.BETA_API_BASE, "end_shippers", id), null, - EndShipper.class, apiKey); - } - - /** - * List all EndShipper objects. - * - * @param params Map of parameters. - * @return List. - * @throws EasyPostException when the request fails. - */ - public static List all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * List all EndShipper objects. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return List. - * @throws EasyPostException when the request fails. - */ - public static List all(final Map params, final String apiKey) throws EasyPostException { - EndShipper[] response = - request(RequestMethod.GET, String.format("%s/%s", EasyPost.BETA_API_BASE, "end_shippers"), params, - EndShipper[].class, apiKey); - - return Arrays.asList(response); - } - - /** - * Update an EndShipper object. - * - * @param params Map of parameters. - * @return EndShipper object. - * @throws EasyPostException when the request fails. - */ - public EndShipper update(final Map params) throws EasyPostException { - return update(params, null); - } - - /** - * Update an EndShipper object. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return EndShipper object. - * @throws EasyPostException when the request fails. - */ - public EndShipper update(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - - wrappedParams.put("address", params); - - EndShipper response = request(RequestMethod.PUT, - String.format("%s/%s/%s", EasyPost.BETA_API_BASE, "end_shippers", this.getId()), wrappedParams, - EndShipper.class, apiKey); - - this.merge(this, response); - return this; - } -} diff --git a/src/main/java/com/easypost/model/beta/ReferralCustomer.java b/src/main/java/com/easypost/model/beta/ReferralCustomer.java deleted file mode 100644 index 56a87296e..000000000 --- a/src/main/java/com/easypost/model/beta/ReferralCustomer.java +++ /dev/null @@ -1,335 +0,0 @@ -package com.easypost.model.beta; - -import com.easypost.EasyPost; -import com.easypost.exception.EasyPostException; -import com.easypost.model.ApiKey; -import com.easypost.model.BaseUser; -import com.easypost.model.CreditCardPriority; -import com.easypost.model.PaymentMethod; -import com.easypost.model.PaymentMethodObject; -import com.easypost.model.Utilities; - -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @deprecated Use {@link com.easypost.model.ReferralCustomer} instead. - */ -public class ReferralCustomer extends BaseUser { - private List apiKeys; - - /** - * Get the api keys of the Referral user. - * - * @return the api keys of the Referral user. - */ - public List getApiKeys() { - return apiKeys; - } - - /** - * Set the api keys of the Referral user. - * - * @param apiKeys the api keys of the Referral user. - */ - public void setApiKeys(List apiKeys) { - this.apiKeys = apiKeys; - } - - /** - * Create a Referral object from parameter map. This function requires the Partner User's API key. - * - * @param params Map of the referral user parameters. - * @return Referral object. - * @throws EasyPostException when the request fails. - */ - public static ReferralCustomer create(Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a Referral object from parameter map. This function requires the Partner User's API key. - * - * @param params Map of the referral user parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Referral object. - * @throws EasyPostException when the request fails. - */ - public static ReferralCustomer create(Map params, String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap<>(); - wrappedParams.put("user", params); - - return request(RequestMethod.POST, String.format("%s/%s", EasyPost.BETA_API_BASE, "referral_customers"), - wrappedParams, ReferralCustomer.class, apiKey); - } - - /** - * Update a Referral object email. This function requires the Partner User's API key. - * - * @param email Email of the referral user to update. - * @param userId ID of the referral user to update. - * @return true if success. - * @throws EasyPostException when the request fails. - */ - public static boolean updateEmail(String email, String userId) throws EasyPostException { - return updateEmail(email, userId, null); - } - - /** - * Update a Referral object email. This function requires the Partner User's API key. - * - * @param email Email of the referral user to update. - * @param userId ID of the referral user to update. - * @param apiKey API key to use in request (overrides default API key). - * @return true if success. - * @throws EasyPostException when the request fails. - */ - public static boolean updateEmail(String email, String userId, String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap<>(); - Map params = new HashMap<>(); - params.put("email", email); - wrappedParams.put("user", params); - - request(RequestMethod.PUT, String.format("%s/%s/%s", EasyPost.BETA_API_BASE, "referral_customers", userId), - wrappedParams, ReferralCustomer.class, apiKey); - - return true; - } - - /** - * List all Referral objects. This function requires the Partner User's API key. - * - * @param params Map of parameters. - * @return List object. - * @throws EasyPostException when the request fails. - */ - public static ReferralCustomerCollection all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * List all Referral objects. This function requires the Partner User's API key. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return ReferralCustomerCollection object. - * @throws EasyPostException when the request fails. - */ - public static ReferralCustomerCollection all(final Map params, String apiKey) - throws EasyPostException { - return request(RequestMethod.GET, String.format("%s/%s", EasyPost.BETA_API_BASE, "referral_customers"), - params, ReferralCustomerCollection.class, apiKey); - } - - /** - * Add credit card to a referral user. This function requires the Referral User's API key. - * - * @param referralApiKey API key of the referral user. - * @param number Credit card number. - * @param expirationMonth Expiration month of the credit card. - * @param expirationYear Expiration year of the credit card. - * @param cvc CVC of the credit card. - * @return CreditCard object. - * @throws Exception when the request fails. - * @deprecated Use {@link #addCreditCardToUser(String, String, int, int, String)} instead. - */ - @Deprecated - public static CreditCard addCreditCard(String referralApiKey, String number, int expirationMonth, - int expirationYear, String cvc) throws Exception { - return addCreditCard(referralApiKey, number, expirationMonth, expirationYear, cvc, CreditCardPriority.PRIMARY); - } - - /** - * Add credit card to a referral user. This function requires the Referral User's API key. - * - * @param referralApiKey API key of the referral user. - * @param number Credit card number. - * @param expirationMonth Expiration month of the credit card. - * @param expirationYear Expiration year of the credit card. - * @param cvc CVC of the credit card. - * @return PaymentMethodObject object. - * @throws Exception when the request fails. - */ - public static PaymentMethodObject addCreditCardToUser(String referralApiKey, String number, int expirationMonth, - int expirationYear, String cvc) throws Exception { - return addCreditCardToUser(referralApiKey, number, expirationMonth, expirationYear, cvc, - PaymentMethod.Priority.PRIMARY); - } - - /** - * Add credit card to a referral user. This function requires the Referral User's API key. - * - * @param referralApiKey API key of the referral user. - * @param number Credit card number. - * @param expirationMonth Expiration month of the credit card. - * @param expirationYear Expiration year of the credit card. - * @param cvc CVC of the credit card. - * @param priority Priority of this credit card. - * @return CreditCard object. - * @throws Exception when the request fails. - * @deprecated Use {@link #addCreditCardToUser(String, String, int, int, String, PaymentMethod.Priority)} instead. - */ - public static CreditCard addCreditCard(String referralApiKey, String number, int expirationMonth, - int expirationYear, String cvc, CreditCardPriority priority) - throws Exception { - - // Convert a CreditCardPriority enum to a PaymentMethod.Priority enum - PaymentMethod.Priority priorityEnum = null; - switch (priority) { - case PRIMARY: - priorityEnum = PaymentMethod.Priority.PRIMARY; - break; - case SECONDARY: - priorityEnum = PaymentMethod.Priority.SECONDARY; - break; - default: - break; - } - - if (priorityEnum == null) { - throw new Exception("Invalid credit card priority."); - } - - PaymentMethodObject paymentMethodObject = - addCreditCardToUser(referralApiKey, number, expirationMonth, expirationYear, cvc, priorityEnum); - - // Convert the new PaymentMethodObject back into the deprecated CreditCard object - CreditCard creditCard = new CreditCard(); - creditCard.setId(paymentMethodObject.getId()); - creditCard.setObject(paymentMethodObject.getObject()); - creditCard.setCreatedAt(paymentMethodObject.getCreatedAt()); - creditCard.setUpdatedAt(paymentMethodObject.getUpdatedAt()); - creditCard.setBrand(paymentMethodObject.getBrand()); - creditCard.setLast4(paymentMethodObject.getLast4()); - creditCard.setFees(paymentMethodObject.getFees()); - creditCard.setName(paymentMethodObject.getName()); - - return creditCard; - } - - /** - * Add credit card to a referral user. This function requires the Referral User's API key. - * - * @param referralApiKey API key of the referral user. - * @param number Credit card number. - * @param expirationMonth Expiration month of the credit card. - * @param expirationYear Expiration year of the credit card. - * @param cvc CVC of the credit card. - * @param priority Priority of this credit card. - * @return PaymentMethodObject object. - * @throws Exception when the request fails. - */ - public static PaymentMethodObject addCreditCardToUser(String referralApiKey, String number, int expirationMonth, - int expirationYear, String cvc, - PaymentMethod.Priority priority) throws Exception { - String easypostStripeApiKey = retrieveEasypostStripeApiKey(); - String stripeToken; - - try { - stripeToken = createStripeToken(number, expirationMonth, expirationYear, cvc, easypostStripeApiKey); - } catch (Exception e) { - throw new Exception("Could not send card details to Stripe, please try again later", e); - } - - return createEasypostCreditCard(referralApiKey, stripeToken, priority.toString().toLowerCase()); - } - - /** - * Retrieve EasyPost Stripe API key. - * - * @return EasyPost Stripe API key. - * @throws EasyPostException when the request fails. - */ - private static String retrieveEasypostStripeApiKey() throws EasyPostException { - @SuppressWarnings ("unchecked") Map response = - request(RequestMethod.GET, String.format("%s/%s", EasyPost.BETA_API_BASE, "partners/stripe_public_key"), - null, Map.class, null); - - return response.getOrDefault("public_key", ""); - } - - /** - * Get credit card token from Stripe. - * - * @param number Credit card number. - * @param expirationMonth Expiration month of the credit card. - * @param expirationYear Expiration year of the credit card. - * @param cvc CVC of the credit card. - * @param easypostStripeApiKey EasyPost Stripe API key. - * @return Stripe token. - * @throws Exception when the request fails. - */ - private static String createStripeToken(String number, int expirationMonth, int expirationYear, String cvc, - String easypostStripeApiKey) throws Exception { - Map params = new HashMap<>(); - params.put("number", number); - params.put("exp_month", String.valueOf(expirationMonth)); - params.put("exp_year", String.valueOf(expirationYear)); - params.put("cvc", cvc); - - URL stripeUrl = new URL("https://api.stripe.com/v1/tokens"); - HttpURLConnection conn = (HttpURLConnection) stripeUrl.openConnection(); - conn.setRequestMethod("POST"); - conn.setRequestProperty("Authorization", String.format("%s %s", "Bearer", easypostStripeApiKey)); - conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - conn.setDoOutput(true); - - String encodedURL = Utilities.getEncodedURL(params, "card"); - byte[] postData = encodedURL.getBytes(StandardCharsets.UTF_8); - - try (DataOutputStream wr = new DataOutputStream(conn.getOutputStream())) { - wr.write(postData); - } - - StringBuilder response; - - try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) { - - String line; - response = new StringBuilder(); - - while ((line = br.readLine()) != null) { - response.append(line); - response.append(System.lineSeparator()); - } - br.close(); - } finally { - conn.disconnect(); - } - - String responseBody = response.toString(); - - @SuppressWarnings ("unchecked") Map responseMap = GSON.fromJson(responseBody, Map.class); - - return responseMap.get("id").toString(); - } - - /** - * Submit Stripe credit card token to EasyPost. - * - * @param referralApiKey API key of the referral user. - * @param stripeObjectId Stripe token. - * @param priority Credit card priority. - * @return CreditCard object. - * @throws EasyPostException when the request fails. - */ - private static PaymentMethodObject createEasypostCreditCard(String referralApiKey, String stripeObjectId, - String priority) throws EasyPostException { - Map params = new HashMap<>(); - params.put("stripe_object_id", stripeObjectId); - params.put("priority", priority); - - Map wrappedParams = new HashMap<>(); - wrappedParams.put("credit_card", params); - - return request(RequestMethod.POST, String.format("%s/%s", EasyPost.BETA_API_BASE, "credit_cards"), - wrappedParams, PaymentMethodObject.class, referralApiKey); - } -} diff --git a/src/main/java/com/easypost/model/beta/ReferralCustomerCollection.java b/src/main/java/com/easypost/model/beta/ReferralCustomerCollection.java deleted file mode 100644 index e15c62d6a..000000000 --- a/src/main/java/com/easypost/model/beta/ReferralCustomerCollection.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.easypost.model.beta; - -import com.easypost.net.EasyPostResource; - -import java.util.List; - -/** - * @deprecated Use {@link com.easypost.model.ReferralCustomerCollection} instead. - */ -public final class ReferralCustomerCollection extends EasyPostResource { - private List referralCustomers; - private boolean hasMore; - - /** - * Get a list of ReferralCustomers. - * - * @return List of ReferralCustomers objects - */ - public List getReferralCustomers() { - return referralCustomers; - } - - /** - * Set a list of ReferralCustomers. - * - * @param referralCustomers List of ReferralCustomers objects - */ - public void setReferralCustomers(final List referralCustomers) { - this.referralCustomers = referralCustomers; - } - - /** - * Get whether there are more ReferralCustomers to retrieve. - * - * @return whether there are more ReferralCustomers to retrieve - */ - public boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more ReferralCustomers to retrieve. - * - * @param hasMore Boolean whether there are more ReferralCustomers to retrieve - */ - public void setHasMore(final boolean hasMore) { - this.hasMore = hasMore; - } -} diff --git a/src/main/java/com/easypost/model/beta/package-info.java b/src/main/java/com/easypost/model/beta/package-info.java deleted file mode 100644 index 5e3884cde..000000000 --- a/src/main/java/com/easypost/model/beta/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Custom exception classes for the EasyPost API. - * - * @author EasyPost developers - * @version 1.0 - * @see EasyPost API documentation - * @since 1.0 - */ -package com.easypost.model.beta; diff --git a/src/test/cassettes/beta_referral/all.json b/src/test/cassettes/beta_referral/all.json deleted file mode 100644 index 2e0271b73..000000000 --- a/src/test/cassettes/beta_referral/all.json +++ /dev/null @@ -1,92 +0,0 @@ -[ - { - "recordedAt": 1663368477, - "request": { - "body": "", - "method": "GET", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ] - }, - "uri": "https://api.easypost.com/beta/referral_customers?page_size\u003d5" - }, - "response": { - "body": "{\n \"referral_customers\": [\n {\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2022-04-26T15:50:28Z\",\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0325\",\n \"recharge_threshold\": null,\n \"balance\": \"0.00000\",\n \"default_insurance_amount\": \"50.00\",\n \"children\": [],\n \"parent_id\": null,\n \"has_billing_method\": null,\n \"name\": \"Firstname Lastname\",\n \"insurance_fee_rate\": \"0.005\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_634b6daa05744bfaa205058f06864363\",\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"email@example.com\",\n \"object\": \"User\"\n },\n {\n \"recharge_amount\": \"100.00\",\n \"verified\": true,\n \"created_at\": \"2022-04-27T20:20:52Z\",\n \"secondary_recharge_amount\": \"100.00\",\n \"cc_fee_rate\": \"0.0325\",\n \"recharge_threshold\": \"0.00\",\n \"balance\": \"0.00000\",\n \"default_insurance_amount\": \"50.00\",\n \"children\": [],\n \"parent_id\": null,\n \"has_billing_method\": true,\n \"name\": \"Firstname Lastname\",\n \"insurance_fee_rate\": \"0.005\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_35cb81fb8af1454dabf1f6afa7330634\",\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"email@example.com\",\n \"object\": \"User\"\n },\n {\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2022-04-28T22:34:38Z\",\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0325\",\n \"recharge_threshold\": null,\n \"balance\": \"0.00000\",\n \"default_insurance_amount\": \"50.00\",\n \"children\": [],\n \"parent_id\": null,\n \"has_billing_method\": null,\n \"name\": \"test test\",\n \"insurance_fee_rate\": \"0.005\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_fa93cc16bcc24c078ee057ce82f38eed\",\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"email@example.com\",\n \"object\": \"User\"\n },\n {\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2022-04-29T19:35:33Z\",\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0325\",\n \"recharge_threshold\": null,\n \"balance\": \"0.00000\",\n \"default_insurance_amount\": \"50.00\",\n \"children\": [],\n \"parent_id\": null,\n \"has_billing_method\": null,\n \"name\": \"test test\",\n \"insurance_fee_rate\": \"0.005\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_4a22730cdc844ce1bc2efbed999c869f\",\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"test@test.com\",\n \"object\": \"User\"\n },\n {\n \"recharge_amount\": \"100.00\",\n \"verified\": true,\n \"created_at\": \"2022-05-02T18:48:22Z\",\n \"secondary_recharge_amount\": \"100.00\",\n \"cc_fee_rate\": \"0.0325\",\n \"recharge_threshold\": \"0.00\",\n \"balance\": \"0.00000\",\n \"default_insurance_amount\": \"50.00\",\n \"children\": [],\n \"parent_id\": null,\n \"has_billing_method\": true,\n \"name\": \"Firstname Lastname\",\n \"insurance_fee_rate\": \"0.005\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_488e391395f4416196a31965fecac409\",\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"email@example.com\",\n \"object\": \"User\"\n }\n ],\n \"has_more\": true\n}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 200 OK" - ], - "content-length": [ - "2573" - ], - "expires": [ - "0" - ], - "x-node": [ - "bigweb2nuq" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "x-backend": [ - "easypost" - ], - "x-permitted-cross-domain-policies": [ - "none" - ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" - ], - "pragma": [ - "no-cache" - ], - "x-content-type-options": [ - "nosniff" - ], - "x-xss-protection": [ - "1; mode\u003dblock" - ], - "x-ep-request-uuid": [ - "359b96fc6324fd1decc2a43e000a46b1" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.194346" - ], - "etag": [ - "W/\"279cdeec93979855fbae0e836593122e\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202209152244-6075a793a4-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "errors": null, - "uri": "https://api.easypost.com/beta/referral_customers?page_size\u003d5" - }, - "duration": 319 - } -] \ No newline at end of file diff --git a/src/test/cassettes/beta_referral/create.json b/src/test/cassettes/beta_referral/create.json deleted file mode 100644 index e9d7e4526..000000000 --- a/src/test/cassettes/beta_referral/create.json +++ /dev/null @@ -1,95 +0,0 @@ -[ - { - "recordedAt": 1663368479, - "request": { - "body": "{\n \"user\": {\n \"phone\": \"REDACTED\",\n \"name\": \"Test Referral\",\n \"email\": \"test@example.com\"\n }\n}", - "method": "POST", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ], - "Content-Type": [ - "application/json" - ] - }, - "uri": "https://api.easypost.com/beta/referral_customers" - }, - "response": { - "body": "{\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2022-09-16T22:47:58Z\",\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0375\",\n \"recharge_threshold\": null,\n \"balance\": \"0.00000\",\n \"default_insurance_amount\": \"50.00\",\n \"children\": [],\n \"parent_id\": null,\n \"has_billing_method\": null,\n \"name\": \"Test Referral\",\n \"insurance_fee_rate\": \"0.005\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_05a7d3b9326544259d86e94232dba4ab\",\n \"api_keys\": [],\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"referral_customer_de14244f43fb4015b15a56c2c1768964@donotemail.easypost.com\",\n \"object\": \"User\"\n}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 201 Created" - ], - "content-length": [ - "965" - ], - "expires": [ - "0" - ], - "x-node": [ - "bigweb8nuq" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "x-backend": [ - "easypost" - ], - "x-permitted-cross-domain-policies": [ - "none" - ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" - ], - "pragma": [ - "no-cache" - ], - "x-content-type-options": [ - "nosniff" - ], - "x-xss-protection": [ - "1; mode\u003dblock" - ], - "x-ep-request-uuid": [ - "359b96fc6324fd1eecb3c545000a46c0" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "1.043825" - ], - "etag": [ - "W/\"13fea18ba3f9973a6b09a8829e385995\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202209152244-6075a793a4-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/beta/referral_customers" - }, - "duration": 1180 - } -] \ No newline at end of file diff --git a/src/test/cassettes/beta_referral/update.json b/src/test/cassettes/beta_referral/update.json deleted file mode 100644 index 73421d608..000000000 --- a/src/test/cassettes/beta_referral/update.json +++ /dev/null @@ -1,188 +0,0 @@ -[ - { - "recordedAt": 1663368480, - "request": { - "body": "{\n \"user\": {\n \"phone\": \"REDACTED\",\n \"name\": \"Test Referral\",\n \"email\": \"test@example.com\"\n }\n}", - "method": "POST", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ], - "Content-Type": [ - "application/json" - ] - }, - "uri": "https://api.easypost.com/beta/referral_customers" - }, - "response": { - "body": "{\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2022-09-16T22:47:59Z\",\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0375\",\n \"recharge_threshold\": null,\n \"balance\": \"0.00000\",\n \"default_insurance_amount\": \"50.00\",\n \"children\": [],\n \"parent_id\": null,\n \"has_billing_method\": null,\n \"name\": \"Test Referral\",\n \"insurance_fee_rate\": \"0.005\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_fb7f3b815d774d52995409ed5b7cf9da\",\n \"api_keys\": [],\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"referral_customer_d247dd40060b4dfab95f5047b4dcce02@donotemail.easypost.com\",\n \"object\": \"User\"\n}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 201 Created" - ], - "content-length": [ - "965" - ], - "expires": [ - "0" - ], - "x-node": [ - "bigweb3nuq" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "x-backend": [ - "easypost" - ], - "x-permitted-cross-domain-policies": [ - "none" - ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" - ], - "pragma": [ - "no-cache" - ], - "x-content-type-options": [ - "nosniff" - ], - "x-xss-protection": [ - "1; mode\u003dblock" - ], - "x-ep-request-uuid": [ - "359b97016324fd1fecd672aa000a46f6" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "1.028179" - ], - "etag": [ - "W/\"853eb5cb7dfedb61ffd8d12883c03669\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202209152244-6075a793a4-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/beta/referral_customers" - }, - "duration": 1177 - }, - { - "recordedAt": 1663368481, - "request": { - "body": "{\n \"user\": {\n \"email\": \"email@example.com\"\n }\n}", - "method": "PUT", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ], - "Content-Type": [ - "application/json" - ] - }, - "uri": "https://api.easypost.com/beta/referral_customers/user_fb7f3b815d774d52995409ed5b7cf9da" - }, - "response": { - "body": "{\n \"message\": \"Referral Customer email updated successfully\"\n}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 200 OK" - ], - "content-length": [ - "59" - ], - "expires": [ - "0" - ], - "x-node": [ - "bigweb5nuq" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "x-backend": [ - "easypost" - ], - "x-permitted-cross-domain-policies": [ - "none" - ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" - ], - "pragma": [ - "no-cache" - ], - "x-content-type-options": [ - "nosniff" - ], - "x-xss-protection": [ - "1; mode\u003dblock" - ], - "x-ep-request-uuid": [ - "359b97006324fd20ec7f36aa000a472c" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.120319" - ], - "etag": [ - "W/\"7b30d603e3257aee787616dc99d6d4af\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202209152244-6075a793a4-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "errors": null, - "uri": "https://api.easypost.com/beta/referral_customers/user_fb7f3b815d774d52995409ed5b7cf9da" - }, - "duration": 252 - } -] \ No newline at end of file diff --git a/src/test/java/com/easypost/beta/ReferralTest.java b/src/test/java/com/easypost/beta/ReferralTest.java deleted file mode 100644 index 90ab46f35..000000000 --- a/src/test/java/com/easypost/beta/ReferralTest.java +++ /dev/null @@ -1,122 +0,0 @@ -package com.easypost.beta; - -import com.easypost.Fixtures; -import com.easypost.TestUtils; -import com.easypost.exception.EasyPostException; -import com.easypost.model.PaymentMethod; -import com.easypost.model.PaymentMethodObject; -import com.easypost.model.beta.ReferralCustomer; -import com.easypost.model.beta.ReferralCustomerCollection; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertInstanceOf; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public final class ReferralTest { - private static TestUtils.VCR vcr; - - /** - * Set up the testing environment for this file. - * - * @throws EasyPostException when the request fails. - */ - @BeforeAll - public static void setup() throws EasyPostException { - vcr = new TestUtils.VCR("beta_referral", TestUtils.ApiKey.PARTNER); - } - - private static String referralUserKey() { - return TestUtils.getApiKey(TestUtils.ApiKey.REFERRAL); - } - - /** - * Create a referral. - * - * @return Referral object - */ - private static ReferralCustomer createReferral() throws EasyPostException { - return ReferralCustomer.create(Fixtures.referralUser()); - } - - /** - * Test creating a Referral object. - * - * @throws EasyPostException when the request fails. - */ - @Test - public void testCreate() throws EasyPostException { - vcr.setUpTest("create"); - - ReferralCustomer referralUser = createReferral(); - - assertInstanceOf(ReferralCustomer.class, referralUser); - assertTrue(referralUser.getId().startsWith("user_")); - assertEquals("Test Referral", referralUser.getName()); - } - - /** - * Test updating a Referral object. - * - * @throws EasyPostException when the request fails. - */ - @Test - public void testUpdate() throws EasyPostException { - vcr.setUpTest("update"); - - ReferralCustomer referralUser = createReferral(); - boolean response = ReferralCustomer.updateEmail("email@example.com", referralUser.getId()); - - assertTrue(response); - } - - /** - * Test retrieving all Referral objects. - * - * @throws EasyPostException when the request fails. - */ - @Test - public void testAll() throws EasyPostException { - vcr.setUpTest("all"); - - Map params = new HashMap(); - params.put("page_size", Fixtures.pageSize()); - - ReferralCustomerCollection referralCustomerCollection = ReferralCustomer.all(params); - - List referralUsers = referralCustomerCollection.getReferralCustomers(); - - assertTrue(referralUsers.size() <= Fixtures.pageSize()); - assertNotNull(referralCustomerCollection.getHasMore()); - assertTrue(referralUsers.stream().allMatch(referral -> referral instanceof ReferralCustomer)); - } - - /** - * Test adding a credit card to a Referral user. - * - * @throws EasyPostException when the request fails. - */ - @Test - @Disabled // failing on replay likely because of urlencoding - public void testReferralAddCreditCard() throws Exception { - vcr.setUpTest("referral_add_credit_card"); - - Map creditCardDetails = Fixtures.creditCardDetails(); - PaymentMethodObject creditCard = - ReferralCustomer.addCreditCardToUser(referralUserKey(), (String) creditCardDetails.get("number"), - Integer.parseInt((String) creditCardDetails.get("expiration_month")), - Integer.parseInt((String) creditCardDetails.get("expiration_year")), - (String) creditCardDetails.get("cvc"), PaymentMethod.Priority.PRIMARY); - - assertInstanceOf(PaymentMethodObject.class, creditCard); - assertTrue(creditCard.getId().startsWith("card_")); - assertEquals(((String) Fixtures.creditCardDetails().get("number")).substring(12), creditCard.getLast4()); - } -} diff --git a/src/test/java/com/easypost/beta/package-info.java b/src/test/java/com/easypost/beta/package-info.java deleted file mode 100644 index 796682206..000000000 --- a/src/test/java/com/easypost/beta/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Unit tests for the EasyPost API Java client library. - * - * @author EasyPost developers - * @version 1.0 - * @see EasyPost API documentation - * @since 1.0 - */ -package com.easypost.beta; From 76d7286edcff5fd8587b915ee015acee5d47857e Mon Sep 17 00:00:00 2001 From: jchen293 Date: Sun, 2 Oct 2022 10:51:38 -0400 Subject: [PATCH 004/208] remove serviceCode from rate and rate deserializer (#188) --- CHANGELOG.md | 1 + src/main/java/com/easypost/model/Rate.java | 19 --- .../com/easypost/model/RateDeserializer.java | 147 ------------------ .../com/easypost/net/EasyPostResource.java | 3 - .../cassettes/batch/add_remove_shipment.json | 100 ++++++------ src/test/cassettes/pickup/buy.json | 69 ++++---- src/test/cassettes/pickup/cancel.json | 96 ++++++------ src/test/cassettes/pickup/create.json | 46 +++--- src/test/cassettes/pickup/lowest_rate.json | 46 +++--- src/test/cassettes/pickup/retrieve.json | 71 +++++---- src/test/cassettes/scan_form/create.json | 45 +++--- src/test/cassettes/scan_form/retrieve.json | 75 ++++----- src/test/cassettes/shipment/buy.json | 53 ++++--- .../buy_shipment_with_carbon_offset.json | 50 +++--- src/test/java/com/easypost/Fixtures.java | 2 +- 15 files changed, 342 insertions(+), 481 deletions(-) delete mode 100644 src/main/java/com/easypost/model/RateDeserializer.java diff --git a/CHANGELOG.md b/CHANGELOG.md index d77ee9d24..6ff5bfaa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Changes the type of Insurance `Amount` from Float to String - Removes `getUpdate` and `setUpdate` from Tracker class - Removes all beta features and corrsponding unit tests +- Remove `serviceCode` from `Rate` class since this value is internal use only ## v5.10.0 (2022-09-21) diff --git a/src/main/java/com/easypost/model/Rate.java b/src/main/java/com/easypost/model/Rate.java index df4e4148a..1eedb1351 100644 --- a/src/main/java/com/easypost/model/Rate.java +++ b/src/main/java/com/easypost/model/Rate.java @@ -7,7 +7,6 @@ public class Rate extends EasyPostResource { private String id; private String carrier; private String service; - private String serviceCode; private Float rate; private String currency; private Float listRate; @@ -329,24 +328,6 @@ public void setService(final String service) { this.service = service; } - /** - * Get the service code of this Rate. - * - * @return Service code of this Rate. - */ - public String getServiceCode() { - return serviceCode; - } - - /** - * Set the service code of this Rate. - * - * @param serviceCode Service code of this Rate. - */ - public void setServiceCode(final String serviceCode) { - this.serviceCode = serviceCode; - } - /** * Retrieve a Rate from the API. * diff --git a/src/main/java/com/easypost/model/RateDeserializer.java b/src/main/java/com/easypost/model/RateDeserializer.java deleted file mode 100644 index 10f47dce1..000000000 --- a/src/main/java/com/easypost/model/RateDeserializer.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.easypost.model; - -import com.easypost.net.EasyPostResource; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; - -import java.lang.reflect.Type; - -public final class RateDeserializer implements JsonDeserializer { - /** - * Deserialize a Rate from a JSON object. - * - * @param json JSON object. - * @param typeOfT Type of the object. - * @param context Deserialization context. - * @return Deserialized Rate object. - * @throws JsonParseException if the JSON object is not a valid Rate. - */ - @Override - public Rate deserialize(final JsonElement json, final Type typeOfT, final JsonDeserializationContext context) - throws JsonParseException { - JsonObject jo = (JsonObject) json; - - String currency; - JsonElement currencyJsonElement = jo.get("currency"); - if (currencyJsonElement == null || currencyJsonElement.isJsonNull()) { - currency = null; - } else { - currency = jo.get("currency").getAsString(); - } - - Float listRate; - JsonElement listRateJsonElement = jo.get("list_rate"); - if (listRateJsonElement == null || listRateJsonElement.isJsonNull()) { - listRate = null; - } else { - listRate = jo.get("list_rate").getAsFloat(); - } - - String listCurrency; - JsonElement listCurrencyJsonElement = jo.get("list_currency"); - if (listCurrencyJsonElement == null || listCurrencyJsonElement.isJsonNull()) { - listCurrency = null; - } else { - listCurrency = jo.get("list_currency").getAsString(); - } - - Float retailRate; - JsonElement retailRateJsonElement = jo.get("retail_rate"); - if (retailRateJsonElement == null || retailRateJsonElement.isJsonNull()) { - retailRate = null; - } else { - retailRate = jo.get("retail_rate").getAsFloat(); - } - - String retailCurrency; - JsonElement retailCurrencyJsonElement = jo.get("retail_currency"); - if (retailCurrencyJsonElement == null || retailCurrencyJsonElement.isJsonNull()) { - retailCurrency = null; - } else { - retailCurrency = jo.get("retail_currency").getAsString(); - } - - Number deliveryDays; - JsonElement deliveryDaysJsonElement = jo.get("delivery_days"); - if (deliveryDaysJsonElement == null || deliveryDaysJsonElement.isJsonNull()) { - deliveryDays = null; - } else { - deliveryDays = jo.get("delivery_days").getAsNumber(); - } - - String deliveryDate; - JsonElement deliveryDateJsonElement = jo.get("delivery_date"); - if (deliveryDateJsonElement == null || deliveryDateJsonElement.isJsonNull()) { - deliveryDate = null; - } else { - deliveryDate = jo.get("delivery_date").getAsString(); - } - - Boolean deliveryDateGuaranteed; - JsonElement deliveryDateGuaranteedJsonElement = jo.get("delivery_date_guaranteed"); - if (deliveryDateGuaranteedJsonElement == null || deliveryDateGuaranteedJsonElement.isJsonNull()) { - deliveryDateGuaranteed = false; - } else { - deliveryDateGuaranteed = jo.get("delivery_date_guaranteed").getAsBoolean(); - } - - Number estDeliveryDays; - JsonElement estDeliveryDaysJsonElement = jo.get("est_delivery_days"); - if (estDeliveryDaysJsonElement == null || estDeliveryDaysJsonElement.isJsonNull()) { - estDeliveryDays = null; - } else { - estDeliveryDays = jo.get("est_delivery_days").getAsNumber(); - } - - String shipmentID; - JsonElement shipmentIdJsonElement = jo.get("shipment_id"); - if (shipmentIdJsonElement == null || shipmentIdJsonElement.isJsonNull()) { - shipmentID = null; - } else { - shipmentID = jo.get("shipment_id").getAsString(); - } - - @SuppressWarnings ("unused") TimeInTransit timeInTransit; - JsonElement timeInTransitJsonElement = jo.get("time_in_transit"); - if (timeInTransitJsonElement == null || timeInTransitJsonElement.isJsonNull()) { - timeInTransit = null; - } else { - timeInTransit = EasyPostResource.GSON.fromJson(timeInTransitJsonElement, TimeInTransit.class); - } - - CarbonOffset carbonOffset; - JsonElement carbonOffsetJsonElement = jo.get("carbon_offset"); - if (carbonOffsetJsonElement == null || carbonOffsetJsonElement.isJsonNull()) { - carbonOffset = null; - } else { - carbonOffset = EasyPostResource.GSON.fromJson(carbonOffsetJsonElement, CarbonOffset.class); - } - - Rate rate = new Rate(); - rate.setId(jo.get("id").getAsString()); - String carrier = jo.get("carrier").getAsString(); - rate.setCarrier(carrier); - String service = jo.get("service").getAsString(); - rate.setService(service); - rate.setServiceCode(carrier.toLowerCase() + "." + service.toLowerCase()); - rate.setRate(jo.get("rate").getAsFloat()); - rate.setCurrency(currency); - rate.setListRate(listRate); - rate.setListCurrency(listCurrency); - rate.setRetailRate(retailRate); - rate.setRetailCurrency(retailCurrency); - rate.setDeliveryDays(deliveryDays); - rate.setDeliveryDate(deliveryDate); - rate.setDeliveryDateGuaranteed(deliveryDateGuaranteed); - rate.setEstDeliveryDays(estDeliveryDays); - rate.setShipmentId(shipmentID); - rate.setCarrierAccountId(jo.get("carrier_account_id").getAsString()); - rate.setCarbonOffset(carbonOffset); - rate.setBillingType(jo.get("billing_type").getAsString()); - - return rate; - } -} diff --git a/src/main/java/com/easypost/net/EasyPostResource.java b/src/main/java/com/easypost/net/EasyPostResource.java index f65e6d864..77011ef08 100644 --- a/src/main/java/com/easypost/net/EasyPostResource.java +++ b/src/main/java/com/easypost/net/EasyPostResource.java @@ -13,8 +13,6 @@ import com.easypost.model.Event; import com.easypost.model.EventDeserializer; import com.easypost.model.Fee; -import com.easypost.model.Rate; -import com.easypost.model.RateDeserializer; import com.easypost.model.Shipment; import com.easypost.model.SmartrateCollection; import com.easypost.model.SmartrateCollectionDeserializer; @@ -61,7 +59,6 @@ protected enum RequestMethod { new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) .registerTypeAdapter(HashMap.class, new HashMapSerializer()) .registerTypeAdapter(Event.class, new EventDeserializer()) - .registerTypeAdapter(Rate.class, new RateDeserializer()) .registerTypeAdapter(SmartrateCollection.class, new SmartrateCollectionDeserializer()).create(); public static final Gson PRETTY_PRINT_GSON = new GsonBuilder().setPrettyPrinting().serializeNulls() .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) diff --git a/src/test/cassettes/batch/add_remove_shipment.json b/src/test/cassettes/batch/add_remove_shipment.json index 8fd3a0061..6b21a5031 100644 --- a/src/test/cassettes/batch/add_remove_shipment.json +++ b/src/test/cassettes/batch/add_remove_shipment.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456470, + "recordedAt": 1664550614, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:41:09Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:10Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:10Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:10Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e1cfba107ae64f2d87e8d19a17170dfc\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:41:10Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"tracking_code\": \"9400100109361135003509\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzhiODZjNzQzNmU0NTRlY2I5YzdhNmUxNThlYjJmNjYy\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:10Z\",\n \"signed_by\": null,\n \"id\": \"trk_8b86c7436e454ecb9c7a6e158eb2f662\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:09+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_de46ce7d24ad11eda59aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:09+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_de46ce7d24ad11eda59aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:41:10Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/6d3846533a754b16a1b4904479cc990f.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:41:10Z\",\n \"id\": \"pl_4e18c0502c704466a941cd244e26ddb6\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:41:10Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:09Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:09Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_8313ef35c25b4162b5c16a776193a528\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:09+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_de4478b724ad11ed82afac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:09Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:09Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_fcae1b78a8254b89aaf7b50931525f96\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:41:09Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:09Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_140d4d48fe924ff8804ac92f3437ef2a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:41:09Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:09Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a39b7e24007c4db38755708cc43fb43f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:09Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:09Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e1cfba107ae64f2d87e8d19a17170dfc\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:09+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_de4478b724ad11ed82afac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003509\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:14Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1529ef7d406c4cdf9b047478aae6c4a8\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:10:14Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"tracking_code\": \"9400100109361140304943\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzY0NTk2YzRjYjAyYTQxZjdhYzE2ZTJjZmNkYWVhNjUx\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:10:14Z\",\n \"signed_by\": null,\n \"id\": \"trk_64596c4cb02a41f7ac16e2cfcdaea651\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fb99507f40d111edae50ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fb99507f40d111edae50ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/59e0cf6e7ba74c1ea39cdc81fbcdc27c.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"id\": \"pl_aa33f10cac61429f89aa36a88f157b09\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:10:13Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_1a04c3796a6148828ee05284dba762fc\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:10:13+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:10:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fb969c0440d111edae41ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7dd522d0082f4cf6b5ffa17586481068\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1529ef7d406c4cdf9b047478aae6c4a8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_a0cab5ac281841519f2bd2e770e1d743\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1f703fd83f20466ebd7a322f411f0cce\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:10:13+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:10:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fb969c0440d111edae41ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140304943\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,29 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d055f7a8fc9c00086817" + "a7b2a1f8633706d5e0ed1383000d9866" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb1nuq 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.125717" + "1.116657" ], "etag": [ - "W/\"07f8a0f62f8ffaa01b6c17a69f67a83f\"" + "W/\"822264f360a13effb5db64c9fcb84eb4\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_9486c62690b14875b499927e19a2b58b" + "/api/v2/shipments/shp_37ba360aeeb744ea91b82d73e84c3f22" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,10 +93,10 @@ "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1276 + "duration": 1498 }, { - "recordedAt": 1661456470, + "recordedAt": 1664550615, "request": { "body": "{}", "method": "POST", @@ -114,20 +114,20 @@ "uri": "https://api.easypost.com/v2/batches" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:10Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-08-25T19:41:10Z\",\n \"id\": \"batch_74dcf81c3113434b98c33530416f8e0d\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-09-30T15:10:15Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-09-30T15:10:15Z\",\n \"id\": \"batch_c2cc1cb8ae6d4a71b08a54687901ca3e\",\n \"state\": \"created\",\n \"object\": \"EasyPost::Entity::Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "383" + "401" ], "expires": [ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -147,6 +147,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -154,26 +157,26 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d056f7cc197f000868c6" + "91477ff5633706d7e0ed1385000ca020" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb2nuq 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.035073" + "0.030566" ], "etag": [ - "W/\"198a9818d00146a0ee9c740609875174\"" + "W/\"1c99ed822fa7f85708d45dcf10ab2299\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,12 +189,12 @@ "errors": null, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 169 + "duration": 306 }, { - "recordedAt": 1661456471, + "recordedAt": 1664550615, "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:09 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_8313ef35c25b4162b5c16a776193a528\",\n \"height\": 4.0,\n \"updatedAt\": \"Aug 25, 2022, 1:41:09 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"serviceCode\": \"usps.express\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"currency\": \"USD\",\n \"id\": \"rate_fcae1b78a8254b89aaf7b50931525f96\",\n \"retailRate\": 33.55\n },\n {\n \"serviceCode\": \"usps.parcelselect\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"currency\": \"USD\",\n \"id\": \"rate_140d4d48fe924ff8804ac92f3437ef2a\",\n \"retailRate\": 7.75\n },\n {\n \"serviceCode\": \"usps.priority\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"currency\": \"USD\",\n \"id\": \"rate_a39b7e24007c4db38755708cc43fb43f\",\n \"retailRate\": 9.45\n },\n {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"currency\": \"USD\",\n \"id\": \"rate_e1cfba107ae64f2d87e8d19a17170dfc\",\n \"retailRate\": 5.57\n }\n ],\n \"trackingCode\": \"9400100109361135003509\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:09 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_de4478b724ad11ed82afac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:09 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:09 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_de46ce7d24ad11eda59aac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:09 PM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"currency\": \"USD\",\n \"id\": \"rate_e1cfba107ae64f2d87e8d19a17170dfc\",\n \"retailRate\": 5.57\n },\n \"createdAt\": \"Aug 25, 2022, 1:41:09 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:09 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_de4478b724ad11ed82afac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:09 PM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361135003509\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:10 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzhiODZjNzQzNmU0NTRlY2I5YzdhNmUxNThlYjJmNjYy\",\n \"id\": \"trk_8b86c7436e454ecb9c7a6e158eb2f662\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:10 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:09 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_de46ce7d24ad11eda59aac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:09 PM\"\n },\n \"id\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:10 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_4e18c0502c704466a941cd244e26ddb6\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/6d3846533a754b16a1b4904479cc990f.png\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:10 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:10 PM\"\n }\n ]\n}", + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_1a04c3796a6148828ee05284dba762fc\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_7dd522d0082f4cf6b5ffa17586481068\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_1529ef7d406c4cdf9b047478aae6c4a8\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_a0cab5ac281841519f2bd2e770e1d743\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_1f703fd83f20466ebd7a322f411f0cce\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140304943\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fb969c0440d111edae41ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fb99507f40d111edae50ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_1529ef7d406c4cdf9b047478aae6c4a8\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fb969c0440d111edae41ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140304943\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:14 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzY0NTk2YzRjYjAyYTQxZjdhYzE2ZTJjZmNkYWVhNjUx\",\n \"id\": \"trk_64596c4cb02a41f7ac16e2cfcdaea651\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:14 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fb99507f40d111edae50ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_aa33f10cac61429f89aa36a88f157b09\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/59e0cf6e7ba74c1ea39cdc81fbcdc27c.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:14 AM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -204,10 +207,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_74dcf81c3113434b98c33530416f8e0d/add_shipments" + "uri": "https://api.easypost.com/v2/batches/batch_c2cc1cb8ae6d4a71b08a54687901ca3e/add_shipments" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:10Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"tracking_code\": \"9400100109361135003509\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-25T19:41:10Z\",\n \"id\": \"batch_74dcf81c3113434b98c33530416f8e0d\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-09-30T15:10:15Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"tracking_code\": \"9400100109361140304943\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-09-30T15:10:15Z\",\n \"id\": \"batch_c2cc1cb8ae6d4a71b08a54687901ca3e\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -220,7 +223,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -247,26 +250,26 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d057e68aa989000868e3" + "91477ff5633706d7e0ed1387000ca05a" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb2nuq 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.043716" + "0.041914" ], "etag": [ - "W/\"93a85d0d32bc621c1ae9601418cac9ce\"" + "W/\"fc530319a6f4de5f107612f9a8686a4d\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -277,14 +280,14 @@ "message": "OK" }, "errors": null, - "uri": "https://api.easypost.com/v2/batches/batch_74dcf81c3113434b98c33530416f8e0d/add_shipments" + "uri": "https://api.easypost.com/v2/batches/batch_c2cc1cb8ae6d4a71b08a54687901ca3e/add_shipments" }, - "duration": 185 + "duration": 309 }, { - "recordedAt": 1661456471, + "recordedAt": 1664550616, "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:09 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_8313ef35c25b4162b5c16a776193a528\",\n \"height\": 4.0,\n \"updatedAt\": \"Aug 25, 2022, 1:41:09 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"serviceCode\": \"usps.express\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"currency\": \"USD\",\n \"id\": \"rate_fcae1b78a8254b89aaf7b50931525f96\",\n \"retailRate\": 33.55\n },\n {\n \"serviceCode\": \"usps.parcelselect\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"currency\": \"USD\",\n \"id\": \"rate_140d4d48fe924ff8804ac92f3437ef2a\",\n \"retailRate\": 7.75\n },\n {\n \"serviceCode\": \"usps.priority\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"currency\": \"USD\",\n \"id\": \"rate_a39b7e24007c4db38755708cc43fb43f\",\n \"retailRate\": 9.45\n },\n {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"currency\": \"USD\",\n \"id\": \"rate_e1cfba107ae64f2d87e8d19a17170dfc\",\n \"retailRate\": 5.57\n }\n ],\n \"trackingCode\": \"9400100109361135003509\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:09 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_de4478b724ad11ed82afac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:09 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:09 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_de46ce7d24ad11eda59aac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:09 PM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"currency\": \"USD\",\n \"id\": \"rate_e1cfba107ae64f2d87e8d19a17170dfc\",\n \"retailRate\": 5.57\n },\n \"createdAt\": \"Aug 25, 2022, 1:41:09 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:09 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_de4478b724ad11ed82afac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:09 PM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361135003509\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:10 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzhiODZjNzQzNmU0NTRlY2I5YzdhNmUxNThlYjJmNjYy\",\n \"id\": \"trk_8b86c7436e454ecb9c7a6e158eb2f662\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:10 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:09 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_de46ce7d24ad11eda59aac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:09 PM\"\n },\n \"id\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:10 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_4e18c0502c704466a941cd244e26ddb6\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/6d3846533a754b16a1b4904479cc990f.png\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:10 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:10 PM\"\n }\n ]\n}", + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_1a04c3796a6148828ee05284dba762fc\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_7dd522d0082f4cf6b5ffa17586481068\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_1529ef7d406c4cdf9b047478aae6c4a8\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_a0cab5ac281841519f2bd2e770e1d743\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_1f703fd83f20466ebd7a322f411f0cce\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140304943\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fb969c0440d111edae41ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fb99507f40d111edae50ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_1529ef7d406c4cdf9b047478aae6c4a8\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fb969c0440d111edae41ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140304943\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:14 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzY0NTk2YzRjYjAyYTQxZjdhYzE2ZTJjZmNkYWVhNjUx\",\n \"id\": \"trk_64596c4cb02a41f7ac16e2cfcdaea651\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:14 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fb99507f40d111edae50ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_aa33f10cac61429f89aa36a88f157b09\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/59e0cf6e7ba74c1ea39cdc81fbcdc27c.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:14 AM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -297,10 +300,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_74dcf81c3113434b98c33530416f8e0d/remove_shipments" + "uri": "https://api.easypost.com/v2/batches/batch_c2cc1cb8ae6d4a71b08a54687901ca3e/remove_shipments" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:10Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-08-25T19:41:11Z\",\n \"id\": \"batch_74dcf81c3113434b98c33530416f8e0d\",\n \"state\": \"purchased\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-09-30T15:10:15Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-09-30T15:10:15Z\",\n \"id\": \"batch_c2cc1cb8ae6d4a71b08a54687901ca3e\",\n \"state\": \"purchased\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -313,7 +316,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -340,26 +343,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d057f7bb87d500086914" + "1d976c7e633706d8e0ed13a3000c2ca4" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.047725" + "0.040392" ], "etag": [ - "W/\"eabdd253095cf4fcbf90b7b9e5309c94\"" + "W/\"4b0b400fcfa741ea750b38b90ad159d6\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -370,8 +374,8 @@ "message": "OK" }, "errors": null, - "uri": "https://api.easypost.com/v2/batches/batch_74dcf81c3113434b98c33530416f8e0d/remove_shipments" + "uri": "https://api.easypost.com/v2/batches/batch_c2cc1cb8ae6d4a71b08a54687901ca3e/remove_shipments" }, - "duration": 185 + "duration": 273 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/buy.json b/src/test/cassettes/pickup/buy.json index 79ff8bcab..0df6faa51 100644 --- a/src/test/cassettes/pickup/buy.json +++ b/src/test/cassettes/pickup/buy.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456513, + "recordedAt": 1664550771, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:41:52Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:53Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:52Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:52Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_213b242ebc0340eb916834f44a6927d9\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:41:53Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"tracking_code\": \"9400100109361135003646\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Y0NmQ2ZDcwZTg1MTQ5Mzc5ZmY2NWUyN2I2NTRkMWMz\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:53Z\",\n \"signed_by\": null,\n \"id\": \"trk_f46d6d70e85149379ff65e27b654d1c3\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:52+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f7be0e7824ad11edb2f6ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:52+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f7be0e7824ad11edb2f6ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:41:52Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/25c569cf41d74fe690bdde3d5960224b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:41:53Z\",\n \"id\": \"pl_357b82b710cc4f018b28bcc8aa30d38d\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:41:52Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:52Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:52Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_2afeae8cabdf4118a7a36c9c546b7477\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:52+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f7bbc8d024ad11edb2f1ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:52Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:52Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_7b507517436a42a6b94ff8d393e20471\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:41:52Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:52Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_21565a9ad0b04eb087560a672e200716\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:41:52Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:52Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1cbffb569ab746d7a7e3de20eec090b3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:52Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:52Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_213b242ebc0340eb916834f44a6927d9\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:52+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f7bbc8d024ad11edb2f1ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003646\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:12:51Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:50Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f5a8255922b74364b0dd530e10314db0\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:12:51Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"tracking_code\": \"9400100109361140305674\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzA1ZTU5ZDJkNjlhMTQ2NjNiMjY4MDRlYzgyMDRjNzI2\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:12:51Z\",\n \"signed_by\": null,\n \"id\": \"trk_05e59d2d69a14663b26804ec8204c726\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:12:50+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5932a98840d211edaebdac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:12:50+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5932a98840d211edaebdac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/341ad6fffc574c358f7f4d9b53e0e9a0.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:12:51Z\",\n \"id\": \"pl_3546df1714f8468db29b62c59312835a\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:12:50Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:12:50Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c98c7021f22744ae9f4e41f997c3458b\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:12:50+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:12:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_592fe3d840d211edaeb0ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:50Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_289ff903be694bc5a3307dded10b685e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:50Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d8bdf55966d74cb1801b5b519b1cf141\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:50Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_16e8477fcf654114b23b1dbc4f07af7e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:50Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f5a8255922b74364b0dd530e10314db0\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:12:50+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:12:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_592fe3d840d211edaeb0ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305674\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,29 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d080f7de287700087df5" + "a7b2a1f963370772e0ed1ba3000dc92a" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.994030" + "1.215871" ], "etag": [ - "W/\"1819d1a2b8967d796a9c990311f30adc\"" + "W/\"d315b11401a6e05fe81aeb71152ae181\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_24f83f6b9be047ab9a51091a8a800cf5" + "/api/v2/shipments/shp_3ed642add5ef4dcaa2e1b2957f41820c" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +93,12 @@ "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1152 + "duration": 1479 }, { - "recordedAt": 1661456514, + "recordedAt": 1664550774, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-08-30\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:52 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_2afeae8cabdf4118a7a36c9c546b7477\",\n \"height\": 4.0,\n \"updatedAt\": \"Aug 25, 2022, 1:41:52 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"serviceCode\": \"usps.express\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"currency\": \"USD\",\n \"id\": \"rate_7b507517436a42a6b94ff8d393e20471\",\n \"retailRate\": 33.55\n },\n {\n \"serviceCode\": \"usps.parcelselect\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"currency\": \"USD\",\n \"id\": \"rate_21565a9ad0b04eb087560a672e200716\",\n \"retailRate\": 7.75\n },\n {\n \"serviceCode\": \"usps.priority\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"currency\": \"USD\",\n \"id\": \"rate_1cbffb569ab746d7a7e3de20eec090b3\",\n \"retailRate\": 9.45\n },\n {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"currency\": \"USD\",\n \"id\": \"rate_213b242ebc0340eb916834f44a6927d9\",\n \"retailRate\": 5.57\n }\n ],\n \"trackingCode\": \"9400100109361135003646\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:52 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f7bbc8d024ad11edb2f1ac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:52 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:52 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f7be0e7824ad11edb2f6ac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:52 PM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"currency\": \"USD\",\n \"id\": \"rate_213b242ebc0340eb916834f44a6927d9\",\n \"retailRate\": 5.57\n },\n \"createdAt\": \"Aug 25, 2022, 1:41:52 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:52 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f7bbc8d024ad11edb2f1ac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:52 PM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361135003646\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:53 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2Y0NmQ2ZDcwZTg1MTQ5Mzc5ZmY2NWUyN2I2NTRkMWMz\",\n \"id\": \"trk_f46d6d70e85149379ff65e27b654d1c3\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:53 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:52 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f7be0e7824ad11edb2f6ac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:52 PM\"\n },\n \"id\": \"shp_24f83f6b9be047ab9a51091a8a800cf5\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:52 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_357b82b710cc4f018b28bcc8aa30d38d\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/25c569cf41d74fe690bdde3d5960224b.png\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:53 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:53 PM\"\n },\n \"min_datetime\": \"2022-08-30\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-10-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_c98c7021f22744ae9f4e41f997c3458b\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"currency\": \"USD\",\n \"id\": \"rate_289ff903be694bc5a3307dded10b685e\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"currency\": \"USD\",\n \"id\": \"rate_d8bdf55966d74cb1801b5b519b1cf141\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"currency\": \"USD\",\n \"id\": \"rate_16e8477fcf654114b23b1dbc4f07af7e\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"currency\": \"USD\",\n \"id\": \"rate_f5a8255922b74364b0dd530e10314db0\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140305674\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_592fe3d840d211edaeb0ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5932a98840d211edaebdac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"currency\": \"USD\",\n \"id\": \"rate_f5a8255922b74364b0dd530e10314db0\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_592fe3d840d211edaeb0ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140305674\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:51 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzA1ZTU5ZDJkNjlhMTQ2NjNiMjY4MDRlYzgyMDRjNzI2\",\n \"id\": \"trk_05e59d2d69a14663b26804ec8204c726\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:51 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5932a98840d211edaebdac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n \"id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_3546df1714f8468db29b62c59312835a\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/341ad6fffc574c358f7f4d9b53e0e9a0.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:51 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:51 AM\"\n },\n \"min_datetime\": \"2022-10-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +114,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:41:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_f894373c24ad11eda2a7ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-08-30T00:00:00Z\",\n \"created_at\": \"2022-08-25T19:41:53Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:54Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-08-25T19:41:54Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_2fd5882b9593400b8f8485f323b7fdad\",\n \"pickup_id\": \"pickup_0fde304e4362472b989a53e6d6673669\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-08-30T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-08-25T19:41:53Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_0fde304e4362472b989a53e6d6673669\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:12:52+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5a59452240d211edb45cac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:12:52Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:12:53Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:12:53Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_99a756ea719241a8ae4d33473814777a\",\n \"pickup_id\": \"pickup_e79cb9a845b54efea48e76ec8172f4f0\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:12:52Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_e79cb9a845b54efea48e76ec8172f4f0\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +127,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,26 +154,26 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d081e68c350900087e8c" + "91477ff963370774e0ed1ba5000cda36" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb2nuq 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.188485" + "1.587463" ], "etag": [ - "W/\"d2582d2af90332ee52141eb515689c4b\"" + "W/\"d7bef093cfade35df51f3d20d1aa6b39\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,10 +186,10 @@ "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1358 + "duration": 1980 }, { - "recordedAt": 1661456516, + "recordedAt": 1664550776, "request": { "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"NextDay\"\n}", "method": "POST", @@ -204,10 +204,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_0fde304e4362472b989a53e6d6673669/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_e79cb9a845b54efea48e76ec8172f4f0/buy" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:41:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_f894373c24ad11eda2a7ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-08-30T00:00:00Z\",\n \"created_at\": \"2022-08-25T19:41:53Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:54Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-08-25T19:41:54Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_2fd5882b9593400b8f8485f323b7fdad\",\n \"pickup_id\": \"pickup_0fde304e4362472b989a53e6d6673669\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62075046\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-08-30T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-08-25T19:41:56Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_0fde304e4362472b989a53e6d6673669\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:12:52+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5a59452240d211edb45cac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:12:52Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:12:53Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:12:53Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_99a756ea719241a8ae4d33473814777a\",\n \"pickup_id\": \"pickup_e79cb9a845b54efea48e76ec8172f4f0\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62247092\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_e79cb9a845b54efea48e76ec8172f4f0\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", "httpVersion": null, "headers": { "null": [ @@ -220,7 +220,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -247,26 +247,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d083f7b74b9400087f57" + "1d976c8063370776e0ed1ba7000c5bef" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.954640" + "1.575552" ], "etag": [ - "W/\"db9d681fd691afbdaefc30ae17107838\"" + "W/\"912d184d68c6bb406341474f30350bc0\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -277,8 +278,8 @@ "message": "OK" }, "errors": null, - "uri": "https://api.easypost.com/v2/pickups/pickup_0fde304e4362472b989a53e6d6673669/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_e79cb9a845b54efea48e76ec8172f4f0/buy" }, - "duration": 1147 + "duration": 1810 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/cancel.json b/src/test/cassettes/pickup/cancel.json index 732413122..71a14f536 100644 --- a/src/test/cassettes/pickup/cancel.json +++ b/src/test/cassettes/pickup/cancel.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456522, + "recordedAt": 1664550783, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:42:01Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:02Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:02Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:02Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_de6c5c1882a944d2aaa90c6cb51450b9\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:42:02Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"tracking_code\": \"9400100109361135003677\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2U1NjA0ZmY2NTY5ZjRhZWI5ZjI5ZDBlMGMzOWI3OGU4\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:02Z\",\n \"signed_by\": null,\n \"id\": \"trk_e5604ff6569f4aeb9f29d0e0c39b78e8\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:01+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fd5e4b9024ad11edac94ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:01+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fd5e4b9024ad11edac94ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:42:02Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/dbd6ae9c6bb84cb382571a58f49b77aa.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:42:02Z\",\n \"id\": \"pl_4c499e611e57476e925f0c4d8e592035\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:42:02Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:42:01Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:42:01Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_633357cb16514c15bd87d64a3136ef7c\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:42:01+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:42:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fd5c77b724ad11edac8fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:42:01Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:01Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_535d52d091e54b8c80ae4724ec58703f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:42:01Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:01Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5aeba294b7b1405294ed87c0c113b0c0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:01Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:01Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_de6c5c1882a944d2aaa90c6cb51450b9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:42:01Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:01Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a9b24c4cb2414318a85bd5c1ec8a792d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:42:01+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:42:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fd5c77b724ad11edac8fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003677\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:13:03Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:02Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9c99a80b1008427eb01da9eb51a22992\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:13:03Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"tracking_code\": \"9400100109361140305766\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2E4ZDU4MDAxYTUxZjRmMTE5MWNlZmJlNjE4Y2VkYjdm\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:03Z\",\n \"signed_by\": null,\n \"id\": \"trk_a8d58001a51f4f1191cefbe618cedb7f\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:13:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_606c3f3640d211ed84ddac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:13:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_606c3f3640d211ed84ddac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/963c4955bf06496d88cebc5fea901087.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:13:03Z\",\n \"id\": \"pl_a379c7e61b954dbeaad61b99be5ff271\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:13:02Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:13:02Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_03020cd49e3441b9b2214d5e9f644735\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:13:02+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:13:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6069c5e240d211edbc4aac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:02Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c2ed0250ff5d4fd7b6193094c1db285e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:02Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9c99a80b1008427eb01da9eb51a22992\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:02Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b499be0272a848de99aa7455c1b07a52\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:02Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9756c95816de4bc481101291614a0a78\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:13:02+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:13:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6069c5e240d211edbc4aac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305766\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d089f7c9e314000881a3" + "1d976c7d6337077ee0ed1be1000c5e1f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.013174" + "1.104355" ], "etag": [ - "W/\"1336185f2b8f17a52645d3e11fbea4af\"" + "W/\"ef013805faf7dbb23697d1c0375d5235\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_60e2aa0066f84451b44e1be3b2b4ee76" + "/api/v2/shipments/shp_e1c00daef06747d089cae9450fc1791f" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +94,12 @@ "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1230 + "duration": 1348 }, { - "recordedAt": 1661456524, + "recordedAt": 1664550784, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-08-30\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Aug 25, 2022, 1:42:01 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_633357cb16514c15bd87d64a3136ef7c\",\n \"height\": 4.0,\n \"updatedAt\": \"Aug 25, 2022, 1:42:01 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"serviceCode\": \"usps.express\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"currency\": \"USD\",\n \"id\": \"rate_535d52d091e54b8c80ae4724ec58703f\",\n \"retailRate\": 33.55\n },\n {\n \"serviceCode\": \"usps.parcelselect\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"currency\": \"USD\",\n \"id\": \"rate_5aeba294b7b1405294ed87c0c113b0c0\",\n \"retailRate\": 7.75\n },\n {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"currency\": \"USD\",\n \"id\": \"rate_de6c5c1882a944d2aaa90c6cb51450b9\",\n \"retailRate\": 5.57\n },\n {\n \"serviceCode\": \"usps.priority\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"currency\": \"USD\",\n \"id\": \"rate_a9b24c4cb2414318a85bd5c1ec8a792d\",\n \"retailRate\": 9.45\n }\n ],\n \"trackingCode\": \"9400100109361135003677\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:42:01 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fd5c77b724ad11edac8fac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:01 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:42:01 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fd5e4b9024ad11edac94ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:01 PM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"currency\": \"USD\",\n \"id\": \"rate_de6c5c1882a944d2aaa90c6cb51450b9\",\n \"retailRate\": 5.57\n },\n \"createdAt\": \"Aug 25, 2022, 1:42:01 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:42:01 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fd5c77b724ad11edac8fac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:01 PM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361135003677\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:42:02 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2U1NjA0ZmY2NTY5ZjRhZWI5ZjI5ZDBlMGMzOWI3OGU4\",\n \"id\": \"trk_e5604ff6569f4aeb9f29d0e0c39b78e8\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:02 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:42:01 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fd5e4b9024ad11edac94ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:01 PM\"\n },\n \"id\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 25, 2022, 1:42:02 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_4c499e611e57476e925f0c4d8e592035\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/dbd6ae9c6bb84cb382571a58f49b77aa.png\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:02 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:02 PM\"\n },\n \"min_datetime\": \"2022-08-30\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-10-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_03020cd49e3441b9b2214d5e9f644735\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"currency\": \"USD\",\n \"id\": \"rate_c2ed0250ff5d4fd7b6193094c1db285e\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"currency\": \"USD\",\n \"id\": \"rate_9c99a80b1008427eb01da9eb51a22992\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"currency\": \"USD\",\n \"id\": \"rate_b499be0272a848de99aa7455c1b07a52\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"currency\": \"USD\",\n \"id\": \"rate_9756c95816de4bc481101291614a0a78\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140305766\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6069c5e240d211edbc4aac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_606c3f3640d211ed84ddac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"currency\": \"USD\",\n \"id\": \"rate_9c99a80b1008427eb01da9eb51a22992\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6069c5e240d211edbc4aac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140305766\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:03 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2E4ZDU4MDAxYTUxZjRmMTE5MWNlZmJlNjE4Y2VkYjdm\",\n \"id\": \"trk_a8d58001a51f4f1191cefbe618cedb7f\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:03 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_606c3f3640d211ed84ddac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n \"id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_a379c7e61b954dbeaad61b99be5ff271\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/963c4955bf06496d88cebc5fea901087.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:03 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:03 AM\"\n },\n \"min_datetime\": \"2022-10-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +115,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_fe340fd424ad11ed8015ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-08-30T00:00:00Z\",\n \"created_at\": \"2022-08-25T19:42:03Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:03Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-08-25T19:42:03Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_1c205583d5c1462f859e5c7f7d1554f9\",\n \"pickup_id\": \"pickup_7f5d8e050c61480b9591d55a23a6b5b1\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-08-30T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-08-25T19:42:03Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_7f5d8e050c61480b9591d55a23a6b5b1\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:13:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_614a459b40d211ed87d8ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:13:03Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:04Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:13:04Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_24b8ebb50f4d443e948c522d96cf3f9f\",\n \"pickup_id\": \"pickup_98a3c607a8644072987e27b9d4e3f9c7\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:13:03Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_98a3c607a8644072987e27b9d4e3f9c7\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +128,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,26 +155,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d08bf7b8ce1000088230" + "1d976c806337077fe0ed1be3000c5eae" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.924478" + "0.740523" ], "etag": [ - "W/\"c8ed5c84247e695005c537767bb665f8\"" + "W/\"f8b50456e0a3d1cbc5efbf696ecb4d9c\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,10 +188,10 @@ "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1156 + "duration": 1025 }, { - "recordedAt": 1661456525, + "recordedAt": 1664550786, "request": { "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"NextDay\"\n}", "method": "POST", @@ -204,10 +206,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_7f5d8e050c61480b9591d55a23a6b5b1/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_98a3c607a8644072987e27b9d4e3f9c7/buy" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_fe340fd424ad11ed8015ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-08-30T00:00:00Z\",\n \"created_at\": \"2022-08-25T19:42:03Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:03Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-08-25T19:42:03Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_1c205583d5c1462f859e5c7f7d1554f9\",\n \"pickup_id\": \"pickup_7f5d8e050c61480b9591d55a23a6b5b1\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62075028\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-08-30T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-08-25T19:42:05Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_7f5d8e050c61480b9591d55a23a6b5b1\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:13:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_614a459b40d211ed87d8ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:13:03Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:04Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:13:04Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_24b8ebb50f4d443e948c522d96cf3f9f\",\n \"pickup_id\": \"pickup_98a3c607a8644072987e27b9d4e3f9c7\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62247052\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:13:05Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_98a3c607a8644072987e27b9d4e3f9c7\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", "httpVersion": null, "headers": { "null": [ @@ -220,7 +222,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -247,26 +249,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d08ce6899067000882d0" + "1d976c7c63370780e0ed1be5000c5f03" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.047195" + "1.154236" ], "etag": [ - "W/\"0d2b85a2333fd9026f45cce2a6c83a36\"" + "W/\"d022ff8995d1eb0122bf91f4e08da0f6\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -277,12 +280,12 @@ "message": "OK" }, "errors": null, - "uri": "https://api.easypost.com/v2/pickups/pickup_7f5d8e050c61480b9591d55a23a6b5b1/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_98a3c607a8644072987e27b9d4e3f9c7/buy" }, - "duration": 1187 + "duration": 1433 }, { - "recordedAt": 1661456526, + "recordedAt": 1664550787, "request": { "body": "", "method": "POST", @@ -294,10 +297,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_7f5d8e050c61480b9591d55a23a6b5b1/cancel" + "uri": "https://api.easypost.com/v2/pickups/pickup_98a3c607a8644072987e27b9d4e3f9c7/cancel" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_fe340fd424ad11ed8015ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-08-30T00:00:00Z\",\n \"created_at\": \"2022-08-25T19:42:03Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:03Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-08-25T19:42:03Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_1c205583d5c1462f859e5c7f7d1554f9\",\n \"pickup_id\": \"pickup_7f5d8e050c61480b9591d55a23a6b5b1\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62075028\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-08-30T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-08-25T19:42:06Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_7f5d8e050c61480b9591d55a23a6b5b1\",\n \"object\": \"Pickup\",\n \"status\": \"canceled\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:13:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_614a459b40d211ed87d8ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:13:03Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:04Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:13:04Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_24b8ebb50f4d443e948c522d96cf3f9f\",\n \"pickup_id\": \"pickup_98a3c607a8644072987e27b9d4e3f9c7\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62247052\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:13:07Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_98a3c607a8644072987e27b9d4e3f9c7\",\n \"object\": \"Pickup\",\n \"status\": \"canceled\"\n}", "httpVersion": null, "headers": { "null": [ @@ -310,7 +313,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -337,26 +340,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d08df7db666f00088360" + "1d976c7c63370782e0ed1be6000c5f74" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.874094" + "1.235491" ], "etag": [ - "W/\"f40fcaf9459d65fb7dc161945729400e\"" + "W/\"d10050751f091667401955305589be5b\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -367,8 +371,8 @@ "message": "OK" }, "errors": null, - "uri": "https://api.easypost.com/v2/pickups/pickup_7f5d8e050c61480b9591d55a23a6b5b1/cancel" + "uri": "https://api.easypost.com/v2/pickups/pickup_98a3c607a8644072987e27b9d4e3f9c7/cancel" }, - "duration": 1000 + "duration": 1508 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/create.json b/src/test/cassettes/pickup/create.json index 6e95ee587..f4f16544b 100644 --- a/src/test/cassettes/pickup/create.json +++ b/src/test/cassettes/pickup/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456528, + "recordedAt": 1664550831, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:42:06Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:08Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:07Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0d19382a154145e583fa6fde9acbe390\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:42:08Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"tracking_code\": \"9400100109361135003684\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzJiN2JlZGI5NzY2NTRjZmJhNTA0OTdkOTNjN2UyMTMz\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:08Z\",\n \"signed_by\": null,\n \"id\": \"trk_2b7bedb976654cfba50497d93c7e2133\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:06+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:06+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_006ea38d24ae11edb2fbac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:06+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:06+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_006ea38d24ae11edb2fbac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:42:07Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/d4f7a2022e4343ddafff53c0f54176b1.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:42:07Z\",\n \"id\": \"pl_c33d290eef8c48b18853445aac00decf\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:42:07Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:42:06Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:42:06Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_236e0d92cb0545859814523117924533\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:42:06+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:42:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_006d307224ae11edb2faac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:42:07Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:07Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fd7056043e9640d898d3a29a47b90175\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:42:07Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:07Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5eabc5e6de3946bdbbf720e275c3e53e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:07Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0d19382a154145e583fa6fde9acbe390\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:42:07Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:07Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_46c501f5759c42709b248fc73dac9c31\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:42:06+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:42:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_006d307224ae11edb2faac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003684\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:13:49Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:13:50Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:13:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:50Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5e92d7c17781430c965b9c35a1b1e099\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:13:50Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"tracking_code\": \"9400100109361140306367\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2ZhMTFlYzk2MDc1NjRkZDk4ZmU5MTQ1MjAwMGRkMjg3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:50Z\",\n \"signed_by\": null,\n \"id\": \"trk_fa11ec9607564dd98fe91452000dd287\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:13:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7caf759e40d211ed909fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:13:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7caf759e40d211ed909fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:13:50Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/ebf70c9cdf9941dab27d67b095753ac5.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:13:50Z\",\n \"id\": \"pl_817c0b6f0d154f2e81c3377c848230a1\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:13:50Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:13:49Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:13:49Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_6b6a326b0a69453fb47078449cb9bdc3\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:13:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:13:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7cacd8ef40d211eda8f5ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:13:49Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:49Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5e92d7c17781430c965b9c35a1b1e099\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:13:49Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:49Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_7432292813c84892ad85e81157490b8e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:13:49Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:49Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_86224f85d5bc4f29aee04451a1125851\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:13:49Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:49Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_14f6aea97cbf4e42ae0eedab237a7720\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:13:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:13:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7cacd8ef40d211eda8f5ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140306367\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d08ee68c3908000883fd" + "1d976c80633707ade0ed1c4b000c6c39" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.415517" + "1.220087" ], "etag": [ - "W/\"e881b9cd509eed4d1b1c034107565401\"" + "W/\"250297504052df66c5e2a1a6016db043\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_7bfca42f81524e1cacc2ef16747b63b7" + "/api/v2/shipments/shp_3c537afced374b6190f575e7d68c6802" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +94,12 @@ "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1614 + "duration": 1565 }, { - "recordedAt": 1661456529, + "recordedAt": 1664550832, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-08-30\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Aug 25, 2022, 1:42:06 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_236e0d92cb0545859814523117924533\",\n \"height\": 4.0,\n \"updatedAt\": \"Aug 25, 2022, 1:42:06 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"serviceCode\": \"usps.parcelselect\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"currency\": \"USD\",\n \"id\": \"rate_fd7056043e9640d898d3a29a47b90175\",\n \"retailRate\": 7.75\n },\n {\n \"serviceCode\": \"usps.priority\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"currency\": \"USD\",\n \"id\": \"rate_5eabc5e6de3946bdbbf720e275c3e53e\",\n \"retailRate\": 9.45\n },\n {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"currency\": \"USD\",\n \"id\": \"rate_0d19382a154145e583fa6fde9acbe390\",\n \"retailRate\": 5.57\n },\n {\n \"serviceCode\": \"usps.express\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"currency\": \"USD\",\n \"id\": \"rate_46c501f5759c42709b248fc73dac9c31\",\n \"retailRate\": 33.55\n }\n ],\n \"trackingCode\": \"9400100109361135003684\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:42:06 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_006d307224ae11edb2faac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:07 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:42:06 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_006ea38d24ae11edb2fbac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:06 PM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"currency\": \"USD\",\n \"id\": \"rate_0d19382a154145e583fa6fde9acbe390\",\n \"retailRate\": 5.57\n },\n \"createdAt\": \"Aug 25, 2022, 1:42:06 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:42:06 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_006d307224ae11edb2faac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:07 PM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361135003684\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:42:08 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzJiN2JlZGI5NzY2NTRjZmJhNTA0OTdkOTNjN2UyMTMz\",\n \"id\": \"trk_2b7bedb976654cfba50497d93c7e2133\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:08 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:42:06 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_006ea38d24ae11edb2fbac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:06 PM\"\n },\n \"id\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 25, 2022, 1:42:07 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_c33d290eef8c48b18853445aac00decf\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/d4f7a2022e4343ddafff53c0f54176b1.png\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:07 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:08 PM\"\n },\n \"min_datetime\": \"2022-08-30\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-10-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_6b6a326b0a69453fb47078449cb9bdc3\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"currency\": \"USD\",\n \"id\": \"rate_5e92d7c17781430c965b9c35a1b1e099\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"currency\": \"USD\",\n \"id\": \"rate_7432292813c84892ad85e81157490b8e\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"currency\": \"USD\",\n \"id\": \"rate_86224f85d5bc4f29aee04451a1125851\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"currency\": \"USD\",\n \"id\": \"rate_14f6aea97cbf4e42ae0eedab237a7720\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140306367\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7cacd8ef40d211eda8f5ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:50 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7caf759e40d211ed909fac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:50 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"currency\": \"USD\",\n \"id\": \"rate_5e92d7c17781430c965b9c35a1b1e099\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:13:50 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7cacd8ef40d211eda8f5ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:50 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140306367\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:50 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2ZhMTFlYzk2MDc1NjRkZDk4ZmU5MTQ1MjAwMGRkMjg3\",\n \"id\": \"trk_fa11ec9607564dd98fe91452000dd287\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:50 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7caf759e40d211ed909fac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n },\n \"id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:13:50 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_817c0b6f0d154f2e81c3377c848230a1\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/ebf70c9cdf9941dab27d67b095753ac5.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:50 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:50 AM\"\n },\n \"min_datetime\": \"2022-10-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +115,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:09+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_01b68c8624ae11ed876aac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-08-30T00:00:00Z\",\n \"created_at\": \"2022-08-25T19:42:09Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:09Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-08-25T19:42:09Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_eda50aa2b7e14d4a9690ab616b1a3b19\",\n \"pickup_id\": \"pickup_e5e78a32772246e7808ec9d58095a793\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-08-30T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-08-25T19:42:09Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_e5e78a32772246e7808ec9d58095a793\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:13:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7db704aa40d211ed95d2ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:13:51Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:52Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:13:52Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_c4a5b4235d224244a8fd15e2b13e23c6\",\n \"pickup_id\": \"pickup_8534f344186e40bbb9551bdbc4ed7105\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:13:51Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_8534f344186e40bbb9551bdbc4ed7105\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +128,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,26 +155,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d090f7ecfb4f000884f6" + "1d976c7a633707afe0ed1c64000c6cb8" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.113049" + "0.883800" ], "etag": [ - "W/\"2a9741950478159265984698bcbde49b\"" + "W/\"9637b6ea81bd0e2e68e59f60527a4ee5\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,6 +188,6 @@ "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1295 + "duration": 1116 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/lowest_rate.json b/src/test/cassettes/pickup/lowest_rate.json index 35904ae5b..31290d313 100644 --- a/src/test/cassettes/pickup/lowest_rate.json +++ b/src/test/cassettes/pickup/lowest_rate.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456520, + "recordedAt": 1664550780, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:41:59Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:00Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:59Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:59Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_de9d9a5f4e694ceda1003e28274b0934\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:42:00Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"tracking_code\": \"9400100109361135003660\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzc4OTBlYmM5MGM4NzQ3NTdiMDY3OGI0ZTM4YzU2ZmM5\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:00Z\",\n \"signed_by\": null,\n \"id\": \"trk_7890ebc90c874757b0678b4e38c56fc9\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:59+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fbe841e024ad11ed8bc9ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:59+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fbe841e024ad11ed8bc9ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:41:59Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/6e5867a76783417cba9d4e2634ffab8d.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:42:00Z\",\n \"id\": \"pl_865d689ca9f045b986f57ee082b87617\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:41:59Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:59Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:59Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_86baa6508a8644a9a951e241d7cb2703\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:59+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fbe681c424ad11ed8bc6ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:59Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:59Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_9ef9c7a9dd2943ab91ead5c02b9e84e2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:41:59Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:59Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_20a91bbd48a84021a7db6ad5c370dcef\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:59Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:59Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_de9d9a5f4e694ceda1003e28274b0934\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:41:59Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:59Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0e1a955fbe064353aa7d7b80af2316f0\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:59+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fbe681c424ad11ed8bc6ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003660\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:12:59Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:13:00Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:13:00Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:00Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c942f09034da4ba195e121c19e062f28\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:13:00Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"tracking_code\": \"9400100109361140305759\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzk0MDUyOTI4MGI0NzRkMzFiZDFiZTg4ZTFjNzU4MTY4\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:00Z\",\n \"signed_by\": null,\n \"id\": \"trk_940529280b474d31bd1be88e1c758168\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:12:59+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ed808b940d211ed9bcfac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:12:59+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ed808b940d211ed9bcfac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:13:00Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/5fb0a9bd9ade4b76b95dd75ea68af81a.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:13:00Z\",\n \"id\": \"pl_f1e52a4cb42847ddbe259728a93e5e01\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:13:00Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:12:59Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:12:59Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_6603b3e280fa48e9aef7b04bd2ccfa71\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:12:59+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:12:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ed550e140d211edbfc5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:12:59Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:59Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c942f09034da4ba195e121c19e062f28\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:12:59Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:59Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_98d9c51441b542f38e09840fb30c2265\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:12:59Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:59Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_85f50afa07e740fdb96da2377b087e54\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:12:59Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:59Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cb24686e543049e792dd0a4bce35a237\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:12:59+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:12:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ed550e140d211edbfc5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305759\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d087f7a646f3000880af" + "1d976c7c6337077be0ed1bc5000c5d69" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.074053" + "1.092995" ], "etag": [ - "W/\"f68479d972d3b029cd2a5420f5802975\"" + "W/\"1dbc362fcf9d12e152a4b6afa11af00c\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_2986d2a65f3b4ae6a64979187e182a37" + "/api/v2/shipments/shp_58f32c27b59c4d9fa060d465587069b1" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +94,12 @@ "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1208 + "duration": 1337 }, { - "recordedAt": 1661456521, + "recordedAt": 1664550781, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-08-30\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:59 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_86baa6508a8644a9a951e241d7cb2703\",\n \"height\": 4.0,\n \"updatedAt\": \"Aug 25, 2022, 1:41:59 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"serviceCode\": \"usps.express\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"currency\": \"USD\",\n \"id\": \"rate_9ef9c7a9dd2943ab91ead5c02b9e84e2\",\n \"retailRate\": 33.55\n },\n {\n \"serviceCode\": \"usps.priority\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"currency\": \"USD\",\n \"id\": \"rate_20a91bbd48a84021a7db6ad5c370dcef\",\n \"retailRate\": 9.45\n },\n {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"currency\": \"USD\",\n \"id\": \"rate_de9d9a5f4e694ceda1003e28274b0934\",\n \"retailRate\": 5.57\n },\n {\n \"serviceCode\": \"usps.parcelselect\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"currency\": \"USD\",\n \"id\": \"rate_0e1a955fbe064353aa7d7b80af2316f0\",\n \"retailRate\": 7.75\n }\n ],\n \"trackingCode\": \"9400100109361135003660\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:59 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fbe681c424ad11ed8bc6ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:59 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:59 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fbe841e024ad11ed8bc9ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:59 PM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"currency\": \"USD\",\n \"id\": \"rate_de9d9a5f4e694ceda1003e28274b0934\",\n \"retailRate\": 5.57\n },\n \"createdAt\": \"Aug 25, 2022, 1:41:59 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:59 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fbe681c424ad11ed8bc6ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:59 PM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361135003660\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:42:00 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzc4OTBlYmM5MGM4NzQ3NTdiMDY3OGI0ZTM4YzU2ZmM5\",\n \"id\": \"trk_7890ebc90c874757b0678b4e38c56fc9\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:00 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:59 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fbe841e024ad11ed8bc9ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:59 PM\"\n },\n \"id\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:59 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_865d689ca9f045b986f57ee082b87617\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/6e5867a76783417cba9d4e2634ffab8d.png\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:00 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:42:00 PM\"\n },\n \"min_datetime\": \"2022-08-30\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-10-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_6603b3e280fa48e9aef7b04bd2ccfa71\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"currency\": \"USD\",\n \"id\": \"rate_c942f09034da4ba195e121c19e062f28\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"currency\": \"USD\",\n \"id\": \"rate_98d9c51441b542f38e09840fb30c2265\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"currency\": \"USD\",\n \"id\": \"rate_85f50afa07e740fdb96da2377b087e54\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"currency\": \"USD\",\n \"id\": \"rate_cb24686e543049e792dd0a4bce35a237\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140305759\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ed550e140d211edbfc5ac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ed808b940d211ed9bcfac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:00 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"currency\": \"USD\",\n \"id\": \"rate_c942f09034da4ba195e121c19e062f28\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:13:00 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ed550e140d211edbfc5ac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140305759\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:00 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzk0MDUyOTI4MGI0NzRkMzFiZDFiZTg4ZTFjNzU4MTY4\",\n \"id\": \"trk_940529280b474d31bd1be88e1c758168\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:00 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ed808b940d211ed9bcfac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n \"id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:13:00 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_f1e52a4cb42847ddbe259728a93e5e01\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/5fb0a9bd9ade4b76b95dd75ea68af81a.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:00 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:00 AM\"\n },\n \"min_datetime\": \"2022-10-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +115,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:00+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_fcbb256824ad11ed8d88ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-08-30T00:00:00Z\",\n \"created_at\": \"2022-08-25T19:42:00Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:01Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-08-25T19:42:01Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_47b08c53d1d94db7b7711c23887b2583\",\n \"pickup_id\": \"pickup_ba68e180c257451a9497b6cc81ad9510\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-08-30T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-08-25T19:42:00Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_ba68e180c257451a9497b6cc81ad9510\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:13:01+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5fb19cb040d211eda045ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:13:01Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:01Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:13:01Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_65ce6c894e8d4ec8b6b5b8354d23e33b\",\n \"pickup_id\": \"pickup_2afbb42dec774ba084ea16f16710bb12\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:13:01Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_2afbb42dec774ba084ea16f16710bb12\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +128,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,26 +155,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d088e68a144200088126" + "1d976c7d6337077ce0ed1bc8000c5dc6" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.751992" + "0.794381" ], "etag": [ - "W/\"596a6590edee9d0298c2211d75d8ca2d\"" + "W/\"3097585ebc5d83aaf6b67afe3108b552\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,6 +188,6 @@ "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 893 + "duration": 1103 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/retrieve.json b/src/test/cassettes/pickup/retrieve.json index a0f2be893..007b899f5 100644 --- a/src/test/cassettes/pickup/retrieve.json +++ b/src/test/cassettes/pickup/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456517, + "recordedAt": 1664550777, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:41:56Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:57Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:57Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:57Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4708cb8e0712400398b4e0faa2ce4ba2\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:41:57Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"tracking_code\": \"9400100109361135003653\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzNlYzU1YjhmNWM1MTRjZTRhMDc4ZjUzMzMxODYxZjhi\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:57Z\",\n \"signed_by\": null,\n \"id\": \"trk_3ec55b8f5c514ce4a078f53331861f8b\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:56+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fa3d4e0824ad11ed8b42ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:56+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fa3d4e0824ad11ed8b42ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:41:57Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/f87a8d5fa3374f848bfe214e6dcacb92.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:41:57Z\",\n \"id\": \"pl_a1fc820aad3b40be927b37dbd0f3849e\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:41:57Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:56Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:56Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_368c1d9077ab492a979e3a49b13cc4d8\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:56+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fa3b7f0c24ad11ed8b40ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:41:56Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:56Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_136fd7a3e33941d48b9d7c807dd25596\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:56Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:56Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4708cb8e0712400398b4e0faa2ce4ba2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:41:56Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:56Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a037314760104d718ad169583e9ed61c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:56Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:56Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_46a98b16354d40f699f419ef40468d4f\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:56+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fa3b7f0c24ad11ed8b40ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003653\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:12:57Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cc2291e04106440ca131953ca56ce2fb\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:12:57Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"tracking_code\": \"9400100109361140305711\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzljMGM4MDUyN2U2MDQ0MzhhNWY1MzRhYzcwYTcxMDdh\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:12:57Z\",\n \"signed_by\": null,\n \"id\": \"trk_9c0c80527e604438a5f534ac70a7107a\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:12:56+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ce71bb340d211ed9170ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:12:56+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ce71bb340d211ed9170ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/ce484c85893c43b793a7263e2b6a5152.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:12:57Z\",\n \"id\": \"pl_dd98ea44c50644e1af93b0cfffa66992\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:12:56Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_9b12689b81cf488ea76f10deb9c88bb9\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:12:56+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:12:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ce5477c40d211ed8211ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_cca4826787e34432970790efec4c06e6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1547faebeab34180bd3f1229cfb15e1d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b813a73ec0314475b56a545a6bb1d41c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cc2291e04106440ca131953ca56ce2fb\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:12:56+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:12:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ce5477c40d211ed8211ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305711\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d084f800a39200087fca" + "1d976c8063370778e0ed1bc0000c5c8d" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.030155" + "0.995219" ], "etag": [ - "W/\"0a586a0dd26d53dce2936d511ba3df94\"" + "W/\"fe0ef51849c8044870191f076d951035\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_86551c2f67f0417fb61b5e259af11b05" + "/api/v2/shipments/shp_a678527b3e89494eb805b8631cbe0f6c" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +94,12 @@ "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1169 + "duration": 1225 }, { - "recordedAt": 1661456518, + "recordedAt": 1664550778, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-08-30\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:56 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_368c1d9077ab492a979e3a49b13cc4d8\",\n \"height\": 4.0,\n \"updatedAt\": \"Aug 25, 2022, 1:41:56 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"serviceCode\": \"usps.parcelselect\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"currency\": \"USD\",\n \"id\": \"rate_136fd7a3e33941d48b9d7c807dd25596\",\n \"retailRate\": 7.75\n },\n {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"currency\": \"USD\",\n \"id\": \"rate_4708cb8e0712400398b4e0faa2ce4ba2\",\n \"retailRate\": 5.57\n },\n {\n \"serviceCode\": \"usps.priority\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"currency\": \"USD\",\n \"id\": \"rate_a037314760104d718ad169583e9ed61c\",\n \"retailRate\": 9.45\n },\n {\n \"serviceCode\": \"usps.express\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"currency\": \"USD\",\n \"id\": \"rate_46a98b16354d40f699f419ef40468d4f\",\n \"retailRate\": 33.55\n }\n ],\n \"trackingCode\": \"9400100109361135003653\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:56 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fa3b7f0c24ad11ed8b40ac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:56 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:56 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fa3d4e0824ad11ed8b42ac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:56 PM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"currency\": \"USD\",\n \"id\": \"rate_4708cb8e0712400398b4e0faa2ce4ba2\",\n \"retailRate\": 5.57\n },\n \"createdAt\": \"Aug 25, 2022, 1:41:56 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:56 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fa3b7f0c24ad11ed8b40ac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:56 PM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361135003653\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:57 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzNlYzU1YjhmNWM1MTRjZTRhMDc4ZjUzMzMxODYxZjhi\",\n \"id\": \"trk_3ec55b8f5c514ce4a078f53331861f8b\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:57 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:56 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fa3d4e0824ad11ed8b42ac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:56 PM\"\n },\n \"id\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:57 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_a1fc820aad3b40be927b37dbd0f3849e\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/f87a8d5fa3374f848bfe214e6dcacb92.png\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:57 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:57 PM\"\n },\n \"min_datetime\": \"2022-08-30\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-10-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_9b12689b81cf488ea76f10deb9c88bb9\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"currency\": \"USD\",\n \"id\": \"rate_cca4826787e34432970790efec4c06e6\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"currency\": \"USD\",\n \"id\": \"rate_1547faebeab34180bd3f1229cfb15e1d\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"currency\": \"USD\",\n \"id\": \"rate_b813a73ec0314475b56a545a6bb1d41c\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"currency\": \"USD\",\n \"id\": \"rate_cc2291e04106440ca131953ca56ce2fb\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140305711\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ce5477c40d211ed8211ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ce71bb340d211ed9170ac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"currency\": \"USD\",\n \"id\": \"rate_cc2291e04106440ca131953ca56ce2fb\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ce5477c40d211ed8211ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140305711\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:57 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzljMGM4MDUyN2U2MDQ0MzhhNWY1MzRhYzcwYTcxMDdh\",\n \"id\": \"trk_9c0c80527e604438a5f534ac70a7107a\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:57 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ce71bb340d211ed9170ac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n \"id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_dd98ea44c50644e1af93b0cfffa66992\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/ce484c85893c43b793a7263e2b6a5152.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:57 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:57 AM\"\n },\n \"min_datetime\": \"2022-10-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +115,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:41:57+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_fb07f87c24ad11eda77aac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-08-30T00:00:00Z\",\n \"created_at\": \"2022-08-25T19:41:57Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:58Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-08-25T19:41:58Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_c38d2d95b26b4d6d807bced0eda89e40\",\n \"pickup_id\": \"pickup_45b11f67a0194a2ba089f8193c436fe6\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-08-30T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-08-25T19:41:57Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_45b11f67a0194a2ba089f8193c436fe6\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:12:57+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5db2855040d211ed8652ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:12:57Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:12:58Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:12:58Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_719a0cb2487c43a78f3cea087a8ec6d0\",\n \"pickup_id\": \"pickup_4eaa528b607d4c85bd3b3f7602ef453f\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:12:57Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_4eaa528b607d4c85bd3b3f7602ef453f\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +128,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,26 +155,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d085f7f02bb100088037" + "1d976c7e63370779e0ed1bc2000c5cea" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.913636" + "1.018854" ], "etag": [ - "W/\"c1c26a6adc9a114f29ba188c43b08423\"" + "W/\"50dbb35161887777409178d828d6951a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,10 +188,10 @@ "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1046 + "duration": 1306 }, { - "recordedAt": 1661456518, + "recordedAt": 1664550779, "request": { "body": "", "method": "GET", @@ -201,10 +203,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_45b11f67a0194a2ba089f8193c436fe6" + "uri": "https://api.easypost.com/v2/pickups/pickup_4eaa528b607d4c85bd3b3f7602ef453f" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:41:57+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_fb07f87c24ad11eda77aac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-08-30T00:00:00Z\",\n \"created_at\": \"2022-08-25T19:41:57Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:58Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-08-25T19:41:58Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_c38d2d95b26b4d6d807bced0eda89e40\",\n \"pickup_id\": \"pickup_45b11f67a0194a2ba089f8193c436fe6\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-08-30T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-08-25T19:41:57Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_45b11f67a0194a2ba089f8193c436fe6\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:12:57+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5db2855040d211ed8652ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:12:57Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:12:58Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:12:58Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_719a0cb2487c43a78f3cea087a8ec6d0\",\n \"pickup_id\": \"pickup_4eaa528b607d4c85bd3b3f7602ef453f\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:12:57Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_4eaa528b607d4c85bd3b3f7602ef453f\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -217,7 +219,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -244,26 +246,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d086f7dc87f500088088" + "1d976c7b6337077ae0ed1bc3000c5d3e" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.065849" + "0.139924" ], "etag": [ - "W/\"c1c26a6adc9a114f29ba188c43b08423\"" + "W/\"50dbb35161887777409178d828d6951a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -274,8 +277,8 @@ "message": "OK" }, "errors": null, - "uri": "https://api.easypost.com/v2/pickups/pickup_45b11f67a0194a2ba089f8193c436fe6" + "uri": "https://api.easypost.com/v2/pickups/pickup_4eaa528b607d4c85bd3b3f7602ef453f" }, - "duration": 192 + "duration": 378 } ] \ No newline at end of file diff --git a/src/test/cassettes/scan_form/create.json b/src/test/cassettes/scan_form/create.json index 19e72ddb0..04d2ad387 100644 --- a/src/test/cassettes/scan_form/create.json +++ b/src/test/cassettes/scan_form/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456465, + "recordedAt": 1664550631, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:41:04Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:05Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:05Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:05Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_59b446ee0bb44d8392667ffbc3607574\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:41:05Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"tracking_code\": \"9400100109361135003493\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzRmNjdhNDY0YmQ2OTQ3NGM5ZDYyMjMxMWRkYTljNmU1\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:05Z\",\n \"signed_by\": null,\n \"id\": \"trk_4f67a464bd69474c9d622311dda9c6e5\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:04+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:04+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_db8308c124ad11edbc7dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:04+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:04+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_db8308c124ad11edbc7dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:41:05Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/f4bcdf311e2e4dfebd2143caa7f8d724.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:41:05Z\",\n \"id\": \"pl_76578b5d3be7425287f8cfe26fcc5058\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:41:05Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:04Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:04Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_9cd948588058442c8d69ae3a67c858c4\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:04+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_db81428a24ad11ed8f5fac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:41:05Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:05Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5f48cd156b7f4666ad4ff463b4ec0e8f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:05Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:05Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_59b446ee0bb44d8392667ffbc3607574\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:41:05Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:05Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d8cff1da7e5a429891b5f7b4924bcb18\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:05Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:05Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_dff2d88e1a12499e9a40f866b2d18b4b\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:04+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_db81428a24ad11ed8f5fac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003493\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:30Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:31Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:31Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_acc698d319ad419c88d067db879a67b9\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:10:31Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"tracking_code\": \"9400100109361140305032\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2RmZmY2MjIwNTUxZTQ4MzZhMjJjYWQ4MzUwMmVlYTBj\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:10:31Z\",\n \"signed_by\": null,\n \"id\": \"trk_dfff6220551e4836a22cad83502eea0c\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:30+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05ebac6040d211eda401ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:30+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05ebac6040d211eda401ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:10:31Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/d73ddbad7ada45f193d19b89aefc1d81.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:10:31Z\",\n \"id\": \"pl_f05066e9dcf54b7fbf3e38985539f826\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:10:31Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:30Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:30Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_2c9a7c36b04f423daf0835004de01611\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:10:30+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:10:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_05ea243a40d211ed8b69ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:30Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:30Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_d24de80d99ef4dc4aac8dd6d6edfca54\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:30Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:30Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_eba2b662f5214c2faca0d383ea0ae7ba\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:30Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:30Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7b88b5db346e446ab0342fba250ffef0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:30Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_acc698d319ad419c88d067db879a67b9\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:10:30+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:10:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_05ea243a40d211ed8b69ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305032\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a922f6307d050f7dea45400085968" + "1d976c7a633706e6e0ed1786000c3129" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.117063" + "1.067454" ], "etag": [ - "W/\"c2513d1b16a8f0c1d1ae138bb831b067\"" + "W/\"b3eb40c33b870d2199f46507bbff8129\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_022e5373de8e4addb2b1ffe37db07915" + "/api/v2/shipments/shp_4402bd1506c5433cac792f54db166a26" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +94,12 @@ "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1332 + "duration": 1334 }, { - "recordedAt": 1661456466, + "recordedAt": 1664550632, "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:04 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_9cd948588058442c8d69ae3a67c858c4\",\n \"height\": 4.0,\n \"updatedAt\": \"Aug 25, 2022, 1:41:04 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"serviceCode\": \"usps.parcelselect\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"currency\": \"USD\",\n \"id\": \"rate_5f48cd156b7f4666ad4ff463b4ec0e8f\",\n \"retailRate\": 7.75\n },\n {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"currency\": \"USD\",\n \"id\": \"rate_59b446ee0bb44d8392667ffbc3607574\",\n \"retailRate\": 5.57\n },\n {\n \"serviceCode\": \"usps.priority\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"currency\": \"USD\",\n \"id\": \"rate_d8cff1da7e5a429891b5f7b4924bcb18\",\n \"retailRate\": 9.45\n },\n {\n \"serviceCode\": \"usps.express\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"currency\": \"USD\",\n \"id\": \"rate_dff2d88e1a12499e9a40f866b2d18b4b\",\n \"retailRate\": 33.55\n }\n ],\n \"trackingCode\": \"9400100109361135003493\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:04 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_db81428a24ad11ed8f5fac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:05 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:04 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_db8308c124ad11edbc7dac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:04 PM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"currency\": \"USD\",\n \"id\": \"rate_59b446ee0bb44d8392667ffbc3607574\",\n \"retailRate\": 5.57\n },\n \"createdAt\": \"Aug 25, 2022, 1:41:04 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:04 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_db81428a24ad11ed8f5fac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:05 PM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361135003493\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:05 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzRmNjdhNDY0YmQ2OTQ3NGM5ZDYyMjMxMWRkYTljNmU1\",\n \"id\": \"trk_4f67a464bd69474c9d622311dda9c6e5\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:05 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:04 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_db8308c124ad11edbc7dac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:04 PM\"\n },\n \"id\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:05 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_76578b5d3be7425287f8cfe26fcc5058\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/f4bcdf311e2e4dfebd2143caa7f8d724.png\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:05 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:05 PM\"\n }\n ]\n}", + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_2c9a7c36b04f423daf0835004de01611\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"currency\": \"USD\",\n \"id\": \"rate_d24de80d99ef4dc4aac8dd6d6edfca54\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"currency\": \"USD\",\n \"id\": \"rate_eba2b662f5214c2faca0d383ea0ae7ba\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"currency\": \"USD\",\n \"id\": \"rate_7b88b5db346e446ab0342fba250ffef0\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"currency\": \"USD\",\n \"id\": \"rate_acc698d319ad419c88d067db879a67b9\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140305032\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_05ea243a40d211ed8b69ac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05ebac6040d211eda401ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:31 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"currency\": \"USD\",\n \"id\": \"rate_acc698d319ad419c88d067db879a67b9\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:31 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_05ea243a40d211ed8b69ac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140305032\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:31 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2RmZmY2MjIwNTUxZTQ4MzZhMjJjYWQ4MzUwMmVlYTBj\",\n \"id\": \"trk_dfff6220551e4836a22cad83502eea0c\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:31 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05ebac6040d211eda401ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n \"id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:31 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_f05066e9dcf54b7fbf3e38985539f826\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/d73ddbad7ada45f193d19b89aefc1d81.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:31 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:31 AM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +115,7 @@ "uri": "https://api.easypost.com/v2/scan_forms" }, "response": { - "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:04+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:04+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_db8308c124ad11edbc7dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-08-25T19:41:06Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220825/42615d882ef8481eb99c4517ba0a9d8a.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_84d31088792f4a36ad51ad49e93b20b5\",\n \"created_at\": \"2022-08-25T19:41:06Z\",\n \"id\": \"sf_33169a5a3fdc430297a2a62be88c0db0\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361135003493\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", + "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:30+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05ebac6040d211eda401ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-09-30T15:10:32Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220930/13873b6db72a44e1b963b940ee90063e.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_1243b4048eb34e2b87c61130092bbb35\",\n \"created_at\": \"2022-09-30T15:10:31Z\",\n \"id\": \"sf_b5e896aa86cb4a5ba64438e94cb68c4c\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361140305032\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +128,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,27 +155,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "4cb7bec56307d052f7dadab100071fe1" + "1d976c7a633706e7e0ed179f000c31a0" ], "x-proxied": [ - "extlb4wdc 9ce216bfac", - "intlb2wdc 6aa9972c1e", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.280295" + "0.254032" ], "etag": [ - "W/\"904096d69d7e46904e4e684e6a1fef8c\"" + "W/\"44a5cfffeaa5b8bc324da90718c821ac\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -187,6 +188,6 @@ "errors": null, "uri": "https://api.easypost.com/v2/scan_forms" }, - "duration": 599 + "duration": 507 } ] \ No newline at end of file diff --git a/src/test/cassettes/scan_form/retrieve.json b/src/test/cassettes/scan_form/retrieve.json index 00905dd43..d5ef2b857 100644 --- a/src/test/cassettes/scan_form/retrieve.json +++ b/src/test/cassettes/scan_form/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456463, + "recordedAt": 1664550629, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:41:02Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:03Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:02Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:02Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e28dd9a97354467fbdcfc75fb626acf4\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:41:03Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"tracking_code\": \"9400100109361135003479\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzJlMmE5YjI3MDQyMzRiMzI5NDg0NzFjZmY1MTVlMDc3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:03Z\",\n \"signed_by\": null,\n \"id\": \"trk_2e2a9b2704234b32948471cff515e077\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d9ea9cb024ad11ed9be1ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d9ea9cb024ad11ed9be1ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:41:02Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/166cc95f0a2a4f91b2db9574bd75ad5d.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:41:03Z\",\n \"id\": \"pl_aca455b95bbc40b680cec6ed8ab77605\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:41:02Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:02Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:02Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a76ede18b9b140b8a9f2604b673c614a\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:02+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d9e347ce24ad11ed9bd5ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:02Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:02Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_ab58336e149d4ec992debdc12fefaf36\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:41:02Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:02Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b04cf834e18b40158da0d336ecbde066\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:41:02Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:02Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3fe689e206b9406284fd8fdb8aa27b6b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:02Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:02Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e28dd9a97354467fbdcfc75fb626acf4\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:02+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d9e347ce24ad11ed9bd5ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003479\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:27Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_51293222b1ea4a47ada4c82d52e8e97f\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:10:29Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"tracking_code\": \"9400100109361140305025\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzI2ZmM4NzZlODQxMTRhMzc4YjIwYTdlNzk5YjhmMTg4\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:10:29Z\",\n \"signed_by\": null,\n \"id\": \"trk_26fc876e84114a378b20a7e799b8f188\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:10:28Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/b4105633849e479690f21aa4531a57cd.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"id\": \"pl_8895b546d4b74378b619b4a20d10130c\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:10:28Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:27Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:27Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_09c8436d6182492f889fb197df8fe933\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:10:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0451b26c40d211ed9b6fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_51293222b1ea4a47ada4c82d52e8e97f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:28Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_87c8fcbfe4ba40f789d7db646b2ad702\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:28Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_629b175efb4349faaf80168035952b87\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_097d1066e51144a19d5ab2b0c5119801\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:10:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0451b26c40d211ed9b6fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305025\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,30 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "237d6d846307d04ef7dc83d4000737ca" + "1d976c7f633706e3e0ed1781000c3078" ], "x-proxied": [ - "extlb3wdc 9ce216bfac", - "intlb1wdc 6aa9972c1e", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.140971" + "1.334265" ], "etag": [ - "W/\"e5f337f114f109ebf9626bc50d785ee8\"" + "W/\"71ca0f7b8c9bc0f78e5b3773d38293a5\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_495dc457b2fe4ec7ae8b87dcbc6428d1" + "/api/v2/shipments/shp_06b8f9744987412fa6f096cbef73112d" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -94,12 +94,12 @@ "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1501 + "duration": 1567 }, { - "recordedAt": 1661456464, + "recordedAt": 1664550629, "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:02 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_a76ede18b9b140b8a9f2604b673c614a\",\n \"height\": 4.0,\n \"updatedAt\": \"Aug 25, 2022, 1:41:02 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"serviceCode\": \"usps.express\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"currency\": \"USD\",\n \"id\": \"rate_ab58336e149d4ec992debdc12fefaf36\",\n \"retailRate\": 33.55\n },\n {\n \"serviceCode\": \"usps.priority\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"currency\": \"USD\",\n \"id\": \"rate_b04cf834e18b40158da0d336ecbde066\",\n \"retailRate\": 9.45\n },\n {\n \"serviceCode\": \"usps.parcelselect\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"currency\": \"USD\",\n \"id\": \"rate_3fe689e206b9406284fd8fdb8aa27b6b\",\n \"retailRate\": 7.75\n },\n {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"currency\": \"USD\",\n \"id\": \"rate_e28dd9a97354467fbdcfc75fb626acf4\",\n \"retailRate\": 5.57\n }\n ],\n \"trackingCode\": \"9400100109361135003479\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:02 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d9e347ce24ad11ed9bd5ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:02 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:02 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d9ea9cb024ad11ed9be1ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:02 PM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"currency\": \"USD\",\n \"id\": \"rate_e28dd9a97354467fbdcfc75fb626acf4\",\n \"retailRate\": 5.57\n },\n \"createdAt\": \"Aug 25, 2022, 1:41:02 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:02 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d9e347ce24ad11ed9bd5ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:02 PM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361135003479\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:03 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzJlMmE5YjI3MDQyMzRiMzI5NDg0NzFjZmY1MTVlMDc3\",\n \"id\": \"trk_2e2a9b2704234b32948471cff515e077\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:03 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 25, 2022, 1:41:02 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d9ea9cb024ad11ed9be1ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:02 PM\"\n },\n \"id\": \"shp_495dc457b2fe4ec7ae8b87dcbc6428d1\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 25, 2022, 1:41:02 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_aca455b95bbc40b680cec6ed8ab77605\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/166cc95f0a2a4f91b2db9574bd75ad5d.png\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:03 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Aug 25, 2022, 1:41:03 PM\"\n }\n ]\n}", + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:27 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_09c8436d6182492f889fb197df8fe933\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:10:27 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:28 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"currency\": \"USD\",\n \"id\": \"rate_51293222b1ea4a47ada4c82d52e8e97f\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:28 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"currency\": \"USD\",\n \"id\": \"rate_87c8fcbfe4ba40f789d7db646b2ad702\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:28 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"currency\": \"USD\",\n \"id\": \"rate_629b175efb4349faaf80168035952b87\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:28 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"currency\": \"USD\",\n \"id\": \"rate_097d1066e51144a19d5ab2b0c5119801\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140305025\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:27 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0451b26c40d211ed9b6fac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:27 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:27 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:28 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"currency\": \"USD\",\n \"id\": \"rate_51293222b1ea4a47ada4c82d52e8e97f\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:10:27 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:27 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0451b26c40d211ed9b6fac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140305025\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:29 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzI2ZmM4NzZlODQxMTRhMzc4YjIwYTdlNzk5YjhmMTg4\",\n \"id\": \"trk_26fc876e84114a378b20a7e799b8f188\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:29 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:27 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:27 AM\"\n },\n \"id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:28 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_8895b546d4b74378b619b4a20d10130c\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/b4105633849e479690f21aa4531a57cd.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -115,7 +115,7 @@ "uri": "https://api.easypost.com/v2/scan_forms" }, "response": { - "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d9ea9cb024ad11ed9be1ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-08-25T19:41:04Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220825/50c0292043f04426b8794b71402badc0.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_2b9794867a3c48ffb8276787f863a19f\",\n \"created_at\": \"2022-08-25T19:41:03Z\",\n \"id\": \"sf_3ed78a5c3f6e4e7f83d08eb06a6852e5\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361135003479\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", + "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-09-30T15:10:29Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220930/919c06cc1c4f4a219c71cb31068fc844.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_04635f2ee5b8411cad432a7f7a40f8fd\",\n \"created_at\": \"2022-09-30T15:10:29Z\",\n \"id\": \"sf_ac482d5fa7094688be81bfb2992c4367\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361140305025\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", "httpVersion": null, "headers": { "null": [ @@ -128,7 +128,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -155,26 +155,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d04ff7a900540008655d" + "1d976c80633706e5e0ed1783000c30db" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.315675" + "0.272387" ], "etag": [ - "W/\"692d706f5e862c8663d05fac5bd45bc6\"" + "W/\"41877f3eef5a986e0c08b951165be867\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -187,10 +188,10 @@ "errors": null, "uri": "https://api.easypost.com/v2/scan_forms" }, - "duration": 493 + "duration": 591 }, { - "recordedAt": 1661456464, + "recordedAt": 1664550630, "request": { "body": "", "method": "GET", @@ -202,10 +203,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/scan_forms/sf_3ed78a5c3f6e4e7f83d08eb06a6852e5" + "uri": "https://api.easypost.com/v2/scan_forms/sf_ac482d5fa7094688be81bfb2992c4367" }, "response": { - "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d9ea9cb024ad11ed9be1ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-08-25T19:41:04Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220825/50c0292043f04426b8794b71402badc0.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_2b9794867a3c48ffb8276787f863a19f\",\n \"created_at\": \"2022-08-25T19:41:03Z\",\n \"id\": \"sf_3ed78a5c3f6e4e7f83d08eb06a6852e5\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361135003479\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", + "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-09-30T15:10:29Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220930/919c06cc1c4f4a219c71cb31068fc844.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_04635f2ee5b8411cad432a7f7a40f8fd\",\n \"created_at\": \"2022-09-30T15:10:29Z\",\n \"id\": \"sf_ac482d5fa7094688be81bfb2992c4367\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361140305025\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", "httpVersion": null, "headers": { "null": [ @@ -218,7 +219,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -238,6 +239,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -245,26 +249,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d050f7dfdab900086596" + "1d976c80633706e5e0ed1784000c3108" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.028887" + "0.044340" ], "etag": [ - "W/\"692d706f5e862c8663d05fac5bd45bc6\"" + "W/\"41877f3eef5a986e0c08b951165be867\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -275,8 +280,8 @@ "message": "OK" }, "errors": null, - "uri": "https://api.easypost.com/v2/scan_forms/sf_3ed78a5c3f6e4e7f83d08eb06a6852e5" + "uri": "https://api.easypost.com/v2/scan_forms/sf_ac482d5fa7094688be81bfb2992c4367" }, - "duration": 170 + "duration": 275 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy.json b/src/test/cassettes/shipment/buy.json index 743df2eae..1938491da 100644 --- a/src/test/cassettes/shipment/buy.json +++ b/src/test/cassettes/shipment/buy.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456960, + "recordedAt": 1664550620, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:20Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:20Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_02ad5d9324af11ed8d7fac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_124b742639cc4db4bd4d992de80d2843\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_02ad5d9324af11ed8d7fac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:20Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:20Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_616dab3895994365af51f60ca8bfd0c2\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_02abce4d24af11ed8c3aac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:20Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_124b742639cc4db4bd4d992de80d2843\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:20Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d51ffa7bd47f4bc6a7a70f93e6cff202\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:20Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_124b742639cc4db4bd4d992de80d2843\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:20Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2b926d6f2dd04bbaaf9956b1e89f590f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:20Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_124b742639cc4db4bd4d992de80d2843\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:20Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1d8050775dbd46d09aee18ca50326e0e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:20Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_124b742639cc4db4bd4d992de80d2843\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:20Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_55fc78594e534799a9d6271359135c25\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_02abce4d24af11ed8c3aac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:19Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_ff37487240d111eda944ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_ff37487240d111eda944ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:19Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:19Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_bbaa9c38909a4a3599bd80ad66774024\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ff34d95c40d111ed81deac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5e01714d76a84f67a9f04b41671dbca9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5a10059496ed431fb5b188f9b337f251\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7a1db9041cc945a9a6626810b7e2cf79\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_9a764b7d415f44fa90bf3df02de15280\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ff34d95c40d111ed81deac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,6 +51,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -58,29 +61,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92316307d240f7dd9cb90009331d" + "1d976c7f633706dbe0ed1409000c2dcd" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.883735" + "0.870377" ], "etag": [ - "W/\"41fd872cde1aa1be437737988c2a090e\"" + "W/\"e8baf72edd1ef1e341f77c96ed7bf1b3\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_124b742639cc4db4bd4d992de80d2843" + "/api/v2/shipments/shp_d691764c1e294fb8a9977548586209ce" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +97,12 @@ "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1020 + "duration": 1109 }, { - "recordedAt": 1661456962, + "recordedAt": 1664550621, "request": { - "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_124b742639cc4db4bd4d992de80d2843\",\n \"currency\": \"USD\",\n \"id\": \"rate_1d8050775dbd46d09aee18ca50326e0e\",\n \"retailRate\": 5.57\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:20 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"currency\": \"USD\",\n \"id\": \"rate_7a1db9041cc945a9a6626810b7e2cf79\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:20 AM\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -111,10 +115,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_124b742639cc4db4bd4d992de80d2843/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_d691764c1e294fb8a9977548586209ce/buy" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:20Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:22Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:21Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_124b742639cc4db4bd4d992de80d2843\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:21Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1d8050775dbd46d09aee18ca50326e0e\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:49:22Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_124b742639cc4db4bd4d992de80d2843\",\n \"tracking_code\": \"9400100109361135004667\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzFiMmYzZTZmYTQ4YTQxOWI5MDEyZGVmZGNjNWE1MTY0\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:49:22Z\",\n \"signed_by\": null,\n \"id\": \"trk_1b2f3e6fa48a419b9012defdcc5a5164\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_02ad5d9324af11ed8d7fac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_124b742639cc4db4bd4d992de80d2843\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_02ad5d9324af11ed8d7fac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:49:21Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/3e777d20e7af4047964b4959119090ee.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:49:21Z\",\n \"id\": \"pl_02c83ac32f05484eb00440df2d461cd8\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:49:21Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:20Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:20Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_616dab3895994365af51f60ca8bfd0c2\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-08-25T19:49:20+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:49:21+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_02abce4d24af11ed8c3aac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:20Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_124b742639cc4db4bd4d992de80d2843\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:20Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d51ffa7bd47f4bc6a7a70f93e6cff202\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:20Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_124b742639cc4db4bd4d992de80d2843\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:20Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2b926d6f2dd04bbaaf9956b1e89f590f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:20Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_124b742639cc4db4bd4d992de80d2843\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:20Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1d8050775dbd46d09aee18ca50326e0e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:20Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_124b742639cc4db4bd4d992de80d2843\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:20Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_55fc78594e534799a9d6271359135c25\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-08-25T19:49:20+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:49:21+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_02abce4d24af11ed8c3aac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004667\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:19Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:21Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:21Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:21Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7a1db9041cc945a9a6626810b7e2cf79\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:10:21Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"tracking_code\": \"9400100109361140304998\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2JlNGMwZjNkODEwYTQyMjI5ZjMxMGYxZDhmNGQ2M2Vm\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:10:21Z\",\n \"signed_by\": null,\n \"id\": \"trk_be4c0f3d810a42229f310f1d8f4d63ef\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_ff37487240d111eda944ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_ff37487240d111eda944ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:10:21Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/604962cb96ac473fa58a78f74e28a079.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:10:21Z\",\n \"id\": \"pl_38b924c40acc40979bdf5e8002e2798b\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:10:21Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:19Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:19Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_bbaa9c38909a4a3599bd80ad66774024\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-09-30T15:10:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_ff34d95c40d111ed81deac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5e01714d76a84f67a9f04b41671dbca9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5a10059496ed431fb5b188f9b337f251\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7a1db9041cc945a9a6626810b7e2cf79\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_9a764b7d415f44fa90bf3df02de15280\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-09-30T15:10:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_ff34d95c40d111ed81deac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140304998\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +131,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,26 +158,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92346307d241f7ff079100093381" + "1d976c7d633706dce0ed140b000c2e36" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.022314" + "1.309639" ], "etag": [ - "W/\"49bd84fb6c1c3b9176e74ce0dd524d77\"" + "W/\"18ed900da39c03298a561891648ae11c\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -184,8 +189,8 @@ "message": "OK" }, "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_124b742639cc4db4bd4d992de80d2843/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_d691764c1e294fb8a9977548586209ce/buy" }, - "duration": 1147 + "duration": 1647 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy_shipment_with_carbon_offset.json b/src/test/cassettes/shipment/buy_shipment_with_carbon_offset.json index 37032302b..7019d3018 100644 --- a/src/test/cassettes/shipment/buy_shipment_with_carbon_offset.json +++ b/src/test/cassettes/shipment/buy_shipment_with_carbon_offset.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456964, + "recordedAt": 1664550623, "request": { "body": "{\n \"shipment\": {\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n },\n \"reference\": \"123\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"options\": {\n \"label_format\": \"PNG\",\n \"invoice_number\": \"123\"\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_052313db24af11eda1c4ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_32bc07ba443d4622861c9ff705b1d633\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_052313db24af11eda1c4ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"currency\": null,\n \"id\": \"cstitem_9f98c9222aa24046a076fda53ef5fcc4\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_9b4ccad6dd02460e975bdf0656f93d9c\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_98a5a05232e144d3bed4e787dc65cb03\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_051f094324af11ed8e79ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_32bc07ba443d4622861c9ff705b1d633\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_098a5dfa0ea7410bbec16f6f71d23dba\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_32bc07ba443d4622861c9ff705b1d633\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c8b937ff006f48aca4af9a42867a6253\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_32bc07ba443d4622861c9ff705b1d633\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6936b51de6d0455e93ab60ba4ee561ff\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_32bc07ba443d4622861c9ff705b1d633\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3a680b11e9af4204ae1832f1945f0237\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_051f094324af11ed8e79ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0120f02e40d211ed8ae6ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0120f02e40d211ed8ae6ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:22Z\",\n \"currency\": null,\n \"id\": \"cstitem_8df864a7da834a6cbdf5733ba4bba799\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-09-30T15:10:22Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_f80205ff80674fca9cebe9f45fcb1106\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:22Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c5514efd58b7418bbe9231022e22b0c5\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_011e663240d211ed8adaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1607f1f595f044afa85152ce4618fa3f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f4bac8a8a5b44435a2225a83ae95ea76\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_6df1866369cd4b2c83cebd03b88ee9f8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c37a382f3ebf40b0a0a7f53df473b4ca\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_011e663240d211ed8adaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92316307d244f7cdb9bc000934b0" + "1d976c7f633706dee0ed1427000c2ed0" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.797517" + "0.993476" ], "etag": [ - "W/\"d4d5417ce12b901bb80c0b103183c729\"" + "W/\"93144b1575fa7aa140eb3e279f4565c6\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_32bc07ba443d4622861c9ff705b1d633" + "/api/v2/shipments/shp_5f5eac94aed64f4e8a7e48324ec74fe2" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +94,12 @@ "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 940 + "duration": 1296 }, { - "recordedAt": 1661456966, + "recordedAt": 1664550625, "request": { - "body": "{\n \"carbon_offset\": true,\n \"rate\": {\n \"serviceCode\": \"usps.first\",\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_32bc07ba443d4622861c9ff705b1d633\",\n \"currency\": \"USD\",\n \"id\": \"rate_c8b937ff006f48aca4af9a42867a6253\",\n \"retailRate\": 5.57\n }\n}", + "body": "{\n \"carbon_offset\": true,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:23 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"currency\": \"USD\",\n \"id\": \"rate_f4bac8a8a5b44435a2225a83ae95ea76\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:23 AM\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -111,10 +112,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_32bc07ba443d4622861c9ff705b1d633/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_5f5eac94aed64f4e8a7e48324ec74fe2/buy" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.11000\",\n \"refunded\": false,\n \"type\": \"CarbonOffsetFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:26Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:25Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_32bc07ba443d4622861c9ff705b1d633\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:25Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c8b937ff006f48aca4af9a42867a6253\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:49:26Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_32bc07ba443d4622861c9ff705b1d633\",\n \"tracking_code\": \"9400100109361135004698\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Q4YWUwNTk1NjE4MjQ5MzdhMjAzMzhlZDY5MGYyNmRm\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:49:26Z\",\n \"signed_by\": null,\n \"id\": \"trk_d8ae059561824937a20338ed690f26df\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_052313db24af11eda1c4ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_32bc07ba443d4622861c9ff705b1d633\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_052313db24af11eda1c4ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"currency\": null,\n \"id\": \"cstitem_9f98c9222aa24046a076fda53ef5fcc4\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_9b4ccad6dd02460e975bdf0656f93d9c\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:49:25Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/2acbda37446d4911a61d76b974e0fc0a.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:49:26Z\",\n \"id\": \"pl_347b3986cca847318eee54b8ca7b6f33\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:49:25Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_98a5a05232e144d3bed4e787dc65cb03\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-08-25T19:49:24+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:49:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_051f094324af11ed8e79ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_32bc07ba443d4622861c9ff705b1d633\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_098a5dfa0ea7410bbec16f6f71d23dba\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_32bc07ba443d4622861c9ff705b1d633\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c8b937ff006f48aca4af9a42867a6253\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_32bc07ba443d4622861c9ff705b1d633\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6936b51de6d0455e93ab60ba4ee561ff\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:24Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_32bc07ba443d4622861c9ff705b1d633\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:24Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3a680b11e9af4204ae1832f1945f0237\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-08-25T19:49:24+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:49:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_051f094324af11ed8e79ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004698\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.11000\",\n \"refunded\": false,\n \"type\": \"CarbonOffsetFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:24Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:24Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:24Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f4bac8a8a5b44435a2225a83ae95ea76\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:10:25Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"tracking_code\": \"9400100109361140305018\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzkzNDc3YmRkZGE0ODQxNDY5Nzg0NDA4YThhMTY1ZmY3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:10:25Z\",\n \"signed_by\": null,\n \"id\": \"trk_93477bddda4841469784408a8a165ff7\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0120f02e40d211ed8ae6ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0120f02e40d211ed8ae6ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:22Z\",\n \"currency\": null,\n \"id\": \"cstitem_8df864a7da834a6cbdf5733ba4bba799\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-09-30T15:10:22Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_f80205ff80674fca9cebe9f45fcb1106\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:10:24Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/e53fb5850dfa42b08000b4f7454f1575.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:10:24Z\",\n \"id\": \"pl_e3cb4b2f928f4750a746a0f587ab0a78\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:10:24Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:22Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c5514efd58b7418bbe9231022e22b0c5\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-09-30T15:10:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_011e663240d211ed8adaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1607f1f595f044afa85152ce4618fa3f\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f4bac8a8a5b44435a2225a83ae95ea76\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_6df1866369cd4b2c83cebd03b88ee9f8\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c37a382f3ebf40b0a0a7f53df473b4ca\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-09-30T15:10:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_011e663240d211ed8adaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305018\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +128,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,26 +155,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92306307d245e68ccda500093500" + "1d976c7a633706dfe0ed1429000c2f41" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.215383" + "1.331613" ], "etag": [ - "W/\"d7d6a631d5b5fc367883c2e53b2ea5ed\"" + "W/\"32e4afdf13ceccc94dbe1de8043aad6a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202209292008-82708ffb20-master" ], "cache-control": [ "private, no-cache, no-store" @@ -184,8 +186,8 @@ "message": "OK" }, "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_32bc07ba443d4622861c9ff705b1d633/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_5f5eac94aed64f4e8a7e48324ec74fe2/buy" }, - "duration": 1421 + "duration": 1624 } ] \ No newline at end of file diff --git a/src/test/java/com/easypost/Fixtures.java b/src/test/java/com/easypost/Fixtures.java index 18786167d..b05e8ec98 100644 --- a/src/test/java/com/easypost/Fixtures.java +++ b/src/test/java/com/easypost/Fixtures.java @@ -231,7 +231,7 @@ public static HashMap basicPickup() { If you need to re-record cassettes, increment the date below and ensure it is one day in the future, USPS only does "next-day" pickups including Saturday but not Sunday or Holidays. */ - String pickupDate = "2022-08-30"; + String pickupDate = "2022-10-01"; fixture.put("min_datetime", pickupDate); fixture.put("max_datetime", pickupDate); From 813d48ac86ea7c4f1631577f4c46d45d3d78f9a6 Mon Sep 17 00:00:00 2001 From: jchen293 Date: Mon, 3 Oct 2022 13:20:40 -0400 Subject: [PATCH 005/208] convert return type for fundWallet and deletePaymentMethod (#190) --- CHANGELOG.md | 4 +++ src/main/java/com/easypost/model/Billing.java | 25 ++++++------------- .../com/easypost/model/ReferralCustomer.java | 10 +++----- src/main/java/com/easypost/model/Tracker.java | 10 +++----- src/test/java/com/easypost/BillingTest.java | 10 +++----- .../java/com/easypost/CarrierAccountTest.java | 3 ++- src/test/java/com/easypost/ReferralTest.java | 4 +-- src/test/java/com/easypost/TrackerTest.java | 6 ++--- src/test/java/com/easypost/UserTest.java | 3 ++- src/test/java/com/easypost/WebhookTest.java | 3 ++- 10 files changed, 31 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ff5bfaa4..dc3ee2bcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ - Removes `getUpdate` and `setUpdate` from Tracker class - Removes all beta features and corrsponding unit tests - Remove `serviceCode` from `Rate` class since this value is internal use only +- Converts return type from boolean to void in empty response body functions + - `fundWallet()` and `deletePaymentMethod()` in Billing class + - `createList()` in Tracker class + - `updateEmail()` in ReferralCustomer class ## v5.10.0 (2022-09-21) diff --git a/src/main/java/com/easypost/model/Billing.java b/src/main/java/com/easypost/model/Billing.java index bdb2e4783..2deab462b 100644 --- a/src/main/java/com/easypost/model/Billing.java +++ b/src/main/java/com/easypost/model/Billing.java @@ -12,11 +12,10 @@ public final class Billing extends EasyPostResource { * Delete a payment method. * * @param priority Which type of payment method to delete. - * @return True if successful. Throws an exception if unsuccessful. * @throws EasyPostException when the request fails. */ - public static boolean deletePaymentMethod(PaymentMethod.Priority priority) throws EasyPostException { - return deletePaymentMethod(priority, null); + public static void deletePaymentMethod(PaymentMethod.Priority priority) throws EasyPostException { + deletePaymentMethod(priority, null); } /** @@ -24,29 +23,25 @@ public static boolean deletePaymentMethod(PaymentMethod.Priority priority) throw * * @param priority Which type of payment method to delete. * @param apiKey API key to use in request (overrides default API key). - * @return True if successful. Throws an exception if unsuccessful. * @throws EasyPostException when the request fails. */ - public static boolean deletePaymentMethod(PaymentMethod.Priority priority, String apiKey) throws EasyPostException { + public static void deletePaymentMethod(PaymentMethod.Priority priority, String apiKey) throws EasyPostException { PaymentMethodObject paymentMethodObject = getPaymentMethodByPriority(priority, apiKey); // will attempt to serialize empty JSON to a PaymentMethod.class, that's fine request(EasyPostResource.RequestMethod.DELETE, String.format("%s/%s/%s", EasyPost.API_BASE, paymentMethodObject.getEndpoint(), paymentMethodObject.getId()), null, PaymentMethod.class, apiKey); - - return true; } /** * Fund your wallet from the primary payment method. * * @param amount amount to fund. - * @return True if successful. Throws an exception if unsuccessful. * @throws EasyPostException when the request fails. */ - public static boolean fundWallet(String amount) throws EasyPostException { - return fundWallet(amount, PaymentMethod.Priority.PRIMARY, null); + public static void fundWallet(String amount) throws EasyPostException { + fundWallet(amount, PaymentMethod.Priority.PRIMARY, null); } /** @@ -54,11 +49,10 @@ public static boolean fundWallet(String amount) throws EasyPostException { * * @param amount amount to fund. * @param priority which type of payment method to use to fund the wallet. Defaults to primary. - * @return True if successful. Throws an exception if unsuccessful. * @throws EasyPostException when the request fails. */ - public static boolean fundWallet(String amount, PaymentMethod.Priority priority) throws EasyPostException { - return fundWallet(amount, priority, null); + public static void fundWallet(String amount, PaymentMethod.Priority priority) throws EasyPostException { + fundWallet(amount, priority, null); } /** @@ -67,10 +61,9 @@ public static boolean fundWallet(String amount, PaymentMethod.Priority priority) * @param amount amount to fund. * @param priority which type of payment method to use to fund the wallet. * @param apiKey API key to use in request (overrides default API key). - * @return True if successful. Throws an exception if unsuccessful. * @throws EasyPostException when the request fails. */ - public static boolean fundWallet(String amount, PaymentMethod.Priority priority, String apiKey) + public static void fundWallet(String amount, PaymentMethod.Priority priority, String apiKey) throws EasyPostException { PaymentMethodObject paymentMethodObject = getPaymentMethodByPriority(priority, apiKey); @@ -80,8 +73,6 @@ public static boolean fundWallet(String amount, PaymentMethod.Priority priority, // will attempt to serialize empty JSON to a PaymentMethod.class, that's fine request(RequestMethod.POST, String.format("%s/%s/%s/%s", EasyPost.API_BASE, paymentMethodObject.getEndpoint(), paymentMethodObject.getId(), "charges"), params, PaymentMethod.class, apiKey); - - return true; } /** diff --git a/src/main/java/com/easypost/model/ReferralCustomer.java b/src/main/java/com/easypost/model/ReferralCustomer.java index 3151b4bd9..d539fffbf 100644 --- a/src/main/java/com/easypost/model/ReferralCustomer.java +++ b/src/main/java/com/easypost/model/ReferralCustomer.java @@ -66,11 +66,10 @@ public static ReferralCustomer create(Map params, String apiKey) * * @param email Email of the referral user to update. * @param userId ID of the referral user to update. - * @return true if success. * @throws EasyPostException when the request fails. */ - public static boolean updateEmail(String email, String userId) throws EasyPostException { - return updateEmail(email, userId, null); + public static void updateEmail(String email, String userId) throws EasyPostException { + updateEmail(email, userId, null); } /** @@ -79,10 +78,9 @@ public static boolean updateEmail(String email, String userId) throws EasyPostEx * @param email Email of the referral user to update. * @param userId ID of the referral user to update. * @param apiKey API key to use in request (overrides default API key). - * @return true if success. * @throws EasyPostException when the request fails. */ - public static boolean updateEmail(String email, String userId, String apiKey) throws EasyPostException { + public static void updateEmail(String email, String userId, String apiKey) throws EasyPostException { Map wrappedParams = new HashMap<>(); Map params = new HashMap<>(); params.put("email", email); @@ -90,8 +88,6 @@ public static boolean updateEmail(String email, String userId, String apiKey) th request(RequestMethod.PUT, String.format("%s/%s/%s", EasyPost.API_BASE, "referral_customers", userId), wrappedParams, ReferralCustomer.class, apiKey); - - return true; } /** diff --git a/src/main/java/com/easypost/model/Tracker.java b/src/main/java/com/easypost/model/Tracker.java index eed2f6bf4..983c1810e 100644 --- a/src/main/java/com/easypost/model/Tracker.java +++ b/src/main/java/com/easypost/model/Tracker.java @@ -334,11 +334,10 @@ public static TrackerCollection all(final Map params, final Stri * Create a list of Trackers. * * @param params Map of parameters used to create the Trackers. - * @return whether the creation was successful. * @throws EasyPostException when the request fails. */ - public static boolean createList(final Map params) throws EasyPostException { - return createList(params, null); + public static void createList(final Map params) throws EasyPostException { + createList(params, null); } /** @@ -346,17 +345,14 @@ public static boolean createList(final Map params) throws EasyPo * * @param params Map of parameters used to create the Trackers. * @param apiKey API key to use in request (overrides default API key). - * @return whether the creation was successful. * @throws EasyPostException when the request fails. */ - public static boolean createList(final Map params, final String apiKey) throws EasyPostException { + public static void createList(final Map params, final String apiKey) throws EasyPostException { String createListUrl = String.format("%s/create_list", classURL(Tracker.class)); Map newParams = new HashMap(); newParams.put("trackers", params); request(RequestMethod.POST, createListUrl, newParams, Object.class, apiKey); - // This endpoint does not return a response so we return true here - return true; } } diff --git a/src/test/java/com/easypost/BillingTest.java b/src/test/java/com/easypost/BillingTest.java index 7cb58b7ef..1038f8c6d 100644 --- a/src/test/java/com/easypost/BillingTest.java +++ b/src/test/java/com/easypost/BillingTest.java @@ -7,8 +7,8 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; public final class BillingTest { private static TestUtils.VCR vcr; @@ -33,9 +33,7 @@ public static void setup() throws EasyPostException { public void testDeletePaymentMethod() throws EasyPostException { vcr.setUpTest("delete_payment_method"); - boolean success = Billing.deletePaymentMethod(PaymentMethod.Priority.PRIMARY); - - assertTrue(success); + assertDoesNotThrow(() -> Billing.deletePaymentMethod(PaymentMethod.Priority.PRIMARY)); } /** @@ -48,9 +46,7 @@ public void testDeletePaymentMethod() throws EasyPostException { public void testFundWallet() throws EasyPostException { vcr.setUpTest("fund_wallet"); - boolean success = Billing.fundWallet("2000", PaymentMethod.Priority.PRIMARY); - - assertTrue(success); + assertDoesNotThrow(() -> Billing.fundWallet("2000", PaymentMethod.Priority.PRIMARY)); } /** diff --git a/src/test/java/com/easypost/CarrierAccountTest.java b/src/test/java/com/easypost/CarrierAccountTest.java index 60307c9d9..9c764f180 100644 --- a/src/test/java/com/easypost/CarrierAccountTest.java +++ b/src/test/java/com/easypost/CarrierAccountTest.java @@ -12,6 +12,7 @@ import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -135,7 +136,7 @@ public void testDelete() throws EasyPostException { CarrierAccount carrierAccount = createBasicCarrierAccount(); - carrierAccount.delete(); + assertDoesNotThrow(() -> carrierAccount.delete()); } /** diff --git a/src/test/java/com/easypost/ReferralTest.java b/src/test/java/com/easypost/ReferralTest.java index 408e76fd2..ca63ba364 100644 --- a/src/test/java/com/easypost/ReferralTest.java +++ b/src/test/java/com/easypost/ReferralTest.java @@ -13,6 +13,7 @@ import java.util.List; import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -70,9 +71,8 @@ public void testUpdate() throws EasyPostException { vcr.setUpTest("update"); ReferralCustomer referralUser = createReferral(); - boolean response = ReferralCustomer.updateEmail("email@example.com", referralUser.getId()); - assertTrue(response); + assertDoesNotThrow(() -> ReferralCustomer.updateEmail("email@example.com", referralUser.getId())); } /** diff --git a/src/test/java/com/easypost/TrackerTest.java b/src/test/java/com/easypost/TrackerTest.java index 82c99826d..0371b2c58 100644 --- a/src/test/java/com/easypost/TrackerTest.java +++ b/src/test/java/com/easypost/TrackerTest.java @@ -10,6 +10,7 @@ import java.util.List; import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -119,9 +120,6 @@ public void testCreateList() throws EasyPostException { params.put(String.valueOf(i), tracker); } - boolean response = Tracker.createList(params); - - // This endpoint returns nothing so we assert the function returns true - assertTrue(response); + assertDoesNotThrow(() -> Tracker.createList(params)); } } diff --git a/src/test/java/com/easypost/UserTest.java b/src/test/java/com/easypost/UserTest.java index b56e7bdb2..3bc612834 100644 --- a/src/test/java/com/easypost/UserTest.java +++ b/src/test/java/com/easypost/UserTest.java @@ -13,6 +13,7 @@ import java.util.List; import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -155,7 +156,7 @@ public void testDelete() throws EasyPostException { User user = createUser(); - user.delete(); + assertDoesNotThrow(() -> user.delete()); } /** diff --git a/src/test/java/com/easypost/WebhookTest.java b/src/test/java/com/easypost/WebhookTest.java index a2376e1ab..3273b3479 100644 --- a/src/test/java/com/easypost/WebhookTest.java +++ b/src/test/java/com/easypost/WebhookTest.java @@ -15,6 +15,7 @@ import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -142,7 +143,7 @@ public void testDelete() throws EasyPostException { Webhook webhook = createBasicWebhook(); Webhook retrievedWebhook = Webhook.retrieve(webhook.getId()); - retrievedWebhook.delete(); + assertDoesNotThrow(() -> retrievedWebhook.delete()); testWebhookId = null; // need to disable post-test deletion for test to work } From fcb7c3ed57c4686eca3ecc602b2110e81ebdc858 Mon Sep 17 00:00:00 2001 From: jchen293 Date: Thu, 6 Oct 2022 13:21:11 -0400 Subject: [PATCH 006/208] override equals() and hashcode() (#191) --- .../com/easypost/net/EasyPostResource.java | 23 +++++++++++++++++++ src/test/java/com/easypost/AddressTest.java | 2 +- .../java/com/easypost/CarrierAccountTest.java | 3 +-- .../java/com/easypost/CustomsInfoTest.java | 3 +-- .../java/com/easypost/CustomsItemTest.java | 3 +-- src/test/java/com/easypost/ParcelTest.java | 3 +-- src/test/java/com/easypost/PickupTest.java | 3 +-- src/test/java/com/easypost/RateTest.java | 4 ++-- src/test/java/com/easypost/RefundTest.java | 3 +-- src/test/java/com/easypost/ScanFormTest.java | 3 +-- src/test/java/com/easypost/ShipmentTest.java | 3 +-- src/test/java/com/easypost/WebhookTest.java | 3 +-- 12 files changed, 35 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/easypost/net/EasyPostResource.java b/src/main/java/com/easypost/net/EasyPostResource.java index 77011ef08..5f24c282a 100644 --- a/src/main/java/com/easypost/net/EasyPostResource.java +++ b/src/main/java/com/easypost/net/EasyPostResource.java @@ -874,4 +874,27 @@ public String getType() { } } + /** + * Override the hashCode method because it is needed when overriding equals(). + * + * @return The hashcode of current object. + */ + @Override + public int hashCode() { + return GSON.toJson(this).hashCode(); + } + + /** + * Override the equals method, convert objects to Json strings for comparsion. + * + * @param object Object of any class. + * @return If two objects have the same properties. + */ + @Override + public boolean equals(Object object) { + String currentObject = GSON.toJson(this); + String newObject = GSON.toJson(object); + + return currentObject.equals(newObject); + } } diff --git a/src/test/java/com/easypost/AddressTest.java b/src/test/java/com/easypost/AddressTest.java index bfc674d31..edb2557a3 100644 --- a/src/test/java/com/easypost/AddressTest.java +++ b/src/test/java/com/easypost/AddressTest.java @@ -131,7 +131,7 @@ public void testRetrieve() throws EasyPostException { Address retrievedAddress = Address.retrieve(address.getId()); assertInstanceOf(Address.class, retrievedAddress); - assertEquals(address.getId(), retrievedAddress.getId()); + assertTrue(address.equals(retrievedAddress)); } diff --git a/src/test/java/com/easypost/CarrierAccountTest.java b/src/test/java/com/easypost/CarrierAccountTest.java index 9c764f180..f0bd4c371 100644 --- a/src/test/java/com/easypost/CarrierAccountTest.java +++ b/src/test/java/com/easypost/CarrierAccountTest.java @@ -11,7 +11,6 @@ import java.util.List; import java.util.Map; -import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; @@ -85,7 +84,7 @@ public void testRetrieve() throws EasyPostException { assertInstanceOf(CarrierAccount.class, retrieveCarrierAccount); assertTrue(retrieveCarrierAccount.getId().startsWith("ca_")); - assertThat(carrierAccount).usingRecursiveComparison().isEqualTo(retrieveCarrierAccount); + assertTrue(carrierAccount.equals(retrieveCarrierAccount)); } /** diff --git a/src/test/java/com/easypost/CustomsInfoTest.java b/src/test/java/com/easypost/CustomsInfoTest.java index cfeef11fa..383f4b042 100644 --- a/src/test/java/com/easypost/CustomsInfoTest.java +++ b/src/test/java/com/easypost/CustomsInfoTest.java @@ -5,7 +5,6 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -62,6 +61,6 @@ public void testRetrieve() throws EasyPostException { CustomsInfo retrievedCustomsInfo = CustomsInfo.retrieve(customsInfo.getId()); assertInstanceOf(CustomsInfo.class, retrievedCustomsInfo); - assertThat(customsInfo).usingRecursiveComparison().isEqualTo(retrievedCustomsInfo); + assertTrue(customsInfo.equals(retrievedCustomsInfo)); } } diff --git a/src/test/java/com/easypost/CustomsItemTest.java b/src/test/java/com/easypost/CustomsItemTest.java index ab1b644c0..b0ddfc0a2 100644 --- a/src/test/java/com/easypost/CustomsItemTest.java +++ b/src/test/java/com/easypost/CustomsItemTest.java @@ -5,7 +5,6 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -62,6 +61,6 @@ public void testRetrieve() throws EasyPostException { CustomsItem retrieveCustomsItem = CustomsItem.retrieve(customsItem.getId()); assertInstanceOf(CustomsItem.class, customsItem); - assertThat(customsItem).usingRecursiveComparison().isEqualTo(retrieveCustomsItem); + assertTrue(customsItem.equals(retrieveCustomsItem)); } } diff --git a/src/test/java/com/easypost/ParcelTest.java b/src/test/java/com/easypost/ParcelTest.java index e4440cd68..2678f3b32 100644 --- a/src/test/java/com/easypost/ParcelTest.java +++ b/src/test/java/com/easypost/ParcelTest.java @@ -5,7 +5,6 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -62,6 +61,6 @@ public void testRetrieve() throws EasyPostException { Parcel retrievedParcel = Parcel.retrieve(parcel.getId()); assertInstanceOf(Parcel.class, retrievedParcel); - assertThat(parcel).usingRecursiveComparison().isEqualTo(retrievedParcel); + assertTrue(parcel.equals(retrievedParcel)); } } diff --git a/src/test/java/com/easypost/PickupTest.java b/src/test/java/com/easypost/PickupTest.java index d5951f9c3..bd26f29d4 100644 --- a/src/test/java/com/easypost/PickupTest.java +++ b/src/test/java/com/easypost/PickupTest.java @@ -13,7 +13,6 @@ import java.util.List; import java.util.Map; -import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -78,7 +77,7 @@ public void testRetrieve() throws EasyPostException { Pickup retrievedPickup = Pickup.retrieve(pickup.getId()); assertInstanceOf(Pickup.class, retrievedPickup); - assertThat(pickup).usingRecursiveComparison().isEqualTo(retrievedPickup); + assertTrue(pickup.equals(retrievedPickup)); } /** diff --git a/src/test/java/com/easypost/RateTest.java b/src/test/java/com/easypost/RateTest.java index d66f019d5..dfa729558 100644 --- a/src/test/java/com/easypost/RateTest.java +++ b/src/test/java/com/easypost/RateTest.java @@ -6,8 +6,8 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertTrue; public final class RateTest { private static TestUtils.VCR vcr; @@ -37,6 +37,6 @@ public void testRetrieve() throws EasyPostException { Rate retrievedRate = Rate.retrieve(rate.getId()); assertInstanceOf(Rate.class, rate); - assertThat(rate).usingRecursiveComparison().isEqualTo(retrievedRate); + assertTrue(rate.equals(retrievedRate)); } } diff --git a/src/test/java/com/easypost/RefundTest.java b/src/test/java/com/easypost/RefundTest.java index d0ff60526..24c8a13e4 100644 --- a/src/test/java/com/easypost/RefundTest.java +++ b/src/test/java/com/easypost/RefundTest.java @@ -11,7 +11,6 @@ import java.util.List; import java.util.Map; -import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -103,6 +102,6 @@ public void testRetrieve() throws EasyPostException { Refund retrievedRefund = Refund.retrieve(refund.getId()); assertInstanceOf(Refund.class, retrievedRefund); - assertThat(refund).usingRecursiveComparison().isEqualTo(retrievedRefund); + assertTrue(refund.equals(retrievedRefund)); } } diff --git a/src/test/java/com/easypost/ScanFormTest.java b/src/test/java/com/easypost/ScanFormTest.java index 6ebd900b1..f0453b27b 100644 --- a/src/test/java/com/easypost/ScanFormTest.java +++ b/src/test/java/com/easypost/ScanFormTest.java @@ -12,7 +12,6 @@ import java.util.List; import java.util.Map; -import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -77,7 +76,7 @@ public void testRetrieve() throws EasyPostException { ScanForm retrievedScanForm = ScanForm.retrieve(scanForm.getId()); assertInstanceOf(ScanForm.class, retrievedScanForm); - assertThat(scanForm).usingRecursiveComparison().isEqualTo(retrievedScanForm); + assertTrue(scanForm.equals(retrievedScanForm)); } /** diff --git a/src/test/java/com/easypost/ShipmentTest.java b/src/test/java/com/easypost/ShipmentTest.java index 2aa470317..aef8f812c 100644 --- a/src/test/java/com/easypost/ShipmentTest.java +++ b/src/test/java/com/easypost/ShipmentTest.java @@ -21,7 +21,6 @@ import java.util.List; import java.util.Map; -import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -84,7 +83,7 @@ public void testRetrieve() throws EasyPostException { Shipment retrievedShipment = Shipment.retrieve(shipment.getId()); assertInstanceOf(Shipment.class, retrievedShipment); - assertThat(shipment).usingRecursiveComparison().isEqualTo(retrievedShipment); + assertTrue(shipment.equals(retrievedShipment)); } /** diff --git a/src/test/java/com/easypost/WebhookTest.java b/src/test/java/com/easypost/WebhookTest.java index 3273b3479..234a28d25 100644 --- a/src/test/java/com/easypost/WebhookTest.java +++ b/src/test/java/com/easypost/WebhookTest.java @@ -14,7 +14,6 @@ import java.util.List; import java.util.Map; -import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; @@ -96,7 +95,7 @@ public void testRetrieve() throws EasyPostException { Webhook retrievedWebhook = Webhook.retrieve(webhook.getId()); assertInstanceOf(Webhook.class, retrievedWebhook); - assertThat(webhook).usingRecursiveComparison().isEqualTo(retrievedWebhook); + assertTrue(webhook.equals(retrievedWebhook)); } /** From 4ec3d17f02f75962f81a05230ee6086b8a20a774 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 7 Oct 2022 16:10:53 -0600 Subject: [PATCH 007/208] chore: enable workflow dispatch on CI --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3b484469..7aa95d626 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: push: branches: [ master ] pull_request: ~ + workflow_dispatch: ~ jobs: build: From fec3309b468186ce9a66a0064bc635e29a95cd4c Mon Sep 17 00:00:00 2001 From: jchen293 Date: Tue, 18 Oct 2022 18:07:13 -0400 Subject: [PATCH 008/208] remove assertj dependency (#194) --- pom.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pom.xml b/pom.xml index 61a210aad..2ad3b0569 100644 --- a/pom.xml +++ b/pom.xml @@ -41,12 +41,6 @@ gson 2.8.9 - - org.assertj - assertj-core - 3.22.0 - test - org.junit.jupiter junit-jupiter From 670a6b0b845e29fe2f620d831b3f2755b222eb0f Mon Sep 17 00:00:00 2001 From: jchen293 Date: Wed, 19 Oct 2022 15:07:45 -0400 Subject: [PATCH 009/208] improve Event class (#195) --- CHANGELOG.md | 2 + src/main/java/com/easypost/model/Event.java | 43 ++++- .../com/easypost/model/EventDeserializer.java | 147 ------------------ .../com/easypost/net/EasyPostResource.java | 6 +- src/test/java/com/easypost/WebhookTest.java | 1 + 5 files changed, 44 insertions(+), 155 deletions(-) delete mode 100644 src/main/java/com/easypost/model/EventDeserializer.java diff --git a/CHANGELOG.md b/CHANGELOG.md index dc3ee2bcd..6e5e88a83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ - `fundWallet()` and `deletePaymentMethod()` in Billing class - `createList()` in Tracker class - `updateEmail()` in ReferralCustomer class +- Adds two missing attributes in the Event class: `pendingUrls` and `completedUrls` +- Changes the type `result` of Event from `EasyPostResource` to `Map` ## v5.10.0 (2022-09-21) diff --git a/src/main/java/com/easypost/model/Event.java b/src/main/java/com/easypost/model/Event.java index 47f1c8724..8ca0448e8 100644 --- a/src/main/java/com/easypost/model/Event.java +++ b/src/main/java/com/easypost/model/Event.java @@ -3,14 +3,17 @@ import com.easypost.exception.EasyPostException; import com.easypost.net.EasyPostResource; +import java.util.List; import java.util.Map; public final class Event extends EasyPostResource { private String id; private String description; private String mode; - private EasyPostResource result; + private Map result; private Map previousAttributes; + private List pendingUrls; + private List completedUrls; /** * Get the description of this Event. @@ -89,7 +92,7 @@ public void setPreviousAttributes(final Map previousAttributes) * * @return Event's result */ - public EasyPostResource getResult() { + public Map getResult() { return result; } @@ -98,10 +101,44 @@ public EasyPostResource getResult() { * * @param result Event's result */ - public void setResult(final EasyPostResource result) { + public void setResult(final Map result) { this.result = result; } + /** + * Get the pendingUrls of this Event. + * + * @return Event's pendingUrls + */ + public List getPendingUrls() { + return this.pendingUrls; + } + + /** + * + * @param pendingUrls pendingUrls of this Event + */ + public void setPendingUrls(List pendingUrls) { + this.pendingUrls = pendingUrls; + } + + /** + * Get the completedUrls of this Event. + * + * @return Event's completedUrls + */ + public List getCompletedUrls() { + return this.completedUrls; + } + + /** + * + * @param completedUrls pendingUrls of this Event + */ + public void setCompletedUrls(List completedUrls) { + this.completedUrls = completedUrls; + } + /** * Retrieve a Event from the API. * diff --git a/src/main/java/com/easypost/model/EventDeserializer.java b/src/main/java/com/easypost/model/EventDeserializer.java deleted file mode 100644 index e4cb34ff2..000000000 --- a/src/main/java/com/easypost/model/EventDeserializer.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.easypost.model; - -import com.easypost.net.EasyPostResource; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.JsonPrimitive; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -public class EventDeserializer implements JsonDeserializer { - - @SuppressWarnings ("rawtypes") - private static final Map OBJECT_MAP = new HashMap(); - - static { - OBJECT_MAP.put("Address", Address.class); - OBJECT_MAP.put("Batch", Batch.class); - OBJECT_MAP.put("CustomsInfo", CustomsInfo.class); - OBJECT_MAP.put("CustomsItem", CustomsItem.class); - OBJECT_MAP.put("Event", Event.class); - OBJECT_MAP.put("Fee", Fee.class); - OBJECT_MAP.put("Parcel", Parcel.class); - OBJECT_MAP.put("PostageLabel", PostageLabel.class); - OBJECT_MAP.put("Rate", Rate.class); - OBJECT_MAP.put("Refund", Refund.class); - OBJECT_MAP.put("ScanForm", ScanForm.class); - OBJECT_MAP.put("Shipment", Shipment.class); - OBJECT_MAP.put("TimeInTransit", TimeInTransit.class); - OBJECT_MAP.put("Tracker", Tracker.class); - OBJECT_MAP.put("TrackingDetail", TrackingDetail.class); - OBJECT_MAP.put("Webhook", Webhook.class); - } - - /** - * Deserialize a JSON primitive into a Java object. - * - * @param element The JSON primitive to deserialize. - * @return The deserialized Java object. - */ - private Object deserializeJsonPrimitive(final JsonPrimitive element) { - if (element.isBoolean()) { - return element.getAsBoolean(); - } else if (element.isNumber()) { - return element.getAsNumber(); - } else { - return element.getAsString(); - } - } - - /** - * Deserialize a JSON array into a Java object. - * - * @param arr The JSON array to deserialize. - * @return The deserialized Java object. - */ - private Object[] deserializeJsonArray(final JsonArray arr) { - Object[] elems = new Object[arr.size()]; - Iterator elemIter = arr.iterator(); - int i = 0; - while (elemIter.hasNext()) { - JsonElement elem = elemIter.next(); - elems[i++] = deserializeJsonElement(elem); - } - return elems; - } - - /** - * Deserialize a JSON object into a Java object. - * - * @param element The JSON object to deserialize. - * @return The deserialized Java object. - */ - private Object deserializeJsonElement(final JsonElement element) { - if (element.isJsonNull()) { - return null; - } else if (element.isJsonObject()) { - Map valueMap = new HashMap(); - populateMapFromJSONObject(valueMap, element.getAsJsonObject()); - return valueMap; - } else if (element.isJsonPrimitive()) { - return deserializeJsonPrimitive(element.getAsJsonPrimitive()); - } else if (element.isJsonArray()) { - return deserializeJsonArray(element.getAsJsonArray()); - } else { - System.err.printf("Unknown JSON element type for element %s. Please email us at %s.%n", element, - EasyPostResource.EASYPOST_SUPPORT_EMAIL); - return null; - } - } - - /** - * Populate a map from a JSON object. - * - * @param objMap The map to populate. - * @param jsonObject The JSON object to populate the map from. - */ - private void populateMapFromJSONObject(final Map objMap, final JsonObject jsonObject) { - for (Map.Entry entry : jsonObject.entrySet()) { - String key = entry.getKey(); - JsonElement element = entry.getValue(); - objMap.put(key, deserializeJsonElement(element)); - } - } - - /** - * Deserialize a JSON object into a Java object. - * - * @param json The JSON object to deserialize. - * @param typeOfT The type of the Java object to deserialize into. - * @param context The deserialization context. - * @return The deserialized Java object. - * @throws JsonParseException if the JSON object is not a valid Event. - */ - @SuppressWarnings ("unchecked") - public Event deserialize(final JsonElement json, final Type typeOfT, final JsonDeserializationContext context) - throws JsonParseException { - Event event = new Event(); - - JsonObject jsonObject = json.getAsJsonObject(); - for (Map.Entry entry : jsonObject.entrySet()) { - String key = entry.getKey(); - JsonElement element = entry.getValue(); - if ("previous_attributes".equals(key) && !element.isJsonNull()) { - Map previousAttributes = new HashMap(); - populateMapFromJSONObject(previousAttributes, element.getAsJsonObject()); - event.setPreviousAttributes(previousAttributes); - } else if ("result".equals(key)) { - String type = element.getAsJsonObject().get("object").getAsString(); - Class cl = OBJECT_MAP.get(type); - EasyPostResource result = EasyPostResource.GSON.fromJson(entry.getValue(), cl); - event.setResult(result); - } - } - event.setId(jsonObject.get("id").getAsString()); - event.setDescription(jsonObject.get("description").getAsString()); - event.setMode(jsonObject.get("mode").getAsString()); - - return event; - } -} diff --git a/src/main/java/com/easypost/net/EasyPostResource.java b/src/main/java/com/easypost/net/EasyPostResource.java index 5f24c282a..42d79ecab 100644 --- a/src/main/java/com/easypost/net/EasyPostResource.java +++ b/src/main/java/com/easypost/net/EasyPostResource.java @@ -10,8 +10,6 @@ import com.easypost.EasyPost; import com.easypost.exception.EasyPostException; -import com.easypost.model.Event; -import com.easypost.model.EventDeserializer; import com.easypost.model.Fee; import com.easypost.model.Shipment; import com.easypost.model.SmartrateCollection; @@ -58,11 +56,9 @@ protected enum RequestMethod { public static final Gson GSON = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) .registerTypeAdapter(HashMap.class, new HashMapSerializer()) - .registerTypeAdapter(Event.class, new EventDeserializer()) .registerTypeAdapter(SmartrateCollection.class, new SmartrateCollectionDeserializer()).create(); public static final Gson PRETTY_PRINT_GSON = new GsonBuilder().setPrettyPrinting().serializeNulls() - .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) - .registerTypeAdapter(Event.class, new EventDeserializer()).create(); + .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create(); public static final String CHARSET = "UTF-8"; public static final ArrayList GLOBAL_FIELD_ACCESSORS = new ArrayList<>(Arrays.asList("getCreatedAt", "getUpdatedAt", "getFees")); diff --git a/src/test/java/com/easypost/WebhookTest.java b/src/test/java/com/easypost/WebhookTest.java index 234a28d25..01b645e90 100644 --- a/src/test/java/com/easypost/WebhookTest.java +++ b/src/test/java/com/easypost/WebhookTest.java @@ -165,6 +165,7 @@ public void testValidateWebhook() throws EasyPostException { Event event = Webhook.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); assertEquals("batch.created", event.getDescription()); + assertEquals("batch_123...", event.getResult().get("id")); } /** From 4ae0a722df50d825d91b526830bbe9cd355d0930 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Wed, 19 Oct 2022 21:36:13 -0600 Subject: [PATCH 010/208] fix: test mode endshipper tests --- src/test/cassettes/end_shipper/all.json | 22 +- src/test/cassettes/end_shipper/create.json | 24 +- src/test/cassettes/end_shipper/retrieve.json | 53 ++-- src/test/cassettes/end_shipper/update.json | 51 ++-- .../buy_shipment_with_end_shipper_id.json | 287 ++++++++++++++++++ .../java/com/easypost/EndShipperTest.java | 2 +- src/test/java/com/easypost/ShipmentTest.java | 19 ++ 7 files changed, 382 insertions(+), 76 deletions(-) create mode 100644 src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json diff --git a/src/test/cassettes/end_shipper/all.json b/src/test/cassettes/end_shipper/all.json index c6d9c5a6b..440c246ab 100644 --- a/src/test/cassettes/end_shipper/all.json +++ b/src/test/cassettes/end_shipper/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661457163, + "recordedAt": 1666236891, "request": { "body": "", "method": "GET", @@ -15,20 +15,20 @@ "uri": "https://api.easypost.com/v2/end_shippers?page_size\u003d5" }, "response": { - "body": "{\n \"has_more\": true,\n \"end_shippers\": [\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-05-11T22:49:45+00:00\",\n \"updated_at\": \"2022-05-11T22:49:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": \"EASYPOST\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_db92a416bbf343b5b3151465624eb3dc\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-05-11T22:50:28+00:00\",\n \"updated_at\": \"2022-05-11T22:50:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": \"EASYPOST\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_e0f5edab6d7c4e27ad74750bdafbde4d\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-05-11T22:50:32+00:00\",\n \"updated_at\": \"2022-05-11T22:50:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": \"EASYPOST\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_1509ca3895ef469d9b877244f6e0ac35\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-05-11T23:12:05+00:00\",\n \"updated_at\": \"2022-05-11T23:12:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": \"EASYPOST\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_c0453e9c062347699f4abef8d1588f27\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-05-11T23:13:54+00:00\",\n \"updated_at\": \"2022-05-11T23:13:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": \"EASYPOST\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_02698cc379434d3db832b0608fa29bc0\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n }\n ]\n}", + "body": "{\n \"has_more\": false,\n \"end_shippers\": [\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:02+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_8eaae3d51c73441b99e4e4987967b108\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:03+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_7fe9380a871d462faba35c8badfe3af6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:03+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:04+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"NEW NAME\",\n \"company\": \"EASYPOST\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_2d007aa105de4b5e97cbcddf386a29b3\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "1834" + "1141" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,26 +55,26 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d30bf7dae7d50009a1a6" + "c499f3b46350c1d9e2cba87b000bf068" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb1nuq 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.057165" + "1.735228" ], "etag": [ - "W/\"b59c6a898bcc8b89834ebbfb4e6a776d\"" + "W/\"3bda2e7b4995f9e4e53b637bc379de0f\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202210192121-de6c7d8326-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,6 +87,6 @@ "errors": null, "uri": "https://api.easypost.com/v2/end_shippers?page_size\u003d5" }, - "duration": 343 + "duration": 1860 } ] \ No newline at end of file diff --git a/src/test/cassettes/end_shipper/create.json b/src/test/cassettes/end_shipper/create.json index 5d8f50421..dbabc64e1 100644 --- a/src/test/cassettes/end_shipper/create.json +++ b/src/test/cassettes/end_shipper/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661457165, + "recordedAt": 1666236543, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,20 +18,20 @@ "uri": "https://api.easypost.com/v2/end_shippers" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:52:45+00:00\",\n \"updated_at\": \"2022-08-25T19:52:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_b79e678eb1da4b8b9fa76a63c0e60441\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:03+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_7fe9380a871d462faba35c8badfe3af6\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "351" + "365" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,27 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "4cb7bec76307d30cf7caefd800080978" + "85b6f8c76350c07fe2cb9fd1000961ef" ], "x-proxied": [ - "extlb4wdc 9ce216bfac", - "intlb2wdc 6aa9972c1e", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.042280" + "0.052987" ], "etag": [ - "W/\"6d960cd7b8d5792544b852a80e3258cc\"" + "W/\"90bc89628d353a14e6fb9bd721ad7b67\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202210192121-de6c7d8326-master" ], "cache-control": [ "private, no-cache, no-store" @@ -91,6 +91,6 @@ "errors": null, "uri": "https://api.easypost.com/v2/end_shippers" }, - "duration": 338 + "duration": 418 } ] \ No newline at end of file diff --git a/src/test/cassettes/end_shipper/retrieve.json b/src/test/cassettes/end_shipper/retrieve.json index 999b8cd04..5df0b5e67 100644 --- a/src/test/cassettes/end_shipper/retrieve.json +++ b/src/test/cassettes/end_shipper/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661457164, + "recordedAt": 1666236542, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,20 +18,20 @@ "uri": "https://api.easypost.com/v2/end_shippers" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:52:44+00:00\",\n \"updated_at\": \"2022-08-25T19:52:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_d1d72fa6085443e985f53012381f259e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:02+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_8eaae3d51c73441b99e4e4987967b108\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "351" + "365" ], "expires": [ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,9 +51,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -61,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d30cf7ef28d70009a1cb" + "85b6f8c56350c07de2cb9cc0000961b9" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037954" + "0.045062" ], "etag": [ - "W/\"57ee198f343a77b6b994266afb950cae\"" + "W/\"eeab1906a7a9250fb57f5e485468b32d\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202210192121-de6c7d8326-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,10 +91,10 @@ "errors": null, "uri": "https://api.easypost.com/v2/end_shippers" }, - "duration": 188 + "duration": 417 }, { - "recordedAt": 1661457164, + "recordedAt": 1666236542, "request": { "body": "", "method": "GET", @@ -108,23 +106,23 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/end_shippers/es_d1d72fa6085443e985f53012381f259e" + "uri": "https://api.easypost.com/v2/end_shippers/es_8eaae3d51c73441b99e4e4987967b108" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:52:44+00:00\",\n \"updated_at\": \"2022-08-25T19:52:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_d1d72fa6085443e985f53012381f259e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:02+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_8eaae3d51c73441b99e4e4987967b108\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "353" + "367" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,26 +149,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d30cf7edfed40009a1df" + "85b6f8c06350c07ee2cb9fcf000961cd" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.033761" + "0.033413" ], "etag": [ - "W/\"a4ed696baf9b34d24023c0205e789755\"" + "W/\"caf46cf486d8b579557a6f906308d794\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202210192121-de6c7d8326-master" ], "cache-control": [ "private, no-cache, no-store" @@ -181,8 +180,8 @@ "message": "OK" }, "errors": null, - "uri": "https://api.easypost.com/v2/end_shippers/es_d1d72fa6085443e985f53012381f259e" + "uri": "https://api.easypost.com/v2/end_shippers/es_8eaae3d51c73441b99e4e4987967b108" }, - "duration": 168 + "duration": 382 } ] \ No newline at end of file diff --git a/src/test/cassettes/end_shipper/update.json b/src/test/cassettes/end_shipper/update.json index 3794eae06..1ded276bf 100644 --- a/src/test/cassettes/end_shipper/update.json +++ b/src/test/cassettes/end_shipper/update.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661457165, + "recordedAt": 1666236543, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,20 +18,20 @@ "uri": "https://api.easypost.com/v2/end_shippers" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:52:45+00:00\",\n \"updated_at\": \"2022-08-25T19:52:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_194f830c7a0c4565a9acf28fe5147bbb\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:03+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_2d007aa105de4b5e97cbcddf386a29b3\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "351" + "365" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,27 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "4cb7beca6307d30df7dd8bfa00080994" + "85b6f8c76350c07fe2cb9fd300096206" ], "x-proxied": [ - "extlb4wdc 9ce216bfac", - "intlb1wdc 6aa9972c1e", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.130275" + "0.046669" ], "etag": [ - "W/\"e7f77589fad5971000d74dad0b2d717c\"" + "W/\"6b5c4d30ad53fe0538a717341448426c\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202210192121-de6c7d8326-master" ], "cache-control": [ "private, no-cache, no-store" @@ -91,10 +91,10 @@ "errors": null, "uri": "https://api.easypost.com/v2/end_shippers" }, - "duration": 422 + "duration": 392 }, { - "recordedAt": 1661457166, + "recordedAt": 1666236544, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"NEW NAME\",\n \"company\": \"EasyPost\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "PUT", @@ -109,23 +109,23 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/end_shippers/es_194f830c7a0c4565a9acf28fe5147bbb" + "uri": "https://api.easypost.com/v2/end_shippers/es_2d007aa105de4b5e97cbcddf386a29b3" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:52:45+00:00\",\n \"updated_at\": \"2022-08-25T19:52:46+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"NEW NAME\",\n \"company\": \"EASYPOST\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_194f830c7a0c4565a9acf28fe5147bbb\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:03+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:04+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"NEW NAME\",\n \"company\": \"EASYPOST\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_2d007aa105de4b5e97cbcddf386a29b3\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "353" + "367" ], "expires": [ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -152,26 +152,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92346307d30ef7b7b96a000981d8" + "85b6f8c36350c080e2cb9fd50009621e" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.057519" + "0.059590" ], "etag": [ - "W/\"147c562a754afb6c13ed7617c5518b50\"" + "W/\"2618dc0063694be8677069fa6f9018fc\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202210192121-de6c7d8326-master" ], "cache-control": [ "private, no-cache, no-store" @@ -182,8 +183,8 @@ "message": "OK" }, "errors": null, - "uri": "https://api.easypost.com/v2/end_shippers/es_194f830c7a0c4565a9acf28fe5147bbb" + "uri": "https://api.easypost.com/v2/end_shippers/es_2d007aa105de4b5e97cbcddf386a29b3" }, - "duration": 197 + "duration": 432 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json b/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json new file mode 100644 index 000000000..6afbcfe49 --- /dev/null +++ b/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json @@ -0,0 +1,287 @@ +[ + { + "recordedAt": 1666236900, + "request": { + "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/end_shippers" + }, + "response": { + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:35:00+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:35:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_b7ee940fb8f0487fa903360bca8e7237\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "365" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb7nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-canary": [ + "direct" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "c499f3b56350c1e4e2cba97c000bf2f4" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.046414" + ], + "etag": [ + "W/\"a74f9b1462938a044773fde088c2dd03\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202210192121-de6c7d8326-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "errors": null, + "uri": "https://api.easypost.com/v2/end_shippers" + }, + "duration": 163 + }, + { + "recordedAt": 1666236901, + "request": { + "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "response": { + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-20T03:35:01+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-20T03:35:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2d7c68ad502811ed9592ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-20T03:35:01+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-20T03:35:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2d7c68ad502811ed9592ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_dd15dd0231a14fa8937de22fc6ed3559\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-20T03:35:00+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-20T03:35:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_2d70dc53502811edb196ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1e1a9a31b5c34ef2bd006e820cc0e940\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_0281edd60b124ed2a67e74762d25524c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9ce44d0d64084d688b46dc0c690df8e7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_15c3b5ef8de14e39898be694e7b476ba\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-20T03:35:00+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-20T03:35:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_2d70dc53502811edb196ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "5972" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb5nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "c499f3b46350c1e4e2cba97e000bf307" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.877876" + ], + "etag": [ + "W/\"78528af0495bcc36d8bd191f00a8b265\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_9d75a18436de44dfa8a9413437a2d89c" + ], + "x-version-label": [ + "easypost-202210192121-de6c7d8326-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "errors": null, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1004 + }, + { + "recordedAt": 1666236903, + "request": { + "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Oct 19, 2022, 9:35:01 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"currency\": \"USD\",\n \"id\": \"rate_15c3b5ef8de14e39898be694e7b476ba\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 19, 2022, 9:35:01 PM\"\n },\n \"end_shipper_id\": \"es_b7ee940fb8f0487fa903360bca8e7237\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_9d75a18436de44dfa8a9413437a2d89c/buy" + }, + "response": { + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-20T03:35:03Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-20T03:35:02Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:02Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_15c3b5ef8de14e39898be694e7b476ba\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-20T03:35:03Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"tracking_code\": \"9400100106068144215659\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzgyNzQ4NTcyMjQyNDQyMGM4ZmU1ZmQ1NjZlOWQ1ZWVi\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-20T03:35:03Z\",\n \"signed_by\": null,\n \"id\": \"trk_827485722424420c8fe5fd566e9d5eeb\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-20T03:35:01+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-20T03:35:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2d7c68ad502811ed9592ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-20T03:35:01+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-20T03:35:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2d7c68ad502811ed9592ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-20T03:35:02Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221020/a8eb91ba96ee4c0f9bb365670c3e1807.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-20T03:35:02Z\",\n \"id\": \"pl_00b44101d4fa4bfb9c5bf725368dca15\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-20T03:35:02Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_dd15dd0231a14fa8937de22fc6ed3559\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-20T03:35:00+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-20T03:35:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_2d70dc53502811edb196ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1e1a9a31b5c34ef2bd006e820cc0e940\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_0281edd60b124ed2a67e74762d25524c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9ce44d0d64084d688b46dc0c690df8e7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_15c3b5ef8de14e39898be694e7b476ba\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-20T03:35:00+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-20T03:35:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_2d70dc53502811edb196ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144215659\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "8182" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb3nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "c499f3b36350c1e6e2cba980000bf344" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.088560" + ], + "etag": [ + "W/\"8a8d45eb29aad6051bf7f7b32635cc9b\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202210192121-de6c7d8326-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "errors": null, + "uri": "https://api.easypost.com/v2/shipments/shp_9d75a18436de44dfa8a9413437a2d89c/buy" + }, + "duration": 1238 + } +] \ No newline at end of file diff --git a/src/test/java/com/easypost/EndShipperTest.java b/src/test/java/com/easypost/EndShipperTest.java index 17a7a3b1a..4f04d3fc7 100644 --- a/src/test/java/com/easypost/EndShipperTest.java +++ b/src/test/java/com/easypost/EndShipperTest.java @@ -25,7 +25,7 @@ public final class EndShipperTest { */ @BeforeAll public static void setup() throws EasyPostException { - vcr = new TestUtils.VCR("end_shipper", TestUtils.ApiKey.PRODUCTION); + vcr = new TestUtils.VCR("end_shipper", TestUtils.ApiKey.TEST); } /** diff --git a/src/test/java/com/easypost/ShipmentTest.java b/src/test/java/com/easypost/ShipmentTest.java index aef8f812c..cf78c5aba 100644 --- a/src/test/java/com/easypost/ShipmentTest.java +++ b/src/test/java/com/easypost/ShipmentTest.java @@ -2,6 +2,7 @@ import com.easypost.exception.EasyPostException; import com.easypost.model.Address; +import com.easypost.model.EndShipper; import com.easypost.model.Fee; import com.easypost.model.Form; import com.easypost.model.Parcel; @@ -546,4 +547,22 @@ public void testRegenerateRatesWithCarbonOffset() throws EasyPostException { assertNull(baseRate.getCarbonOffset()); assertNotNull(newCarbonRate.getCarbonOffset()); } + + /** + * Test buying a shipment with an EndShipper ID. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testBuyShipmentWithEndShipperId() throws EasyPostException { + vcr.setUpTest("buy_shipment_with_end_shipper_id"); + + EndShipper endShipper = EndShipper.create(Fixtures.caAddress1()); + + Shipment shipment = Shipment.create(Fixtures.basicShipment()); + Rate rate = shipment.lowestRate(); + Shipment boughtShipment = shipment.buy(rate, endShipper.getId()); + + assertNotNull(boughtShipment.getPostageLabel()); + } } From 2cef33d7166eeb05b894efa4241e6567b6790f77 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 20 Oct 2022 00:11:58 -0600 Subject: [PATCH 011/208] feat: expire cassettes after 6 months --- pom.xml | 2 +- src/test/java/com/easypost/TestUtils.java | 68 ++++++++++++++--------- 2 files changed, 42 insertions(+), 28 deletions(-) diff --git a/pom.xml b/pom.xml index 2ad3b0569..c0854f9f8 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ com.easypost easyvcr - 0.3.0 + 0.4.1 compile diff --git a/src/test/java/com/easypost/TestUtils.java b/src/test/java/com/easypost/TestUtils.java index 0597e669a..709b84e97 100644 --- a/src/test/java/com/easypost/TestUtils.java +++ b/src/test/java/com/easypost/TestUtils.java @@ -4,8 +4,10 @@ import com.easypost.easyvcr.Cassette; import com.easypost.easyvcr.CensorElement; import com.easypost.easyvcr.Censors; +import com.easypost.easyvcr.ExpirationActions; import com.easypost.easyvcr.MatchRules; import com.easypost.easyvcr.Mode; +import com.easypost.easyvcr.TimeFrame; import java.io.File; import java.io.IOException; @@ -24,29 +26,37 @@ public enum ApiKey { private static final String API_KEY_FAILED_TO_PULL = "couldNotPullApiKey"; private static final String CASSETTES_PATH = "src/test/cassettes"; - private static final java.util.List HEADER_CENSORS = new ArrayList() {{ - add("Authorization"); - add("User-Agent"); - }}; - private static final List QUERY_CENSORS = new ArrayList() {{ - add("card[cvc]"); - add("card[number]"); - }}; - private static final List BODY_CENSORS = new ArrayList() {{ - add("api_keys"); - add("client_ip"); - add("credentials"); - add("key"); - add("keys"); - add("phone_number"); - add("phone"); - add("test_credentials"); - }}; - private static final List BODY_ELEMENTS_TO_IGNORE_ON_MATCH = new ArrayList() {{ - // Timezone difference between machines causing failure on replay - add(new CensorElement("createdAt", false)); - add(new CensorElement("updatedAt", false)); - }}; + private static final java.util.List HEADER_CENSORS = new ArrayList() { + { + add("Authorization"); + add("User-Agent"); + } + }; + private static final List QUERY_CENSORS = new ArrayList() { + { + add("card[cvc]"); + add("card[number]"); + } + }; + private static final List BODY_CENSORS = new ArrayList() { + { + add("api_keys"); + add("client_ip"); + add("credentials"); + add("key"); + add("keys"); + add("phone_number"); + add("phone"); + add("test_credentials"); + } + }; + private static final List BODY_ELEMENTS_TO_IGNORE_ON_MATCH = new ArrayList() { + { + // Timezone difference between machines causing failure on replay + add(new CensorElement("createdAt", false)); + add(new CensorElement("updatedAt", false)); + } + }; /** * Get the directory where the program is currently executing. @@ -110,8 +120,9 @@ public static String getApiKey(ApiKey apiKey) { } String value = System.getenv(keyName); - value = (value != null && !value.isEmpty()) ? value : - API_KEY_FAILED_TO_PULL; // if can't pull from environment, will use a fake key. Won't matter on replay. + value = (value != null && !value.isEmpty()) ? value : API_KEY_FAILED_TO_PULL; // if can't pull from environment, + // will use a fake key. Won't + // matter on replay. return value; } @@ -158,11 +169,14 @@ public VCR(String testCassettesFolder, ApiKey apiKey) { */ public VCR(String testCassettesFolder, String apiKey) { AdvancedSettings advancedSettings = new AdvancedSettings(); - advancedSettings.matchRules = - new MatchRules().byMethod().byFullUrl().byBody(BODY_ELEMENTS_TO_IGNORE_ON_MATCH); + advancedSettings.matchRules = new MatchRules().byMethod().byFullUrl() + .byBody(BODY_ELEMENTS_TO_IGNORE_ON_MATCH); advancedSettings.censors = new Censors("REDACTED").censorHeadersByKeys(HEADER_CENSORS) .censorQueryParametersByKeys(QUERY_CENSORS).censorBodyElementsByKeys(BODY_CENSORS); + advancedSettings.timeFrame = TimeFrame.months6(); + advancedSettings.whenExpired = ExpirationActions.Warn; + vcr = new com.easypost.easyvcr.VCR(advancedSettings); this.apiKey = apiKey; From c9e4b87dd9ab5ea7e525cb00d4dfaff4ddf2ec00 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 20 Oct 2022 11:14:38 -0600 Subject: [PATCH 012/208] fix: bump EasyVCR version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c0854f9f8..8c0a82be8 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ com.easypost easyvcr - 0.4.1 + 0.4.2 compile From de759f2bad6f8f608591aa15a42bd0fd17ad7215 Mon Sep 17 00:00:00 2001 From: jchen293 Date: Thu, 20 Oct 2022 17:13:35 -0400 Subject: [PATCH 013/208] Improve error handling (#193) --- CHANGELOG.md | 5 +- pom.xml | 5 + .../exception/API/ForbiddenError.java | 20 +++ .../exception/API/GatewayTimeoutError.java | 20 +++ .../exception/API/InternalServerError.java | 20 +++ .../exception/API/InvalidRequestError.java | 20 +++ .../exception/API/MethodNotAllowedError.java | 20 +++ .../easypost/exception/API/NotFoundError.java | 20 +++ .../easypost/exception/API/PaymentError.java | 20 +++ .../exception/API/RateLimitError.java | 20 +++ .../easypost/exception/API/RedirectError.java | 20 +++ .../exception/API/ServiceUnavailablError.java | 20 +++ .../easypost/exception/API/TimeoutError.java | 20 +++ .../exception/API/UnauthorizedError.java | 20 +++ .../exception/API/UnknownApiError.java | 20 +++ .../easypost/exception/API/package-info.java | 9 ++ .../com/easypost/exception/Constants.java | 34 +++++ .../easypost/exception/EasyPostException.java | 92 ++++++++++---- .../exception/General/ExternalApiError.java | 14 +++ .../exception/General/FilteringError.java | 14 +++ .../exception/General/InvalidObjectError.java | 14 +++ .../General/InvalidParameterError.java | 24 ++++ .../General/MissingParameterError.java | 14 +++ .../General/SignatureVerificationError.java | 14 +++ .../exception/General/package-info.java | 9 ++ src/main/java/com/easypost/model/Billing.java | 6 +- .../java/com/easypost/model/CreditCard.java | 3 +- src/main/java/com/easypost/model/Error.java | 89 ++++++++----- .../com/easypost/model/ErrorDeserializer.java | 55 ++++++++ .../com/easypost/model/PaymentMethod.java | 4 +- .../com/easypost/model/ReferralCustomer.java | 4 +- src/main/java/com/easypost/model/Report.java | 7 +- .../java/com/easypost/model/Shipment.java | 4 +- .../com/easypost/model/SmartrateAccuracy.java | 10 +- .../com/easypost/model/TimeInTransit.java | 4 +- src/main/java/com/easypost/model/User.java | 8 +- .../java/com/easypost/model/Utilities.java | 5 +- src/main/java/com/easypost/model/Webhook.java | 7 +- .../com/easypost/net/EasyPostResource.java | 119 ++++++++++-------- .../address/error_address_creation.json | 91 ++++++++++++++ src/test/cassettes/error/error.json | 17 ++- src/test/java/com/easypost/AddressTest.java | 18 ++- src/test/java/com/easypost/ErrorTest.java | 106 +++++++++++++++- 43 files changed, 925 insertions(+), 140 deletions(-) create mode 100644 src/main/java/com/easypost/exception/API/ForbiddenError.java create mode 100644 src/main/java/com/easypost/exception/API/GatewayTimeoutError.java create mode 100644 src/main/java/com/easypost/exception/API/InternalServerError.java create mode 100644 src/main/java/com/easypost/exception/API/InvalidRequestError.java create mode 100644 src/main/java/com/easypost/exception/API/MethodNotAllowedError.java create mode 100644 src/main/java/com/easypost/exception/API/NotFoundError.java create mode 100644 src/main/java/com/easypost/exception/API/PaymentError.java create mode 100644 src/main/java/com/easypost/exception/API/RateLimitError.java create mode 100644 src/main/java/com/easypost/exception/API/RedirectError.java create mode 100644 src/main/java/com/easypost/exception/API/ServiceUnavailablError.java create mode 100644 src/main/java/com/easypost/exception/API/TimeoutError.java create mode 100644 src/main/java/com/easypost/exception/API/UnauthorizedError.java create mode 100644 src/main/java/com/easypost/exception/API/UnknownApiError.java create mode 100644 src/main/java/com/easypost/exception/API/package-info.java create mode 100644 src/main/java/com/easypost/exception/Constants.java create mode 100644 src/main/java/com/easypost/exception/General/ExternalApiError.java create mode 100644 src/main/java/com/easypost/exception/General/FilteringError.java create mode 100644 src/main/java/com/easypost/exception/General/InvalidObjectError.java create mode 100644 src/main/java/com/easypost/exception/General/InvalidParameterError.java create mode 100644 src/main/java/com/easypost/exception/General/MissingParameterError.java create mode 100644 src/main/java/com/easypost/exception/General/SignatureVerificationError.java create mode 100644 src/main/java/com/easypost/exception/General/package-info.java create mode 100644 src/main/java/com/easypost/model/ErrorDeserializer.java create mode 100644 src/test/cassettes/address/error_address_creation.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e5e88a83..a191e17c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,16 @@ - Changes the type of Insurance `Amount` from Float to String - Removes `getUpdate` and `setUpdate` from Tracker class - Removes all beta features and corrsponding unit tests -- Remove `serviceCode` from `Rate` class since this value is internal use only +- Removes `serviceCode` from `Rate` class since this value is internal use only - Converts return type from boolean to void in empty response body functions - `fundWallet()` and `deletePaymentMethod()` in Billing class - `createList()` in Tracker class - `updateEmail()` in ReferralCustomer class - Adds two missing attributes in the Event class: `pendingUrls` and `completedUrls` - Changes the type `result` of Event from `EasyPostResource` to `Map` +- Improves error exception handling + - Specific error types for each category of error + - API error message may be an array rather than a string. Arrays will be concatenated (by comma) and returned as a string. ## v5.10.0 (2022-09-21) diff --git a/pom.xml b/pom.xml index 8c0a82be8..9986188b1 100644 --- a/pom.xml +++ b/pom.xml @@ -64,6 +64,11 @@ 0.4.2 compile + + org.apache.httpcomponents + httpclient + 4.5.13 + diff --git a/src/main/java/com/easypost/exception/API/ForbiddenError.java b/src/main/java/com/easypost/exception/API/ForbiddenError.java new file mode 100644 index 000000000..fab4126ab --- /dev/null +++ b/src/main/java/com/easypost/exception/API/ForbiddenError.java @@ -0,0 +1,20 @@ +package com.easypost.exception.API; + +import java.util.List; + +import com.easypost.model.Error; +import com.easypost.exception.EasyPostException; + +public class ForbiddenError extends EasyPostException { + /** + * ForbiddenError constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public ForbiddenError(final String message, final String code, final int statusCode, List errors) { + super(message, code, statusCode, errors); + } +} diff --git a/src/main/java/com/easypost/exception/API/GatewayTimeoutError.java b/src/main/java/com/easypost/exception/API/GatewayTimeoutError.java new file mode 100644 index 000000000..3e205d44a --- /dev/null +++ b/src/main/java/com/easypost/exception/API/GatewayTimeoutError.java @@ -0,0 +1,20 @@ +package com.easypost.exception.API; + +import java.util.List; + +import com.easypost.model.Error; +import com.easypost.exception.EasyPostException; + +public class GatewayTimeoutError extends EasyPostException { + /** + * GatewayTimeoutError constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public GatewayTimeoutError(final String message, final String code, final int statusCode, List errors) { + super(message, code, statusCode, errors); + } +} diff --git a/src/main/java/com/easypost/exception/API/InternalServerError.java b/src/main/java/com/easypost/exception/API/InternalServerError.java new file mode 100644 index 000000000..61b4b7ee3 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/InternalServerError.java @@ -0,0 +1,20 @@ +package com.easypost.exception.API; + +import java.util.List; + +import com.easypost.model.Error; +import com.easypost.exception.EasyPostException; + +public class InternalServerError extends EasyPostException { + /** + * InternalServerError constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public InternalServerError(final String message, final String code, final int statusCode, List errors) { + super(message, code, statusCode, errors); + } +} diff --git a/src/main/java/com/easypost/exception/API/InvalidRequestError.java b/src/main/java/com/easypost/exception/API/InvalidRequestError.java new file mode 100644 index 000000000..6ca255f23 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/InvalidRequestError.java @@ -0,0 +1,20 @@ +package com.easypost.exception.API; + +import java.util.List; + +import com.easypost.model.Error; +import com.easypost.exception.EasyPostException; + +public class InvalidRequestError extends EasyPostException { + /** + * InvalidRequestError constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public InvalidRequestError(final String message, final String code, final int statusCode, List errors) { + super(message, code, statusCode, errors); + } +} diff --git a/src/main/java/com/easypost/exception/API/MethodNotAllowedError.java b/src/main/java/com/easypost/exception/API/MethodNotAllowedError.java new file mode 100644 index 000000000..6fe9b98d3 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/MethodNotAllowedError.java @@ -0,0 +1,20 @@ +package com.easypost.exception.API; + +import java.util.List; + +import com.easypost.model.Error; +import com.easypost.exception.EasyPostException; + +public class MethodNotAllowedError extends EasyPostException { + /** + * MethodNotAllowedError constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public MethodNotAllowedError(final String message, final String code, final int statusCode, List errors) { + super(message, code, statusCode, errors); + } +} diff --git a/src/main/java/com/easypost/exception/API/NotFoundError.java b/src/main/java/com/easypost/exception/API/NotFoundError.java new file mode 100644 index 000000000..0eba51e24 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/NotFoundError.java @@ -0,0 +1,20 @@ +package com.easypost.exception.API; + +import java.util.List; + +import com.easypost.model.Error; +import com.easypost.exception.EasyPostException; + +public class NotFoundError extends EasyPostException { + /** + * NotFoundError constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public NotFoundError(final String message, final String code, final int statusCode, List errors) { + super(message, code, statusCode, errors); + } +} diff --git a/src/main/java/com/easypost/exception/API/PaymentError.java b/src/main/java/com/easypost/exception/API/PaymentError.java new file mode 100644 index 000000000..6023c6c0a --- /dev/null +++ b/src/main/java/com/easypost/exception/API/PaymentError.java @@ -0,0 +1,20 @@ +package com.easypost.exception.API; + +import java.util.List; + +import com.easypost.model.Error; +import com.easypost.exception.EasyPostException; + +public class PaymentError extends EasyPostException { + /** + * PaymentError constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public PaymentError(final String message, final String code, final int statusCode, List errors) { + super(message, code, statusCode, errors); + } +} diff --git a/src/main/java/com/easypost/exception/API/RateLimitError.java b/src/main/java/com/easypost/exception/API/RateLimitError.java new file mode 100644 index 000000000..b2490eb35 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/RateLimitError.java @@ -0,0 +1,20 @@ +package com.easypost.exception.API; + +import java.util.List; + +import com.easypost.model.Error; +import com.easypost.exception.EasyPostException; + +public class RateLimitError extends EasyPostException { + /** + * RateLimitError constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public RateLimitError(final String message, final String code, final int statusCode, List errors) { + super(message, code, statusCode, errors); + } +} diff --git a/src/main/java/com/easypost/exception/API/RedirectError.java b/src/main/java/com/easypost/exception/API/RedirectError.java new file mode 100644 index 000000000..7215cf493 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/RedirectError.java @@ -0,0 +1,20 @@ +package com.easypost.exception.API; + +import java.util.List; + +import com.easypost.model.Error; +import com.easypost.exception.EasyPostException; + +public class RedirectError extends EasyPostException { + /** + * RedirectError constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public RedirectError(final String message, final String code, final int statusCode, List errors) { + super(message, code, statusCode, errors); + } +} diff --git a/src/main/java/com/easypost/exception/API/ServiceUnavailablError.java b/src/main/java/com/easypost/exception/API/ServiceUnavailablError.java new file mode 100644 index 000000000..a7e95779a --- /dev/null +++ b/src/main/java/com/easypost/exception/API/ServiceUnavailablError.java @@ -0,0 +1,20 @@ +package com.easypost.exception.API; + +import java.util.List; + +import com.easypost.model.Error; +import com.easypost.exception.EasyPostException; + +public class ServiceUnavailablError extends EasyPostException { + /** + * ServiceUnavailablError constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public ServiceUnavailablError(final String message, final String code, final int statusCode, List errors) { + super(message, code, statusCode, errors); + } +} diff --git a/src/main/java/com/easypost/exception/API/TimeoutError.java b/src/main/java/com/easypost/exception/API/TimeoutError.java new file mode 100644 index 000000000..6a60e97d4 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/TimeoutError.java @@ -0,0 +1,20 @@ +package com.easypost.exception.API; + +import java.util.List; + +import com.easypost.model.Error; +import com.easypost.exception.EasyPostException; + +public class TimeoutError extends EasyPostException { + /** + * TimeoutError constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public TimeoutError(final String message, final String code, final int statusCode, List errors) { + super(message, code, statusCode, errors); + } +} diff --git a/src/main/java/com/easypost/exception/API/UnauthorizedError.java b/src/main/java/com/easypost/exception/API/UnauthorizedError.java new file mode 100644 index 000000000..2b7640e54 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/UnauthorizedError.java @@ -0,0 +1,20 @@ +package com.easypost.exception.API; + +import java.util.List; + +import com.easypost.model.Error; +import com.easypost.exception.EasyPostException; + +public class UnauthorizedError extends EasyPostException { + /** + * UnauthorizedError constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public UnauthorizedError(final String message, final String code, final int statusCode, List errors) { + super(message, code, statusCode, errors); + } +} diff --git a/src/main/java/com/easypost/exception/API/UnknownApiError.java b/src/main/java/com/easypost/exception/API/UnknownApiError.java new file mode 100644 index 000000000..d3ca95598 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/UnknownApiError.java @@ -0,0 +1,20 @@ +package com.easypost.exception.API; + +import java.util.List; + +import com.easypost.model.Error; +import com.easypost.exception.EasyPostException; + +public class UnknownApiError extends EasyPostException { + /** + * UnknownApiError constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public UnknownApiError(final String message, final String code, final int statusCode, List errors) { + super(message, code, statusCode, errors); + } +} diff --git a/src/main/java/com/easypost/exception/API/package-info.java b/src/main/java/com/easypost/exception/API/package-info.java new file mode 100644 index 000000000..5f8f797e7 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/package-info.java @@ -0,0 +1,9 @@ +/** + * Custom API exception classes for the EasyPost API. + * + * @author EasyPost developers + * @version 6.0 + * @see EasyPost API documentation + * @since 6.0 + */ +package com.easypost.exception.API; diff --git a/src/main/java/com/easypost/exception/Constants.java b/src/main/java/com/easypost/exception/Constants.java new file mode 100644 index 000000000..da4c07dc4 --- /dev/null +++ b/src/main/java/com/easypost/exception/Constants.java @@ -0,0 +1,34 @@ +package com.easypost.exception; + +public abstract class Constants { + + public static final String EXTERNAL_API_CALL_FAILED = "Could not send card details to %s, please try again later"; + public static final String ENCODED_ERROR = "Encode error for %s"; + public static final String INVALID_API_KEY_TYPE = "Invalid API key type."; + public static final String INVALID_PARAMETER = "Invalid parameter: %s."; + public static final String INVALID_PAYMENT = "The chosen payment method is not a credit card. Please try again."; + public static final String INVALID_WEBHOOK_SIGNATURE = "Webhook does not contain a valid HMAC signature."; + public static final String MISSING_REQUIRED_PARAMETER = "Missing required parameter: %s."; + public static final String NO_OBJECT_FOUND = "No %s found."; + public static final String NO_PAYMENT_METHODS = + "No payment methods are set up. Please add a payment method and try again."; + public static final String API_DID_NOT_RETURN_ERROR_DETAILS = "API did not return error details."; + public static final String WEBHOOK_DOES_NOT_MATCH = + "Webhook received did not originate from EasyPost or had a webhook secret mismatch."; + + public abstract class ErrorCode { + public static final int REDIRECT_CODE_BEGIN = 300; + public static final int REDIRECT_CODE_END = 308; + public static final int UNAUTHORIZED_ERROR = 401; + public static final int PAYMENT_ERROR = 402; + public static final int FORBIDDEN_ERROR = 403; + public static final int NOT_FOUND_ERROR = 404; + public static final int METHOD_NOT_ALLOWED_ERROR = 405; + public static final int TIMEOUT_ERROR = 408; + public static final int INVALID_REQUEST_ERROR = 422; + public static final int RATE_LIMIT_ERROR = 429; + public static final int INTERNAL_SERVER_ERROR = 500; + public static final int SERVICE_UNAVAILABLE_ERROR = 503; + public static final int GATEWAY_TIMEOUT_ERROR = 504; + } +} diff --git a/src/main/java/com/easypost/exception/EasyPostException.java b/src/main/java/com/easypost/exception/EasyPostException.java index 146e648b7..20df5d4f1 100644 --- a/src/main/java/com/easypost/exception/EasyPostException.java +++ b/src/main/java/com/easypost/exception/EasyPostException.java @@ -8,50 +8,100 @@ package com.easypost.exception; +import com.easypost.model.Error; + +import java.util.List; + public class EasyPostException extends Exception { private static final long serialVersionUID = 1L; - private final String param; + private final String code; + private final Integer statusCode; + private final String message; + private final List errors; /** - * Get the parameter name. + * EasyPostException constructor. * - * @return the parameter name + * @param message the exception message */ - public String getParam() { - return param; + public EasyPostException(final String message) { + this(message, null); } /** - * Constructor. + * EasyPostException constructor. * * @param message the exception message + * @param ex the exception cause */ - public EasyPostException(final String message) { - super(message, null); - this.param = null; + public EasyPostException(final String message, final Throwable ex) { + this(message, null, null, null, ex); } /** - * Constructor. + * EasyPostException constructor. * - * @param message the exception message - * @param ex the exception cause + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array */ - public EasyPostException(final String message, final Throwable ex) { - super(message, ex); - this.param = null; + public EasyPostException(final String message, final String code, final int statusCode, List errors) { + this(message, code, statusCode, errors, null); } /** - * Constructor. + * EasyPostException constructor. * - * @param message the exception message - * @param param the parameter name - * @param ex the exception cause + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + * @param ex the exception cause */ - public EasyPostException(final String message, final String param, final Throwable ex) { + public EasyPostException(final String message, final String code, final Integer statusCode, + final List errors, final Throwable ex) { super(message, ex); - this.param = param; + this.code = code; + this.statusCode = statusCode; + this.message = message; + this.errors = errors; + } + + /** + * Get status code of the error object. + * + * @return statusCode the status code of the error object + */ + public Integer getStatusCode() { + return statusCode; + } + + /** + * Get code of the error object. + * + * @return code the code of the error object + */ + public String getCode() { + return code; + } + + /** + * Get message of the error object. + * + * @return message the message of the error object + */ + public String getMessage() { + return message; + } + + /** + * Get errors array of the exception. + * + * @return errors of the exception + */ + public List getErrors() { + return errors; } } diff --git a/src/main/java/com/easypost/exception/General/ExternalApiError.java b/src/main/java/com/easypost/exception/General/ExternalApiError.java new file mode 100644 index 000000000..14d32fe6f --- /dev/null +++ b/src/main/java/com/easypost/exception/General/ExternalApiError.java @@ -0,0 +1,14 @@ +package com.easypost.exception.General; + +import com.easypost.exception.EasyPostException; + +public class ExternalApiError extends EasyPostException { + /** + * ExternalApiError constructor. + * + * @param message the exception message + */ + public ExternalApiError(final String message) { + super(message); + } +} diff --git a/src/main/java/com/easypost/exception/General/FilteringError.java b/src/main/java/com/easypost/exception/General/FilteringError.java new file mode 100644 index 000000000..a65580034 --- /dev/null +++ b/src/main/java/com/easypost/exception/General/FilteringError.java @@ -0,0 +1,14 @@ +package com.easypost.exception.General; + +import com.easypost.exception.EasyPostException; + +public class FilteringError extends EasyPostException { + /** + * FilteringError constructor. + * + * @param message the exception message + */ + public FilteringError(final String message) { + super(message); + } +} diff --git a/src/main/java/com/easypost/exception/General/InvalidObjectError.java b/src/main/java/com/easypost/exception/General/InvalidObjectError.java new file mode 100644 index 000000000..641e4f63b --- /dev/null +++ b/src/main/java/com/easypost/exception/General/InvalidObjectError.java @@ -0,0 +1,14 @@ +package com.easypost.exception.General; + +import com.easypost.exception.EasyPostException; + +public class InvalidObjectError extends EasyPostException { + /** + * InvalidObjectError constructor. + * + * @param message the exception message + */ + public InvalidObjectError(final String message) { + super(message); + } +} diff --git a/src/main/java/com/easypost/exception/General/InvalidParameterError.java b/src/main/java/com/easypost/exception/General/InvalidParameterError.java new file mode 100644 index 000000000..85e2fc63e --- /dev/null +++ b/src/main/java/com/easypost/exception/General/InvalidParameterError.java @@ -0,0 +1,24 @@ +package com.easypost.exception.General; + +import com.easypost.exception.EasyPostException; + +public class InvalidParameterError extends EasyPostException{ + /** + * InvalidParameterError constructor. + * + * @param message the exception message + */ + public InvalidParameterError(final String message) { + super(message); + } + + /** + * constructor. + * + * @param message the exception message + * @param e the Throwable object + */ + public InvalidParameterError(final String message, Throwable e) { + super(message, e); + } +} diff --git a/src/main/java/com/easypost/exception/General/MissingParameterError.java b/src/main/java/com/easypost/exception/General/MissingParameterError.java new file mode 100644 index 000000000..84c0680a8 --- /dev/null +++ b/src/main/java/com/easypost/exception/General/MissingParameterError.java @@ -0,0 +1,14 @@ +package com.easypost.exception.General; + +import com.easypost.exception.EasyPostException; + +public class MissingParameterError extends EasyPostException { + /** + * MissingParameterError constructor. + * + * @param message the exception message + */ + public MissingParameterError(final String message) { + super(message); + } +} diff --git a/src/main/java/com/easypost/exception/General/SignatureVerificationError.java b/src/main/java/com/easypost/exception/General/SignatureVerificationError.java new file mode 100644 index 000000000..c5c337839 --- /dev/null +++ b/src/main/java/com/easypost/exception/General/SignatureVerificationError.java @@ -0,0 +1,14 @@ +package com.easypost.exception.General; + +import com.easypost.exception.EasyPostException; + +public class SignatureVerificationError extends EasyPostException { + /** + * SignatureVerificationError constructor. + * + * @param message the exception message + */ + public SignatureVerificationError(final String message) { + super(message); + } +} diff --git a/src/main/java/com/easypost/exception/General/package-info.java b/src/main/java/com/easypost/exception/General/package-info.java new file mode 100644 index 000000000..d4c38a519 --- /dev/null +++ b/src/main/java/com/easypost/exception/General/package-info.java @@ -0,0 +1,9 @@ +/** + * Custom general exception classes for the EasyPost API. + * + * @author EasyPost developers + * @version 6.0 + * @see EasyPost API documentation + * @since 6.0 + */ +package com.easypost.exception.General; diff --git a/src/main/java/com/easypost/model/Billing.java b/src/main/java/com/easypost/model/Billing.java index 2deab462b..27b8ac300 100644 --- a/src/main/java/com/easypost/model/Billing.java +++ b/src/main/java/com/easypost/model/Billing.java @@ -1,7 +1,9 @@ package com.easypost.model; import com.easypost.EasyPost; +import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.InvalidObjectError; import com.easypost.net.EasyPostResource; import java.util.HashMap; @@ -98,7 +100,7 @@ public static PaymentMethod retrievePaymentMethods(String apiKey) throws EasyPos PaymentMethod.class, apiKey); if (response.getId() == null) { - throw new EasyPostException("Billing has not been setup for this user. Please add a payment method."); + throw new InvalidObjectError(Constants.NO_PAYMENT_METHODS); } return response; @@ -128,7 +130,7 @@ private static PaymentMethodObject getPaymentMethodByPriority(PaymentMethod.Prio } if (paymentMethod == null || paymentMethod.getId() == null) { - throw new EasyPostException("The chosen payment method is not set up yet."); + throw new InvalidObjectError(Constants.NO_PAYMENT_METHODS); } return paymentMethod; diff --git a/src/main/java/com/easypost/model/CreditCard.java b/src/main/java/com/easypost/model/CreditCard.java index bf3adb1f8..43de44ff0 100644 --- a/src/main/java/com/easypost/model/CreditCard.java +++ b/src/main/java/com/easypost/model/CreditCard.java @@ -1,6 +1,7 @@ package com.easypost.model; import com.easypost.EasyPost; +import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; import java.util.HashMap; @@ -58,7 +59,7 @@ public static boolean fund(String amount, CreditCardPriority primaryOrSecondary, } if (cardID == null || !cardID.startsWith("card_")) { - throw new EasyPostException("The chosen payment method is not a credit card. Please try again."); + throw new EasyPostException(Constants.INVALID_PAYMENT); } Map params = new HashMap<>(); diff --git a/src/main/java/com/easypost/model/Error.java b/src/main/java/com/easypost/model/Error.java index 24ba1db25..53994417c 100644 --- a/src/main/java/com/easypost/model/Error.java +++ b/src/main/java/com/easypost/model/Error.java @@ -1,80 +1,101 @@ package com.easypost.model; +import java.util.List; + public final class Error { - private String field; private String message; - private String suggestion; private String code; + private List errors; + private String suggestion; + private String field; /** - * Get the error code. + * Get the field of the error. * - * @return code + * @return field */ - public String getCode() { - return code; + public String getField() { + return field; } /** - * Set the error code. + * Set the field of the error. * - * @param code code + * @param field field */ - public void setCode(final String code) { - this.code = code; + public void setField(final String field) { + this.field = field; } /** - * Get the field that caused the error. + * Get the suggestion of the error. * - * @return field + * @return suggestion */ - public String getField() { - return field; + public String getSuggestion() { + return suggestion; } /** - * Set the field that caused the error. + * Set the suggestion of the error. * - * @param field field + * @param suggestion suggestion */ - public void setField(final String field) { - this.field = field; + public void setSuggestion(final String suggestion) { + this.suggestion = suggestion; } /** - * Get the error message. + * Get the errors from an Error object. * - * @return message + * @return errors */ - public String getMessage() { - return message; + public List getErrors() { + return errors; } /** - * Set the error message. + * Set the errors for an Error object. + * + * @param errors errors + */ + public void setErrors(List errors) { + this.errors = errors; + } + + /** + * Get the error code. * - * @param message message + * @return code */ - public void setMessage(final String message) { - this.message = message; + public String getCode() { + return code; } /** - * Get the suggestion for the error. + * Set the error code. * - * @return suggestion + * @param code code */ - public String getSuggestion() { - return suggestion; + public void setCode(final String code) { + this.code = code; } /** - * Set the suggestion for the error. + * Get the error message. * - * @param suggestion suggestion + * @return message */ - public void setSuggestion(final String suggestion) { - this.suggestion = suggestion; + public String getMessage() { + return message; + } + + /** + * Set the error message. + * + * @param message message + */ + public void setMessage(final String message) { + this.message = message; } } diff --git a/src/main/java/com/easypost/model/ErrorDeserializer.java b/src/main/java/com/easypost/model/ErrorDeserializer.java new file mode 100644 index 000000000..335013130 --- /dev/null +++ b/src/main/java/com/easypost/model/ErrorDeserializer.java @@ -0,0 +1,55 @@ +package com.easypost.model; + +import com.easypost.exception.Constants; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.JsonPrimitive; + +import java.lang.reflect.Type; +import java.util.ArrayList; + +public final class ErrorDeserializer implements JsonDeserializer { + /** + * Deserialize an Error from a JSON object. + * + * @param json JSON object to deserialize. + * @param typeOfT Type of the object to deserialize. + * @param context Deserialization context. + * @return Deserialized Error object. + * @throws JsonParseException if the JSON object is not a valid SmartrateCollection. + */ + @Override + public Error deserialize(final JsonElement json, final Type typeOfT, + final JsonDeserializationContext context) throws JsonParseException{ + JsonObject jo = json.getAsJsonObject(); + JsonElement results = jo.get("error"); + Gson gson = new Gson(); + + if (results == null) { + Error error = new Error(); + error.setMessage(Constants.API_DID_NOT_RETURN_ERROR_DETAILS); + error.setCode("NO RESPONSE CODE"); + return error; + } + + JsonElement errorMessage = results.getAsJsonObject().get("message"); + if (errorMessage.isJsonArray()) { + JsonArray jsonArray = errorMessage.getAsJsonArray(); + ArrayList messages = new ArrayList<>(); + + for (int i = 0; i < jsonArray.size(); i++) { + messages.add(jsonArray.get(i).getAsString()); + } + + JsonPrimitive value = new JsonPrimitive(String.join(", ", messages)); + results.getAsJsonObject().add("message", value); + } + + return gson.fromJson(results, Error.class); + } +} diff --git a/src/main/java/com/easypost/model/PaymentMethod.java b/src/main/java/com/easypost/model/PaymentMethod.java index 2f8366f21..c8e20159a 100644 --- a/src/main/java/com/easypost/model/PaymentMethod.java +++ b/src/main/java/com/easypost/model/PaymentMethod.java @@ -1,7 +1,9 @@ package com.easypost.model; import com.easypost.EasyPost; +import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.InvalidObjectError; import com.easypost.net.EasyPostResource; public class PaymentMethod extends EasyPostResource { @@ -81,7 +83,7 @@ public static PaymentMethod all(String apiKey) throws EasyPostException { PaymentMethod.class, apiKey); if (response.getId() == null) { - throw new EasyPostException("Billing has not been setup for this user. Please add a payment method."); + throw new InvalidObjectError(Constants.NO_PAYMENT_METHODS); } return response; diff --git a/src/main/java/com/easypost/model/ReferralCustomer.java b/src/main/java/com/easypost/model/ReferralCustomer.java index d539fffbf..ca985b65f 100644 --- a/src/main/java/com/easypost/model/ReferralCustomer.java +++ b/src/main/java/com/easypost/model/ReferralCustomer.java @@ -1,7 +1,9 @@ package com.easypost.model; import com.easypost.EasyPost; +import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.ExternalApiError; import java.io.BufferedReader; import java.io.DataOutputStream; @@ -153,7 +155,7 @@ public static PaymentMethodObject addCreditCardToUser(String referralApiKey, Str try { stripeToken = createStripeToken(number, expirationMonth, expirationYear, cvc, easypostStripeApiKey); } catch (Exception e) { - throw new Exception("Could not send card details to Stripe, please try again later", e); + throw new ExternalApiError(String.format(Constants.EXTERNAL_API_CALL_FAILED, "Stripe")); } return createEasypostCreditCard(referralApiKey, stripeToken, priority.toString().toLowerCase()); diff --git a/src/main/java/com/easypost/model/Report.java b/src/main/java/com/easypost/model/Report.java index 44cd44305..b813fc706 100644 --- a/src/main/java/com/easypost/model/Report.java +++ b/src/main/java/com/easypost/model/Report.java @@ -1,7 +1,10 @@ package com.easypost.model; import com.easypost.EasyPost; +import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.InvalidObjectError; +import com.easypost.exception.General.InvalidParameterError; import com.easypost.net.EasyPostResource; import java.net.URLEncoder; @@ -189,7 +192,7 @@ public static Report create(final Map params, final String apiKe return request(RequestMethod.POST, reportURL((String) params.get("type")), paramsWithoutType, Report.class, apiKey); } else { - throw new EasyPostException("Report type is required."); + throw new InvalidObjectError(String.format(Constants.MISSING_REQUIRED_PARAMETER, "type")); } } @@ -205,7 +208,7 @@ protected static String reportURL(final String type) throws EasyPostException { String urlType = URLEncoder.encode(type, "UTF-8").toLowerCase(); return String.format("%s/reports/%s/", EasyPost.API_BASE, urlType); } catch (java.io.UnsupportedEncodingException e) { - throw new EasyPostException("Undetermined Report Type"); + throw new InvalidParameterError(String.format(Constants.ENCODED_ERROR, "report type"), e); } } diff --git a/src/main/java/com/easypost/model/Shipment.java b/src/main/java/com/easypost/model/Shipment.java index 76f3e6c49..39a719390 100644 --- a/src/main/java/com/easypost/model/Shipment.java +++ b/src/main/java/com/easypost/model/Shipment.java @@ -1,6 +1,8 @@ package com.easypost.model; +import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.FilteringError; import com.easypost.net.EasyPostResource; import java.util.HashMap; @@ -1296,7 +1298,7 @@ public static Smartrate findLowestSmartrate(final List smartrates, in } if (lowestSmartrate == null) { - throw new EasyPostException("No rates found."); + throw new FilteringError(String.format(Constants.NO_OBJECT_FOUND, "rate")); } return lowestSmartrate; diff --git a/src/main/java/com/easypost/model/SmartrateAccuracy.java b/src/main/java/com/easypost/model/SmartrateAccuracy.java index ef3863fbf..5f6b944f3 100644 --- a/src/main/java/com/easypost/model/SmartrateAccuracy.java +++ b/src/main/java/com/easypost/model/SmartrateAccuracy.java @@ -1,5 +1,9 @@ package com.easypost.model; +import com.easypost.exception.Constants; +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.InvalidParameterError; + public enum SmartrateAccuracy { Percentile50("percentile_50"), Percentile75("percentile_75"), @@ -34,14 +38,14 @@ public String getKeyName() { * * @param keyName the internal key name * @return the enum value - * @throws IllegalArgumentException if the key name is not found + * @throws EasyPostException if the key name is not found */ - public static SmartrateAccuracy getByKeyName(String keyName) throws IllegalArgumentException { + public static SmartrateAccuracy getByKeyName(String keyName) throws EasyPostException { for (SmartrateAccuracy smartrateAccuracy : values()) { if (smartrateAccuracy.getKeyName().equals(keyName)) { return smartrateAccuracy; } } - throw new IllegalArgumentException("Invalid SmartrateAccuracy key name."); + throw new InvalidParameterError(String.format(Constants.INVALID_PARAMETER, "smartrateAccuracy")); } } diff --git a/src/main/java/com/easypost/model/TimeInTransit.java b/src/main/java/com/easypost/model/TimeInTransit.java index b228798a4..ad7e06890 100644 --- a/src/main/java/com/easypost/model/TimeInTransit.java +++ b/src/main/java/com/easypost/model/TimeInTransit.java @@ -1,6 +1,8 @@ package com.easypost.model; +import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.InvalidParameterError; import com.google.gson.annotations.SerializedName; public final class TimeInTransit { @@ -173,7 +175,7 @@ public int getSmartRateAccuracy(final String percentile) throws EasyPostExceptio case "percentile_99": return this.percentile99; default: - throw new EasyPostException("Invalid percentile value"); + throw new InvalidParameterError(String.format(Constants.INVALID_PARAMETER, "percentile")); } } diff --git a/src/main/java/com/easypost/model/User.java b/src/main/java/com/easypost/model/User.java index 077bb2196..12c6c539e 100644 --- a/src/main/java/com/easypost/model/User.java +++ b/src/main/java/com/easypost/model/User.java @@ -1,7 +1,8 @@ package com.easypost.model; +import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.exception.General.FilteringError; import java.util.HashMap; import java.util.List; @@ -156,9 +157,8 @@ public List apiKeys() throws EasyPostException { return parentKeys.getChildren().get(i).getKeys(); } } - - throw new EasyPostException( - String.format("Unable to find api key. Please contact %s.", EasyPostResource.EASYPOST_SUPPORT_EMAIL)); + + throw new FilteringError(String.format(Constants.NO_OBJECT_FOUND, "API keys")); } /** diff --git a/src/main/java/com/easypost/model/Utilities.java b/src/main/java/com/easypost/model/Utilities.java index 16d18f678..574141e85 100644 --- a/src/main/java/com/easypost/model/Utilities.java +++ b/src/main/java/com/easypost/model/Utilities.java @@ -1,6 +1,8 @@ package com.easypost.model; +import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.FilteringError; import java.net.URLEncoder; import java.util.List; @@ -49,7 +51,8 @@ public static Rate getLowestObjectRate(List rates, List carriers, } if (lowestRate == null) { - throw new EasyPostException("Unable to find lowest rate matching required criteria."); + throw new FilteringError(String.format( + Constants.NO_OBJECT_FOUND, "lowest rate matching required criteria")); } return lowestRate; diff --git a/src/main/java/com/easypost/model/Webhook.java b/src/main/java/com/easypost/model/Webhook.java index 8c54bb299..87949f21c 100644 --- a/src/main/java/com/easypost/model/Webhook.java +++ b/src/main/java/com/easypost/model/Webhook.java @@ -1,6 +1,8 @@ package com.easypost.model; +import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.SignatureVerificationError; import com.easypost.net.EasyPostResource; import com.easypost.utils.Cryptography; @@ -265,11 +267,10 @@ public static Event validateWebhook(byte[] eventBody, Map header String json = new String(eventBody, StandardCharsets.UTF_8); return GSON.fromJson(json, Event.class); } else { - throw new EasyPostException( - "Webhook received did not originate from EasyPost or had a webhook secret mismatch."); + throw new SignatureVerificationError(Constants.WEBHOOK_DOES_NOT_MATCH); } } else { - throw new EasyPostException("Webhook received does not contain an HMAC signature."); + throw new SignatureVerificationError(Constants.INVALID_WEBHOOK_SIGNATURE); } } } diff --git a/src/main/java/com/easypost/net/EasyPostResource.java b/src/main/java/com/easypost/net/EasyPostResource.java index 42d79ecab..0fc021e5e 100644 --- a/src/main/java/com/easypost/net/EasyPostResource.java +++ b/src/main/java/com/easypost/net/EasyPostResource.java @@ -9,7 +9,24 @@ package com.easypost.net; import com.easypost.EasyPost; +import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; +import com.easypost.exception.API.ForbiddenError; +import com.easypost.exception.API.GatewayTimeoutError; +import com.easypost.exception.API.InternalServerError; +import com.easypost.exception.API.InvalidRequestError; +import com.easypost.exception.API.MethodNotAllowedError; +import com.easypost.exception.API.NotFoundError; +import com.easypost.exception.API.PaymentError; +import com.easypost.exception.API.RateLimitError; +import com.easypost.exception.API.RedirectError; +import com.easypost.exception.API.ServiceUnavailablError; +import com.easypost.exception.API.TimeoutError; +import com.easypost.exception.API.UnauthorizedError; +import com.easypost.exception.API.UnknownApiError; +import com.easypost.exception.General.MissingParameterError; +import com.easypost.model.Error; +import com.easypost.model.ErrorDeserializer; import com.easypost.model.Fee; import com.easypost.model.Shipment; import com.easypost.model.SmartrateCollection; @@ -56,7 +73,8 @@ protected enum RequestMethod { public static final Gson GSON = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) .registerTypeAdapter(HashMap.class, new HashMapSerializer()) - .registerTypeAdapter(SmartrateCollection.class, new SmartrateCollectionDeserializer()).create(); + .registerTypeAdapter(SmartrateCollection.class, new SmartrateCollectionDeserializer()) + .registerTypeAdapter(Error.class, new ErrorDeserializer()).create(); public static final Gson PRETTY_PRINT_GSON = new GsonBuilder().setPrettyPrinting().serializeNulls() .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create(); public static final String CHARSET = "UTF-8"; @@ -445,6 +463,11 @@ private static Map flattenParams(final Map param } private static String getResponseBody(final InputStream responseStream) throws IOException { + if (responseStream.available() == 0) { + // Return empty string if the InputSteam is empty to avoid exceptions. + return ""; + } + @SuppressWarnings ("resource") String rBody = new Scanner(responseStream, CHARSET).useDelimiter("\\A").next(); responseStream.close(); return rBody; @@ -536,11 +559,7 @@ protected static T _request(final EasyPostResource.RequestMethod method, fin final boolean apiKeyRequired) throws EasyPostException { if ((EasyPost.apiKey == null || EasyPost.apiKey.length() == 0) && (apiKey == null || apiKey.length() == 0)) { if (apiKeyRequired) { - throw new EasyPostException(String.format( - "No API key provided. (set your API key using 'EasyPost.apiKey = {KEY}'. " + - "Your API key can be found in your EasyPost dashboard, " + - "or you can email us at %s for assistance.", EasyPostResource.EASYPOST_SUPPORT_EMAIL)); - + throw new MissingParameterError(Constants.INVALID_API_KEY_TYPE); } } @@ -600,18 +619,50 @@ protected static T _request(final EasyPostResource.RequestMethod method, fin return GSON.fromJson(rBody, clazz); } - private static void handleAPIError(final String rBody, final int rCode) throws EasyPostException { - try { - EasyPostResource.Error error = GSON.fromJson(rBody, EasyPostResource.Error.class); - - if (error.getError().length() > 0) { - throw new EasyPostException(error.getError()); - } - - throw new EasyPostException(error.getMessage(), error.getParam(), null); - } catch (Exception e) { - throw new EasyPostException( - String.format("An error occurred. Response code: %s Response body: %s", rCode, rBody)); + /** + * Handles API error based on the error status code. + * + * @param rBody Body of the error message. + * @param rCode Status code of the error messsage. + */ + protected static void handleAPIError(String rBody, final int rCode) throws EasyPostException { + if (rBody == null || rBody.length() == 0) { + rBody = "{}"; + } + Error error = GSON.fromJson(rBody, Error.class); + String errorMessage = error.getMessage(); + String errorCode = error.getCode(); + List errors = error.getErrors(); + + if (rCode >= Constants.ErrorCode.REDIRECT_CODE_BEGIN && rCode <= Constants.ErrorCode.REDIRECT_CODE_END) { + throw new RedirectError(errorMessage, errorCode, rCode, errors); + } + + switch (rCode) { + case Constants.ErrorCode.UNAUTHORIZED_ERROR: + throw new UnauthorizedError(errorMessage, errorCode, rCode, errors); + case Constants.ErrorCode.FORBIDDEN_ERROR: + throw new ForbiddenError(errorMessage, errorCode, rCode, errors); + case Constants.ErrorCode.PAYMENT_ERROR: + throw new PaymentError(errorMessage, errorCode, rCode, errors); + case Constants.ErrorCode.NOT_FOUND_ERROR: + throw new NotFoundError(errorMessage, errorCode, rCode, errors); + case Constants.ErrorCode.METHOD_NOT_ALLOWED_ERROR: + throw new MethodNotAllowedError(errorMessage, errorCode, rCode, errors); + case Constants.ErrorCode.TIMEOUT_ERROR: + throw new TimeoutError(errorMessage, errorCode, rCode, errors); + case Constants.ErrorCode.INVALID_REQUEST_ERROR: + throw new InvalidRequestError(errorMessage, errorCode, rCode, errors); + case Constants.ErrorCode.RATE_LIMIT_ERROR: + throw new RateLimitError(errorMessage, errorCode, rCode, errors); + case Constants.ErrorCode.INTERNAL_SERVER_ERROR: + throw new InternalServerError(errorMessage, errorCode, rCode, errors); + case Constants.ErrorCode.SERVICE_UNAVAILABLE_ERROR: + throw new ServiceUnavailablError(errorMessage, errorCode, rCode, errors); + case Constants.ErrorCode.GATEWAY_TIMEOUT_ERROR: + throw new GatewayTimeoutError(errorMessage, errorCode, rCode, errors); + default: + throw new UnknownApiError(errorMessage, errorCode, rCode, errors); } } @@ -837,37 +888,7 @@ private static List getAllNonStaticMethods(Class type) { @SuppressWarnings ("unused") private static class ErrorContainer { - private EasyPostResource.Error error; - } - - private static class Error { - private String type; - private String message; - private String code; - private String param; - private String error; - - @SuppressWarnings ("unused") - public String getCode() { - return code; - } - - public String getError() { - return error; - } - - public String getMessage() { - return message; - } - - public String getParam() { - return param; - } - - @SuppressWarnings ("unused") - public String getType() { - return type; - } + private Error error; } /** diff --git a/src/test/cassettes/address/error_address_creation.json b/src/test/cassettes/address/error_address_creation.json new file mode 100644 index 000000000..d490f9440 --- /dev/null +++ b/src/test/cassettes/address/error_address_creation.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1666294101, + "request": { + "body": "{}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/addresses/create_and_verify" + }, + "response": { + "body": "{\n \"error\": {\n \"code\": \"PARAMETER.REQUIRED\",\n \"message\": \"Missing required parameter.\",\n \"errors\": [\n {\n \"field\": \"address\",\n \"message\": \"cannot be blank\"\n }\n ]\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 422 Unprocessable Entity" + ], + "content-length": [ + "138" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb4nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "a224a4276351a154e0ebf65d0006037b" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.037111" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202210201856-ea17ac3304-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 422, + "message": "Unprocessable Entity" + }, + "uri": "https://api.easypost.com/v2/addresses/create_and_verify" + }, + "duration": 301 + } +] \ No newline at end of file diff --git a/src/test/cassettes/error/error.json b/src/test/cassettes/error/error.json index 57508f684..334509fac 100644 --- a/src/test/cassettes/error/error.json +++ b/src/test/cassettes/error/error.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456596, + "recordedAt": 1666294010, "request": { "body": "{}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": null, + "body": "{\n \"error\": {\n \"code\": \"PARAMETER.REQUIRED\",\n \"message\": \"Missing required parameter.\",\n \"errors\": [\n {\n \"field\": \"shipment\",\n \"message\": \"cannot be blank\"\n }\n ]\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -58,23 +58,23 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d0d4f7a874350008a8d9" + "a224a4296351a0fae0ebf30a0005e4b2" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb1nuq 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.035329" + "0.032120" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202210201856-ea17ac3304-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +84,8 @@ "code": 422, "message": "Unprocessable Entity" }, - "errors": "{\n \"error\": {\n \"code\": \"PARAMETER.REQUIRED\",\n \"message\": \"Missing required parameter.\",\n \"errors\": [\n {\n \"field\": \"shipment\",\n \"message\": \"cannot be blank\"\n }\n ]\n }\n}", "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 157 + "duration": 309 } ] \ No newline at end of file diff --git a/src/test/java/com/easypost/AddressTest.java b/src/test/java/com/easypost/AddressTest.java index edb2557a3..cdd5295c1 100644 --- a/src/test/java/com/easypost/AddressTest.java +++ b/src/test/java/com/easypost/AddressTest.java @@ -14,6 +14,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; public final class AddressTest { @@ -132,7 +133,6 @@ public void testRetrieve() throws EasyPostException { assertInstanceOf(Address.class, retrievedAddress); assertTrue(address.equals(retrievedAddress)); - } /** @@ -193,4 +193,20 @@ public void testVerify() throws EasyPostException { assertTrue(verifiedAddress.getId().startsWith("adr_")); assertEquals("388 TOWNSEND ST APT 20", verifiedAddress.getStreet1()); } + + /** + * Test creating invalid address creation to see if the error has correct properties. + * + * @throws EasyPostException + */ + @Test + public void testInvalidAddressCreation() throws EasyPostException { + vcr.setUpTest("error_address_creation"); + EasyPostException exception = assertThrows(EasyPostException.class, + () -> Address.createAndVerify(null)); + + assertEquals("PARAMETER.REQUIRED", exception.getCode()); + assertEquals(422, exception.getStatusCode()); + assertEquals("Missing required parameter.", exception.getMessage()); + } } diff --git a/src/test/java/com/easypost/ErrorTest.java b/src/test/java/com/easypost/ErrorTest.java index 704bf40ad..b2fe9ded1 100644 --- a/src/test/java/com/easypost/ErrorTest.java +++ b/src/test/java/com/easypost/ErrorTest.java @@ -1,13 +1,33 @@ package com.easypost; +import com.easypost.exception.Constants; +import com.easypost.net.EasyPostResource; import com.easypost.exception.EasyPostException; +import com.easypost.exception.API.RedirectError; +import com.easypost.exception.API.ServiceUnavailablError; +import com.easypost.exception.API.UnauthorizedError; +import com.easypost.exception.API.UnknownApiError; +import com.easypost.exception.API.PaymentError; +import com.easypost.exception.API.RateLimitError; +import com.easypost.exception.API.NotFoundError; +import com.easypost.exception.API.MethodNotAllowedError; +import com.easypost.exception.API.TimeoutError; +import com.easypost.exception.API.ForbiddenError; +import com.easypost.exception.API.GatewayTimeoutError; +import com.easypost.exception.API.InternalServerError; +import com.easypost.exception.API.InvalidRequestError; import com.easypost.model.Shipment; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; -public final class ErrorTest { +import java.util.HashMap; +import java.util.Map; + +public final class ErrorTest extends EasyPostResource{ private static TestUtils.VCR vcr; /** @@ -28,10 +48,86 @@ public static void setup() { @Test public void testError() throws EasyPostException { vcr.setUpTest("error"); + + EasyPostException exception = assertThrows(InvalidRequestError.class, () -> Shipment.create(null)); + + assertEquals(422, exception.getStatusCode()); + assertEquals("PARAMETER.REQUIRED", exception.getCode()); + assertEquals("Missing required parameter.", exception.getMessage()); + assertEquals("cannot be blank", exception.getErrors().get(0).getMessage()); + assertEquals("shipment", exception.getErrors().get(0).getField()); + } + + /** + * Test every error type and make sure each error has the correct properties. + * + * @throws EasyPostException + */ + @Test + public void testKnownApiException() throws EasyPostException { + HashMap> apiErrorsMap = new HashMap>() {{ + put(300, RedirectError.class); + put(301, RedirectError.class); + put(302, RedirectError.class); + put(303, RedirectError.class); + put(304, RedirectError.class); + put(305, RedirectError.class); + put(306, RedirectError.class); + put(307, RedirectError.class); + put(308, RedirectError.class); + put(401, UnauthorizedError.class); + put(402, PaymentError.class); + put(403, ForbiddenError.class); + put(404, NotFoundError.class); + put(405, MethodNotAllowedError.class); + put(408, TimeoutError.class); + put(422, InvalidRequestError.class); + put(429, RateLimitError.class); + put(444, UnknownApiError.class); + put(500, InternalServerError.class); + put(503, ServiceUnavailablError.class); + put(504, GatewayTimeoutError.class); + }}; + + for (Map.Entry> entry: apiErrorsMap.entrySet()) { + EasyPostException exception = assertThrows(EasyPostException.class, + () -> EasyPostResource.handleAPIError("{}", entry.getKey())); + + assertEquals(Constants.API_DID_NOT_RETURN_ERROR_DETAILS, exception.getMessage()); + assertEquals("NO RESPONSE CODE", exception.getCode()); + assertEquals(entry.getKey(), exception.getStatusCode()); + assertInstanceOf(entry.getValue(), exception); + } + } + + /** + * Test parsing error message. + * + * @throws EasyPostException + */ + @Test + public void testExceptionErrorMessageParsing() throws EasyPostException { + String errorMessageStringJson = + "{\"error\": {\"code\": \"ERROR_CODE\", \"message\": \"ERROR_MESSAGE_1\", \"errors\": []}}"; + EasyPostException exception = assertThrows(EasyPostException.class, + () -> EasyPostResource.handleAPIError(errorMessageStringJson, 400)); + + assertEquals("ERROR_MESSAGE_1", exception.getMessage()); + } + + /** + * Test parsing error message that is an array. + * + * @throws EasyPostException + */ + @Test + public void testExceptionErrorArrayParsing() throws EasyPostException { + String errorMessageArrayJson = "{\"error\": {\"code\": \"ERROR_CODE\", \"message\":" + + "[\"ERROR_MESSAGE_1\", \"ERROR_MESSAGE_2\"], \"errors\": []}}"; + + EasyPostException exception = assertThrows(EasyPostException.class, + () -> EasyPostResource.handleAPIError(errorMessageArrayJson, 400)); - // should throw EasyPostException, - // but might throw NullPointerException due to a bug in the VCR grabbing response content, - // so we'll just check fo a generic exception - assertThrows(Exception.class, () -> Shipment.create(null)); + assertEquals("ERROR_MESSAGE_1, ERROR_MESSAGE_2", exception.getMessage()); } } From 140156e2afa8aa60bbc239f09e4c8321d9a4b10e Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 20 Oct 2022 17:00:13 -0600 Subject: [PATCH 014/208] chore: re-add Gradle install info and specify VERSION info when using Gradle --- README.md | 8 ++++++++ src/main/java-templates/com/easypost/EasyPost.java | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cda005e4a..bbfaedc51 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,14 @@ Add this to your project's POM: ``` +### Gradle + +Add this to your project's build file: + +```groovy +implementation "com.easypost:easypost-api-client:5.10.0" +``` + **NOTE:** [Google Gson](http://code.google.com/p/google-gson/) is required. ## Usage diff --git a/src/main/java-templates/com/easypost/EasyPost.java b/src/main/java-templates/com/easypost/EasyPost.java index 5e30b8773..925ad5d80 100644 --- a/src/main/java-templates/com/easypost/EasyPost.java +++ b/src/main/java-templates/com/easypost/EasyPost.java @@ -8,12 +8,13 @@ * This file exists as a template for the Templating Maven Plugin (https://www.mojohaus.org/templating-maven-plugin/) * If you notice the VERSION = ${project.version} below, that's an example of a template variable. *

- * In Maven (and Gradle), you can set variables inside the pom.xml file + * In Maven, you can set variables inside the pom.xml file * (https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#available-variables) *

* The Templating Maven Plugin, at compile time, will extract these variables and add them into the source code. *

* Specifically here, VERSION = ${project.version} will be replaced with, i.e. VERSION = 1.0.0 when compiling the code. + * NOTE: The VERSION will not populate if built with Gradle. *

* The placement of this file is important. * The Templating Maven Plugin will look for any template files in this specific `java-templates` directory. From 85311ca8c2f3d9a9511dd3138158b1f117315853 Mon Sep 17 00:00:00 2001 From: jchen293 Date: Mon, 24 Oct 2022 16:38:01 -0400 Subject: [PATCH 015/208] EasyPostResource file clean up (#199) --- .../com/easypost/exception/Constants.java | 1 - .../easypost/exception/EasyPostException.java | 3 +- src/main/java/com/easypost/http/Constant.java | 30 ++ .../{net => http}/EasyPostResponse.java | 3 +- .../{net => http}/HashMapSerializer.java | 2 +- .../Requestor.java} | 447 ++++-------------- .../easypost/{net => http}/package-info.java | 2 +- src/main/java/com/easypost/model/Address.java | 36 +- .../com/easypost/model/AddressCollection.java | 2 - .../easypost/model/AddressVerifications.java | 2 - src/main/java/com/easypost/model/ApiKey.java | 21 - src/main/java/com/easypost/model/ApiKeys.java | 27 +- .../java/com/easypost/model/BaseAddress.java | 21 - .../com/easypost/model/BaseCreditCard.java | 21 - .../java/com/easypost/model/BaseUser.java | 21 - src/main/java/com/easypost/model/Batch.java | 74 +-- .../com/easypost/model/BatchCollection.java | 2 - src/main/java/com/easypost/model/Billing.java | 14 +- src/main/java/com/easypost/model/Brand.java | 21 - .../java/com/easypost/model/CarbonOffset.java | 3 - .../com/easypost/model/CarrierAccount.java | 41 +- .../java/com/easypost/model/CarrierType.java | 5 +- .../java/com/easypost/model/CreditCard.java | 10 +- .../java/com/easypost/model/CustomsInfo.java | 28 +- .../java/com/easypost/model/CustomsItem.java | 28 +- .../com/easypost/model/EasyPostResource.java | 276 +++++++++++ .../java/com/easypost/model/EndShipper.java | 13 +- src/main/java/com/easypost/model/Event.java | 45 +- .../com/easypost/model/EventCollection.java | 2 - .../java/com/easypost/model/EventData.java | 2 - src/main/java/com/easypost/model/Field.java | 2 - src/main/java/com/easypost/model/Fields.java | 2 - src/main/java/com/easypost/model/Form.java | 40 +- .../java/com/easypost/model/Insurance.java | 52 +- .../easypost/model/InsuranceCollection.java | 2 - src/main/java/com/easypost/model/Order.java | 57 +-- .../com/easypost/model/OrderCollection.java | 2 - src/main/java/com/easypost/model/Parcel.java | 26 +- .../com/easypost/model/PaymentMethod.java | 15 +- .../easypost/model/PaymentMethodObject.java | 2 - src/main/java/com/easypost/model/Pickup.java | 58 +-- .../com/easypost/model/PickupCollection.java | 2 - .../java/com/easypost/model/PostageLabel.java | 21 - src/main/java/com/easypost/model/Rate.java | 24 +- .../com/easypost/model/ReferralCustomer.java | 18 +- .../model/ReferralCustomerCollection.java | 2 - src/main/java/com/easypost/model/Refund.java | 30 +- .../com/easypost/model/RefundCollection.java | 2 - src/main/java/com/easypost/model/Report.java | 49 +- .../com/easypost/model/ReportCollection.java | 2 - .../java/com/easypost/model/ScanForm.java | 28 +- .../easypost/model/ScanFormCollection.java | 2 - .../java/com/easypost/model/Shipment.java | 106 ++--- .../easypost/model/ShipmentCollection.java | 2 - .../com/easypost/model/TaxIdentifier.java | 3 - src/main/java/com/easypost/model/Tracker.java | 49 +- .../com/easypost/model/TrackerCollection.java | 2 - src/main/java/com/easypost/model/User.java | 16 +- src/main/java/com/easypost/model/Webhook.java | 57 +-- .../com/easypost/model/WebhookCollection.java | 2 - .../cassettes/batch/add_remove_shipment.json | 103 ++-- src/test/cassettes/pickup/buy.json | 72 +-- src/test/cassettes/pickup/cancel.json | 84 ++-- src/test/cassettes/pickup/create.json | 43 +- src/test/cassettes/pickup/lowest_rate.json | 45 +- src/test/cassettes/pickup/retrieve.json | 61 ++- src/test/cassettes/scan_form/all.json | 24 +- src/test/cassettes/scan_form/create.json | 47 +- src/test/cassettes/scan_form/retrieve.json | 76 ++- src/test/cassettes/shipment/buy.json | 51 +- .../buy_shipment_with_carbon_offset.json | 42 +- .../buy_shipment_with_end_shipper_id.json | 77 ++- src/test/java/com/easypost/EasyPostTest.java | 15 +- src/test/java/com/easypost/ErrorTest.java | 10 +- src/test/java/com/easypost/Fixtures.java | 2 +- 75 files changed, 972 insertions(+), 1658 deletions(-) create mode 100644 src/main/java/com/easypost/http/Constant.java rename src/main/java/com/easypost/{net => http}/EasyPostResponse.java (98%) rename src/main/java/com/easypost/{net => http}/HashMapSerializer.java (99%) rename src/main/java/com/easypost/{net/EasyPostResource.java => http/Requestor.java} (63%) rename src/main/java/com/easypost/{net => http}/package-info.java (88%) create mode 100644 src/main/java/com/easypost/model/EasyPostResource.java diff --git a/src/main/java/com/easypost/exception/Constants.java b/src/main/java/com/easypost/exception/Constants.java index da4c07dc4..ae4b17b5c 100644 --- a/src/main/java/com/easypost/exception/Constants.java +++ b/src/main/java/com/easypost/exception/Constants.java @@ -1,7 +1,6 @@ package com.easypost.exception; public abstract class Constants { - public static final String EXTERNAL_API_CALL_FAILED = "Could not send card details to %s, please try again later"; public static final String ENCODED_ERROR = "Encode error for %s"; public static final String INVALID_API_KEY_TYPE = "Invalid API key type."; diff --git a/src/main/java/com/easypost/exception/EasyPostException.java b/src/main/java/com/easypost/exception/EasyPostException.java index 20df5d4f1..3a254668f 100644 --- a/src/main/java/com/easypost/exception/EasyPostException.java +++ b/src/main/java/com/easypost/exception/EasyPostException.java @@ -13,7 +13,6 @@ import java.util.List; public class EasyPostException extends Exception { - private static final long serialVersionUID = 1L; private final String code; private final Integer statusCode; @@ -47,7 +46,7 @@ public EasyPostException(final String message, final Throwable ex) { * @param statusCode the exception status code * @param errors the errors array */ - public EasyPostException(final String message, final String code, final int statusCode, List errors) { + public EasyPostException(final String message, final String code, final int statusCode, final List errors) { this(message, code, statusCode, errors, null); } diff --git a/src/main/java/com/easypost/http/Constant.java b/src/main/java/com/easypost/http/Constant.java new file mode 100644 index 000000000..e39293a52 --- /dev/null +++ b/src/main/java/com/easypost/http/Constant.java @@ -0,0 +1,30 @@ +package com.easypost.http; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; + +import com.easypost.model.Error; +import com.easypost.model.ErrorDeserializer; +import com.easypost.model.SmartrateCollection; +import com.easypost.model.SmartrateCollectionDeserializer; +import com.google.gson.FieldNamingPolicy; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +public abstract class Constant { + public static final String EASYPOST_SUPPORT_EMAIL = "support@easypost.com"; + public static final String CHARSET = "UTF-8"; + public static final ArrayList GLOBAL_FIELD_ACCESSORS = new ArrayList<>( + Arrays.asList("getCreatedAt", "getUpdatedAt", "getFees")); + public static final int DEFAULT_CONNECT_TIMEOUT_MILLISECONDS = 30000; + public static final int DEFAULT_READ_TIMEOUT_MILLISECONDS = 60000; + public static final double DEFAULT_APP_ENGINE_TIMEOUT_SECONDS = 20.0; + public static final Gson GSON = new GsonBuilder() + .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) + .registerTypeAdapter(HashMap.class, new HashMapSerializer()) + .registerTypeAdapter(SmartrateCollection.class, new SmartrateCollectionDeserializer()) + .registerTypeAdapter(Error.class, new ErrorDeserializer()).create(); + public static final Gson PRETTY_PRINT_GSON = new GsonBuilder().setPrettyPrinting().serializeNulls() + .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create(); +} diff --git a/src/main/java/com/easypost/net/EasyPostResponse.java b/src/main/java/com/easypost/http/EasyPostResponse.java similarity index 98% rename from src/main/java/com/easypost/net/EasyPostResponse.java rename to src/main/java/com/easypost/http/EasyPostResponse.java index 27619ec6f..3f30834ff 100644 --- a/src/main/java/com/easypost/net/EasyPostResponse.java +++ b/src/main/java/com/easypost/http/EasyPostResponse.java @@ -6,10 +6,9 @@ * file that was distributed with this source code. */ -package com.easypost.net; +package com.easypost.http; public class EasyPostResponse { - private int responseCode; private String responseBody; diff --git a/src/main/java/com/easypost/net/HashMapSerializer.java b/src/main/java/com/easypost/http/HashMapSerializer.java similarity index 99% rename from src/main/java/com/easypost/net/HashMapSerializer.java rename to src/main/java/com/easypost/http/HashMapSerializer.java index 7dd50826e..473193f3b 100644 --- a/src/main/java/com/easypost/net/HashMapSerializer.java +++ b/src/main/java/com/easypost/http/HashMapSerializer.java @@ -1,4 +1,4 @@ -package com.easypost.net; +package com.easypost.http; import com.google.gson.Gson; import com.google.gson.JsonElement; diff --git a/src/main/java/com/easypost/net/EasyPostResource.java b/src/main/java/com/easypost/http/Requestor.java similarity index 63% rename from src/main/java/com/easypost/net/EasyPostResource.java rename to src/main/java/com/easypost/http/Requestor.java index 0fc021e5e..201cf479b 100644 --- a/src/main/java/com/easypost/net/EasyPostResource.java +++ b/src/main/java/com/easypost/http/Requestor.java @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -package com.easypost.net; +package com.easypost.http; import com.easypost.EasyPost; import com.easypost.exception.Constants; @@ -25,16 +25,8 @@ import com.easypost.exception.API.UnauthorizedError; import com.easypost.exception.API.UnknownApiError; import com.easypost.exception.General.MissingParameterError; +import com.easypost.model.EasyPostResource; import com.easypost.model.Error; -import com.easypost.model.ErrorDeserializer; -import com.easypost.model.Fee; -import com.easypost.model.Shipment; -import com.easypost.model.SmartrateCollection; -import com.easypost.model.SmartrateCollectionDeserializer; -import com.easypost.model.TrackingDetail; -import com.google.gson.FieldNamingPolicy; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -44,53 +36,31 @@ import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.lang.reflect.Constructor; -import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.net.URLEncoder; import java.net.URLStreamHandler; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Scanner; -public abstract class EasyPostResource { - protected enum RequestMethod { +public abstract class Requestor { + public enum RequestMethod { GET, POST, DELETE, PUT } - public static final String EASYPOST_SUPPORT_EMAIL = "support@easypost.com"; - public static final Gson GSON = - new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) - .registerTypeAdapter(HashMap.class, new HashMapSerializer()) - .registerTypeAdapter(SmartrateCollection.class, new SmartrateCollectionDeserializer()) - .registerTypeAdapter(Error.class, new ErrorDeserializer()).create(); - public static final Gson PRETTY_PRINT_GSON = new GsonBuilder().setPrettyPrinting().serializeNulls() - .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create(); - public static final String CHARSET = "UTF-8"; - public static final ArrayList GLOBAL_FIELD_ACCESSORS = - new ArrayList<>(Arrays.asList("getCreatedAt", "getUpdatedAt", "getFees")); - public static final int DEFAULT_CONNECT_TIMEOUT_MILLISECONDS = 30000; - public static final int DEFAULT_READ_TIMEOUT_MILLISECONDS = 60000; - public static final double DEFAULT_APP_ENGINE_TIMEOUT_SECONDS = 20.0; private static final String DNS_CACHE_TTL_PROPERTY_NAME = "networkaddress.cache.ttl"; private static final String CUSTOM_URL_STREAM_HANDLER_PROPERTY_NAME = "com.easypost.net.customURLStreamHandler"; - private static int connectTimeoutMilliseconds = DEFAULT_CONNECT_TIMEOUT_MILLISECONDS; - private static int readTimeoutMilliseconds = DEFAULT_READ_TIMEOUT_MILLISECONDS; - private static double appEngineTimeoutSeconds = DEFAULT_APP_ENGINE_TIMEOUT_SECONDS; - private Date createdAt; - private Date updatedAt; - private ArrayList fees; + private static int connectTimeoutMilliseconds = Constant.DEFAULT_CONNECT_TIMEOUT_MILLISECONDS; + private static int readTimeoutMilliseconds = Constant.DEFAULT_READ_TIMEOUT_MILLISECONDS; + private static double appEngineTimeoutSeconds = Constant.DEFAULT_APP_ENGINE_TIMEOUT_SECONDS; /** * Get the timeout in milliseconds for App Engine API requests. @@ -128,59 +98,6 @@ public static void setConnectTimeoutMilliseconds(int milliseconds) { connectTimeoutMilliseconds = milliseconds; } - /** - * @return the Date this object was created - */ - public Date getCreatedAt() { - return createdAt; - } - - /** - * Set the Date this object was created. - * - * @param createdAt the Date this object was created - */ - public void setCreatedAt(final Date createdAt) { - this.createdAt = createdAt; - } - - /** - * @return the Fees associated with this object - */ - public ArrayList getFees() { - return fees; - } - - /** - * Set the Fees associated with this object. - * - * @param fees the Fees associated with this object - */ - public void setFees(final ArrayList fees) { - this.fees = fees; - } - - /** - * @return the ID of this object - */ - public String getId() { - return ""; - } - - /** - * @return the URL of the label for this object - */ - public String getLabelUrl() { - return ""; - } - - /** - * @return the API mode used to create this object - */ - public String getMode() { - return ""; - } - /** * Get the timeout in milliseconds for reading API responses. * @@ -199,86 +116,14 @@ public static void setReadTimeoutMilliseconds(int milliseconds) { readTimeoutMilliseconds = milliseconds; } - /** - * @return the ID of this shipment - */ - public String getShipmentId() { - return ""; - } - - /** - * @return the list of shipments in this batch - */ - public List getShipments() { - return new ArrayList(); - } - - /** - * @return the status of this object - */ - public String getStatus() { - return ""; - } - - /** - * @return the tracking code of this shipment - */ - public String getTrackingCode() { - return ""; - } - - /** - * @return the tracking details of this shipment - */ - public List getTrackingDetails() { - return new ArrayList(); - } - - /** - * @return the Date this object was last updated - */ - public Date getUpdatedAt() { - return updatedAt; - } - - /** - * Set the Date this object was last updated. - * - * @param updatedAt the Date this object was last updated - */ - public void setUpdatedAt(final Date updatedAt) { - this.updatedAt = updatedAt; - } - - protected static String instanceURL(final Class clazz, final String id) { - return String.format("%s/%s", classURL(clazz), id); - } - - protected static String classURL(final Class clazz) { - String singleURL = singleClassURL(clazz); - if (singleURL.charAt(singleURL.length() - 1) == 's' || singleURL.charAt(singleURL.length() - 1) == 'h') { - return String.format("%ses", singleClassURL(clazz)); - } else { - return String.format("%ss", singleClassURL(clazz)); - } - } - - protected static String singleClassURL(final Class clazz) { - return String.format("%s/%s", EasyPost.API_BASE, className(clazz)); - } - - private static String className(final Class clazz) { - return clazz.getSimpleName().replaceAll("([a-z])([A-Z])", "$1_$2").toLowerCase().replace("$", ""); - - } - private static String urlEncodePair(final String key, final String value) throws UnsupportedEncodingException { - return String.format("%s=%s", URLEncoder.encode(key, CHARSET), URLEncoder.encode(value, CHARSET)); + return String.format("%s=%s", + URLEncoder.encode(key, Constant.CHARSET), URLEncoder.encode(value, Constant.CHARSET)); } static Map getHeaders(String apiKey) { Map headers = new HashMap(); - headers.put("Accept-Charset", CHARSET); + headers.put("Accept-Charset", Constant.CHARSET); headers.put("User-Agent", String.format("EasyPost/v2 JavaClient/%s Java/%s OS/%s OSVersion/%s OSArch/%s " + "Implementation/%s", EasyPost.VERSION, System.getProperty("java.version"), convertSpaceToHyphen(System.getProperty("os.name")), System.getProperty("os.version"), @@ -299,14 +144,15 @@ private static String convertSpaceToHyphen(String string) { } private static javax.net.ssl.HttpsURLConnection createEasyPostConnection(final String url, final String apiKey, - final String method) throws IOException { + final String method) throws IOException { HttpsURLConnection conn = null; String customURLStreamHandlerClassName = System.getProperty(CUSTOM_URL_STREAM_HANDLER_PROPERTY_NAME, null); if (customURLStreamHandlerClassName != null) { // instantiate the custom handler provided try { - @SuppressWarnings ("unchecked") Class clazz = - (Class) Class.forName(customURLStreamHandlerClassName); + @SuppressWarnings("unchecked") + Class clazz = (Class) Class + .forName(customURLStreamHandlerClassName); Constructor constructor = clazz.getConstructor(); URLStreamHandler customHandler = constructor.newInstance(); URL urlObj = new URL(null, url, customHandler); @@ -356,7 +202,7 @@ private static javax.net.ssl.HttpsURLConnection createEasyPostConnection(final S } private static javax.net.ssl.HttpsURLConnection writeBody(final javax.net.ssl.HttpsURLConnection conn, - final JsonObject body) throws IOException { + final JsonObject body) throws IOException { if (body != null) { conn.setDoOutput(true); conn.setRequestProperty("Content-Type", "application/json"); @@ -364,7 +210,7 @@ private static javax.net.ssl.HttpsURLConnection writeBody(final javax.net.ssl.Ht try { output = conn.getOutputStream(); String jsonString = body.toString(); - output.write(jsonString.getBytes(CHARSET)); + output.write(jsonString.getBytes(Constant.CHARSET)); } finally { if (output != null) { output.close(); @@ -375,7 +221,7 @@ private static javax.net.ssl.HttpsURLConnection writeBody(final javax.net.ssl.Ht } private static javax.net.ssl.HttpsURLConnection createGetConnection(final String url, final String query, - final String apiKey) throws IOException { + final String apiKey) throws IOException { String getURL = url; if (query != null) { getURL = String.format("%s?%s", url, query); @@ -385,14 +231,14 @@ private static javax.net.ssl.HttpsURLConnection createGetConnection(final String } private static javax.net.ssl.HttpsURLConnection createPostConnection(final String url, final JsonObject body, - final String apiKey) throws IOException { + final String apiKey) throws IOException { javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(url, apiKey, "POST"); conn = writeBody(conn, body); return conn; } private static javax.net.ssl.HttpsURLConnection createDeleteConnection(final String url, final String query, - final String apiKey) throws IOException { + final String apiKey) throws IOException { String deleteUrl = url; if (query != null) { deleteUrl = String.format("%s?%s", url, query); @@ -402,16 +248,17 @@ private static javax.net.ssl.HttpsURLConnection createDeleteConnection(final Str } private static javax.net.ssl.HttpsURLConnection createPutConnection(final String url, final JsonObject body, - final String apiKey) throws IOException { + final String apiKey) throws IOException { javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(url, apiKey, "PUT"); conn = writeBody(conn, body); return conn; } private static JsonObject createBody(final Map params) { - // this is a hack to fix a broken concept: https://github.com/google/gson/issues/1080 - //noinspection rawtypes,unchecked - JsonElement jsonElement = GSON.toJsonTree(new HashMap(params)); + // this is a hack to fix a broken concept: + // https://github.com/google/gson/issues/1080 + // noinspection rawtypes,unchecked + JsonElement jsonElement = Constant.GSON.toJsonTree(new HashMap(params)); JsonObject jsonObject = jsonElement.getAsJsonObject(); return jsonObject; } @@ -468,14 +315,15 @@ private static String getResponseBody(final InputStream responseStream) throws I return ""; } - @SuppressWarnings ("resource") String rBody = new Scanner(responseStream, CHARSET).useDelimiter("\\A").next(); + @SuppressWarnings("resource") + String rBody = new Scanner(responseStream, Constant.CHARSET).useDelimiter("\\A").next(); responseStream.close(); return rBody; } - private static EasyPostResponse makeURLConnectionRequest(final EasyPostResource.RequestMethod method, - final String url, final String query, - final JsonObject body, final String apiKey) + private static EasyPostResponse makeURLConnectionRequest(final RequestMethod method, + final String url, final String query, + final JsonObject body, final String apiKey) throws EasyPostException { javax.net.ssl.HttpsURLConnection conn = null; try { @@ -495,7 +343,7 @@ private static EasyPostResponse makeURLConnectionRequest(final EasyPostResource. default: throw new EasyPostException( String.format("Unrecognized HTTP method %s. Please contact EasyPost at %s.", method, - EasyPostResource.EASYPOST_SUPPORT_EMAIL)); + Constant.EASYPOST_SUPPORT_EMAIL)); } conn.connect(); // This line is crucial for getting VCR to work // (triggers internal pre-request processing needed for VCR) @@ -512,7 +360,7 @@ private static EasyPostResponse makeURLConnectionRequest(final EasyPostResource. } catch (IOException e) { throw new EasyPostException(String.format("Could not connect to EasyPost (%s). " + "Please check your internet connection and try again. If this problem persists," + - "please contact us at %s.", EasyPost.API_BASE, EasyPostResource.EASYPOST_SUPPORT_EMAIL), e); + "please contact us at %s.", EasyPost.API_BASE, Constant.EASYPOST_SUPPORT_EMAIL), e); } finally { if (conn != null) { conn.disconnect(); @@ -520,15 +368,42 @@ private static EasyPostResponse makeURLConnectionRequest(final EasyPostResource. } } - protected static T request(final EasyPostResource.RequestMethod method, final String url, - final Map params, final Class clazz, final String apiKey) + /** + * Send an HTTP request to EasyPost. + * + * @param Any class. + * @param method The method of the API request. + * @param url The URL of the API request. + * @param params The params of the API request. + * @param clazz The class of the object for deserialization + * @param apiKey The API key for this API request. + * + * @return A class object. + * @throws EasyPostException when the request fails. + */ + public static T request(final RequestMethod method, final String url, + final Map params, final Class clazz, final String apiKey) throws EasyPostException { return request(method, url, params, clazz, apiKey, true); } - protected static T request(final EasyPostResource.RequestMethod method, final String url, - final Map params, final Class clazz, final String apiKey, - final boolean apiKeyRequired) throws EasyPostException { + /** + * Send an HTTP request to EasyPost. + * + * @param Any class. + * @param method The method of the API request. + * @param url The URL of the API request. + * @param params The params of the API request. + * @param clazz The class of the object for deserialization + * @param apiKey The API key for this API request. + * @param apiKeyRequired The API key for this HTTP request call if needed. + * + * @return A class object. + * @throws EasyPostException when the request fails. + */ + protected static T request(final RequestMethod method, final String url, + final Map params, final Class clazz, final String apiKey, + final boolean apiKeyRequired) throws EasyPostException { String originalDNSCacheTTL = null; boolean allowedToSetTTL = true; try { @@ -553,10 +428,10 @@ protected static T request(final EasyPostResource.RequestMethod method, fina } } - @SuppressWarnings ("checkstyle:methodname") - protected static T _request(final EasyPostResource.RequestMethod method, final String url, - final Map params, final Class clazz, String apiKey, - final boolean apiKeyRequired) throws EasyPostException { + @SuppressWarnings("checkstyle:methodname") + protected static T _request(final RequestMethod method, final String url, + final Map params, final Class clazz, String apiKey, + final boolean apiKeyRequired) throws EasyPostException { if ((EasyPost.apiKey == null || EasyPost.apiKey.length() == 0) && (apiKey == null || apiKey.length() == 0)) { if (apiKeyRequired) { throw new MissingParameterError(Constants.INVALID_API_KEY_TYPE); @@ -578,7 +453,8 @@ protected static T _request(final EasyPostResource.RequestMethod method, fin } catch (UnsupportedEncodingException e) { throw new EasyPostException( String.format("Unable to encode parameters to %s. Please email %s for assistance.", - CHARSET, EasyPostResource.EASYPOST_SUPPORT_EMAIL), e); + Constant.CHARSET, Constant.EASYPOST_SUPPORT_EMAIL), + e); } break; case POST: @@ -588,7 +464,7 @@ protected static T _request(final EasyPostResource.RequestMethod method, fin } catch (Exception e) { throw new EasyPostException(String.format( "Unable to create JSON body from parameters. Please email %s for assistance.", - EasyPostResource.EASYPOST_SUPPORT_EMAIL), e); + Constant.EASYPOST_SUPPORT_EMAIL), e); } break; default: @@ -596,7 +472,6 @@ protected static T _request(final EasyPostResource.RequestMethod method, fin } } - EasyPostResponse response; try { // HTTPSURLConnection verifies SSL cert by default @@ -616,7 +491,7 @@ protected static T _request(final EasyPostResource.RequestMethod method, fin handleAPIError(rBody, rCode); } - return GSON.fromJson(rBody, clazz); + return Constant.GSON.fromJson(rBody, clazz); } /** @@ -629,7 +504,7 @@ protected static void handleAPIError(String rBody, final int rCode) throws EasyP if (rBody == null || rBody.length() == 0) { rBody = "{}"; } - Error error = GSON.fromJson(rBody, Error.class); + Error error = Constant.GSON.fromJson(rBody, Error.class); String errorMessage = error.getMessage(); String errorCode = error.getCode(); List errors = error.getErrors(); @@ -667,11 +542,12 @@ protected static void handleAPIError(String rBody, final int rCode) throws EasyP } private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, String url, final String query, - final JsonObject body, final String apiKey) + final JsonObject body, final String apiKey) throws EasyPostException { String unknownErrorMessage = String.format( "Sorry, an unknown error occurred while trying to use the Google App Engine runtime." + - "Please email %s for assistance.", EasyPostResource.EASYPOST_SUPPORT_EMAIL); + "Please email %s for assistance.", + Constant.EASYPOST_SUPPORT_EMAIL); try { if ((method == RequestMethod.GET || method == RequestMethod.DELETE) && query != null) { url = String.format("%s?%s", url, query); @@ -689,13 +565,15 @@ private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, System.err.printf( "Warning: this App Engine SDK version does not allow verification of SSL certificates;" + "this exposes you to a MITM attack. Please upgrade your App Engine SDK to >=1.5.0. " + - "If you have questions, email %s.%n", EasyPostResource.EASYPOST_SUPPORT_EMAIL); + "If you have questions, email %s.%n", + Constant.EASYPOST_SUPPORT_EMAIL); fetchOptions = fetchOptionsBuilderClass.getDeclaredMethod("withDefaults").invoke(null); } Class fetchOptionsClass = Class.forName("com.google.appengine.api.urlfetch.FetchOptions"); - // Heroku times out after 30s, so leave some time for the API to return a response + // Heroku times out after 30s, so leave some time for the API to return a + // response fetchOptionsClass.getDeclaredMethod("setDeadline", java.lang.Double.class) .invoke(fetchOptions, getAppEngineTimeoutSeconds()); @@ -724,8 +602,8 @@ private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, Object response = fetchMethod.invoke(urlFetchService, request); int responseCode = (Integer) response.getClass().getDeclaredMethod("getResponseCode").invoke(response); - String responseBody = - new String((byte[]) response.getClass().getDeclaredMethod("getContent").invoke(response), CHARSET); + String responseBody = new String( + (byte[]) response.getClass().getDeclaredMethod("getContent").invoke(response), Constant.CHARSET); return new EasyPostResponse(responseCode, responseBody); @@ -751,167 +629,4 @@ private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, throw new EasyPostException(unknownErrorMessage, e); } } - - /** - * Get all static methods for a particular class. - * - * @param type Class type to get methods for. - * @return List of class methods. - */ - private static List getAllStaticMethods(Class type) { - List allMethods = getAllMethods(type); - - List staticMethods = new ArrayList<>(); - for (Method method : allMethods) { - if (Modifier.isStatic(method.getModifiers())) { - staticMethods.add(method); - } - } - - return staticMethods; - } - - /** - * Get all methods for a particular class. - * - * @param type Class type to get methods for. - * @return List of class methods. - */ - private static List getAllMethods(Class type) { - return Arrays.asList(type.getMethods()); - } - - /** - * Returns a string representation of the object. - */ - @Override - public String toString() { - - return (String) this.getIdString(); - } - - private Object getIdString() { - try { - Field idField = this.getClass().getDeclaredField("id"); - return idField.get(this); - } catch (SecurityException e) { - return ""; - } catch (NoSuchFieldException e) { - return ""; - } catch (IllegalArgumentException e) { - return ""; - } catch (IllegalAccessException e) { - return ""; - } - } - - /** - * Pretty print the JSON representation of the object. - * - * @return the JSON representation of the object. - */ - public String prettyPrint() { - return String.format("<%s@%s id=%s> JSON: %s", this.getClass().getName(), System.identityHashCode(this), - this.getIdString(), PRETTY_PRINT_GSON.toJson(this)); - } - - /** - * Merge two EasyPostResource objects. - * - * @param obj the base object - * @param update the object to merge - */ - public void merge(final EasyPostResource obj, final EasyPostResource update) { - if (!obj.getClass().isAssignableFrom(update.getClass())) { - return; - } - - // get all methods from the obj class and its superclasses - List methods = getAllNonStaticMethods(obj.getClass()); - - for (Method fromMethod : methods) { - if (fromMethod.getName().startsWith("get") || GLOBAL_FIELD_ACCESSORS.contains(fromMethod.getName())) { - - if (fromMethod.isAnnotationPresent(Deprecated.class)) { - // skip deprecated methods - continue; - } - - String fromName = fromMethod.getName(); - String toName = fromName.replace("get", "set"); - - try { - Object value = fromMethod.invoke(update, (Object[]) null); - if (value != null) { - Method toMethod = obj.getClass().getMethod(toName, fromMethod.getReturnType()); - toMethod.invoke(obj, value); - } - } catch (Exception e) { - // TODO: Address situation below - /* - The method getSmartrates() on the Shipment object is causing this exception. - Since it found a method with "get" in the name, it expects there to be a "set" equivalent. - There is not, causing this exception to be thrown, although nothing wrong has really happened. - This code block was copy-pasted from StackOverflow: https://stackoverflow.com/a/7526414/13343799 - Per the comments, there are some built-in expectations for how this will work, - and should eventually be re-written or removed entirely - (explore returning a brand-new object rather than modifying the existing one). - For now, the easiest fix would be to - a) just ignore this exception, or - b) rename getSmartrates() in the Shipment class to just smartrates() - (similar to how the other methods are named). - */ - // e.printStackTrace(); - } - } - } - } - - /** - * Get all non-static methods for a particular class. - * - * @param type Class type to get methods for. - * @return List of class methods. - */ - private static List getAllNonStaticMethods(Class type) { - List allMethods = getAllMethods(type); - - List nonStaticMethods = new ArrayList<>(); - for (Method method : allMethods) { - if (!Modifier.isStatic(method.getModifiers())) { - nonStaticMethods.add(method); - } - } - - return nonStaticMethods; - } - - @SuppressWarnings ("unused") - private static class ErrorContainer { - private Error error; - } - - /** - * Override the hashCode method because it is needed when overriding equals(). - * - * @return The hashcode of current object. - */ - @Override - public int hashCode() { - return GSON.toJson(this).hashCode(); - } - - /** - * Override the equals method, convert objects to Json strings for comparsion. - * - * @param object Object of any class. - * @return If two objects have the same properties. - */ - @Override - public boolean equals(Object object) { - String currentObject = GSON.toJson(this); - String newObject = GSON.toJson(object); - - return currentObject.equals(newObject); - } } diff --git a/src/main/java/com/easypost/net/package-info.java b/src/main/java/com/easypost/http/package-info.java similarity index 88% rename from src/main/java/com/easypost/net/package-info.java rename to src/main/java/com/easypost/http/package-info.java index 6ccdfb779..cdc967afb 100644 --- a/src/main/java/com/easypost/net/package-info.java +++ b/src/main/java/com/easypost/http/package-info.java @@ -6,4 +6,4 @@ * @see EasyPost API * @since 1.0 */ -package com.easypost.net; +package com.easypost.http; diff --git a/src/main/java/com/easypost/model/Address.java b/src/main/java/com/easypost/model/Address.java index fba41723e..2a7d7aee7 100644 --- a/src/main/java/com/easypost/model/Address.java +++ b/src/main/java/com/easypost/model/Address.java @@ -1,13 +1,13 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.HashMap; import java.util.Map; public final class Address extends BaseAddress { - - private String mode; private String message; private String carrierFacility; private String federalTaxId; @@ -68,24 +68,6 @@ public void setMessage(final String message) { this.message = message; } - /** - * Get address mode. - * - * @return address mode - */ - public String getMode() { - return mode; - } - - /** - * Set address mode. - * - * @param mode address mode - */ - public void setMode(final String mode) { - this.mode = mode; - } - /** * Get whether address is residential. * @@ -154,7 +136,7 @@ public static Address create(final Map params, final String apiK wrappedParams.put("address", params); - return request(RequestMethod.POST, classURL(Address.class), wrappedParams, Address.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(Address.class), wrappedParams, Address.class, apiKey); } /** @@ -177,7 +159,7 @@ public static Address retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static Address retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(Address.class, id), null, Address.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(Address.class, id), null, Address.class, apiKey); } /** @@ -201,7 +183,7 @@ public static AddressCollection all(final Map params) throws Eas */ public static AddressCollection all(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, classURL(Address.class), params, AddressCollection.class, apiKey); + return Requestor.request(RequestMethod.GET, classURL(Address.class), params, AddressCollection.class, apiKey); } /** @@ -229,8 +211,8 @@ public static Address createAndVerify(final Map params, final St wrappedParams.put("address", params); AddressVerifyResponse response = - request(RequestMethod.POST, String.format("%s/create_and_verify", classURL(Address.class)), - wrappedParams, AddressVerifyResponse.class, apiKey); + Requestor.request(RequestMethod.POST, String.format("%s/create_and_verify", classURL(Address.class)), + wrappedParams, AddressVerifyResponse.class, apiKey); return response.getAddress(); } @@ -255,8 +237,8 @@ public Address verify() throws EasyPostException { public Address verify(final String apiKey) throws EasyPostException { AddressVerifyResponse response; response = - request(RequestMethod.GET, String.format("%s/verify", instanceURL(Address.class, this.getId())), null, - AddressVerifyResponse.class, apiKey); + Requestor.request(RequestMethod.GET, String.format("%s/verify", + instanceURL(Address.class, this.getId())), null, AddressVerifyResponse.class, apiKey); return response.getAddress(); } diff --git a/src/main/java/com/easypost/model/AddressCollection.java b/src/main/java/com/easypost/model/AddressCollection.java index 40ad5ba8b..996fdceea 100644 --- a/src/main/java/com/easypost/model/AddressCollection.java +++ b/src/main/java/com/easypost/model/AddressCollection.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public final class AddressCollection extends EasyPostResource { diff --git a/src/main/java/com/easypost/model/AddressVerifications.java b/src/main/java/com/easypost/model/AddressVerifications.java index 1d50d804d..02fee79ca 100644 --- a/src/main/java/com/easypost/model/AddressVerifications.java +++ b/src/main/java/com/easypost/model/AddressVerifications.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - public class AddressVerifications extends EasyPostResource { private AddressVerification zip4; private AddressVerification delivery; diff --git a/src/main/java/com/easypost/model/ApiKey.java b/src/main/java/com/easypost/model/ApiKey.java index 12660e160..fa0bf8b67 100644 --- a/src/main/java/com/easypost/model/ApiKey.java +++ b/src/main/java/com/easypost/model/ApiKey.java @@ -1,9 +1,6 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - public final class ApiKey extends EasyPostResource { - private String mode; private String key; /** @@ -23,23 +20,5 @@ public String getKey() { public void setKey(final String key) { this.key = key; } - - /** - * Get the API key mode. - * - * @return API key mode - */ - public String getMode() { - return mode; - } - - /** - * Set the API key mode. - * - * @param mode API key mode - */ - public void setMode(final String mode) { - this.mode = mode; - } } diff --git a/src/main/java/com/easypost/model/ApiKeys.java b/src/main/java/com/easypost/model/ApiKeys.java index 6d2c9794d..cbb33905d 100644 --- a/src/main/java/com/easypost/model/ApiKeys.java +++ b/src/main/java/com/easypost/model/ApiKeys.java @@ -1,12 +1,12 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.List; public final class ApiKeys extends EasyPostResource { - private String id; private List keys; private List children; @@ -28,24 +28,6 @@ public void setChildren(final List children) { this.children = children; } - /** - * Get API key ID. - * - * @return API key ID. - */ - public String getId() { - return id; - } - - /** - * Set API key ID. - * - * @param id API key ID. - */ - public void setId(final String id) { - this.id = id; - } - /** * Get a list of API keys. * @@ -82,9 +64,6 @@ public static ApiKeys all() throws EasyPostException { * @throws EasyPostException when the request fails. */ public static ApiKeys all(final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, classURL(ApiKey.class), null, ApiKeys.class, apiKey); + return Requestor.request(RequestMethod.GET, classURL(ApiKey.class), null, ApiKeys.class, apiKey); } - } - - diff --git a/src/main/java/com/easypost/model/BaseAddress.java b/src/main/java/com/easypost/model/BaseAddress.java index 80703dadf..98a337636 100644 --- a/src/main/java/com/easypost/model/BaseAddress.java +++ b/src/main/java/com/easypost/model/BaseAddress.java @@ -1,9 +1,6 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - public class BaseAddress extends EasyPostResource { - private String id; private String name; private String company; private String street1; @@ -87,24 +84,6 @@ public void setEmail(final String email) { this.email = email; } - /** - * Get Address ID. - * - * @return Address ID - */ - public String getId() { - return id; - } - - /** - * Set Address ID. - * - * @param id Address ID - */ - public void setId(final String id) { - this.id = id; - } - /** * Get name of Address. * diff --git a/src/main/java/com/easypost/model/BaseCreditCard.java b/src/main/java/com/easypost/model/BaseCreditCard.java index fc0b57efb..dee2f370a 100644 --- a/src/main/java/com/easypost/model/BaseCreditCard.java +++ b/src/main/java/com/easypost/model/BaseCreditCard.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - /** * BaseCreditCard is a model class that represents the base of any credit card. * @@ -10,7 +8,6 @@ */ @Deprecated public class BaseCreditCard extends EasyPostResource { - private String id; private String object; private String name; private String last4; @@ -72,24 +69,6 @@ public void setExpYear(String expYear) { this.expYear = expYear; } - /** - * Get ID of this CreditCard object. - * - * @return ID of this CreditCard. - */ - public String getId() { - return id; - } - - /** - * Set ID of this CreditCard object. - * - * @param id ID of this CreditCard. - */ - public void setId(String id) { - this.id = id; - } - /** * Get the last 4 digits of this CreditCard object. * diff --git a/src/main/java/com/easypost/model/BaseUser.java b/src/main/java/com/easypost/model/BaseUser.java index 4a237c11c..17ddc138c 100644 --- a/src/main/java/com/easypost/model/BaseUser.java +++ b/src/main/java/com/easypost/model/BaseUser.java @@ -1,11 +1,8 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public class BaseUser extends EasyPostResource { - private String id; private String name; private String email; private String phoneNumber; @@ -132,24 +129,6 @@ public void setHasBillingMethod(boolean hasBillingMethod) { this.hasBillingMethod = hasBillingMethod; } - /** - * Get the ID of the User. - * - * @return the ID of the User. - */ - public String getId() { - return id; - } - - /** - * Set the ID of the User. - * - * @param id the ID of the User. - */ - public void setId(final String id) { - this.id = id; - } - /** * Get the insurance fee minimum of the User. * diff --git a/src/main/java/com/easypost/model/Batch.java b/src/main/java/com/easypost/model/Batch.java index a1108cbda..dd95287f2 100644 --- a/src/main/java/com/easypost/model/Batch.java +++ b/src/main/java/com/easypost/model/Batch.java @@ -1,15 +1,14 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.HashMap; import java.util.List; import java.util.Map; public final class Batch extends EasyPostResource { - private String id; - private String mode; private String state; private BatchStatus status; private Number numShipments; @@ -130,7 +129,7 @@ public static Batch create(final Map params, final String apiKey Map wrappedParams = new HashMap(); wrappedParams.put("batch", params); - return request(RequestMethod.POST, classURL(Batch.class), wrappedParams, Batch.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(Batch.class), wrappedParams, Batch.class, apiKey); } /** @@ -164,7 +163,7 @@ public static Batch retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static Batch retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(Batch.class, id), null, Batch.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(Batch.class, id), null, Batch.class, apiKey); } /** @@ -187,7 +186,7 @@ public static BatchCollection all(final Map params) throws EasyP * @throws EasyPostException when the request fails. */ public static BatchCollection all(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, classURL(Batch.class), params, BatchCollection.class, apiKey); + return Requestor.request(RequestMethod.GET, classURL(Batch.class), params, BatchCollection.class, apiKey); } /** @@ -213,7 +212,7 @@ public static Batch createAndBuy(final Map params, final String Map wrappedParams = new HashMap(); wrappedParams.put("batch", params); - return request(RequestMethod.POST, classURL(Batch.class), wrappedParams, Batch.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(Batch.class), wrappedParams, Batch.class, apiKey); } /** @@ -235,28 +234,10 @@ public Batch refresh() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Batch refresh(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, String.format("%s", instanceURL(Batch.class, this.getId())), params, + return Requestor.request(RequestMethod.GET, String.format("%s", instanceURL(Batch.class, this.getId())), params, Batch.class, apiKey); } - /** - * Get ID of this batch. - * - * @return ID of this batch. - */ - public String getId() { - return id; - } - - /** - * Set ID of this batch. - * - * @param id ID of this batch. - */ - public void setId(final String id) { - this.id = id; - } - /** * Get label URL of this batch. * @@ -266,24 +247,6 @@ public String getLabelUrl() { return labelUrl; } - /** - * Get mode of this batch. - * - * @return mode of this batch. - */ - public String getMode() { - return mode; - } - - /** - * Set mode of this batch. - * - * @param mode mode of this batch. - */ - public void setMode(final String mode) { - this.mode = mode; - } - /** * Get shipments in this batch. * @@ -352,8 +315,8 @@ public Batch label() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Batch label(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.POST, String.format("%s/label", instanceURL(Batch.class, this.getId())), params, - Batch.class, apiKey); + return Requestor.request(RequestMethod.POST, String.format("%s/label", + instanceURL(Batch.class, this.getId())), params, Batch.class, apiKey); } /** @@ -389,8 +352,8 @@ public Batch addShipments(final List shipments) throws EasyPostExcepti * @throws EasyPostException when the request fails. */ public Batch addShipments(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.POST, String.format("%s/add_shipments", instanceURL(Batch.class, this.getId())), - params, Batch.class, apiKey); + return Requestor.request(RequestMethod.POST, String.format("%s/add_shipments", + instanceURL(Batch.class, this.getId())), params, Batch.class, apiKey); } /** @@ -404,6 +367,7 @@ public Batch addShipments(final Map params, final String apiKey) public Batch addShipments(final List shipments, final String apiKey) throws EasyPostException { Map params = new HashMap(); params.put("shipments", shipments); + return this.addShipments(params, apiKey); } @@ -428,6 +392,7 @@ public Batch addShipments(final Map params) throws EasyPostExcep public Batch removeShipments(final List shipments) throws EasyPostException { Map params = new HashMap(); params.put("shipments", shipments); + return this.removeShipments(params, null); } @@ -440,8 +405,8 @@ public Batch removeShipments(final List shipments) throws EasyPostExce * @throws EasyPostException when the request fails. */ public Batch removeShipments(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.POST, String.format("%s/remove_shipments", instanceURL(Batch.class, this.getId())), - params, Batch.class, apiKey); + return Requestor.request(RequestMethod.POST, String.format("%s/remove_shipments", + instanceURL(Batch.class, this.getId())), params, Batch.class, apiKey); } /** @@ -455,6 +420,7 @@ public Batch removeShipments(final Map params, final String apiK public Batch removeShipments(final List shipments, final String apiKey) throws EasyPostException { Map params = new HashMap(); params.put("shipments", shipments); + return this.removeShipments(params, apiKey); } @@ -488,8 +454,8 @@ public Batch buy() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Batch buy(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.POST, String.format("%s/buy", instanceURL(Batch.class, this.getId())), params, - Batch.class, apiKey); + return Requestor.request(RequestMethod.POST, String.format("%s/buy", + instanceURL(Batch.class, this.getId())), params, Batch.class, apiKey); } /** @@ -522,8 +488,8 @@ public Batch createScanForm() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Batch createScanForm(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.POST, String.format("%s/scan_form", instanceURL(Batch.class, this.getId())), - params, Batch.class, apiKey); + return Requestor.request(RequestMethod.POST, String.format("%s/scan_form", + instanceURL(Batch.class, this.getId())), params, Batch.class, apiKey); } /** diff --git a/src/main/java/com/easypost/model/BatchCollection.java b/src/main/java/com/easypost/model/BatchCollection.java index 1c8c433b9..238e06846 100644 --- a/src/main/java/com/easypost/model/BatchCollection.java +++ b/src/main/java/com/easypost/model/BatchCollection.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public final class BatchCollection extends EasyPostResource { diff --git a/src/main/java/com/easypost/model/Billing.java b/src/main/java/com/easypost/model/Billing.java index 27b8ac300..9a824f465 100644 --- a/src/main/java/com/easypost/model/Billing.java +++ b/src/main/java/com/easypost/model/Billing.java @@ -4,7 +4,8 @@ import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.InvalidObjectError; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.HashMap; import java.util.Map; @@ -31,7 +32,7 @@ public static void deletePaymentMethod(PaymentMethod.Priority priority, String a PaymentMethodObject paymentMethodObject = getPaymentMethodByPriority(priority, apiKey); // will attempt to serialize empty JSON to a PaymentMethod.class, that's fine - request(EasyPostResource.RequestMethod.DELETE, + Requestor.request(RequestMethod.DELETE, String.format("%s/%s/%s", EasyPost.API_BASE, paymentMethodObject.getEndpoint(), paymentMethodObject.getId()), null, PaymentMethod.class, apiKey); } @@ -73,8 +74,9 @@ public static void fundWallet(String amount, PaymentMethod.Priority priority, St params.put("amount", amount); // will attempt to serialize empty JSON to a PaymentMethod.class, that's fine - request(RequestMethod.POST, String.format("%s/%s/%s/%s", EasyPost.API_BASE, paymentMethodObject.getEndpoint(), - paymentMethodObject.getId(), "charges"), params, PaymentMethod.class, apiKey); + Requestor.request(RequestMethod.POST, String.format("%s/%s/%s/%s", EasyPost.API_BASE, + paymentMethodObject.getEndpoint(), paymentMethodObject.getId(), "charges"), + params, PaymentMethod.class, apiKey); } /** @@ -96,8 +98,8 @@ public static PaymentMethod retrievePaymentMethods() throws EasyPostException { */ public static PaymentMethod retrievePaymentMethods(String apiKey) throws EasyPostException { PaymentMethod response = - request(RequestMethod.GET, String.format("%s/%s", EasyPost.API_BASE, "payment_methods"), null, - PaymentMethod.class, apiKey); + Requestor.request(RequestMethod.GET, String.format("%s/%s", EasyPost.API_BASE, "payment_methods"), null, + PaymentMethod.class, apiKey); if (response.getId() == null) { throw new InvalidObjectError(Constants.NO_PAYMENT_METHODS); diff --git a/src/main/java/com/easypost/model/Brand.java b/src/main/java/com/easypost/model/Brand.java index 7ffbdbe4e..ebd0b9185 100644 --- a/src/main/java/com/easypost/model/Brand.java +++ b/src/main/java/com/easypost/model/Brand.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - public class Brand extends EasyPostResource { private String backgroundColor; private String color; @@ -12,7 +10,6 @@ public class Brand extends EasyPostResource { private String name; private String userID; private String theme; - private String id; /** * Get the ad of the Brand. @@ -86,24 +83,6 @@ public void setColor(String color) { this.color = color; } - /** - * Get the ID of the Brand. - * - * @return the ID of the Brand. - */ - public String getId() { - return this.id; - } - - /** - * Set the ID of the Brand. - * - * @param id the id of the Brand. - */ - public void setId(String id) { - this.id = id; - } - /** * Get the logo of the Brand. * diff --git a/src/main/java/com/easypost/model/CarbonOffset.java b/src/main/java/com/easypost/model/CarbonOffset.java index 231b06631..909bf3559 100644 --- a/src/main/java/com/easypost/model/CarbonOffset.java +++ b/src/main/java/com/easypost/model/CarbonOffset.java @@ -1,9 +1,6 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - public final class CarbonOffset extends EasyPostResource { - private String currency; private int grams; private String price; diff --git a/src/main/java/com/easypost/model/CarrierAccount.java b/src/main/java/com/easypost/model/CarrierAccount.java index 0dc030e46..937e05fb3 100644 --- a/src/main/java/com/easypost/model/CarrierAccount.java +++ b/src/main/java/com/easypost/model/CarrierAccount.java @@ -1,7 +1,8 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.Arrays; import java.util.HashMap; @@ -9,7 +10,6 @@ import java.util.Map; public final class CarrierAccount extends EasyPostResource { - private String id; private String object; private String type; private Fields fields; @@ -135,7 +135,8 @@ public static CarrierAccount create(final Map params, final Stri Map wrappedParams = new HashMap(); wrappedParams.put("carrier_account", params); - return request(RequestMethod.POST, classURL(CarrierAccount.class), wrappedParams, CarrierAccount.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(CarrierAccount.class), + wrappedParams, CarrierAccount.class, apiKey); } /** @@ -158,7 +159,8 @@ public static CarrierAccount retrieve(final String id) throws EasyPostException * @throws EasyPostException when the request fails. */ public static CarrierAccount retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(CarrierAccount.class, id), null, CarrierAccount.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(CarrierAccount.class, id), + null, CarrierAccount.class, apiKey); } /** @@ -181,8 +183,9 @@ public static List all() throws EasyPostException { */ public static List all(final Map params, final String apiKey) throws EasyPostException { - CarrierAccount[] response = - request(RequestMethod.GET, classURL(CarrierAccount.class), params, CarrierAccount[].class, apiKey); + CarrierAccount[] response = Requestor.request(RequestMethod.GET, + classURL(CarrierAccount.class), params, CarrierAccount[].class, apiKey); + return Arrays.asList(response); } @@ -311,31 +314,13 @@ public CarrierAccount update(final Map params, final String apiK wrappedParams.put("carrier_account", params); CarrierAccount response = - request(RequestMethod.PUT, instanceURL(CarrierAccount.class, this.getId()), wrappedParams, - CarrierAccount.class, apiKey); + Requestor.request(RequestMethod.PUT, instanceURL(CarrierAccount.class, this.getId()), wrappedParams, + CarrierAccount.class, apiKey); this.merge(this, response); return this; } - /** - * Get ID of the carrier account. - * - * @return ID of the carrier account. - */ - public String getId() { - return id; - } - - /** - * Set ID of the carrier account. - * - * @param id ID of the carrier account. - */ - public void setId(final String id) { - this.id = id; - } - /** * Delete this carrier account. * @@ -352,7 +337,7 @@ public void delete() throws EasyPostException { * @throws EasyPostException when the request fails. */ public void delete(final String apiKey) throws EasyPostException { - request(RequestMethod.DELETE, instanceURL(CarrierAccount.class, this.getId()), null, CarrierAccount.class, - apiKey); + Requestor.request(RequestMethod.DELETE, instanceURL(CarrierAccount.class, this.getId()), + null, CarrierAccount.class, apiKey); } } diff --git a/src/main/java/com/easypost/model/CarrierType.java b/src/main/java/com/easypost/model/CarrierType.java index 7c5d7af64..85c9769d1 100644 --- a/src/main/java/com/easypost/model/CarrierType.java +++ b/src/main/java/com/easypost/model/CarrierType.java @@ -1,7 +1,8 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.Arrays; import java.util.List; @@ -104,7 +105,7 @@ public static List all() throws EasyPostException { */ public static List all(final String apikey) throws EasyPostException { CarrierType[] response = - request(RequestMethod.GET, classURL(CarrierType.class), null, CarrierType[].class, apikey); + Requestor.request(RequestMethod.GET, classURL(CarrierType.class), null, CarrierType[].class, apikey); return Arrays.asList(response); } } diff --git a/src/main/java/com/easypost/model/CreditCard.java b/src/main/java/com/easypost/model/CreditCard.java index 43de44ff0..d3f12df1a 100644 --- a/src/main/java/com/easypost/model/CreditCard.java +++ b/src/main/java/com/easypost/model/CreditCard.java @@ -3,6 +3,8 @@ import com.easypost.EasyPost; import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.HashMap; import java.util.Map; @@ -66,8 +68,8 @@ public static boolean fund(String amount, CreditCardPriority primaryOrSecondary, params.put("amount", amount); // will attempt to serialize the empty response to a CreditCard object (doesn't matter) - request(RequestMethod.POST, String.format("%s/%s/%s/%s", EasyPost.API_BASE, "credit_cards", cardID, "charges"), - params, CreditCard.class, apiKey); + Requestor.request(RequestMethod.POST, String.format("%s/%s/%s/%s", + EasyPost.API_BASE, "credit_cards", cardID, "charges"), params, CreditCard.class, apiKey); return true; } @@ -96,7 +98,7 @@ public static void delete(String creditCardId) throws EasyPostException { */ @Deprecated public static void delete(String creditCardId, String apiKey) throws EasyPostException { - request(RequestMethod.DELETE, String.format("%s/%s/%s", EasyPost.API_BASE, "credit_cards", creditCardId), null, - CreditCard.class, apiKey); + Requestor.request(RequestMethod.DELETE, String.format("%s/%s/%s", + EasyPost.API_BASE, "credit_cards", creditCardId), null, CreditCard.class, apiKey); } } diff --git a/src/main/java/com/easypost/model/CustomsInfo.java b/src/main/java/com/easypost/model/CustomsInfo.java index db6c885f4..c33d4c77d 100644 --- a/src/main/java/com/easypost/model/CustomsInfo.java +++ b/src/main/java/com/easypost/model/CustomsInfo.java @@ -1,14 +1,14 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.HashMap; import java.util.List; import java.util.Map; public final class CustomsInfo extends EasyPostResource { - private String id; private String contentsType; private String contentsExplanation; private boolean customsCertify; @@ -146,24 +146,6 @@ public void setEelPfc(String eelPfc) { this.eelPfc = eelPfc; } - /** - * Get this CustomsInfo's ID. - * - * @return the ID of this CustomsInfo. - */ - public String getId() { - return id; - } - - /** - * Set this CustomsInfo's ID. - * - * @param id the ID of this CustomsInfo. - */ - public void setId(final String id) { - this.id = id; - } - /** * Get the non-delivery option of this CustomsInfo. * @@ -241,7 +223,8 @@ public static CustomsInfo create(final Map params, final String Map wrappedParams = new HashMap(); wrappedParams.put("customs_info", params); - return request(RequestMethod.POST, classURL(CustomsInfo.class), wrappedParams, CustomsInfo.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(CustomsInfo.class), + wrappedParams, CustomsInfo.class, apiKey); } /** @@ -264,6 +247,7 @@ public static CustomsInfo retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static CustomsInfo retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(CustomsInfo.class, id), null, CustomsInfo.class, apiKey); + return Requestor.request(RequestMethod.GET, + instanceURL(CustomsInfo.class, id), null, CustomsInfo.class, apiKey); } } diff --git a/src/main/java/com/easypost/model/CustomsItem.java b/src/main/java/com/easypost/model/CustomsItem.java index 2c8c07ad9..d4383b41c 100644 --- a/src/main/java/com/easypost/model/CustomsItem.java +++ b/src/main/java/com/easypost/model/CustomsItem.java @@ -1,13 +1,13 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.HashMap; import java.util.Map; public final class CustomsItem extends EasyPostResource { - private String id; private String description; private String hsTariffNumber; private String originCountry; @@ -89,24 +89,6 @@ public void setHsTariffNumber(final String hsTariffNumber) { this.hsTariffNumber = hsTariffNumber; } - /** - * Get this CustomsItem's ID. - * - * @return the ID of this CustomsItem. - */ - public String getId() { - return id; - } - - /** - * Set this CustomsItem's ID. - * - * @param id the ID of this CustomsItem. - */ - public void setId(final String id) { - this.id = id; - } - /** * Get this CustomsItem's origin country. * @@ -202,7 +184,8 @@ public static CustomsItem create(final Map params, final String Map wrappedParams = new HashMap(); wrappedParams.put("customs_item", params); - return request(RequestMethod.POST, classURL(CustomsItem.class), wrappedParams, CustomsItem.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(CustomsItem.class), + wrappedParams, CustomsItem.class, apiKey); } /** @@ -225,6 +208,7 @@ public static CustomsItem retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static CustomsItem retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(CustomsItem.class, id), null, CustomsItem.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(CustomsItem.class, id), + null, CustomsItem.class, apiKey); } } diff --git a/src/main/java/com/easypost/model/EasyPostResource.java b/src/main/java/com/easypost/model/EasyPostResource.java new file mode 100644 index 000000000..845e253f8 --- /dev/null +++ b/src/main/java/com/easypost/model/EasyPostResource.java @@ -0,0 +1,276 @@ +/** + * EasyPostResource.java + * This file is a part of EasyPost API SDK. + * (c) 2022 EasyPost + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +package com.easypost.model; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; + +import com.easypost.EasyPost; +import com.easypost.http.Constant; + +public abstract class EasyPostResource { + private String id; + private String mode; + private Date createdAt; + private Date updatedAt; + + /** + * @return the Date this object was created + */ + public Date getCreatedAt() { + return createdAt; + } + + /** + * Set the Date this object was created. + * + * @param createdAt the Date this object was created + */ + public void setCreatedAt(final Date createdAt) { + this.createdAt = createdAt; + } + + /** + * @return the ID of this object + */ + public String getId() { + return id; + } + + /** + * Set the ID of this object. + * + * @param id the ID of this object + */ + public void setId(final String id) { + this.id = id; + } + + /** + * @return the API mode used to create this object + */ + public String getMode() { + return mode; + } + + /** + * Set the API mode used to create this object. + * + * @param mode the Mode of this object + */ + public void setMode(final String mode) { + this.mode = mode; + } + + /** + * @return the Date this object was last updated + */ + public Date getUpdatedAt() { + return updatedAt; + } + + /** + * Set the Date this object was last updated. + * + * @param updatedAt the Date this object was last updated + */ + public void setUpdatedAt(final Date updatedAt) { + this.updatedAt = updatedAt; + } + + protected static String instanceURL(final Class clazz, final String id) { + return String.format("%s/%s", classURL(clazz), id); + } + + protected static String classURL(final Class clazz) { + String singleURL = singleClassURL(clazz); + if (singleURL.charAt(singleURL.length() - 1) == 's' || singleURL.charAt(singleURL.length() - 1) == 'h') { + return String.format("%ses", singleClassURL(clazz)); + } else { + return String.format("%ss", singleClassURL(clazz)); + } + } + + protected static String singleClassURL(final Class clazz) { + return String.format("%s/%s", EasyPost.API_BASE, className(clazz)); + } + + private static String className(final Class clazz) { + return clazz.getSimpleName().replaceAll("([a-z])([A-Z])", "$1_$2").toLowerCase().replace("$", ""); + } + + /** + * Get all static methods for a particular class. + * + * @param type Class type to get methods for. + * @return List of class methods. + */ + private static List getAllStaticMethods(Class type) { + List allMethods = getAllMethods(type); + + List staticMethods = new ArrayList<>(); + for (Method method : allMethods) { + if (Modifier.isStatic(method.getModifiers())) { + staticMethods.add(method); + } + } + + return staticMethods; + } + + /** + * Get all methods for a particular class. + * + * @param type Class type to get methods for. + * @return List of class methods. + */ + private static List getAllMethods(Class type) { + return Arrays.asList(type.getMethods()); + } + + /** + * Returns a string representation of the object. + */ + @Override + public String toString() { + return (String) this.getIdString(); + } + + private Object getIdString() { + try { + Field idField = this.getClass().getDeclaredField("id"); + return idField.get(this); + } catch (SecurityException e) { + return ""; + } catch (NoSuchFieldException e) { + return ""; + } catch (IllegalArgumentException e) { + return ""; + } catch (IllegalAccessException e) { + return ""; + } + } + + /** + * Pretty print the JSON representation of the object. + * + * @return the JSON representation of the object. + */ + public String prettyPrint() { + return String.format("<%s@%s id=%s> JSON: %s", this.getClass().getName(), System.identityHashCode(this), + this.getIdString(), Constant.PRETTY_PRINT_GSON.toJson(this)); + } + + /** + * Merge two EasyPostResource objects. + * + * @param obj the base object + * @param update the object to merge + */ + public void merge(final EasyPostResource obj, final EasyPostResource update) { + if (!obj.getClass().isAssignableFrom(update.getClass())) { + return; + } + + // get all methods from the obj class and its superclasses + List methods = getAllNonStaticMethods(obj.getClass()); + + for (Method fromMethod : methods) { + if (fromMethod.getName().startsWith("get") + || Constant.GLOBAL_FIELD_ACCESSORS.contains(fromMethod.getName())) { + + if (fromMethod.isAnnotationPresent(Deprecated.class)) { + // skip deprecated methods + continue; + } + + String fromName = fromMethod.getName(); + String toName = fromName.replace("get", "set"); + + try { + Object value = fromMethod.invoke(update, (Object[]) null); + if (value != null) { + Method toMethod = obj.getClass().getMethod(toName, fromMethod.getReturnType()); + toMethod.invoke(obj, value); + } + } catch (Exception e) { + // TODO: Address situation below + /* + * The method getSmartrates() on the Shipment object is causing this exception. + * Since it found a method with "get" in the name, it expects there to be a + * "set" equivalent. + * There is not, causing this exception to be thrown, although nothing wrong has + * really happened. + * This code block was copy-pasted from StackOverflow: + * https://stackoverflow.com/a/7526414/13343799 + * Per the comments, there are some built-in expectations for how this will + * work, + * and should eventually be re-written or removed entirely + * (explore returning a brand-new object rather than modifying the existing + * one). + * For now, the easiest fix would be to + * a) just ignore this exception, or + * b) rename getSmartrates() in the Shipment class to just smartrates() + * (similar to how the other methods are named). + */ + // e.printStackTrace(); + } + } + } + } + + /** + * Get all non-static methods for a particular class. + * + * @param type Class type to get methods for. + * @return List of class methods. + */ + private static List getAllNonStaticMethods(Class type) { + List allMethods = getAllMethods(type); + + List nonStaticMethods = new ArrayList<>(); + for (Method method : allMethods) { + if (!Modifier.isStatic(method.getModifiers())) { + nonStaticMethods.add(method); + } + } + + return nonStaticMethods; + } + + /** + * Override the hashCode method because it is needed when overriding equals(). + * + * @return The hashcode of current object. + */ + @Override + public int hashCode() { + return Constant.GSON.toJson(this).hashCode(); + } + + /** + * Override the equals method, convert objects to Json strings for comparsion. + * + * @param object Object of any class. + * @return If two objects have the same properties. + */ + @Override + public boolean equals(Object object) { + String currentObject = Constant.GSON.toJson(this); + String newObject = Constant.GSON.toJson(object); + + return currentObject.equals(newObject); + } +} diff --git a/src/main/java/com/easypost/model/EndShipper.java b/src/main/java/com/easypost/model/EndShipper.java index 460804d5c..fc2b1a8cb 100644 --- a/src/main/java/com/easypost/model/EndShipper.java +++ b/src/main/java/com/easypost/model/EndShipper.java @@ -2,6 +2,8 @@ import com.easypost.EasyPost; import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.HashMap; import java.util.Map; @@ -31,7 +33,7 @@ public static EndShipper create(final Map params, final String a wrappedParams.put("address", params); - return request(RequestMethod.POST, String.format("%s/%s", EasyPost.API_BASE, "end_shippers"), + return Requestor.request(RequestMethod.POST, String.format("%s/%s", EasyPost.API_BASE, "end_shippers"), wrappedParams, EndShipper.class, apiKey); } @@ -55,8 +57,8 @@ public static EndShipper retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static EndShipper retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, String.format("%s/%s/%s", EasyPost.API_BASE, "end_shippers", id), null, - EndShipper.class, apiKey); + return Requestor.request(RequestMethod.GET, + String.format("%s/%s/%s", EasyPost.API_BASE, "end_shippers", id), null, EndShipper.class, apiKey); } /** @@ -80,7 +82,8 @@ public static EndShipperCollection all(final Map params) throws */ public static EndShipperCollection all(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, classURL(EndShipper.class), params, EndShipperCollection.class, apiKey); + return Requestor.request(RequestMethod.GET, + classURL(EndShipper.class), params, EndShipperCollection.class, apiKey); } /** @@ -107,7 +110,7 @@ public EndShipper update(final Map params, final String apiKey) wrappedParams.put("address", params); - EndShipper response = request(RequestMethod.PUT, + EndShipper response = Requestor.request(RequestMethod.PUT, String.format("%s/%s/%s", EasyPost.API_BASE, "end_shippers", this.getId()), wrappedParams, EndShipper.class, apiKey); diff --git a/src/main/java/com/easypost/model/Event.java b/src/main/java/com/easypost/model/Event.java index 8ca0448e8..52254cceb 100644 --- a/src/main/java/com/easypost/model/Event.java +++ b/src/main/java/com/easypost/model/Event.java @@ -1,15 +1,14 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.List; import java.util.Map; public final class Event extends EasyPostResource { - private String id; private String description; - private String mode; private Map result; private Map previousAttributes; private List pendingUrls; @@ -33,42 +32,6 @@ public void setDescription(final String description) { this.description = description; } - /** - * Get this Event's ID. - * - * @return Event's ID - */ - public String getId() { - return id; - } - - /** - * Set this Event's ID. - * - * @param id Event's ID - */ - public void setId(final String id) { - this.id = id; - } - - /** - * Get the mode of this Event. - * - * @return Event's mode - */ - public String getMode() { - return mode; - } - - /** - * Set the mode of this Event. - * - * @param mode Event's mode - */ - public void setMode(final String mode) { - this.mode = mode; - } - /** * Get the previous attributes of this Event. * @@ -159,7 +122,7 @@ public static Event retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static Event retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(Event.class, id), null, Event.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(Event.class, id), null, Event.class, apiKey); } /** @@ -182,6 +145,6 @@ public static EventCollection all(final Map params) throws EasyP * @throws EasyPostException when the request fails. */ public static EventCollection all(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, classURL(Event.class), params, EventCollection.class, apiKey); + return Requestor.request(RequestMethod.GET, classURL(Event.class), params, EventCollection.class, apiKey); } } diff --git a/src/main/java/com/easypost/model/EventCollection.java b/src/main/java/com/easypost/model/EventCollection.java index fb3f28acb..28ba705f0 100644 --- a/src/main/java/com/easypost/model/EventCollection.java +++ b/src/main/java/com/easypost/model/EventCollection.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public final class EventCollection extends EasyPostResource { diff --git a/src/main/java/com/easypost/model/EventData.java b/src/main/java/com/easypost/model/EventData.java index b0c085566..db06da1fd 100644 --- a/src/main/java/com/easypost/model/EventData.java +++ b/src/main/java/com/easypost/model/EventData.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.Map; public final class EventData extends EasyPostResource { diff --git a/src/main/java/com/easypost/model/Field.java b/src/main/java/com/easypost/model/Field.java index 4de06f360..ab5a0c9bf 100644 --- a/src/main/java/com/easypost/model/Field.java +++ b/src/main/java/com/easypost/model/Field.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - public class Field extends EasyPostResource { private String key; private String visibility; diff --git a/src/main/java/com/easypost/model/Fields.java b/src/main/java/com/easypost/model/Fields.java index ed6224eb5..c2cee2dac 100644 --- a/src/main/java/com/easypost/model/Fields.java +++ b/src/main/java/com/easypost/model/Fields.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - public class Fields extends EasyPostResource { private Field credentials; private Field testCredentials; diff --git a/src/main/java/com/easypost/model/Form.java b/src/main/java/com/easypost/model/Form.java index b997bc211..4408b81b0 100644 --- a/src/main/java/com/easypost/model/Form.java +++ b/src/main/java/com/easypost/model/Form.java @@ -1,8 +1,6 @@ package com.easypost.model; -public final class Form { - private String id; - private String mode; +public final class Form extends EasyPostResource { private String formType; private String formUrl; private Boolean submittedElectronically; @@ -43,42 +41,6 @@ public void setFormUrl(final String formUrl) { this.formUrl = formUrl; } - /** - * Get the ID of the Form. - * - * @return the ID of the Form. - */ - public String getId() { - return id; - } - - /** - * Set the ID of the Form. - * - * @param id the ID of the Form. - */ - public void setId(final String id) { - this.id = id; - } - - /** - * Get the mode of the Form. - * - * @return the mode of the Form. - */ - public String getMode() { - return mode; - } - - /** - * Set the mode of the Form. - * - * @param mode the mode of the Form. - */ - public void setMode(final String mode) { - this.mode = mode; - } - /** * Get whether the Form is submitted electronically. * diff --git a/src/main/java/com/easypost/model/Insurance.java b/src/main/java/com/easypost/model/Insurance.java index a6319eb7e..6dd11eda0 100644 --- a/src/main/java/com/easypost/model/Insurance.java +++ b/src/main/java/com/easypost/model/Insurance.java @@ -1,15 +1,14 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.HashMap; import java.util.List; import java.util.Map; public final class Insurance extends EasyPostResource { - private String id; - private String mode; private String reference; private Address toAddress; private Address fromAddress; @@ -189,7 +188,7 @@ public static Insurance create(final Map params, final String ap Map wrappedParams = new HashMap(); wrappedParams.put("insurance", params); - return request(RequestMethod.POST, classURL(Insurance.class), wrappedParams, Insurance.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(Insurance.class), wrappedParams, Insurance.class, apiKey); } /** @@ -212,7 +211,7 @@ public static Insurance retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static Insurance retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(Insurance.class, id), null, Insurance.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(Insurance.class, id), null, Insurance.class, apiKey); } /** @@ -236,7 +235,8 @@ public static InsuranceCollection all(final Map params) throws E */ public static InsuranceCollection all(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, classURL(Insurance.class), params, InsuranceCollection.class, apiKey); + return Requestor.request(RequestMethod.GET, classURL(Insurance.class), + params, InsuranceCollection.class, apiKey); } /** @@ -258,44 +258,8 @@ public Insurance refresh() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Insurance refresh(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, String.format("%s", instanceURL(Insurance.class, this.getId())), params, - Insurance.class, apiKey); - } - - /** - * Get the ID of this Insurance. - * - * @return the ID of the Insurance - */ - public String getId() { - return id; - } - - /** - * Set the ID of this Insurance. - * - * @param id the ID of the Insurance - */ - public void setId(final String id) { - this.id = id; - } - - /** - * Get the mode of this Insurance. - * - * @return the mode of the Insurance - */ - public String getMode() { - return mode; - } - - /** - * Set the mode of this Insurance. - * - * @param mode the mode of the Insurance - */ - public void setMode(final String mode) { - this.mode = mode; + return Requestor.request(RequestMethod.GET, + String.format("%s", instanceURL(Insurance.class, this.getId())), params, Insurance.class, apiKey); } /** diff --git a/src/main/java/com/easypost/model/InsuranceCollection.java b/src/main/java/com/easypost/model/InsuranceCollection.java index 7d5df92c2..8e051460f 100644 --- a/src/main/java/com/easypost/model/InsuranceCollection.java +++ b/src/main/java/com/easypost/model/InsuranceCollection.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public final class InsuranceCollection extends EasyPostResource { diff --git a/src/main/java/com/easypost/model/Order.java b/src/main/java/com/easypost/model/Order.java index b20626dd3..19e658998 100644 --- a/src/main/java/com/easypost/model/Order.java +++ b/src/main/java/com/easypost/model/Order.java @@ -1,15 +1,14 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.HashMap; import java.util.List; import java.util.Map; public final class Order extends EasyPostResource { - private String id; - private String mode; private String service; private String reference; private Boolean isReturn; @@ -263,7 +262,7 @@ public static Order create(final Map params, final String apiKey Map wrappedParams = new HashMap(); wrappedParams.put("order", params); - return request(RequestMethod.POST, classURL(Order.class), wrappedParams, Order.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(Order.class), wrappedParams, Order.class, apiKey); } /** @@ -286,7 +285,7 @@ public static Order retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static Order retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(Order.class, id), null, Order.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(Order.class, id), null, Order.class, apiKey); } /** @@ -308,46 +307,10 @@ public Order refresh() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Order refresh(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, String.format("%s", instanceURL(Order.class, this.getId())), params, + return Requestor.request(RequestMethod.GET, String.format("%s", instanceURL(Order.class, this.getId())), params, Order.class, apiKey); } - /** - * Get the ID of the Order. - * - * @return the ID of the Order. - */ - public String getId() { - return id; - } - - /** - * Set the ID of the Order. - * - * @param id the ID of the Order. - */ - public void setId(final String id) { - this.id = id; - } - - /** - * Get the mode of the Order. - * - * @return the mode of the Order. - */ - public String getMode() { - return mode; - } - - /** - * Set the mode of the Order. - * - * @param mode the mode of the Order. - */ - public void setMode(final String mode) { - this.mode = mode; - } - /** * Get the shipments of the Order. * @@ -407,9 +370,8 @@ public Order newRates() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Order newRates(final Map params, final String apiKey) throws EasyPostException { - Order response = - request(RequestMethod.GET, String.format("%s/rates", instanceURL(Order.class, this.getId())), params, - Order.class, apiKey); + Order response = Requestor.request(RequestMethod.GET, String.format("%s/rates", + instanceURL(Order.class, this.getId())), params, Order.class, apiKey); this.merge(this, response); return this; @@ -457,9 +419,8 @@ public Order buy(final Map params) throws EasyPostException { * @throws EasyPostException when the request fails. */ public Order buy(final Map params, final String apiKey) throws EasyPostException { - Order response = - request(RequestMethod.POST, String.format("%s/buy", instanceURL(Order.class, this.getId())), params, - Order.class, apiKey); + Order response = Requestor.request(RequestMethod.POST, String.format("%s/buy", + instanceURL(Order.class, this.getId())), params, Order.class, apiKey); this.merge(this, response); return this; diff --git a/src/main/java/com/easypost/model/OrderCollection.java b/src/main/java/com/easypost/model/OrderCollection.java index c47eb97ba..2d0a7f99c 100644 --- a/src/main/java/com/easypost/model/OrderCollection.java +++ b/src/main/java/com/easypost/model/OrderCollection.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public final class OrderCollection extends EasyPostResource { diff --git a/src/main/java/com/easypost/model/Parcel.java b/src/main/java/com/easypost/model/Parcel.java index 350787f4f..ae42d37b6 100644 --- a/src/main/java/com/easypost/model/Parcel.java +++ b/src/main/java/com/easypost/model/Parcel.java @@ -1,13 +1,13 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.HashMap; import java.util.Map; public final class Parcel extends EasyPostResource { - private String id; private String predefinedPackage; private Float weight; private Float length; @@ -32,24 +32,6 @@ public void setHeight(final Float height) { this.height = height; } - /** - * Get the ID of this Parcel. - * - * @return the ID of this Parcel. - */ - public String getId() { - return id; - } - - /** - * Set the ID of this Parcel. - * - * @param id the ID of this Parcel. - */ - public void setId(final String id) { - this.id = id; - } - /** * Get the length of this Parcel. * @@ -145,7 +127,7 @@ public static Parcel create(final Map params, final String apiKe Map wrappedParams = new HashMap(); wrappedParams.put("parcel", params); - return request(RequestMethod.POST, classURL(Parcel.class), wrappedParams, Parcel.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(Parcel.class), wrappedParams, Parcel.class, apiKey); } /** @@ -168,6 +150,6 @@ public static Parcel retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static Parcel retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(Parcel.class, id), null, Parcel.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(Parcel.class, id), null, Parcel.class, apiKey); } } diff --git a/src/main/java/com/easypost/model/PaymentMethod.java b/src/main/java/com/easypost/model/PaymentMethod.java index c8e20159a..4b3ee250e 100644 --- a/src/main/java/com/easypost/model/PaymentMethod.java +++ b/src/main/java/com/easypost/model/PaymentMethod.java @@ -4,7 +4,8 @@ import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.InvalidObjectError; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; public class PaymentMethod extends EasyPostResource { @@ -13,7 +14,6 @@ public enum Priority { SECONDARY } - private String id; private String object; private PaymentMethodObject primaryPaymentMethod; private PaymentMethodObject secondaryPaymentMethod; @@ -79,7 +79,7 @@ public static PaymentMethod all() throws EasyPostException { @Deprecated public static PaymentMethod all(String apiKey) throws EasyPostException { PaymentMethod response = - request(RequestMethod.GET, String.format("%s/%s", EasyPost.API_BASE, "payment_methods"), null, + Requestor.request(RequestMethod.GET, String.format("%s/%s", EasyPost.API_BASE, "payment_methods"), null, PaymentMethod.class, apiKey); if (response.getId() == null) { @@ -115,13 +115,4 @@ public PaymentMethodObject getPrimaryPaymentMethodObject() { public PaymentMethodObject getSecondaryPaymentMethodObject() { return secondaryPaymentMethod; } - - /** - * Get ID of this PaymentMethod object. - * - * @return ID of this PaymentMethod. - */ - public String getId() { - return id; - } } diff --git a/src/main/java/com/easypost/model/PaymentMethodObject.java b/src/main/java/com/easypost/model/PaymentMethodObject.java index b8de98fb1..b721f044e 100644 --- a/src/main/java/com/easypost/model/PaymentMethodObject.java +++ b/src/main/java/com/easypost/model/PaymentMethodObject.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - public class PaymentMethodObject extends EasyPostResource { public enum PaymentMethodType { diff --git a/src/main/java/com/easypost/model/Pickup.java b/src/main/java/com/easypost/model/Pickup.java index 3d680fdd2..1c35a1ddb 100644 --- a/src/main/java/com/easypost/model/Pickup.java +++ b/src/main/java/com/easypost/model/Pickup.java @@ -1,7 +1,8 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.ArrayList; import java.util.Date; @@ -10,8 +11,6 @@ import java.util.Map; public final class Pickup extends EasyPostResource { - private String id; - private String mode; private String status; private String reference; private Date minDatetime; @@ -209,7 +208,7 @@ public static Pickup create(final Map params, final String apiKe Map wrappedParams = new HashMap(); wrappedParams.put("pickup", params); - return request(RequestMethod.POST, classURL(Pickup.class), wrappedParams, Pickup.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(Pickup.class), wrappedParams, Pickup.class, apiKey); } /** @@ -232,7 +231,7 @@ public static Pickup retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static Pickup retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(Pickup.class, id), null, Pickup.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(Pickup.class, id), null, Pickup.class, apiKey); } /** @@ -254,44 +253,8 @@ public Pickup refresh() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Pickup refresh(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, String.format("%s", instanceURL(Pickup.class, this.getId())), params, - Pickup.class, apiKey); - } - - /** - * Get the ID of this Pickup. - * - * @return the ID of this Pickup. - */ - public String getId() { - return id; - } - - /** - * Set the ID of this Pickup. - * - * @param id the ID of this Pickup. - */ - public void setId(final String id) { - this.id = id; - } - - /** - * Get the mode of this Pickup. - * - * @return the mode of this Pickup. - */ - public String getMode() { - return mode; - } - - /** - * Set the mode of this Pickup. - * - * @param mode the mode of this Pickup. - */ - public void setMode(final String mode) { - this.mode = mode; + return Requestor.request(RequestMethod.GET, String.format("%s", + instanceURL(Pickup.class, this.getId())), params, Pickup.class, apiKey); } /** @@ -353,9 +316,8 @@ public Pickup buy() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Pickup buy(final Map params, final String apiKey) throws EasyPostException { - Pickup response = - request(RequestMethod.POST, String.format("%s/buy", instanceURL(Pickup.class, this.getId())), params, - Pickup.class, apiKey); + Pickup response = Requestor.request(RequestMethod.POST, String.format("%s/buy", + instanceURL(Pickup.class, this.getId())), params, Pickup.class, apiKey); this.merge(this, response); return this; @@ -416,8 +378,8 @@ public Pickup cancel() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Pickup cancel(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.POST, String.format("%s/cancel", instanceURL(Pickup.class, this.getId())), params, - Pickup.class, apiKey); + return Requestor.request(RequestMethod.POST, String.format("%s/cancel", + instanceURL(Pickup.class, this.getId())), params, Pickup.class, apiKey); } /** diff --git a/src/main/java/com/easypost/model/PickupCollection.java b/src/main/java/com/easypost/model/PickupCollection.java index 23a9bf2a0..542d54df5 100644 --- a/src/main/java/com/easypost/model/PickupCollection.java +++ b/src/main/java/com/easypost/model/PickupCollection.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public final class PickupCollection extends EasyPostResource { diff --git a/src/main/java/com/easypost/model/PostageLabel.java b/src/main/java/com/easypost/model/PostageLabel.java index b868c1bf6..99adc252e 100644 --- a/src/main/java/com/easypost/model/PostageLabel.java +++ b/src/main/java/com/easypost/model/PostageLabel.java @@ -1,9 +1,6 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - public final class PostageLabel extends EasyPostResource { - private String id; private int dateAdvance; private String integratedForm; private int labelResolution; @@ -52,24 +49,6 @@ public String getEpl2LabelType() { return labelEpl2Type; } - /** - * Get the ID of this PostageLabel. - * - * @return ID of this PostageLabel. - */ - public String getId() { - return id; - } - - /** - * Set the ID of this PostageLabel. - * - * @param id ID of this PostageLabel. - */ - public void setId(final String id) { - this.id = id; - } - /** * Get the URL of this PostageLabel. * diff --git a/src/main/java/com/easypost/model/Rate.java b/src/main/java/com/easypost/model/Rate.java index 1eedb1351..26533d689 100644 --- a/src/main/java/com/easypost/model/Rate.java +++ b/src/main/java/com/easypost/model/Rate.java @@ -1,10 +1,10 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; public class Rate extends EasyPostResource { - private String id; private String carrier; private String service; private Float rate; @@ -184,24 +184,6 @@ public void setEstDeliveryDays(final Number estDeliveryDays) { this.estDeliveryDays = estDeliveryDays; } - /** - * Get the ID of this Rate. - * - * @return ID of this Rate. - */ - public String getId() { - return id; - } - - /** - * Set the ID of this Rate. - * - * @param id ID of this Rate. - */ - public void setId(final String id) { - this.id = id; - } - /** * Get the ID of the shipment of this Rate. * @@ -349,7 +331,7 @@ public static Rate retrieve(final String id) throws EasyPostException { */ public static Rate retrieve(final String id, final String apiKey) throws EasyPostException { Rate response; - response = request(RequestMethod.GET, instanceURL(Rate.class, id), null, Rate.class, apiKey); + response = Requestor.request(RequestMethod.GET, instanceURL(Rate.class, id), null, Rate.class, apiKey); return response; } diff --git a/src/main/java/com/easypost/model/ReferralCustomer.java b/src/main/java/com/easypost/model/ReferralCustomer.java index ca985b65f..cc77eebad 100644 --- a/src/main/java/com/easypost/model/ReferralCustomer.java +++ b/src/main/java/com/easypost/model/ReferralCustomer.java @@ -4,6 +4,9 @@ import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.ExternalApiError; +import com.easypost.http.Constant; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.io.BufferedReader; import java.io.DataOutputStream; @@ -59,7 +62,7 @@ public static ReferralCustomer create(Map params, String apiKey) Map wrappedParams = new HashMap<>(); wrappedParams.put("user", params); - return request(RequestMethod.POST, String.format("%s/%s", EasyPost.API_BASE, "referral_customers"), + return Requestor.request(RequestMethod.POST, String.format("%s/%s", EasyPost.API_BASE, "referral_customers"), wrappedParams, ReferralCustomer.class, apiKey); } @@ -88,7 +91,7 @@ public static void updateEmail(String email, String userId, String apiKey) throw params.put("email", email); wrappedParams.put("user", params); - request(RequestMethod.PUT, String.format("%s/%s/%s", EasyPost.API_BASE, "referral_customers", userId), + Requestor.request(RequestMethod.PUT, String.format("%s/%s/%s", EasyPost.API_BASE, "referral_customers", userId), wrappedParams, ReferralCustomer.class, apiKey); } @@ -113,7 +116,7 @@ public static ReferralCustomerCollection all(final Map params) t */ public static ReferralCustomerCollection all(final Map params, String apiKey) throws EasyPostException { - return request(RequestMethod.GET, String.format("%s/%s", EasyPost.API_BASE, "referral_customers"), + return Requestor.request(RequestMethod.GET, String.format("%s/%s", EasyPost.API_BASE, "referral_customers"), params, ReferralCustomerCollection.class, apiKey); } @@ -169,8 +172,8 @@ public static PaymentMethodObject addCreditCardToUser(String referralApiKey, Str */ private static String retrieveEasypostStripeApiKey() throws EasyPostException { @SuppressWarnings ("unchecked") Map response = - request(RequestMethod.GET, String.format("%s/%s", EasyPost.API_BASE, "partners/stripe_public_key"), - null, Map.class, null); + Requestor.request(RequestMethod.GET, String.format("%s/%s", + EasyPost.API_BASE, "partners/stripe_public_key"), null, Map.class, null); return response.getOrDefault("public_key", ""); } @@ -226,7 +229,8 @@ private static String createStripeToken(String number, int expirationMonth, int String responseBody = response.toString(); - @SuppressWarnings ("unchecked") Map responseMap = GSON.fromJson(responseBody, Map.class); + @SuppressWarnings ("unchecked") Map responseMap = + Constant.GSON.fromJson(responseBody, Map.class); return responseMap.get("id").toString(); } @@ -249,7 +253,7 @@ private static PaymentMethodObject createEasypostCreditCard(String referralApiKe Map wrappedParams = new HashMap<>(); wrappedParams.put("credit_card", params); - return request(RequestMethod.POST, String.format("%s/%s", EasyPost.API_BASE, "credit_cards"), + return Requestor.request(RequestMethod.POST, String.format("%s/%s", EasyPost.API_BASE, "credit_cards"), wrappedParams, PaymentMethodObject.class, referralApiKey); } } diff --git a/src/main/java/com/easypost/model/ReferralCustomerCollection.java b/src/main/java/com/easypost/model/ReferralCustomerCollection.java index 84e4e2dea..98f02c365 100644 --- a/src/main/java/com/easypost/model/ReferralCustomerCollection.java +++ b/src/main/java/com/easypost/model/ReferralCustomerCollection.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public final class ReferralCustomerCollection extends EasyPostResource { diff --git a/src/main/java/com/easypost/model/Refund.java b/src/main/java/com/easypost/model/Refund.java index 7f1d42703..1c95bfc50 100644 --- a/src/main/java/com/easypost/model/Refund.java +++ b/src/main/java/com/easypost/model/Refund.java @@ -1,7 +1,8 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.Arrays; import java.util.HashMap; @@ -9,7 +10,6 @@ import java.util.Map; public final class Refund extends EasyPostResource { - private String id; private String trackingCode; private String confirmationNumber; private String status; @@ -52,24 +52,6 @@ public void setConfirmationNumber(final String confirmationNumber) { this.confirmationNumber = confirmationNumber; } - /** - * Get refund ID. - * - * @return refund ID - */ - public String getId() { - return id; - } - - /** - * Set refund ID. - * - * @param id refund ID - */ - public void setId(final String id) { - this.id = id; - } - /** * Get refund shipment ID. * @@ -147,7 +129,9 @@ public static List create(final Map params, final String Map wrappedParams = new HashMap(); wrappedParams.put("refund", params); - Refund[] response = request(RequestMethod.POST, classURL(Refund.class), wrappedParams, Refund[].class, apiKey); + Refund[] response = Requestor.request(RequestMethod.POST, classURL(Refund.class), + wrappedParams, Refund[].class, apiKey); + return Arrays.asList(response); } @@ -171,7 +155,7 @@ public static Refund retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static Refund retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(Refund.class, id), null, Refund.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(Refund.class, id), null, Refund.class, apiKey); } /** @@ -194,6 +178,6 @@ public static RefundCollection all(final Map params) throws Easy * @throws EasyPostException when the request fails. */ public static RefundCollection all(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, classURL(Refund.class), params, RefundCollection.class, apiKey); + return Requestor.request(RequestMethod.GET, classURL(Refund.class), params, RefundCollection.class, apiKey); } } diff --git a/src/main/java/com/easypost/model/RefundCollection.java b/src/main/java/com/easypost/model/RefundCollection.java index 366e063bd..11442cb92 100644 --- a/src/main/java/com/easypost/model/RefundCollection.java +++ b/src/main/java/com/easypost/model/RefundCollection.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public final class RefundCollection extends EasyPostResource { diff --git a/src/main/java/com/easypost/model/Report.java b/src/main/java/com/easypost/model/Report.java index b813fc706..d1b1e8575 100644 --- a/src/main/java/com/easypost/model/Report.java +++ b/src/main/java/com/easypost/model/Report.java @@ -5,7 +5,8 @@ import com.easypost.exception.EasyPostException; import com.easypost.exception.General.InvalidObjectError; import com.easypost.exception.General.InvalidParameterError; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.net.URLEncoder; import java.util.Date; @@ -13,10 +14,8 @@ import java.util.Map; public final class Report extends EasyPostResource { - private String id; private Date startDate; private Date endDate; - private String mode; private String status; private Boolean includeChildren; private String url; @@ -40,42 +39,6 @@ public void setEndDate(final Date endDate) { this.endDate = endDate; } - /** - * Get the ID of this Report. - * - * @return the ID of this Report. - */ - public String getId() { - return id; - } - - /** - * Set the ID of this Report. - * - * @param id the ID of this Report. - */ - public void setId(final String id) { - this.id = id; - } - - /** - * Get the mode of this Report. - * - * @return the mode of this Report - */ - public String getMode() { - return mode; - } - - /** - * Set the mode of this Report. - * - * @param mode the mode of this Report. - */ - public void setMode(final String mode) { - this.mode = mode; - } - /** * Get the status of this Report. * @@ -189,8 +152,8 @@ public static Report create(final Map params, final String apiKe if (params.containsKey("type")) { HashMap paramsWithoutType = new HashMap<>(params); paramsWithoutType.remove("type"); - return request(RequestMethod.POST, reportURL((String) params.get("type")), paramsWithoutType, Report.class, - apiKey); + return Requestor.request(RequestMethod.POST, + reportURL((String) params.get("type")), paramsWithoutType, Report.class, apiKey); } else { throw new InvalidObjectError(String.format(Constants.MISSING_REQUIRED_PARAMETER, "type")); } @@ -232,7 +195,7 @@ public static Report retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static Report retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(Report.class, id), null, Report.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(Report.class, id), null, Report.class, apiKey); } /** @@ -256,6 +219,6 @@ public static ReportCollection all(final Map params) throws Easy */ public static ReportCollection all(final Map params, final String apiKey) throws EasyPostException { String type = (String) params.get("type"); - return request(RequestMethod.GET, reportURL(type), params, ReportCollection.class, apiKey); + return Requestor.request(RequestMethod.GET, reportURL(type), params, ReportCollection.class, apiKey); } } diff --git a/src/main/java/com/easypost/model/ReportCollection.java b/src/main/java/com/easypost/model/ReportCollection.java index 7cb0f1afa..f2d112d58 100644 --- a/src/main/java/com/easypost/model/ReportCollection.java +++ b/src/main/java/com/easypost/model/ReportCollection.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public final class ReportCollection extends EasyPostResource { diff --git a/src/main/java/com/easypost/model/ScanForm.java b/src/main/java/com/easypost/model/ScanForm.java index e7dfbaaab..2b3fd1828 100644 --- a/src/main/java/com/easypost/model/ScanForm.java +++ b/src/main/java/com/easypost/model/ScanForm.java @@ -1,13 +1,13 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.List; import java.util.Map; public class ScanForm extends EasyPostResource { - private String id; private String status; private String message; private Address fromAddress; @@ -71,24 +71,6 @@ public void setFromAddress(final Address fromAddress) { this.fromAddress = fromAddress; } - /** - * Get the ID of the ScanForm. - * - * @return the ID of the ScanForm. - */ - public String getId() { - return id; - } - - /** - * Set the ID of the ScanForm. - * - * @param id the ID of the ScanForm. - */ - public void setId(final String id) { - this.id = id; - } - /** * Get the the label URL of the ScanForm. * @@ -217,7 +199,7 @@ public static ScanForm create(final Map params) throws EasyPostE * @throws EasyPostException when the request fails. when the request fails. */ public static ScanForm create(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.POST, classURL(ScanForm.class), params, ScanForm.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(ScanForm.class), params, ScanForm.class, apiKey); } /** @@ -240,7 +222,7 @@ public static ScanForm retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. when the request fails. */ public static ScanForm retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(ScanForm.class, id), null, ScanForm.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(ScanForm.class, id), null, ScanForm.class, apiKey); } /** @@ -264,6 +246,6 @@ public static ScanFormCollection all(final Map params) throws Ea */ public static ScanFormCollection all(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, classURL(ScanForm.class), params, ScanFormCollection.class, apiKey); + return Requestor.request(RequestMethod.GET, classURL(ScanForm.class), params, ScanFormCollection.class, apiKey); } } diff --git a/src/main/java/com/easypost/model/ScanFormCollection.java b/src/main/java/com/easypost/model/ScanFormCollection.java index dbbd0de26..5e24e7998 100644 --- a/src/main/java/com/easypost/model/ScanFormCollection.java +++ b/src/main/java/com/easypost/model/ScanFormCollection.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public final class ScanFormCollection extends EasyPostResource { diff --git a/src/main/java/com/easypost/model/Shipment.java b/src/main/java/com/easypost/model/Shipment.java index 39a719390..54f8967fb 100644 --- a/src/main/java/com/easypost/model/Shipment.java +++ b/src/main/java/com/easypost/model/Shipment.java @@ -3,15 +3,14 @@ import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.FilteringError; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.HashMap; import java.util.List; import java.util.Map; public final class Shipment extends EasyPostResource { - private String id; - private String mode; private String reference; private Boolean isReturn; private Address toAddress; @@ -40,6 +39,7 @@ public final class Shipment extends EasyPostResource { private List taxIdentifiers; private List carrierAccounts; private String service; + private List fees; /** * Get the batch ID of this Shipment. @@ -509,6 +509,22 @@ public void setUspsZone(final String uspsZone) { this.uspsZone = uspsZone; } + /** + * @return the Fees associated with this object + */ + public List getFees() { + return fees; + } + + /** + * Set the Fees associated with this object. + * + * @param fees the Fees associated with this object + */ + public void setFees(final List fees) { + this.fees = fees; + } + /** * Create a new Shipment object from a map of parameters. * @@ -544,7 +560,7 @@ public static Shipment create(final Map params, final String api Map wrappedParams = new HashMap<>(); wrappedParams.put("shipment", params); - return request(RequestMethod.POST, classURL(Shipment.class), wrappedParams, Shipment.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(Shipment.class), wrappedParams, Shipment.class, apiKey); } /** @@ -562,7 +578,7 @@ public static Shipment create(final Map params, boolean withCarb wrappedParams.put("shipment", params); wrappedParams.put("carbon_offset", withCarbonOffset); - return request(RequestMethod.POST, classURL(Shipment.class), wrappedParams, Shipment.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(Shipment.class), wrappedParams, Shipment.class, apiKey); } /** @@ -585,7 +601,7 @@ public static Shipment retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static Shipment retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(Shipment.class, id), null, Shipment.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(Shipment.class, id), null, Shipment.class, apiKey); } /** @@ -609,7 +625,7 @@ public static ShipmentCollection all(final Map params) throws Ea */ public static ShipmentCollection all(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, classURL(Shipment.class), params, ShipmentCollection.class, apiKey); + return Requestor.request(RequestMethod.GET, classURL(Shipment.class), params, ShipmentCollection.class, apiKey); } /** @@ -631,44 +647,8 @@ public Shipment refresh() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Shipment refresh(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, String.format("%s", instanceURL(Shipment.class, this.getId())), params, - Shipment.class, apiKey); - } - - /** - * Get the ID of this Shipment. - * - * @return the ID of this Shipment. - */ - public String getId() { - return id; - } - - /** - * Set the ID of this Shipment. - * - * @param id the ID of this Shipment. - */ - public void setId(final String id) { - this.id = id; - } - - /** - * Get the mode of this Shipment. - * - * @return the mode of this Shipment. - */ - public String getMode() { - return mode; - } - - /** - * Set the mode of this Shipment. - * - * @param mode the mode of this Shipment. - */ - public void setMode(final String mode) { - this.mode = mode; + return Requestor.request(RequestMethod.GET, String.format("%s", + instanceURL(Shipment.class, this.getId())), params, Shipment.class, apiKey); } /** @@ -821,9 +801,8 @@ public Shipment newRates(final Map params, final String apiKey) public Shipment newRates(final Map params, final boolean withCarbonOffset, final String apiKey) throws EasyPostException { params.put("carbon_offset", withCarbonOffset); - Shipment response = - request(RequestMethod.POST, String.format("%s/rerate", instanceURL(Shipment.class, this.getId())), - params, Shipment.class, apiKey); + Shipment response = Requestor.request(RequestMethod.POST, String.format("%s/rerate", + instanceURL(Shipment.class, this.getId())), params, Shipment.class, apiKey); this.merge(this, response); @@ -880,9 +859,9 @@ public List getSmartrates(final Map params, final Str * @throws EasyPostException when the request fails. */ public List smartrates(final Map params, final String apiKey) throws EasyPostException { - SmartrateCollection smartrateCollection = - request(RequestMethod.GET, String.format("%s/smartrate", instanceURL(Shipment.class, this.getId())), - params, SmartrateCollection.class, apiKey); + SmartrateCollection smartrateCollection = Requestor.request(RequestMethod.GET, String.format("%s/smartrate", + instanceURL(Shipment.class, this.getId())), params, SmartrateCollection.class, apiKey); + return smartrateCollection.getSmartrates(); } @@ -975,7 +954,7 @@ public Shipment buy(final Rate rate, final String endShipperId) throws EasyPostE * @throws EasyPostException when the request fails. */ public Shipment buy(final Map params, final String apiKey) throws EasyPostException { - // TODO: When Java Client Library rewrite happens, the apiKey param will be replaced with endShipperId + // TODO: When Java Client Library rewrite happens, the apiKey param will be replaced with endShipperId return this.buy(params, false, null, apiKey); } @@ -1055,9 +1034,8 @@ public Shipment buy(final Map params, final boolean withCarbonOf params.put("end_shipper_id", endShipperId); } - Shipment response = - request(RequestMethod.POST, String.format("%s/buy", instanceURL(Shipment.class, this.getId())), params, - Shipment.class, apiKey); + Shipment response = Requestor.request(RequestMethod.POST, String.format("%s/buy", + instanceURL(Shipment.class, this.getId())), params, Shipment.class, apiKey); this.merge(this, response); @@ -1083,8 +1061,8 @@ public Shipment refund() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Shipment refund(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, String.format("%s/refund", instanceURL(Shipment.class, this.getId())), params, - Shipment.class, apiKey); + return Requestor.request(RequestMethod.GET, String.format("%s/refund", + instanceURL(Shipment.class, this.getId())), params, Shipment.class, apiKey); } /** @@ -1128,9 +1106,8 @@ public Shipment label() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Shipment label(final Map params, final String apiKey) throws EasyPostException { - Shipment response = - request(RequestMethod.GET, String.format("%s/label", instanceURL(Shipment.class, this.getId())), params, - Shipment.class, apiKey); + Shipment response = Requestor.request(RequestMethod.GET, String.format("%s/label", + instanceURL(Shipment.class, this.getId())), params, Shipment.class, apiKey); this.merge(this, response); return this; @@ -1177,8 +1154,8 @@ public Shipment insure() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Shipment insure(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.POST, String.format("%s/insure", instanceURL(Shipment.class, this.getId())), - params, Shipment.class, apiKey); + return Requestor.request(RequestMethod.POST, String.format("%s/insure", + instanceURL(Shipment.class, this.getId())), params, Shipment.class, apiKey); } /** @@ -1386,9 +1363,8 @@ public void generateForm(final String formType, final Map formOp params.putAll(formOptions); wrappedParams.put("form", params); - Shipment response = - request(RequestMethod.POST, String.format("%s/forms", instanceURL(Shipment.class, this.getId())), - wrappedParams, Shipment.class, apiKey); + Shipment response = Requestor.request(RequestMethod.POST, String.format("%s/forms", + instanceURL(Shipment.class, this.getId())), wrappedParams, Shipment.class, apiKey); this.merge(this, response); } diff --git a/src/main/java/com/easypost/model/ShipmentCollection.java b/src/main/java/com/easypost/model/ShipmentCollection.java index 9c8026979..60522f5a0 100644 --- a/src/main/java/com/easypost/model/ShipmentCollection.java +++ b/src/main/java/com/easypost/model/ShipmentCollection.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public final class ShipmentCollection extends EasyPostResource { diff --git a/src/main/java/com/easypost/model/TaxIdentifier.java b/src/main/java/com/easypost/model/TaxIdentifier.java index cee78713c..557505bec 100644 --- a/src/main/java/com/easypost/model/TaxIdentifier.java +++ b/src/main/java/com/easypost/model/TaxIdentifier.java @@ -1,9 +1,6 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - public final class TaxIdentifier extends EasyPostResource { - private String entity; private String taxId; private String taxIdType; diff --git a/src/main/java/com/easypost/model/Tracker.java b/src/main/java/com/easypost/model/Tracker.java index 983c1810e..66dfaee23 100644 --- a/src/main/java/com/easypost/model/Tracker.java +++ b/src/main/java/com/easypost/model/Tracker.java @@ -1,7 +1,8 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.Date; import java.util.HashMap; @@ -9,8 +10,6 @@ import java.util.Map; public final class Tracker extends EasyPostResource { - private String id; - private String mode; private String trackingCode; private String status; private String shipmentId; @@ -77,42 +76,6 @@ public void setEstDeliveryDate(final Date estDeliveryDate) { this.estDeliveryDate = estDeliveryDate; } - /** - * Get the ID of the Tracker. - * - * @return the ID of the Tracker. - */ - public String getId() { - return id; - } - - /** - * Set the ID of the Tracker. - * - * @param id the ID of the Tracker. - */ - public void setId(final String id) { - this.id = id; - } - - /** - * Get the mode of the Tracker. - * - * @return the mode of the Tracker. - */ - public String getMode() { - return mode; - } - - /** - * Set the mode of the Tracker. - * - * @param mode the mode of the Tracker. - */ - public void setMode(final String mode) { - this.mode = mode; - } - /** * Get the ID of the shipment associated with this tracker. * @@ -280,7 +243,7 @@ public static Tracker create(final Map params, final String apiK Map wrappedParams = new HashMap(); wrappedParams.put("tracker", params); - return request(RequestMethod.POST, classURL(Tracker.class), wrappedParams, Tracker.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(Tracker.class), wrappedParams, Tracker.class, apiKey); } /** @@ -303,7 +266,7 @@ public static Tracker retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static Tracker retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(Tracker.class, id), null, Tracker.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(Tracker.class, id), null, Tracker.class, apiKey); } /** @@ -327,7 +290,7 @@ public static TrackerCollection all(final Map params) throws Eas */ public static TrackerCollection all(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, classURL(Tracker.class), params, TrackerCollection.class, apiKey); + return Requestor.request(RequestMethod.GET, classURL(Tracker.class), params, TrackerCollection.class, apiKey); } /** @@ -353,6 +316,6 @@ public static void createList(final Map params, final String api Map newParams = new HashMap(); newParams.put("trackers", params); - request(RequestMethod.POST, createListUrl, newParams, Object.class, apiKey); + Requestor.request(RequestMethod.POST, createListUrl, newParams, Object.class, apiKey); } } diff --git a/src/main/java/com/easypost/model/TrackerCollection.java b/src/main/java/com/easypost/model/TrackerCollection.java index eb27ac1d5..0f765fcc7 100644 --- a/src/main/java/com/easypost/model/TrackerCollection.java +++ b/src/main/java/com/easypost/model/TrackerCollection.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public final class TrackerCollection extends EasyPostResource { diff --git a/src/main/java/com/easypost/model/User.java b/src/main/java/com/easypost/model/User.java index 12c6c539e..c457e7a22 100644 --- a/src/main/java/com/easypost/model/User.java +++ b/src/main/java/com/easypost/model/User.java @@ -3,6 +3,8 @@ import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.FilteringError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import java.util.HashMap; import java.util.List; @@ -30,7 +32,7 @@ public static User retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static User retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(User.class, id), null, User.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(User.class, id), null, User.class, apiKey); } /** @@ -51,7 +53,7 @@ public static User retrieveMe() throws EasyPostException { * @throws EasyPostException when the request fails. */ public static User retrieveMe(final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, classURL(User.class), null, User.class, apiKey); + return Requestor.request(RequestMethod.GET, classURL(User.class), null, User.class, apiKey); } /** @@ -76,7 +78,7 @@ public static User create(final Map params, final String apiKey) Map wrappedParams = new HashMap(); wrappedParams.put("user", params); - return request(RequestMethod.POST, classURL(User.class), wrappedParams, User.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(User.class), wrappedParams, User.class, apiKey); } /** @@ -113,8 +115,8 @@ public User update(final Map params, final String apiKey) throws Map wrappedParams = new HashMap(); wrappedParams.put("user", params); - User response = - request(RequestMethod.PUT, instanceURL(User.class, this.getId()), wrappedParams, User.class, apiKey); + User response = Requestor.request(RequestMethod.PUT, + instanceURL(User.class, this.getId()), wrappedParams, User.class, apiKey); this.merge(this, response); return this; @@ -136,7 +138,7 @@ public void delete() throws EasyPostException { * @throws EasyPostException when the request fails. */ public void delete(final String apiKey) throws EasyPostException { - request(RequestMethod.DELETE, instanceURL(User.class, this.getId()), null, User.class, apiKey); + Requestor.request(RequestMethod.DELETE, instanceURL(User.class, this.getId()), null, User.class, apiKey); } /** @@ -184,6 +186,6 @@ public Brand updateBrand(Map params, String apiKey) throws EasyP String updateBrandUrl = String.format("%s/brand", instanceURL(User.class, this.getId())); Map wrappedParams = new HashMap(); wrappedParams.put("brand", params); - return request(RequestMethod.PUT, updateBrandUrl, wrappedParams, Brand.class, apiKey); + return Requestor.request(RequestMethod.PUT, updateBrandUrl, wrappedParams, Brand.class, apiKey); } } diff --git a/src/main/java/com/easypost/model/Webhook.java b/src/main/java/com/easypost/model/Webhook.java index 87949f21c..5a5b77150 100644 --- a/src/main/java/com/easypost/model/Webhook.java +++ b/src/main/java/com/easypost/model/Webhook.java @@ -3,7 +3,9 @@ import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.SignatureVerificationError; -import com.easypost.net.EasyPostResource; +import com.easypost.http.Constant; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import com.easypost.utils.Cryptography; import java.nio.charset.StandardCharsets; @@ -13,8 +15,6 @@ import java.util.Map; public final class Webhook extends EasyPostResource { - private String id; - private String mode; private String url; private Date disabledAt; @@ -77,7 +77,7 @@ public static Webhook create(final Map params, final String apiK Map wrappedParams = new HashMap(); wrappedParams.put("webhook", params); - return request(RequestMethod.POST, classURL(Webhook.class), wrappedParams, Webhook.class, apiKey); + return Requestor.request(RequestMethod.POST, classURL(Webhook.class), wrappedParams, Webhook.class, apiKey); } /** @@ -100,7 +100,7 @@ public static Webhook retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public static Webhook retrieve(final String id, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, instanceURL(Webhook.class, id), null, Webhook.class, apiKey); + return Requestor.request(RequestMethod.GET, instanceURL(Webhook.class, id), null, Webhook.class, apiKey); } /** @@ -124,7 +124,7 @@ public static WebhookCollection all() throws EasyPostException { */ public static WebhookCollection all(final Map params, final String apiKey) throws EasyPostException { - return request(RequestMethod.GET, classURL(Webhook.class), params, WebhookCollection.class, apiKey); + return Requestor.request(RequestMethod.GET, classURL(Webhook.class), params, WebhookCollection.class, apiKey); } /** @@ -154,43 +154,7 @@ public void delete() throws EasyPostException { * @throws EasyPostException when the request fails. */ public void delete(final String apiKey) throws EasyPostException { - request(RequestMethod.DELETE, instanceURL(Webhook.class, this.getId()), null, Webhook.class, apiKey); - } - - /** - * Get the ID of the webhook. - * - * @return the ID of the webhook - */ - public String getId() { - return id; - } - - /** - * Set the ID of the webhook. - * - * @param id the ID of the webhook - */ - public void setId(final String id) { - this.id = id; - } - - /** - * Get the mode of the webhook. - * - * @return the mode of the webhook - */ - public String getMode() { - return mode; - } - - /** - * Set the mode of the webhook. - * - * @param mode the mode of the webhook - */ - public void setMode(final String mode) { - this.mode = mode; + Requestor.request(RequestMethod.DELETE, instanceURL(Webhook.class, this.getId()), null, Webhook.class, apiKey); } /** @@ -216,9 +180,8 @@ public Webhook update(final Map params, final String apiKey) thr Map wrappedParams = new HashMap(); wrappedParams.put("webhook", params); - Webhook response = - request(RequestMethod.PUT, instanceURL(Webhook.class, this.getId()), wrappedParams, Webhook.class, - apiKey); + Webhook response = Requestor.request(RequestMethod.PUT, + instanceURL(Webhook.class, this.getId()), wrappedParams, Webhook.class, apiKey); this.merge(this, response); return this; @@ -265,7 +228,7 @@ public static Event validateWebhook(byte[] eventBody, Map header if (Cryptography.signaturesMatch(providedSignature, calculatedSignature)) { // Serialize data into a JSON string, then into an Event object String json = new String(eventBody, StandardCharsets.UTF_8); - return GSON.fromJson(json, Event.class); + return Constant.GSON.fromJson(json, Event.class); } else { throw new SignatureVerificationError(Constants.WEBHOOK_DOES_NOT_MATCH); } diff --git a/src/main/java/com/easypost/model/WebhookCollection.java b/src/main/java/com/easypost/model/WebhookCollection.java index a7c760969..ce51dbd9d 100644 --- a/src/main/java/com/easypost/model/WebhookCollection.java +++ b/src/main/java/com/easypost/model/WebhookCollection.java @@ -1,7 +1,5 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; public final class WebhookCollection extends EasyPostResource { diff --git a/src/test/cassettes/batch/add_remove_shipment.json b/src/test/cassettes/batch/add_remove_shipment.json index 6b21a5031..96a17c82c 100644 --- a/src/test/cassettes/batch/add_remove_shipment.json +++ b/src/test/cassettes/batch/add_remove_shipment.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1664550614, + "recordedAt": 1666369118, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:14Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1529ef7d406c4cdf9b047478aae6c4a8\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:10:14Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"tracking_code\": \"9400100109361140304943\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzY0NTk2YzRjYjAyYTQxZjdhYzE2ZTJjZmNkYWVhNjUx\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:10:14Z\",\n \"signed_by\": null,\n \"id\": \"trk_64596c4cb02a41f7ac16e2cfcdaea651\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fb99507f40d111edae50ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fb99507f40d111edae50ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/59e0cf6e7ba74c1ea39cdc81fbcdc27c.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"id\": \"pl_aa33f10cac61429f89aa36a88f157b09\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:10:13Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_1a04c3796a6148828ee05284dba762fc\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:10:13+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:10:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fb969c0440d111edae41ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7dd522d0082f4cf6b5ffa17586481068\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1529ef7d406c4cdf9b047478aae6c4a8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_a0cab5ac281841519f2bd2e770e1d743\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:13Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:13Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1f703fd83f20466ebd7a322f411f0cce\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:10:13+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:10:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fb969c0440d111edae41ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140304943\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:18:37Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:18:38Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:18:38Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:18:38Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_203e7e6e7ea54c96b5e3c43519773c2b\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T16:18:38Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"tracking_code\": \"9400100106068144550088\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2FhMWQ0MGJhNzZhYjQ2MTdiYTkwMmRhOWNlZjExMTY3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T16:18:38Z\",\n \"signed_by\": null,\n \"id\": \"trk_aa1d40ba76ab4617ba902da9cef11167\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:18:37+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:18:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_04c37752515c11ed9679ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:18:37+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:18:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_04c37752515c11ed9679ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T16:18:38Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e0ccd15a47804a009a144d51b983dcd0.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T16:18:38Z\",\n \"id\": \"pl_a2025ff479924554bd62a54aff17b432\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T16:18:38Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:18:37Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:18:37Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_d65b942038894bf3a41ff5f996c9ee0e\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T16:18:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T16:18:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_04c0c74a515c11edaf02ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:18:37Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:18:37Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_77176897564449a39e5a4287ada610ac\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:18:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:18:37Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_203e7e6e7ea54c96b5e3c43519773c2b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:18:37Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:18:37Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_a9efae52a80f46c9b0462054381d0bff\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:18:37Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:18:37Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_beba7c364d754953a8d9584221d5982e\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T16:18:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T16:18:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_04c0c74a515c11edaf02ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144550088\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,29 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "a7b2a1f8633706d5e0ed1383000d9866" + "9aa06c326352c65de0db69b90000ef1a" ], "x-proxied": [ "extlb1nuq 29913d444b", - "intlb1nuq 29913d444b" + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.116657" + "1.205318" ], "etag": [ - "W/\"822264f360a13effb5db64c9fcb84eb4\"" + "W/\"136358f3f4faedf3d9808fb112024e3e\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_37ba360aeeb744ea91b82d73e84c3f22" + "/api/v2/shipments/shp_04b5b6d8f75a4850aaa238804eb4273f" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +90,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1498 + "duration": 1478 }, { - "recordedAt": 1664550615, + "recordedAt": 1666369119, "request": { "body": "{}", "method": "POST", @@ -114,20 +113,20 @@ "uri": "https://api.easypost.com/v2/batches" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-09-30T15:10:15Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-09-30T15:10:15Z\",\n \"id\": \"batch_c2cc1cb8ae6d4a71b08a54687901ca3e\",\n \"state\": \"created\",\n \"object\": \"EasyPost::Entity::Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-10-21T16:18:39Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-10-21T16:18:39Z\",\n \"id\": \"batch_6f24fcdbfc23492ca2e360ff69ccf0b3\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "401" + "383" ], "expires": [ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -147,9 +146,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -157,26 +153,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "91477ff5633706d7e0ed1385000ca020" + "2c01d7c96352c65fe0db69da0001a49a" ], "x-proxied": [ - "extlb2nuq 29913d444b", - "intlb1nuq 29913d444b" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.030566" + "0.037601" ], "etag": [ - "W/\"1c99ed822fa7f85708d45dcf10ab2299\"" + "W/\"3c042c1cf8541187783ace75c57b57c9\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,15 +183,14 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 306 + "duration": 335 }, { - "recordedAt": 1664550615, + "recordedAt": 1666369119, "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_1a04c3796a6148828ee05284dba762fc\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_7dd522d0082f4cf6b5ffa17586481068\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_1529ef7d406c4cdf9b047478aae6c4a8\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_a0cab5ac281841519f2bd2e770e1d743\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_1f703fd83f20466ebd7a322f411f0cce\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140304943\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fb969c0440d111edae41ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fb99507f40d111edae50ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_1529ef7d406c4cdf9b047478aae6c4a8\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fb969c0440d111edae41ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140304943\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:14 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzY0NTk2YzRjYjAyYTQxZjdhYzE2ZTJjZmNkYWVhNjUx\",\n \"id\": \"trk_64596c4cb02a41f7ac16e2cfcdaea651\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:14 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fb99507f40d111edae50ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_aa33f10cac61429f89aa36a88f157b09\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/59e0cf6e7ba74c1ea39cdc81fbcdc27c.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:14 AM\"\n }\n ]\n}", + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_d65b942038894bf3a41ff5f996c9ee0e\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_77176897564449a39e5a4287ada610ac\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_203e7e6e7ea54c96b5e3c43519773c2b\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_a9efae52a80f46c9b0462054381d0bff\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_beba7c364d754953a8d9584221d5982e\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068144550088\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_04c0c74a515c11edaf02ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_04c37752515c11ed9679ac1f6bc7b362\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:38 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_203e7e6e7ea54c96b5e3c43519773c2b\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_04c0c74a515c11edaf02ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:38 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2FhMWQ0MGJhNzZhYjQ2MTdiYTkwMmRhOWNlZjExMTY3\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144550088\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_aa1d40ba76ab4617ba902da9cef11167\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_04c37752515c11ed9679ac1f6bc7b362\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 12:18:38 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_a2025ff479924554bd62a54aff17b432\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e0ccd15a47804a009a144d51b983dcd0.png\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -207,10 +203,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_c2cc1cb8ae6d4a71b08a54687901ca3e/add_shipments" + "uri": "https://api.easypost.com/v2/batches/batch_6f24fcdbfc23492ca2e360ff69ccf0b3/add_shipments" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-09-30T15:10:15Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"tracking_code\": \"9400100109361140304943\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-09-30T15:10:15Z\",\n \"id\": \"batch_c2cc1cb8ae6d4a71b08a54687901ca3e\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-10-21T16:18:39Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"tracking_code\": \"9400100106068144550088\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-10-21T16:18:39Z\",\n \"id\": \"batch_6f24fcdbfc23492ca2e360ff69ccf0b3\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -223,7 +219,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -250,26 +246,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "91477ff5633706d7e0ed1387000ca05a" + "2c01d7cf6352c65fe0db69e00001a4c0" ], "x-proxied": [ - "extlb2nuq 29913d444b", - "intlb1nuq 29913d444b" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.041914" + "0.059276" ], "etag": [ - "W/\"fc530319a6f4de5f107612f9a8686a4d\"" + "W/\"33b3403ff2053c5593bb8ed89ffbeefe\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -279,15 +276,14 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches/batch_c2cc1cb8ae6d4a71b08a54687901ca3e/add_shipments" + "uri": "https://api.easypost.com/v2/batches/batch_6f24fcdbfc23492ca2e360ff69ccf0b3/add_shipments" }, - "duration": 309 + "duration": 336 }, { - "recordedAt": 1664550616, + "recordedAt": 1666369120, "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_1a04c3796a6148828ee05284dba762fc\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_7dd522d0082f4cf6b5ffa17586481068\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_1529ef7d406c4cdf9b047478aae6c4a8\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_a0cab5ac281841519f2bd2e770e1d743\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_1f703fd83f20466ebd7a322f411f0cce\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140304943\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fb969c0440d111edae41ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fb99507f40d111edae50ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"currency\": \"USD\",\n \"id\": \"rate_1529ef7d406c4cdf9b047478aae6c4a8\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fb969c0440d111edae41ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140304943\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:14 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzY0NTk2YzRjYjAyYTQxZjdhYzE2ZTJjZmNkYWVhNjUx\",\n \"id\": \"trk_64596c4cb02a41f7ac16e2cfcdaea651\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:14 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fb99507f40d111edae50ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"id\": \"shp_37ba360aeeb744ea91b82d73e84c3f22\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:13 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_aa33f10cac61429f89aa36a88f157b09\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/59e0cf6e7ba74c1ea39cdc81fbcdc27c.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:13 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:14 AM\"\n }\n ]\n}", + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_d65b942038894bf3a41ff5f996c9ee0e\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_77176897564449a39e5a4287ada610ac\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_203e7e6e7ea54c96b5e3c43519773c2b\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_a9efae52a80f46c9b0462054381d0bff\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_beba7c364d754953a8d9584221d5982e\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068144550088\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_04c0c74a515c11edaf02ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_04c37752515c11ed9679ac1f6bc7b362\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:38 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_203e7e6e7ea54c96b5e3c43519773c2b\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_04c0c74a515c11edaf02ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:38 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2FhMWQ0MGJhNzZhYjQ2MTdiYTkwMmRhOWNlZjExMTY3\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144550088\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_aa1d40ba76ab4617ba902da9cef11167\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_04c37752515c11ed9679ac1f6bc7b362\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 12:18:38 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_a2025ff479924554bd62a54aff17b432\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e0ccd15a47804a009a144d51b983dcd0.png\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -300,10 +296,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_c2cc1cb8ae6d4a71b08a54687901ca3e/remove_shipments" + "uri": "https://api.easypost.com/v2/batches/batch_6f24fcdbfc23492ca2e360ff69ccf0b3/remove_shipments" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-09-30T15:10:15Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-09-30T15:10:15Z\",\n \"id\": \"batch_c2cc1cb8ae6d4a71b08a54687901ca3e\",\n \"state\": \"purchased\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-10-21T16:18:39Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-10-21T16:18:40Z\",\n \"id\": \"batch_6f24fcdbfc23492ca2e360ff69ccf0b3\",\n \"state\": \"purchased\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -316,7 +312,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -343,27 +339,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7e633706d8e0ed13a3000c2ca4" + "107f19416352c660e0db69e20012aa7c" ], "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", + "extlb3wdc 29913d444b", + "intlb1wdc 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.040392" + "0.052643" ], "etag": [ - "W/\"4b0b400fcfa741ea750b38b90ad159d6\"" + "W/\"9e60d3c48ab9f3ac3ab430ee4cce8af4\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -373,9 +369,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches/batch_c2cc1cb8ae6d4a71b08a54687901ca3e/remove_shipments" + "uri": "https://api.easypost.com/v2/batches/batch_6f24fcdbfc23492ca2e360ff69ccf0b3/remove_shipments" }, - "duration": 273 + "duration": 344 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/buy.json b/src/test/cassettes/pickup/buy.json index 0df6faa51..730f06485 100644 --- a/src/test/cassettes/pickup/buy.json +++ b/src/test/cassettes/pickup/buy.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1664550771, + "recordedAt": 1666367739, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:12:51Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:50Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f5a8255922b74364b0dd530e10314db0\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:12:51Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"tracking_code\": \"9400100109361140305674\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzA1ZTU5ZDJkNjlhMTQ2NjNiMjY4MDRlYzgyMDRjNzI2\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:12:51Z\",\n \"signed_by\": null,\n \"id\": \"trk_05e59d2d69a14663b26804ec8204c726\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:12:50+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5932a98840d211edaebdac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:12:50+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5932a98840d211edaebdac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/341ad6fffc574c358f7f4d9b53e0e9a0.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:12:51Z\",\n \"id\": \"pl_3546df1714f8468db29b62c59312835a\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:12:50Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:12:50Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c98c7021f22744ae9f4e41f997c3458b\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:12:50+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:12:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_592fe3d840d211edaeb0ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:50Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_289ff903be694bc5a3307dded10b685e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:50Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d8bdf55966d74cb1801b5b519b1cf141\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:50Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_16e8477fcf654114b23b1dbc4f07af7e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:12:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:50Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f5a8255922b74364b0dd530e10314db0\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:12:50+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:12:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_592fe3d840d211edaeb0ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305674\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:55:37Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:55:38Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:38Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:38Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_19da4fa2df5143bd95b68ac1b333daf9\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:55:38Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"tracking_code\": \"9400100106068144545565\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzU4ZWNmOGY4ODY0YzQ0NDk4NTU5MzMyZmU0M2QzMGY3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:38Z\",\n \"signed_by\": null,\n \"id\": \"trk_58ecf8f8864c44498559332fe43d30f7\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:37+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ce3c036b515811eda49bac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:37+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ce3c036b515811eda49bac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:55:38Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/b1ee8d8af3a0411f8e97b8f25c2e549c.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:55:38Z\",\n \"id\": \"pl_2a07df86dfe24ca5b166d7fee5f9b561\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:55:38Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:55:37Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:55:37Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_0ca5e2f5c4114bd0a8e9913f49ee634f\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_ce396058515811ed84efac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:55:37Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:37Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_20b72254a6dd486187645b95d2d9b1b3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:55:37Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:37Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0a5dde23d26743b1970921426fd6d035\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:55:37Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:37Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_11dca4e3860e44658ec35b87083acc09\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:37Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_19da4fa2df5143bd95b68ac1b333daf9\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_ce396058515811ed84efac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545565\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,6 +51,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -58,7 +61,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "a7b2a1f963370772e0ed1ba3000dc92a" + "8424afb46352c0f9e0d9d53c0011d678" ], "x-proxied": [ "extlb1nuq 29913d444b", @@ -68,19 +71,19 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.215871" + "1.311291" ], "etag": [ - "W/\"d315b11401a6e05fe81aeb71152ae181\"" + "W/\"a6b24947e7635c1cfccf6e2d39ac0d73\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_3ed642add5ef4dcaa2e1b2957f41820c" + "/api/v2/shipments/shp_c9625bb7c4dc439585311f624cc99d4d" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,15 +93,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1479 + "duration": 1693 }, { - "recordedAt": 1664550774, + "recordedAt": 1666367741, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-10-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_c98c7021f22744ae9f4e41f997c3458b\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"currency\": \"USD\",\n \"id\": \"rate_289ff903be694bc5a3307dded10b685e\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"currency\": \"USD\",\n \"id\": \"rate_d8bdf55966d74cb1801b5b519b1cf141\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"currency\": \"USD\",\n \"id\": \"rate_16e8477fcf654114b23b1dbc4f07af7e\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"currency\": \"USD\",\n \"id\": \"rate_f5a8255922b74364b0dd530e10314db0\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140305674\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_592fe3d840d211edaeb0ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5932a98840d211edaebdac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"currency\": \"USD\",\n \"id\": \"rate_f5a8255922b74364b0dd530e10314db0\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_592fe3d840d211edaeb0ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140305674\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:51 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzA1ZTU5ZDJkNjlhMTQ2NjNiMjY4MDRlYzgyMDRjNzI2\",\n \"id\": \"trk_05e59d2d69a14663b26804ec8204c726\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:51 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5932a98840d211edaebdac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:50 AM\"\n },\n \"id\": \"shp_3ed642add5ef4dcaa2e1b2957f41820c\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:12:50 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_3546df1714f8468db29b62c59312835a\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/341ad6fffc574c358f7f4d9b53e0e9a0.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:51 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:51 AM\"\n },\n \"min_datetime\": \"2022-10-01\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-11-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_0ca5e2f5c4114bd0a8e9913f49ee634f\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"currency\": \"USD\",\n \"id\": \"rate_20b72254a6dd486187645b95d2d9b1b3\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"currency\": \"USD\",\n \"id\": \"rate_0a5dde23d26743b1970921426fd6d035\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"currency\": \"USD\",\n \"id\": \"rate_11dca4e3860e44658ec35b87083acc09\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"currency\": \"USD\",\n \"id\": \"rate_19da4fa2df5143bd95b68ac1b333daf9\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545565\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_ce396058515811ed84efac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:38 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_ce3c036b515811eda49bac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:38 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"currency\": \"USD\",\n \"id\": \"rate_19da4fa2df5143bd95b68ac1b333daf9\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:38 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_ce396058515811ed84efac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:38 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:38 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzU4ZWNmOGY4ODY0YzQ0NDk4NTU5MzMyZmU0M2QzMGY3\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545565\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_58ecf8f8864c44498559332fe43d30f7\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:38 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_ce3c036b515811eda49bac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n },\n \"id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:55:38 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_2a07df86dfe24ca5b166d7fee5f9b561\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/b1ee8d8af3a0411f8e97b8f25c2e549c.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:38 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:38 AM\"\n },\n \"min_datetime\": \"2022-11-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +116,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:12:52+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5a59452240d211edb45cac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:12:52Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:12:53Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:12:53Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_99a756ea719241a8ae4d33473814777a\",\n \"pickup_id\": \"pickup_e79cb9a845b54efea48e76ec8172f4f0\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:12:52Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_e79cb9a845b54efea48e76ec8172f4f0\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:39+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_cf88dd7e515811eda536ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:39Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:41Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:41Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_c07014a77acc42b8913b012322c96df3\",\n \"pickup_id\": \"pickup_15f373f924dc4bfb9c3d2a3c6931072d\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:39Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_15f373f924dc4bfb9c3d2a3c6931072d\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +129,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,26 +156,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "91477ff963370774e0ed1ba5000cda36" + "107f19466352c0fbe0d9d53e0010468d" ], "x-proxied": [ - "extlb2nuq 29913d444b", - "intlb1nuq 29913d444b" + "extlb3wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.587463" + "1.487638" ], "etag": [ - "W/\"d7bef093cfade35df51f3d20d1aa6b39\"" + "W/\"442266a12a828e3ecbb0ea2b6e275b7c\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,13 +186,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1980 + "duration": 1843 }, { - "recordedAt": 1664550776, + "recordedAt": 1666367743, "request": { "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"NextDay\"\n}", "method": "POST", @@ -204,10 +206,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_e79cb9a845b54efea48e76ec8172f4f0/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_15f373f924dc4bfb9c3d2a3c6931072d/buy" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:12:52+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5a59452240d211edb45cac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:12:52Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:12:53Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:12:53Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_99a756ea719241a8ae4d33473814777a\",\n \"pickup_id\": \"pickup_e79cb9a845b54efea48e76ec8172f4f0\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62247092\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_e79cb9a845b54efea48e76ec8172f4f0\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:39+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_cf88dd7e515811eda536ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:39Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:41Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:41Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_c07014a77acc42b8913b012322c96df3\",\n \"pickup_id\": \"pickup_15f373f924dc4bfb9c3d2a3c6931072d\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62314242\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:43Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_15f373f924dc4bfb9c3d2a3c6931072d\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", "httpVersion": null, "headers": { "null": [ @@ -220,7 +222,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -247,27 +249,26 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c8063370776e0ed1ba7000c5bef" + "a4cf67b06352c0fee0d9d5400012629d" ], "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb1nuq 29913d444b" + "extlb2nuq 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.575552" + "1.654272" ], "etag": [ - "W/\"912d184d68c6bb406341474f30350bc0\"" + "W/\"bfdefefe91e259ee1ff5f7d5a1145f11\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -277,9 +278,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/pickups/pickup_e79cb9a845b54efea48e76ec8172f4f0/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_15f373f924dc4bfb9c3d2a3c6931072d/buy" }, - "duration": 1810 + "duration": 2030 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/cancel.json b/src/test/cassettes/pickup/cancel.json index 71a14f536..6cd2f8aa0 100644 --- a/src/test/cassettes/pickup/cancel.json +++ b/src/test/cassettes/pickup/cancel.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1664550783, + "recordedAt": 1666367752, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:13:03Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:02Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9c99a80b1008427eb01da9eb51a22992\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:13:03Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"tracking_code\": \"9400100109361140305766\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2E4ZDU4MDAxYTUxZjRmMTE5MWNlZmJlNjE4Y2VkYjdm\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:03Z\",\n \"signed_by\": null,\n \"id\": \"trk_a8d58001a51f4f1191cefbe618cedb7f\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:13:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_606c3f3640d211ed84ddac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:13:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_606c3f3640d211ed84ddac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/963c4955bf06496d88cebc5fea901087.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:13:03Z\",\n \"id\": \"pl_a379c7e61b954dbeaad61b99be5ff271\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:13:02Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:13:02Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_03020cd49e3441b9b2214d5e9f644735\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:13:02+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:13:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6069c5e240d211edbc4aac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:02Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c2ed0250ff5d4fd7b6193094c1db285e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:02Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9c99a80b1008427eb01da9eb51a22992\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:02Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b499be0272a848de99aa7455c1b07a52\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:13:02Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:02Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9756c95816de4bc481101291614a0a78\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:13:02+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:13:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6069c5e240d211edbc4aac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305766\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:55:50Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:51Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_233400edba8a43c9a50c0ef1473adaa9\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:55:52Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"tracking_code\": \"9400100106068144545602\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2QwMjlkZDQzZGQ4MTQ5NmM5MmRhYTM1NDdhMmRhMDlh\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:52Z\",\n \"signed_by\": null,\n \"id\": \"trk_d029dd43dd81496c92daa3547a2da09a\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:50+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d61c1ff2515811eda882ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:50+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d61c1ff2515811eda882ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:55:51Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e5e796b234924100b0a3864ad14ef8ec.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"id\": \"pl_302c9486db054b738ca1f9bd345b437e\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:55:51Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:55:50Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:55:50Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_605200fdbe1342b4b0d2059fa6f2d629\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:50+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d61a9bdc515811ed88aaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:51Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_233400edba8a43c9a50c0ef1473adaa9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:55:51Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d5d18df482604bb6b0f5df4c84e0fdc0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:55:51Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_155669533747422d98f54c67bf66cf57\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:55:51Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fed77550f49a40f2893afc8e2b77a89a\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:50+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d61a9bdc515811ed88aaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545602\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,7 +58,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7d6337077ee0ed1be1000c5e1f" + "352b94386352c106e0d9d57a0011dd1b" ], "x-proxied": [ "extlb4wdc 29913d444b", @@ -69,19 +69,19 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.104355" + "1.266161" ], "etag": [ - "W/\"ef013805faf7dbb23697d1c0375d5235\"" + "W/\"284e46d46c49b911a492fba716f5bebc\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_e1c00daef06747d089cae9450fc1791f" + "/api/v2/shipments/shp_d31148a1d7394fedb8248e6dc04de78a" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -91,15 +91,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1348 + "duration": 1563 }, { - "recordedAt": 1664550784, + "recordedAt": 1666367753, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-10-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_03020cd49e3441b9b2214d5e9f644735\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"currency\": \"USD\",\n \"id\": \"rate_c2ed0250ff5d4fd7b6193094c1db285e\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"currency\": \"USD\",\n \"id\": \"rate_9c99a80b1008427eb01da9eb51a22992\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"currency\": \"USD\",\n \"id\": \"rate_b499be0272a848de99aa7455c1b07a52\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"currency\": \"USD\",\n \"id\": \"rate_9756c95816de4bc481101291614a0a78\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140305766\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6069c5e240d211edbc4aac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_606c3f3640d211ed84ddac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"currency\": \"USD\",\n \"id\": \"rate_9c99a80b1008427eb01da9eb51a22992\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6069c5e240d211edbc4aac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140305766\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:03 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2E4ZDU4MDAxYTUxZjRmMTE5MWNlZmJlNjE4Y2VkYjdm\",\n \"id\": \"trk_a8d58001a51f4f1191cefbe618cedb7f\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:03 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_606c3f3640d211ed84ddac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:02 AM\"\n },\n \"id\": \"shp_e1c00daef06747d089cae9450fc1791f\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:13:02 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_a379c7e61b954dbeaad61b99be5ff271\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/963c4955bf06496d88cebc5fea901087.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:03 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:03 AM\"\n },\n \"min_datetime\": \"2022-10-01\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-11-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:50 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_605200fdbe1342b4b0d2059fa6f2d629\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:50 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:51 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"currency\": \"USD\",\n \"id\": \"rate_233400edba8a43c9a50c0ef1473adaa9\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:51 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"currency\": \"USD\",\n \"id\": \"rate_d5d18df482604bb6b0f5df4c84e0fdc0\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:51 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"currency\": \"USD\",\n \"id\": \"rate_155669533747422d98f54c67bf66cf57\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:51 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"currency\": \"USD\",\n \"id\": \"rate_fed77550f49a40f2893afc8e2b77a89a\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545602\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:50 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d61a9bdc515811ed88aaac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:50 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d61c1ff2515811eda882ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:50 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:51 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"currency\": \"USD\",\n \"id\": \"rate_233400edba8a43c9a50c0ef1473adaa9\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:50 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:50 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d61a9bdc515811ed88aaac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:52 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2QwMjlkZDQzZGQ4MTQ5NmM5MmRhYTM1NDdhMmRhMDlh\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545602\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_d029dd43dd81496c92daa3547a2da09a\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:52 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:50 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d61c1ff2515811eda882ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:50 AM\"\n },\n \"id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:55:51 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_302c9486db054b738ca1f9bd345b437e\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e5e796b234924100b0a3864ad14ef8ec.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n \"min_datetime\": \"2022-11-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -115,7 +114,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:13:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_614a459b40d211ed87d8ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:13:03Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:04Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:13:04Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_24b8ebb50f4d443e948c522d96cf3f9f\",\n \"pickup_id\": \"pickup_98a3c607a8644072987e27b9d4e3f9c7\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:13:03Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_98a3c607a8644072987e27b9d4e3f9c7\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:52+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d72482e3515811ed890fac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:52Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:53Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:53Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_ccabb8e11d2a4edaaf510de16831a005\",\n \"pickup_id\": \"pickup_efe281ab38804a85ab2235db9831591f\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:52Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_efe281ab38804a85ab2235db9831591f\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -128,7 +127,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -155,27 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c806337077fe0ed1be3000c5eae" + "352b943d6352c108e0d9d57c0011ddb3" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", + "intlb2wdc 29913d444b", "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.740523" + "0.683423" ], "etag": [ - "W/\"f8b50456e0a3d1cbc5efbf696ecb4d9c\"" + "W/\"f9132c639e760deeddd8825067393744\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -185,13 +184,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1025 + "duration": 1048 }, { - "recordedAt": 1664550786, + "recordedAt": 1666367755, "request": { "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"NextDay\"\n}", "method": "POST", @@ -206,10 +204,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_98a3c607a8644072987e27b9d4e3f9c7/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_efe281ab38804a85ab2235db9831591f/buy" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:13:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_614a459b40d211ed87d8ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:13:03Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:04Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:13:04Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_24b8ebb50f4d443e948c522d96cf3f9f\",\n \"pickup_id\": \"pickup_98a3c607a8644072987e27b9d4e3f9c7\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62247052\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:13:05Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_98a3c607a8644072987e27b9d4e3f9c7\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:52+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d72482e3515811ed890fac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:52Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:53Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:53Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_ccabb8e11d2a4edaaf510de16831a005\",\n \"pickup_id\": \"pickup_efe281ab38804a85ab2235db9831591f\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62314244\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:54Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_efe281ab38804a85ab2235db9831591f\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", "httpVersion": null, "headers": { "null": [ @@ -249,27 +247,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7c63370780e0ed1be5000c5f03" + "352b943a6352c109e0d9d57e0011de10" ], "x-proxied": [ "extlb4wdc 29913d444b", "intlb2wdc 29913d444b", - "intlb1nuq 29913d444b" + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.154236" + "1.107913" ], "etag": [ - "W/\"d022ff8995d1eb0122bf91f4e08da0f6\"" + "W/\"29d302386a5250c228a897d7de2683db\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -279,13 +277,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/pickups/pickup_98a3c607a8644072987e27b9d4e3f9c7/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_efe281ab38804a85ab2235db9831591f/buy" }, - "duration": 1433 + "duration": 1480 }, { - "recordedAt": 1664550787, + "recordedAt": 1666367756, "request": { "body": "", "method": "POST", @@ -297,10 +294,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_98a3c607a8644072987e27b9d4e3f9c7/cancel" + "uri": "https://api.easypost.com/v2/pickups/pickup_efe281ab38804a85ab2235db9831591f/cancel" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:13:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_614a459b40d211ed87d8ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:13:03Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:04Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:13:04Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_24b8ebb50f4d443e948c522d96cf3f9f\",\n \"pickup_id\": \"pickup_98a3c607a8644072987e27b9d4e3f9c7\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62247052\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:13:07Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_98a3c607a8644072987e27b9d4e3f9c7\",\n \"object\": \"Pickup\",\n \"status\": \"canceled\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:52+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d72482e3515811ed890fac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:52Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:53Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:53Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_ccabb8e11d2a4edaaf510de16831a005\",\n \"pickup_id\": \"pickup_efe281ab38804a85ab2235db9831591f\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62314244\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:56Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_efe281ab38804a85ab2235db9831591f\",\n \"object\": \"Pickup\",\n \"status\": \"canceled\"\n}", "httpVersion": null, "headers": { "null": [ @@ -313,7 +310,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -340,27 +337,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7c63370782e0ed1be6000c5f74" + "352b94386352c10be0d9d57f0011de76" ], "x-proxied": [ "extlb4wdc 29913d444b", "intlb2wdc 29913d444b", - "intlb1nuq 29913d444b" + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.235491" + "0.802140" ], "etag": [ - "W/\"d10050751f091667401955305589be5b\"" + "W/\"f44af22fcd00476efd775a4ee9ca7ebe\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -370,9 +367,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/pickups/pickup_98a3c607a8644072987e27b9d4e3f9c7/cancel" + "uri": "https://api.easypost.com/v2/pickups/pickup_efe281ab38804a85ab2235db9831591f/cancel" }, - "duration": 1508 + "duration": 1183 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/create.json b/src/test/cassettes/pickup/create.json index f4f16544b..552d93425 100644 --- a/src/test/cassettes/pickup/create.json +++ b/src/test/cassettes/pickup/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1664550831, + "recordedAt": 1666367758, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:13:49Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:13:50Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:13:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:50Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5e92d7c17781430c965b9c35a1b1e099\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:13:50Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"tracking_code\": \"9400100109361140306367\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2ZhMTFlYzk2MDc1NjRkZDk4ZmU5MTQ1MjAwMGRkMjg3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:50Z\",\n \"signed_by\": null,\n \"id\": \"trk_fa11ec9607564dd98fe91452000dd287\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:13:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7caf759e40d211ed909fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:13:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7caf759e40d211ed909fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:13:50Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/ebf70c9cdf9941dab27d67b095753ac5.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:13:50Z\",\n \"id\": \"pl_817c0b6f0d154f2e81c3377c848230a1\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:13:50Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:13:49Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:13:49Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_6b6a326b0a69453fb47078449cb9bdc3\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:13:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:13:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7cacd8ef40d211eda8f5ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:13:49Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:49Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5e92d7c17781430c965b9c35a1b1e099\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:13:49Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:49Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_7432292813c84892ad85e81157490b8e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:13:49Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:49Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_86224f85d5bc4f29aee04451a1125851\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:13:49Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:49Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_14f6aea97cbf4e42ae0eedab237a7720\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:13:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:13:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7cacd8ef40d211eda8f5ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140306367\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:55:57Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:55:58Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:58Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:58Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b6f558ddb4884f5cb2afe2fcaa1354ac\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:55:58Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"tracking_code\": \"9400100106068144545626\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzdiYmJlODA4ZjkyODRiNmI5N2M2OGNhMDlmZjU5OWEy\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:58Z\",\n \"signed_by\": null,\n \"id\": \"trk_7bbbe808f9284b6b97c68ca09ff599a2\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:57+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_da2ebd18515811edab2aac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:57+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_da2ebd18515811edab2aac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:55:58Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/f76c54dd12974d48a8945e8ec61d6e68.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:55:58Z\",\n \"id\": \"pl_8c700cabcca54696bd0f7a3269311619\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:55:58Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:55:57Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:55:57Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_1e14787fe8034309a0f32ce912c5ba94\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:57+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_da2ca963515811ed89ffac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:55:57Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:57Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_0b7ea07ad5a640959bba6d53e371ec24\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:55:57Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:57Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_55748d56f693431ea8f2efcd9c3a2c13\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:55:57Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:57Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_39a96118395345b4883d58ef48e67f5c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:57Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:57Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b6f558ddb4884f5cb2afe2fcaa1354ac\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:57+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_da2ca963515811ed89ffac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545626\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,7 +58,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c80633707ade0ed1c4b000c6c39" + "352b943c6352c10de0d9d5810011df46" ], "x-proxied": [ "extlb4wdc 29913d444b", @@ -69,19 +69,19 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.220087" + "1.040488" ], "etag": [ - "W/\"250297504052df66c5e2a1a6016db043\"" + "W/\"61b69be685b83bf5d467d3096d3c770a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_3c537afced374b6190f575e7d68c6802" + "/api/v2/shipments/shp_29aa7d5641d245199560727e239829e3" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -91,15 +91,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1565 + "duration": 2313 }, { - "recordedAt": 1664550832, + "recordedAt": 1666367759, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-10-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_6b6a326b0a69453fb47078449cb9bdc3\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"currency\": \"USD\",\n \"id\": \"rate_5e92d7c17781430c965b9c35a1b1e099\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"currency\": \"USD\",\n \"id\": \"rate_7432292813c84892ad85e81157490b8e\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"currency\": \"USD\",\n \"id\": \"rate_86224f85d5bc4f29aee04451a1125851\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"currency\": \"USD\",\n \"id\": \"rate_14f6aea97cbf4e42ae0eedab237a7720\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140306367\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7cacd8ef40d211eda8f5ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:50 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7caf759e40d211ed909fac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:50 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"currency\": \"USD\",\n \"id\": \"rate_5e92d7c17781430c965b9c35a1b1e099\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:13:50 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7cacd8ef40d211eda8f5ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:50 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140306367\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:50 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2ZhMTFlYzk2MDc1NjRkZDk4ZmU5MTQ1MjAwMGRkMjg3\",\n \"id\": \"trk_fa11ec9607564dd98fe91452000dd287\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:50 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:49 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7caf759e40d211ed909fac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:49 AM\"\n },\n \"id\": \"shp_3c537afced374b6190f575e7d68c6802\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:13:50 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_817c0b6f0d154f2e81c3377c848230a1\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/ebf70c9cdf9941dab27d67b095753ac5.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:50 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:50 AM\"\n },\n \"min_datetime\": \"2022-10-01\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-11-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_1e14787fe8034309a0f32ce912c5ba94\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"currency\": \"USD\",\n \"id\": \"rate_0b7ea07ad5a640959bba6d53e371ec24\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"currency\": \"USD\",\n \"id\": \"rate_55748d56f693431ea8f2efcd9c3a2c13\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"currency\": \"USD\",\n \"id\": \"rate_39a96118395345b4883d58ef48e67f5c\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"currency\": \"USD\",\n \"id\": \"rate_b6f558ddb4884f5cb2afe2fcaa1354ac\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545626\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_da2ca963515811ed89ffac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:58 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_da2ebd18515811edab2aac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:58 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"currency\": \"USD\",\n \"id\": \"rate_b6f558ddb4884f5cb2afe2fcaa1354ac\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:58 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_da2ca963515811ed89ffac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:58 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:58 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzdiYmJlODA4ZjkyODRiNmI5N2M2OGNhMDlmZjU5OWEy\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545626\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_7bbbe808f9284b6b97c68ca09ff599a2\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:58 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_da2ebd18515811edab2aac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n },\n \"id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:55:58 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_8c700cabcca54696bd0f7a3269311619\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/f76c54dd12974d48a8945e8ec61d6e68.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:58 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:58 AM\"\n },\n \"min_datetime\": \"2022-11-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -115,7 +114,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:13:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7db704aa40d211ed95d2ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:13:51Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:52Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:13:52Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_c4a5b4235d224244a8fd15e2b13e23c6\",\n \"pickup_id\": \"pickup_8534f344186e40bbb9551bdbc4ed7105\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:13:51Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_8534f344186e40bbb9551bdbc4ed7105\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:59+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_db130f15515811edaa29ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:59Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:59Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:59Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_5673dacc15f048f0908eaa3529665d48\",\n \"pickup_id\": \"pickup_0ff27fa7e4604f1aaee24a51c59c5301\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:59Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_0ff27fa7e4604f1aaee24a51c59c5301\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -128,7 +127,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -148,6 +147,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -155,27 +157,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7a633707afe0ed1c64000c6cb8" + "352b943a6352c10fe0d9d59a0011dfc3" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", + "intlb1wdc 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.883800" + "0.692799" ], "etag": [ - "W/\"9637b6ea81bd0e2e68e59f60527a4ee5\"" + "W/\"e0dc22b18b2ea76715a3b121deee77df\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -185,9 +187,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1116 + "duration": 975 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/lowest_rate.json b/src/test/cassettes/pickup/lowest_rate.json index 31290d313..ac7e27c84 100644 --- a/src/test/cassettes/pickup/lowest_rate.json +++ b/src/test/cassettes/pickup/lowest_rate.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1664550780, + "recordedAt": 1666367749, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:12:59Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:13:00Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:13:00Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:13:00Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c942f09034da4ba195e121c19e062f28\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:13:00Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"tracking_code\": \"9400100109361140305759\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzk0MDUyOTI4MGI0NzRkMzFiZDFiZTg4ZTFjNzU4MTY4\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:00Z\",\n \"signed_by\": null,\n \"id\": \"trk_940529280b474d31bd1be88e1c758168\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:12:59+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ed808b940d211ed9bcfac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:12:59+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ed808b940d211ed9bcfac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:13:00Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/5fb0a9bd9ade4b76b95dd75ea68af81a.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:13:00Z\",\n \"id\": \"pl_f1e52a4cb42847ddbe259728a93e5e01\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:13:00Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:12:59Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:12:59Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_6603b3e280fa48e9aef7b04bd2ccfa71\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:12:59+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:12:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ed550e140d211edbfc5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:12:59Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:59Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c942f09034da4ba195e121c19e062f28\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:12:59Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:59Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_98d9c51441b542f38e09840fb30c2265\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:12:59Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:59Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_85f50afa07e740fdb96da2377b087e54\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:12:59Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:59Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cb24686e543049e792dd0a4bce35a237\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:12:59+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:12:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ed550e140d211edbfc5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305759\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:55:47Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ca22109eb94545f68ffa714f2226fa97\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"tracking_code\": \"9400100106068144545589\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzcwMmQ1ZDY0NjkwNTQwMDk5YjEzZmRjOWFlYTA0ZGQw\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"signed_by\": null,\n \"id\": \"trk_702d5d64690540099b13fdc9aea04dd0\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d44e2eec515811edaa07ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d44e2eec515811edaa07ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/6dd731cc250b4d198bdecbbf23b2a22e.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"id\": \"pl_d5f458aee2074af4aae91555b562e52d\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:55:48Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:55:47Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:55:47Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_4616591c934d4d6bb091c9e98f1ef8c7\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:47+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d44bcabc515811edafcbac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ca22109eb94545f68ffa714f2226fa97\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_dbca706d7c944d789275c224ba68124e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_9a5bbda7f1b546dda1848809473d326f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0014304672b443a29fa6bf6a6220f1c4\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:47+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d44bcabc515811edafcbac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545589\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,7 +58,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7c6337077be0ed1bc5000c5d69" + "352b943d6352c103e0d9d55e0011dc34" ], "x-proxied": [ "extlb4wdc 29913d444b", @@ -69,19 +69,19 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.092995" + "1.072394" ], "etag": [ - "W/\"1dbc362fcf9d12e152a4b6afa11af00c\"" + "W/\"f8be98dba2dd56788a7060df64053d74\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_58f32c27b59c4d9fa060d465587069b1" + "/api/v2/shipments/shp_8a8edae167e4448894aa6bbc8abea017" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -91,15 +91,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1337 + "duration": 1436 }, { - "recordedAt": 1664550781, + "recordedAt": 1666367750, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-10-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_6603b3e280fa48e9aef7b04bd2ccfa71\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"currency\": \"USD\",\n \"id\": \"rate_c942f09034da4ba195e121c19e062f28\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"currency\": \"USD\",\n \"id\": \"rate_98d9c51441b542f38e09840fb30c2265\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"currency\": \"USD\",\n \"id\": \"rate_85f50afa07e740fdb96da2377b087e54\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"currency\": \"USD\",\n \"id\": \"rate_cb24686e543049e792dd0a4bce35a237\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140305759\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ed550e140d211edbfc5ac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ed808b940d211ed9bcfac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:13:00 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"currency\": \"USD\",\n \"id\": \"rate_c942f09034da4ba195e121c19e062f28\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:13:00 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ed550e140d211edbfc5ac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140305759\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:13:00 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzk0MDUyOTI4MGI0NzRkMzFiZDFiZTg4ZTFjNzU4MTY4\",\n \"id\": \"trk_940529280b474d31bd1be88e1c758168\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:00 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:59 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ed808b940d211ed9bcfac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:59 AM\"\n },\n \"id\": \"shp_58f32c27b59c4d9fa060d465587069b1\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:13:00 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_f1e52a4cb42847ddbe259728a93e5e01\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/5fb0a9bd9ade4b76b95dd75ea68af81a.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:00 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:13:00 AM\"\n },\n \"min_datetime\": \"2022-10-01\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-11-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:47 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_4616591c934d4d6bb091c9e98f1ef8c7\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:47 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"currency\": \"USD\",\n \"id\": \"rate_ca22109eb94545f68ffa714f2226fa97\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"currency\": \"USD\",\n \"id\": \"rate_dbca706d7c944d789275c224ba68124e\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"currency\": \"USD\",\n \"id\": \"rate_9a5bbda7f1b546dda1848809473d326f\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"currency\": \"USD\",\n \"id\": \"rate_0014304672b443a29fa6bf6a6220f1c4\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545589\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:47 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d44bcabc515811edafcbac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:47 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d44e2eec515811edaa07ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:47 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"currency\": \"USD\",\n \"id\": \"rate_ca22109eb94545f68ffa714f2226fa97\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:47 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:47 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d44bcabc515811edafcbac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzcwMmQ1ZDY0NjkwNTQwMDk5YjEzZmRjOWFlYTA0ZGQw\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545589\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_702d5d64690540099b13fdc9aea04dd0\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:47 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d44e2eec515811edaa07ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:47 AM\"\n },\n \"id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_d5f458aee2074af4aae91555b562e52d\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/6dd731cc250b4d198bdecbbf23b2a22e.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n \"min_datetime\": \"2022-11-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -115,7 +114,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:13:01+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:13:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5fb19cb040d211eda045ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:13:01Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:13:01Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:13:01Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_65ce6c894e8d4ec8b6b5b8354d23e33b\",\n \"pickup_id\": \"pickup_2afbb42dec774ba084ea16f16710bb12\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:13:01Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_2afbb42dec774ba084ea16f16710bb12\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d5453c06515811eda836ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:49Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:50Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:50Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_eb9637b6eef14548bbd6661d20f887c4\",\n \"pickup_id\": \"pickup_2d0907b2b823406eb08e8cd65f5a0f74\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:49Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_2d0907b2b823406eb08e8cd65f5a0f74\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -128,7 +127,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -148,6 +147,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -155,27 +157,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7d6337077ce0ed1bc8000c5dc6" + "352b94366352c105e0d9d5610011dcc3" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", - "intlb2nuq 29913d444b" + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.794381" + "0.872295" ], "etag": [ - "W/\"3097585ebc5d83aaf6b67afe3108b552\"" + "W/\"4c87760ea4fe1bc98294d41633f5c5e6\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -185,9 +187,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1103 + "duration": 1242 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/retrieve.json b/src/test/cassettes/pickup/retrieve.json index 007b899f5..d87aff0ed 100644 --- a/src/test/cassettes/pickup/retrieve.json +++ b/src/test/cassettes/pickup/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1664550777, + "recordedAt": 1666367745, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:12:57Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cc2291e04106440ca131953ca56ce2fb\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:12:57Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"tracking_code\": \"9400100109361140305711\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzljMGM4MDUyN2U2MDQ0MzhhNWY1MzRhYzcwYTcxMDdh\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:12:57Z\",\n \"signed_by\": null,\n \"id\": \"trk_9c0c80527e604438a5f534ac70a7107a\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:12:56+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ce71bb340d211ed9170ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:12:56+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ce71bb340d211ed9170ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/ce484c85893c43b793a7263e2b6a5152.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:12:57Z\",\n \"id\": \"pl_dd98ea44c50644e1af93b0cfffa66992\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:12:56Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_9b12689b81cf488ea76f10deb9c88bb9\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:12:56+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:12:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ce5477c40d211ed8211ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_cca4826787e34432970790efec4c06e6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1547faebeab34180bd3f1229cfb15e1d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b813a73ec0314475b56a545a6bb1d41c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:12:56Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:12:56Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cc2291e04106440ca131953ca56ce2fb\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:12:56+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:12:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ce5477c40d211ed8211ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305711\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:55:45Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:44Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_71b8bc56de514f1ca4f7aca244b46fc4\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:55:45Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"tracking_code\": \"9400100106068144545572\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE1NGJlZGY3NGU0ZDQwYWJhMGFmNWMwNWM4Y2VlNDE3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:45Z\",\n \"signed_by\": null,\n \"id\": \"trk_154bedf74e4d40aba0af5c05c8cee417\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:44+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d230b6ec515811ed8718ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:44+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d230b6ec515811ed8718ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/3c028994e8ec4739b4ae5e146be7d0e7.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:55:45Z\",\n \"id\": \"pl_ce31f4fcef0b430a8875259d39dd5e50\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:55:44Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:55:44Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_99b5394a67994a71ae9e126668dd17b5\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:44+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d22ed6c5515811eda6d7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:44Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_c5c80f3721c24179a6802e85bb533566\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:44Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_71b8bc56de514f1ca4f7aca244b46fc4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:44Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2f28c98f45f945acb9c0088f2fd99f4b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:44Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0bd35ba510c7485ebd04c067fcf3f087\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:44+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d22ed6c5515811eda6d7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545572\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,7 +58,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c8063370778e0ed1bc0000c5c8d" + "352b94366352c100e0d9d5590011daf1" ], "x-proxied": [ "extlb4wdc 29913d444b", @@ -69,19 +69,19 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.995219" + "1.107778" ], "etag": [ - "W/\"fe0ef51849c8044870191f076d951035\"" + "W/\"603dcaaf698d8ba0ed23f7e944b5c1be\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_a678527b3e89494eb805b8631cbe0f6c" + "/api/v2/shipments/shp_c8f0fce2487a4529bb54eb6c9b3bd403" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -91,15 +91,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1225 + "duration": 1588 }, { - "recordedAt": 1664550778, + "recordedAt": 1666367746, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-10-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_9b12689b81cf488ea76f10deb9c88bb9\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"currency\": \"USD\",\n \"id\": \"rate_cca4826787e34432970790efec4c06e6\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"currency\": \"USD\",\n \"id\": \"rate_1547faebeab34180bd3f1229cfb15e1d\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"currency\": \"USD\",\n \"id\": \"rate_b813a73ec0314475b56a545a6bb1d41c\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"currency\": \"USD\",\n \"id\": \"rate_cc2291e04106440ca131953ca56ce2fb\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140305711\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ce5477c40d211ed8211ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ce71bb340d211ed9170ac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"currency\": \"USD\",\n \"id\": \"rate_cc2291e04106440ca131953ca56ce2fb\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5ce5477c40d211ed8211ac1f6bc72124\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140305711\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:57 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzljMGM4MDUyN2U2MDQ0MzhhNWY1MzRhYzcwYTcxMDdh\",\n \"id\": \"trk_9c0c80527e604438a5f534ac70a7107a\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:57 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ce71bb340d211ed9170ac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:56 AM\"\n },\n \"id\": \"shp_a678527b3e89494eb805b8631cbe0f6c\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:12:56 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_dd98ea44c50644e1af93b0cfffa66992\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/ce484c85893c43b793a7263e2b6a5152.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:57 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:12:57 AM\"\n },\n \"min_datetime\": \"2022-10-01\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-11-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_99b5394a67994a71ae9e126668dd17b5\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"currency\": \"USD\",\n \"id\": \"rate_c5c80f3721c24179a6802e85bb533566\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"currency\": \"USD\",\n \"id\": \"rate_71b8bc56de514f1ca4f7aca244b46fc4\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"currency\": \"USD\",\n \"id\": \"rate_2f28c98f45f945acb9c0088f2fd99f4b\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"currency\": \"USD\",\n \"id\": \"rate_0bd35ba510c7485ebd04c067fcf3f087\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545572\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d22ed6c5515811eda6d7ac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d230b6ec515811ed8718ac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"currency\": \"USD\",\n \"id\": \"rate_71b8bc56de514f1ca4f7aca244b46fc4\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d22ed6c5515811eda6d7ac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:45 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzE1NGJlZGY3NGU0ZDQwYWJhMGFmNWMwNWM4Y2VlNDE3\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545572\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_154bedf74e4d40aba0af5c05c8cee417\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:45 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d230b6ec515811ed8718ac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n \"id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_ce31f4fcef0b430a8875259d39dd5e50\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/3c028994e8ec4739b4ae5e146be7d0e7.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:45 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:45 AM\"\n },\n \"min_datetime\": \"2022-11-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -115,7 +114,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:12:57+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5db2855040d211ed8652ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:12:57Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:12:58Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:12:58Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_719a0cb2487c43a78f3cea087a8ec6d0\",\n \"pickup_id\": \"pickup_4eaa528b607d4c85bd3b3f7602ef453f\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:12:57Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_4eaa528b607d4c85bd3b3f7602ef453f\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:46+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:46+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d33a4ca5515811edaf5aac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:46Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:46Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:46Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_15e6d4a314fc483c87b9c4ae44f2cde4\",\n \"pickup_id\": \"pickup_e4b0c0e7991b4e529b20fbd694360d58\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:46Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_e4b0c0e7991b4e529b20fbd694360d58\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -128,7 +127,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -155,27 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7e63370779e0ed1bc2000c5cea" + "352b943c6352c101e0d9d55b0011db88" ], "x-proxied": [ "extlb4wdc 29913d444b", "intlb2wdc 29913d444b", - "intlb1nuq 29913d444b" + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.018854" + "0.799467" ], "etag": [ - "W/\"50dbb35161887777409178d828d6951a\"" + "W/\"cb1a0f8a513ba59b0216fe1b49ff64ac\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -185,13 +184,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1306 + "duration": 1160 }, { - "recordedAt": 1664550779, + "recordedAt": 1666367747, "request": { "body": "", "method": "GET", @@ -203,10 +201,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_4eaa528b607d4c85bd3b3f7602ef453f" + "uri": "https://api.easypost.com/v2/pickups/pickup_e4b0c0e7991b4e529b20fbd694360d58" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:12:57+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:12:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5db2855040d211ed8652ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-10-01T00:00:00Z\",\n \"created_at\": \"2022-09-30T15:12:57Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:12:58Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-09-30T15:12:58Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_719a0cb2487c43a78f3cea087a8ec6d0\",\n \"pickup_id\": \"pickup_4eaa528b607d4c85bd3b3f7602ef453f\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-10-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-09-30T15:12:57Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_4eaa528b607d4c85bd3b3f7602ef453f\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:46+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:46+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d33a4ca5515811edaf5aac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:46Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:46Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:46Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_15e6d4a314fc483c87b9c4ae44f2cde4\",\n \"pickup_id\": \"pickup_e4b0c0e7991b4e529b20fbd694360d58\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:46Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_e4b0c0e7991b4e529b20fbd694360d58\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -219,7 +217,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -246,7 +244,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7b6337077ae0ed1bc3000c5d3e" + "352b943a6352c103e0d9d55c0011dbf1" ], "x-proxied": [ "extlb4wdc 29913d444b", @@ -257,16 +255,16 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.139924" + "0.076810" ], "etag": [ - "W/\"50dbb35161887777409178d828d6951a\"" + "W/\"cb1a0f8a513ba59b0216fe1b49ff64ac\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -276,9 +274,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/pickups/pickup_4eaa528b607d4c85bd3b3f7602ef453f" + "uri": "https://api.easypost.com/v2/pickups/pickup_e4b0c0e7991b4e529b20fbd694360d58" }, - "duration": 378 + "duration": 363 } ] \ No newline at end of file diff --git a/src/test/cassettes/scan_form/all.json b/src/test/cassettes/scan_form/all.json index d2d2482c8..e5ea21701 100644 --- a/src/test/cassettes/scan_form/all.json +++ b/src/test/cassettes/scan_form/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456461, + "recordedAt": 1666367632, "request": { "body": "", "method": "GET", @@ -15,20 +15,20 @@ "uri": "https://api.easypost.com/v2/scan_forms?page_size\u003d5" }, "response": { - "body": "{\n \"has_more\": true,\n \"scan_forms\": [\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T18:58:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T18:58:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_e2b9f99424a711ed9dc2ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-08-25T18:58:30Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220825/2fb283c1107b44f78b18698f9cd9f274.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_2e858da624b84bbc97f10cda71621845\",\n \"created_at\": \"2022-08-25T18:58:30Z\",\n \"id\": \"sf_76d6b807dee74bbfa57d4adb5002813d\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361134988753\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n },\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T18:58:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T18:58:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_df22357724a711eda40fac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-08-25T18:58:15Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220825/7872c2ad5f914fa7b0eb589c6dbb62a2.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_541e5d60eeff4b258fe2b1e5e0db4105\",\n \"created_at\": \"2022-08-25T18:58:15Z\",\n \"id\": \"sf_75e733fd635446969701d455892ba3bf\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361134988692\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n },\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T18:58:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T18:58:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_dd95f8f024a711ed95fbac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-08-25T18:58:13Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220825/7262b445e26b4e03b88f11ecf332da58.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_9522f56611f745eda20a5a12463ab2a4\",\n \"created_at\": \"2022-08-25T18:58:13Z\",\n \"id\": \"sf_714f45da4969408180d43e7eaff1a352\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361134988647\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n },\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T18:51:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T18:51:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_eca9f78124a611edb0baac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-08-25T18:51:37Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220825/4cdc967c3f174e9b8badd5f2dc65f6e9.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_1e16c86e87194ecab60b06c7e1e749b9\",\n \"created_at\": \"2022-08-25T18:51:37Z\",\n \"id\": \"sf_90cd5e716e16404e9082998749c16d33\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361134985707\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n },\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T18:51:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T18:51:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_e839e59e24a611ed8490ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-08-25T18:51:21Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220825/7fc95f58bdcf4a709cf77a757d61bb85.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_c892eeb89c0149ce9e4b35c9b44a98a9\",\n \"created_at\": \"2022-08-25T18:51:21Z\",\n \"id\": \"sf_8e58f3cf3674477ba12f762c2e1d2cdf\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361134985639\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n }\n ]\n}", + "body": "{\n \"has_more\": false,\n \"scan_forms\": [\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-09-30T15:10:29Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220930/919c06cc1c4f4a219c71cb31068fc844.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_04635f2ee5b8411cad432a7f7a40f8fd\",\n \"created_at\": \"2022-09-30T15:10:29Z\",\n \"id\": \"sf_ac482d5fa7094688be81bfb2992c4367\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361140305025\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n },\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:30+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05ebac6040d211eda401ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-09-30T15:10:32Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220930/13873b6db72a44e1b963b940ee90063e.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_1243b4048eb34e2b87c61130092bbb35\",\n \"created_at\": \"2022-09-30T15:10:31Z\",\n \"id\": \"sf_b5e896aa86cb4a5ba64438e94cb68c4c\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361140305032\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "4552" + "1841" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,27 +55,26 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "237d6d7f6307d04df7b8d29100073798" + "a4cf67b16352c090e0d9cd5e001245ee" ], "x-proxied": [ - "extlb3wdc 9ce216bfac", - "intlb1wdc 6aa9972c1e", - "intlb1nuq 6aa9972c1e" + "extlb2nuq 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.047298" + "0.094510" ], "etag": [ - "W/\"e1ef26ebf8a713c16291b731625f3e70\"" + "W/\"edc117a7c9bf066c5df416c358422beb\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -85,9 +84,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/scan_forms?page_size\u003d5" }, - "duration": 692 + "duration": 489 } ] \ No newline at end of file diff --git a/src/test/cassettes/scan_form/create.json b/src/test/cassettes/scan_form/create.json index 04d2ad387..97c2e0cba 100644 --- a/src/test/cassettes/scan_form/create.json +++ b/src/test/cassettes/scan_form/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1664550631, + "recordedAt": 1666367637, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:30Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:31Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:31Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_acc698d319ad419c88d067db879a67b9\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:10:31Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"tracking_code\": \"9400100109361140305032\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2RmZmY2MjIwNTUxZTQ4MzZhMjJjYWQ4MzUwMmVlYTBj\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:10:31Z\",\n \"signed_by\": null,\n \"id\": \"trk_dfff6220551e4836a22cad83502eea0c\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:30+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05ebac6040d211eda401ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:30+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05ebac6040d211eda401ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:10:31Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/d73ddbad7ada45f193d19b89aefc1d81.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:10:31Z\",\n \"id\": \"pl_f05066e9dcf54b7fbf3e38985539f826\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:10:31Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:30Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:30Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_2c9a7c36b04f423daf0835004de01611\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:10:30+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:10:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_05ea243a40d211ed8b69ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:30Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:30Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_d24de80d99ef4dc4aac8dd6d6edfca54\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:30Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:30Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_eba2b662f5214c2faca0d383ea0ae7ba\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:30Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:30Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7b88b5db346e446ab0342fba250ffef0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:30Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_acc698d319ad419c88d067db879a67b9\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:10:30+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:10:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_05ea243a40d211ed8b69ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305032\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:53:56Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:53:57Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:53:57Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:57Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a6ee5af447bb4a95a1db5f8eac926aa4\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:53:57Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"tracking_code\": \"9400100106068144545275\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzYxOTYxM2NkMWQ4MzRmNzA4YTIwZTFkNzNlNDNmN2Mz\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:53:57Z\",\n \"signed_by\": null,\n \"id\": \"trk_619613cd1d834f708a20e1d73e43f7c3\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:56+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_91ce672c515811ed97a6ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:56+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_91ce672c515811ed97a6ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:53:57Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/f59832ccbd104baa8ec7b78cb7f562f9.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:53:57Z\",\n \"id\": \"pl_3d7489e55ded4bc78fc8233cfa0783d6\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:53:57Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:53:56Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:53:56Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_67a75636b8164ea3a1be7cfefc4eda58\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:53:56+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:53:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_91cbf5dd515811ed97a4ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:53:56Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:56Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_6a85e63dfc5c4976bc85d886d8afa36f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:53:56Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:56Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_eb11c33e7a9440c19b12c7c3f0dc4375\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:53:56Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:56Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3b7d816779be4970b16ca5da0d95b9ae\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:53:56Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:56Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a6ee5af447bb4a95a1db5f8eac926aa4\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:53:56+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:53:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_91cbf5dd515811ed97a4ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545275\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,30 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7a633706e6e0ed1786000c3129" + "107f19436352c094e0d9cd7d00102b20" ], "x-proxied": [ - "extlb4wdc 29913d444b", + "extlb3wdc 29913d444b", "intlb1wdc 29913d444b", - "intlb2nuq 29913d444b" + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.067454" + "1.193781" ], "etag": [ - "W/\"b3eb40c33b870d2199f46507bbff8129\"" + "W/\"6e4b2e3f7fb5eb129971e4d50baaf95b\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_4402bd1506c5433cac792f54db166a26" + "/api/v2/shipments/shp_f2f59ecd324c46d0b8b0c4369fa00a76" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -91,15 +91,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1334 + "duration": 1502 }, { - "recordedAt": 1664550632, + "recordedAt": 1666367638, "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_2c9a7c36b04f423daf0835004de01611\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"currency\": \"USD\",\n \"id\": \"rate_d24de80d99ef4dc4aac8dd6d6edfca54\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"currency\": \"USD\",\n \"id\": \"rate_eba2b662f5214c2faca0d383ea0ae7ba\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"currency\": \"USD\",\n \"id\": \"rate_7b88b5db346e446ab0342fba250ffef0\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"currency\": \"USD\",\n \"id\": \"rate_acc698d319ad419c88d067db879a67b9\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140305032\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_05ea243a40d211ed8b69ac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05ebac6040d211eda401ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:31 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"currency\": \"USD\",\n \"id\": \"rate_acc698d319ad419c88d067db879a67b9\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:31 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_05ea243a40d211ed8b69ac1f6bc7b362\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140305032\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:31 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2RmZmY2MjIwNTUxZTQ4MzZhMjJjYWQ4MzUwMmVlYTBj\",\n \"id\": \"trk_dfff6220551e4836a22cad83502eea0c\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:31 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:30 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05ebac6040d211eda401ac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:30 AM\"\n },\n \"id\": \"shp_4402bd1506c5433cac792f54db166a26\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:31 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_f05066e9dcf54b7fbf3e38985539f826\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/d73ddbad7ada45f193d19b89aefc1d81.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:31 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:31 AM\"\n }\n ]\n}", + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_67a75636b8164ea3a1be7cfefc4eda58\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"currency\": \"USD\",\n \"id\": \"rate_6a85e63dfc5c4976bc85d886d8afa36f\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"currency\": \"USD\",\n \"id\": \"rate_eb11c33e7a9440c19b12c7c3f0dc4375\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"currency\": \"USD\",\n \"id\": \"rate_3b7d816779be4970b16ca5da0d95b9ae\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"currency\": \"USD\",\n \"id\": \"rate_a6ee5af447bb4a95a1db5f8eac926aa4\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545275\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_91cbf5dd515811ed97a4ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_91ce672c515811ed97a6ac1f6bc7b362\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:57 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"currency\": \"USD\",\n \"id\": \"rate_a6ee5af447bb4a95a1db5f8eac926aa4\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:53:57 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_91cbf5dd515811ed97a4ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:57 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzYxOTYxM2NkMWQ4MzRmNzA4YTIwZTFkNzNlNDNmN2Mz\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545275\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_619613cd1d834f708a20e1d73e43f7c3\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:57 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_91ce672c515811ed97a6ac1f6bc7b362\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n \"id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:53:57 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_3d7489e55ded4bc78fc8233cfa0783d6\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/f59832ccbd104baa8ec7b78cb7f562f9.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:57 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:57 AM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -115,7 +114,7 @@ "uri": "https://api.easypost.com/v2/scan_forms" }, "response": { - "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:30+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05ebac6040d211eda401ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-09-30T15:10:32Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220930/13873b6db72a44e1b963b940ee90063e.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_1243b4048eb34e2b87c61130092bbb35\",\n \"created_at\": \"2022-09-30T15:10:31Z\",\n \"id\": \"sf_b5e896aa86cb4a5ba64438e94cb68c4c\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361140305032\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", + "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:56+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_91ce672c515811ed97a6ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-10-21T15:53:58Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221021/41b631c176ed4884a08d6fbd8dff6b22.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_ecdcbd4c812c4912bdaba9f3da5671b8\",\n \"created_at\": \"2022-10-21T15:53:58Z\",\n \"id\": \"sf_4d29a8e1422f43a1a58b0c3f22d21ec6\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068144545275\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", "httpVersion": null, "headers": { "null": [ @@ -128,7 +127,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -155,27 +154,26 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7a633706e7e0ed179f000c31a0" + "8424afb56352c096e0d9cd7f0011bd18" ], "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb1nuq 29913d444b" + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.254032" + "0.235697" ], "etag": [ - "W/\"44a5cfffeaa5b8bc324da90718c821ac\"" + "W/\"e4d53bedeef982d95bc44f35060f2659\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -185,9 +183,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/scan_forms" }, - "duration": 507 + "duration": 587 } ] \ No newline at end of file diff --git a/src/test/cassettes/scan_form/retrieve.json b/src/test/cassettes/scan_form/retrieve.json index d5ef2b857..6c6e81af0 100644 --- a/src/test/cassettes/scan_form/retrieve.json +++ b/src/test/cassettes/scan_form/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1664550629, + "recordedAt": 1666367634, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:27Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_51293222b1ea4a47ada4c82d52e8e97f\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:10:29Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"tracking_code\": \"9400100109361140305025\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzI2ZmM4NzZlODQxMTRhMzc4YjIwYTdlNzk5YjhmMTg4\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:10:29Z\",\n \"signed_by\": null,\n \"id\": \"trk_26fc876e84114a378b20a7e799b8f188\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:10:28Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/b4105633849e479690f21aa4531a57cd.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"id\": \"pl_8895b546d4b74378b619b4a20d10130c\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:10:28Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:27Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:27Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_09c8436d6182492f889fb197df8fe933\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:10:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0451b26c40d211ed9b6fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_51293222b1ea4a47ada4c82d52e8e97f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:28Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_87c8fcbfe4ba40f789d7db646b2ad702\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:28Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_629b175efb4349faaf80168035952b87\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:28Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_097d1066e51144a19d5ab2b0c5119801\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-09-30T15:10:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0451b26c40d211ed9b6fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305025\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:53:54Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:53Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0a1dd7531aa448399a480fa5eb8e649f\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:53:54Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"tracking_code\": \"9400100106068144545244\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzRkM2M4YWU5N2NkYzQ4ODRhZjY5Yzk2MjJjYmQ2OGM2\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:53:54Z\",\n \"signed_by\": null,\n \"id\": \"trk_4d3c8ae97cdc4884af69c9622cbd68c6\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_8fee0ee1515811edaeebac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_8fee0ee1515811edaeebac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e3ab4c62cf9541a8bb26462d04d70c67.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:53:54Z\",\n \"id\": \"pl_5ba088a123f34ea3a6f03f833a0cfd6b\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:53:53Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:53:53Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_2a9fbb2691934b668970db030592d514\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:53:53+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:53:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_8fec1180515811ed9707ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:53Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_69426510d95149cfa5a1f330847818a4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:53Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0a1dd7531aa448399a480fa5eb8e649f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:53Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f1e4a51dbe874a4e9d07070ba6affb2e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:53Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b045ad0cdfe94974b172599ad917668d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:53:53+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:53:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_8fec1180515811ed9707ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545244\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,6 +51,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -58,30 +61,29 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7f633706e3e0ed1781000c3078" + "a4cf67b06352c091e0d9cd6000124627" ], "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", + "extlb2nuq 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.334265" + "1.129061" ], "etag": [ - "W/\"71ca0f7b8c9bc0f78e5b3773d38293a5\"" + "W/\"2d2244bb8c5614b15ef49b0cbfa6c14a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_06b8f9744987412fa6f096cbef73112d" + "/api/v2/shipments/shp_490363d57c5d46e898a6f8133534ea6b" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -91,15 +93,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1567 + "duration": 1407 }, { - "recordedAt": 1664550629, + "recordedAt": 1666367635, "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:27 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_09c8436d6182492f889fb197df8fe933\",\n \"height\": 4.0,\n \"updatedAt\": \"Sep 30, 2022, 11:10:27 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.57,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:28 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"currency\": \"USD\",\n \"id\": \"rate_51293222b1ea4a47ada4c82d52e8e97f\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.5,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:28 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.5,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"currency\": \"USD\",\n \"id\": \"rate_87c8fcbfe4ba40f789d7db646b2ad702\",\n \"retailRate\": 33.55,\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 7.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:28 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.75,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"currency\": \"USD\",\n \"id\": \"rate_629b175efb4349faaf80168035952b87\",\n \"retailRate\": 7.75,\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 7.9,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:28 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"currency\": \"USD\",\n \"id\": \"rate_097d1066e51144a19d5ab2b0c5119801\",\n \"retailRate\": 9.45,\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n }\n ],\n \"trackingCode\": \"9400100109361140305025\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:27 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0451b26c40d211ed9b6fac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:27 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:27 AM\"\n },\n \"mode\": \"test\",\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:28 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"currency\": \"USD\",\n \"id\": \"rate_51293222b1ea4a47ada4c82d52e8e97f\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n \"createdAt\": \"Sep 30, 2022, 11:10:27 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:27 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0451b26c40d211ed9b6fac1f6b0a0d1e\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n \"tracker\": {\n \"fees\": [],\n \"weight\": 0.0,\n \"trackingCode\": \"9400100109361140305025\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:29 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzI2ZmM4NzZlODQxMTRhMzc4YjIwYTdlNzk5YjhmMTg4\",\n \"id\": \"trk_26fc876e84114a378b20a7e799b8f188\",\n \"trackingDetails\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:29 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Sep 30, 2022, 11:10:27 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:27 AM\"\n },\n \"id\": \"shp_06b8f9744987412fa6f096cbef73112d\",\n \"postageLabel\": {\n \"createdAt\": \"Sep 30, 2022, 11:10:28 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_8895b546d4b74378b619b4a20d10130c\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/b4105633849e479690f21aa4531a57cd.png\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Sep 30, 2022, 11:10:28 AM\"\n }\n ]\n}", + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_2a9fbb2691934b668970db030592d514\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"currency\": \"USD\",\n \"id\": \"rate_69426510d95149cfa5a1f330847818a4\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"currency\": \"USD\",\n \"id\": \"rate_0a1dd7531aa448399a480fa5eb8e649f\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"currency\": \"USD\",\n \"id\": \"rate_f1e4a51dbe874a4e9d07070ba6affb2e\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"currency\": \"USD\",\n \"id\": \"rate_b045ad0cdfe94974b172599ad917668d\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545244\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_8fec1180515811ed9707ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_8fee0ee1515811edaeebac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"currency\": \"USD\",\n \"id\": \"rate_0a1dd7531aa448399a480fa5eb8e649f\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_8fec1180515811ed9707ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:54 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzRkM2M4YWU5N2NkYzQ4ODRhZjY5Yzk2MjJjYmQ2OGM2\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545244\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_4d3c8ae97cdc4884af69c9622cbd68c6\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:54 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_8fee0ee1515811edaeebac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n \"id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_5ba088a123f34ea3a6f03f833a0cfd6b\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e3ab4c62cf9541a8bb26462d04d70c67.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:54 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:54 AM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -115,7 +116,7 @@ "uri": "https://api.easypost.com/v2/scan_forms" }, "response": { - "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-09-30T15:10:29Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220930/919c06cc1c4f4a219c71cb31068fc844.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_04635f2ee5b8411cad432a7f7a40f8fd\",\n \"created_at\": \"2022-09-30T15:10:29Z\",\n \"id\": \"sf_ac482d5fa7094688be81bfb2992c4367\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361140305025\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", + "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_8fee0ee1515811edaeebac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-10-21T15:53:55Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221021/ba7203f479224687b1425b7f241aa766.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_018b11f1d12a4d7d9d1677ba1f090daa\",\n \"created_at\": \"2022-10-21T15:53:55Z\",\n \"id\": \"sf_8c711db6980f49c994d87b2db3d2894d\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068144545244\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", "httpVersion": null, "headers": { "null": [ @@ -128,7 +129,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -155,27 +156,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c80633706e5e0ed1783000c30db" + "352b943b6352c093e0d9cd630011b4a8" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", - "intlb1nuq 29913d444b" + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.272387" + "0.321294" ], "etag": [ - "W/\"41877f3eef5a986e0c08b951165be867\"" + "W/\"d107ac272c26e35849d1cd18245f3d98\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -185,13 +186,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/scan_forms" }, - "duration": 591 + "duration": 615 }, { - "recordedAt": 1664550630, + "recordedAt": 1666367635, "request": { "body": "", "method": "GET", @@ -203,10 +203,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/scan_forms/sf_ac482d5fa7094688be81bfb2992c4367" + "uri": "https://api.easypost.com/v2/scan_forms/sf_8c711db6980f49c994d87b2db3d2894d" }, "response": { - "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-09-30T15:10:29Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220930/919c06cc1c4f4a219c71cb31068fc844.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_04635f2ee5b8411cad432a7f7a40f8fd\",\n \"created_at\": \"2022-09-30T15:10:29Z\",\n \"id\": \"sf_ac482d5fa7094688be81bfb2992c4367\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361140305025\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", + "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_8fee0ee1515811edaeebac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-10-21T15:53:55Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221021/ba7203f479224687b1425b7f241aa766.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_018b11f1d12a4d7d9d1677ba1f090daa\",\n \"created_at\": \"2022-10-21T15:53:55Z\",\n \"id\": \"sf_8c711db6980f49c994d87b2db3d2894d\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068144545244\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", "httpVersion": null, "headers": { "null": [ @@ -219,7 +219,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -239,9 +239,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -249,27 +246,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c80633706e5e0ed1784000c3108" + "107f19426352c093e0d9cd7b00102b00" ], "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", + "extlb3wdc 29913d444b", + "intlb2wdc 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.044340" + "0.026127" ], "etag": [ - "W/\"41877f3eef5a986e0c08b951165be867\"" + "W/\"d107ac272c26e35849d1cd18245f3d98\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -279,9 +276,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/scan_forms/sf_ac482d5fa7094688be81bfb2992c4367" + "uri": "https://api.easypost.com/v2/scan_forms/sf_8c711db6980f49c994d87b2db3d2894d" }, - "duration": 275 + "duration": 316 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy.json b/src/test/cassettes/shipment/buy.json index 1938491da..660d06359 100644 --- a/src/test/cassettes/shipment/buy.json +++ b/src/test/cassettes/shipment/buy.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1664550620, + "recordedAt": 1666369239, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:19Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_ff37487240d111eda944ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_ff37487240d111eda944ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:19Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:19Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_bbaa9c38909a4a3599bd80ad66774024\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ff34d95c40d111ed81deac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5e01714d76a84f67a9f04b41671dbca9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5a10059496ed431fb5b188f9b337f251\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7a1db9041cc945a9a6626810b7e2cf79\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_9a764b7d415f44fa90bf3df02de15280\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ff34d95c40d111ed81deac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:20:38Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4d006928515c11eda6f9ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4d006928515c11eda6f9ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:38Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:20:38Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_fe55efc12e5947d089b74f3dd72f9288\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4ce446ef515c11edac3bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_402ac0d0513b467bb6f3252c52aa0788\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9f45993b64dc41bfb0ceb0a47a6173cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f48ab940d58e438da82883f75996970e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62122d6888fb4462b1433b5ac65aae71\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4ce446ef515c11edac3bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,9 +51,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -61,30 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7f633706dbe0ed1409000c2dcd" + "2c01d7ca6352c6d6e0db87e40001d0bf" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", + "intlb2wdc 29913d444b", "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.870377" + "1.183406" ], "etag": [ - "W/\"e8baf72edd1ef1e341f77c96ed7bf1b3\"" + "W/\"d7f47f239f4bf33f9db4b7640fb5e650\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_d691764c1e294fb8a9977548586209ce" + "/api/v2/shipments/shp_37530e797d3c4eb98dcacc1eea58cf0a" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -94,15 +91,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1109 + "duration": 1470 }, { - "recordedAt": 1664550621, + "recordedAt": 1666369241, "request": { - "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:20 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"currency\": \"USD\",\n \"id\": \"rate_7a1db9041cc945a9a6626810b7e2cf79\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:20 AM\"\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:20:39 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"currency\": \"USD\",\n \"id\": \"rate_62122d6888fb4462b1433b5ac65aae71\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:20:39 PM\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -115,10 +111,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_d691764c1e294fb8a9977548586209ce/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_37530e797d3c4eb98dcacc1eea58cf0a/buy" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:19Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:21Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:21Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:21Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7a1db9041cc945a9a6626810b7e2cf79\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:10:21Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"tracking_code\": \"9400100109361140304998\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2JlNGMwZjNkODEwYTQyMjI5ZjMxMGYxZDhmNGQ2M2Vm\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:10:21Z\",\n \"signed_by\": null,\n \"id\": \"trk_be4c0f3d810a42229f310f1d8f4d63ef\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_ff37487240d111eda944ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_ff37487240d111eda944ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:10:21Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/604962cb96ac473fa58a78f74e28a079.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:10:21Z\",\n \"id\": \"pl_38b924c40acc40979bdf5e8002e2798b\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:10:21Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:19Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:19Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_bbaa9c38909a4a3599bd80ad66774024\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-09-30T15:10:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_ff34d95c40d111ed81deac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5e01714d76a84f67a9f04b41671dbca9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5a10059496ed431fb5b188f9b337f251\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7a1db9041cc945a9a6626810b7e2cf79\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:20Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d691764c1e294fb8a9977548586209ce\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:20Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_9a764b7d415f44fa90bf3df02de15280\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-09-30T15:10:19+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-09-30T15:10:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_ff34d95c40d111ed81deac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140304998\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:20:38Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:20:41Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:40Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62122d6888fb4462b1433b5ac65aae71\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T16:20:41Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"tracking_code\": \"9400100106068144550323\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE4ODE2ZTM5NmM1NDQxOGZiYzI3Mjk5OTZmYTY1YTc1\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T16:20:41Z\",\n \"signed_by\": null,\n \"id\": \"trk_18816e396c54418fbc2729996fa65a75\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4d006928515c11eda6f9ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4d006928515c11eda6f9ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T16:20:40Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/72b29f4d26004c18b99ab45fe30a902e.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T16:20:40Z\",\n \"id\": \"pl_8f9c9b0627b94a29b7de0d0244adc912\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T16:20:40Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:38Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:20:38Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_fe55efc12e5947d089b74f3dd72f9288\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-21T16:20:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_4ce446ef515c11edac3bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_402ac0d0513b467bb6f3252c52aa0788\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9f45993b64dc41bfb0ceb0a47a6173cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f48ab940d58e438da82883f75996970e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62122d6888fb4462b1433b5ac65aae71\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-21T16:20:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_4ce446ef515c11edac3bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144550323\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -131,7 +127,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -158,27 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7d633706dce0ed140b000c2e36" + "2c01d7ca6352c6d8e0db88050001d18a" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb2nuq 29913d444b" + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.309639" + "0.845423" ], "etag": [ - "W/\"18ed900da39c03298a561891648ae11c\"" + "W/\"988eff397cab775df0bd30b0c7a11aa5\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -188,9 +184,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_d691764c1e294fb8a9977548586209ce/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_37530e797d3c4eb98dcacc1eea58cf0a/buy" }, - "duration": 1647 + "duration": 1125 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy_shipment_with_carbon_offset.json b/src/test/cassettes/shipment/buy_shipment_with_carbon_offset.json index 7019d3018..d762459cd 100644 --- a/src/test/cassettes/shipment/buy_shipment_with_carbon_offset.json +++ b/src/test/cassettes/shipment/buy_shipment_with_carbon_offset.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1664550623, + "recordedAt": 1666369246, "request": { "body": "{\n \"shipment\": {\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n },\n \"reference\": \"123\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"options\": {\n \"label_format\": \"PNG\",\n \"invoice_number\": \"123\"\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0120f02e40d211ed8ae6ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0120f02e40d211ed8ae6ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:22Z\",\n \"currency\": null,\n \"id\": \"cstitem_8df864a7da834a6cbdf5733ba4bba799\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-09-30T15:10:22Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_f80205ff80674fca9cebe9f45fcb1106\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:22Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c5514efd58b7418bbe9231022e22b0c5\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_011e663240d211ed8adaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1607f1f595f044afa85152ce4618fa3f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f4bac8a8a5b44435a2225a83ae95ea76\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_6df1866369cd4b2c83cebd03b88ee9f8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c37a382f3ebf40b0a0a7f53df473b4ca\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_011e663240d211ed8adaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_50c83788515c11edad24ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_50c83788515c11edad24ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:45Z\",\n \"currency\": null,\n \"id\": \"cstitem_a0274258642e41c188d77656932aa6d4\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-10-21T16:20:45Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_0465be8f5ea34c3d92caa79d2326ffd0\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:45Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_6a5fbc498ed144d9a17131f5e57f4ced\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_50c5ba12515c11edb131ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c67a97ae2ae643c681ad451889f0a5e8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3b761a91d7c649cb97607d7bc7bab2c5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_784f77a38c154c6f8b8a88fa5fd272e0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_65391832ded3475bb20d47b03b1dd01d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_50c5ba12515c11edb131ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -58,7 +58,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7f633706dee0ed1427000c2ed0" + "2c01d7d06352c6dde0db8b600001d3a4" ], "x-proxied": [ "extlb4wdc 29913d444b", @@ -69,19 +69,19 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.993476" + "1.111804" ], "etag": [ - "W/\"93144b1575fa7aa140eb3e279f4565c6\"" + "W/\"d733a3abe57a14b8ac680ef98da4eeb2\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_5f5eac94aed64f4e8a7e48324ec74fe2" + "/api/v2/shipments/shp_3df1e757d39d4348b385e7090581a1da" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -91,15 +91,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1296 + "duration": 1391 }, { - "recordedAt": 1664550625, + "recordedAt": 1666369248, "request": { - "body": "{\n \"carbon_offset\": true,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.57,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Sep 30, 2022, 11:10:23 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.57,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"currency\": \"USD\",\n \"id\": \"rate_f4bac8a8a5b44435a2225a83ae95ea76\",\n \"retailRate\": 5.57,\n \"updatedAt\": \"Sep 30, 2022, 11:10:23 AM\"\n }\n}", + "body": "{\n \"carbon_offset\": true,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:20:46 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"currency\": \"USD\",\n \"id\": \"rate_784f77a38c154c6f8b8a88fa5fd272e0\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:20:46 PM\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -112,10 +111,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_5f5eac94aed64f4e8a7e48324ec74fe2/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_3df1e757d39d4348b385e7090581a1da/buy" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.11000\",\n \"refunded\": false,\n \"type\": \"CarbonOffsetFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-09-30T15:10:24Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:24Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:24Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f4bac8a8a5b44435a2225a83ae95ea76\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-09-30T15:10:25Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"tracking_code\": \"9400100109361140305018\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzkzNDc3YmRkZGE0ODQxNDY5Nzg0NDA4YThhMTY1ZmY3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-09-30T15:10:25Z\",\n \"signed_by\": null,\n \"id\": \"trk_93477bddda4841469784408a8a165ff7\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0120f02e40d211ed8ae6ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0120f02e40d211ed8ae6ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:22Z\",\n \"currency\": null,\n \"id\": \"cstitem_8df864a7da834a6cbdf5733ba4bba799\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-09-30T15:10:22Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_f80205ff80674fca9cebe9f45fcb1106\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-09-30T15:10:24Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220930/e53fb5850dfa42b08000b4f7454f1575.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-09-30T15:10:24Z\",\n \"id\": \"pl_e3cb4b2f928f4750a746a0f587ab0a78\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-09-30T15:10:24Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-09-30T15:10:22Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-09-30T15:10:22Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c5514efd58b7418bbe9231022e22b0c5\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-09-30T15:10:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_011e663240d211ed8adaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1607f1f595f044afa85152ce4618fa3f\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f4bac8a8a5b44435a2225a83ae95ea76\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_6df1866369cd4b2c83cebd03b88ee9f8\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-09-30T15:10:23Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f5eac94aed64f4e8a7e48324ec74fe2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-09-30T15:10:23Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c37a382f3ebf40b0a0a7f53df473b4ca\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-09-30T15:10:22+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-09-30T15:10:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_011e663240d211ed8adaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361140305018\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.11000\",\n \"refunded\": false,\n \"type\": \"CarbonOffsetFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:20:47Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:47Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:47Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_784f77a38c154c6f8b8a88fa5fd272e0\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T16:20:48Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"tracking_code\": \"9400100106068144550385\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2U2NTEyMTcxN2I1YzQ0NDA4MjY5M2JhOTZkZThkZGVi\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T16:20:48Z\",\n \"signed_by\": null,\n \"id\": \"trk_e65121717b5c444082693ba96de8ddeb\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_50c83788515c11edad24ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_50c83788515c11edad24ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:45Z\",\n \"currency\": null,\n \"id\": \"cstitem_a0274258642e41c188d77656932aa6d4\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-10-21T16:20:45Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_0465be8f5ea34c3d92caa79d2326ffd0\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T16:20:47Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/af0cf58617584e72b0d5e39396fb453c.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T16:20:47Z\",\n \"id\": \"pl_ecfb231a05cb4b17b987273e1c6e5faf\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T16:20:47Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:45Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_6a5fbc498ed144d9a17131f5e57f4ced\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-21T16:20:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_50c5ba12515c11edb131ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c67a97ae2ae643c681ad451889f0a5e8\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3b761a91d7c649cb97607d7bc7bab2c5\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_784f77a38c154c6f8b8a88fa5fd272e0\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_65391832ded3475bb20d47b03b1dd01d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-21T16:20:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_50c5ba12515c11edb131ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144550385\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -128,7 +127,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -155,27 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "1d976c7a633706dfe0ed1429000c2f41" + "2c01d7d06352c6dee0db8b660001d460" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", + "intlb1wdc 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.331613" + "1.273149" ], "etag": [ - "W/\"32e4afdf13ceccc94dbe1de8043aad6a\"" + "W/\"c32772b539a3a2065e161002aade30bd\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209292008-82708ffb20-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -185,9 +184,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_5f5eac94aed64f4e8a7e48324ec74fe2/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_3df1e757d39d4348b385e7090581a1da/buy" }, - "duration": 1624 + "duration": 1557 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json b/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json index 6afbcfe49..ecee20a10 100644 --- a/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json +++ b/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1666236900, + "recordedAt": 1666369241, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/end_shippers" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:35:00+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:35:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_b7ee940fb8f0487fa903360bca8e7237\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T16:20:41+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_182c2866d6c644038561f60c5976b1fa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,9 +51,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -61,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "c499f3b56350c1e4e2cba97c000bf2f4" + "2c01d7ca6352c6d9e0db880d0001d240" ], "x-proxied": [ - "extlb1nuq 29913d444b", - "intlb1nuq 29913d444b" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.046414" + "0.043907" ], "etag": [ - "W/\"a74f9b1462938a044773fde088c2dd03\"" + "W/\"e83041268e713a482a5bb8e060c84642\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210192121-de6c7d8326-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/end_shippers" }, - "duration": 163 + "duration": 332 }, { - "recordedAt": 1666236901, + "recordedAt": 1666369243, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -114,7 +111,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-20T03:35:01+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-20T03:35:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2d7c68ad502811ed9592ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-20T03:35:01+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-20T03:35:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2d7c68ad502811ed9592ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_dd15dd0231a14fa8937de22fc6ed3559\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-20T03:35:00+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-20T03:35:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_2d70dc53502811edb196ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1e1a9a31b5c34ef2bd006e820cc0e940\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_0281edd60b124ed2a67e74762d25524c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9ce44d0d64084d688b46dc0c690df8e7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_15c3b5ef8de14e39898be694e7b476ba\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-20T03:35:00+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-20T03:35:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_2d70dc53502811edb196ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:20:42Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4f19e53a515c11eda7c3ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4f19e53a515c11eda7c3ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:42Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:20:42Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_3a2cac0382cc430eb27dcea645b36b16\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4f176858515c11edb09aac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_664d60a10a2948c5a319e0d6c368c5ab\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_679c2a45b0d5459d8e7b33f812d34b64\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9d0ac84156e844f2afd02eee211f562f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a69b5d73b370454cb021389169cb8e45\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4f176858515c11edb09aac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +124,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,29 +151,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "c499f3b46350c1e4e2cba97e000bf307" + "2c01d7c96352c6dae0db882a0001d275" ], "x-proxied": [ - "extlb1nuq 29913d444b", - "intlb1nuq 29913d444b" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.877876" + "0.876229" ], "etag": [ - "W/\"78528af0495bcc36d8bd191f00a8b265\"" + "W/\"815b81b3cce8c3590d153b332c06fe3b\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_9d75a18436de44dfa8a9413437a2d89c" + "/api/v2/shipments/shp_f3991df6d4874a0091f2778e4deb5db9" ], "x-version-label": [ - "easypost-202210192121-de6c7d8326-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,15 +184,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1004 + "duration": 1156 }, { - "recordedAt": 1666236903, + "recordedAt": 1666369244, "request": { - "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"createdAt\": \"Oct 19, 2022, 9:35:01 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"currency\": \"USD\",\n \"id\": \"rate_15c3b5ef8de14e39898be694e7b476ba\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 19, 2022, 9:35:01 PM\"\n },\n \"end_shipper_id\": \"es_b7ee940fb8f0487fa903360bca8e7237\"\n}", + "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:20:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"currency\": \"USD\",\n \"id\": \"rate_9d0ac84156e844f2afd02eee211f562f\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:20:43 PM\"\n },\n \"end_shipper_id\": \"es_182c2866d6c644038561f60c5976b1fa\"\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -207,10 +204,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_9d75a18436de44dfa8a9413437a2d89c/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_f3991df6d4874a0091f2778e4deb5db9/buy" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-20T03:35:03Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-20T03:35:02Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:02Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_15c3b5ef8de14e39898be694e7b476ba\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-20T03:35:03Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"tracking_code\": \"9400100106068144215659\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzgyNzQ4NTcyMjQyNDQyMGM4ZmU1ZmQ1NjZlOWQ1ZWVi\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-20T03:35:03Z\",\n \"signed_by\": null,\n \"id\": \"trk_827485722424420c8fe5fd566e9d5eeb\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-20T03:35:01+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-20T03:35:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2d7c68ad502811ed9592ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-20T03:35:01+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-20T03:35:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2d7c68ad502811ed9592ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-20T03:35:02Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221020/a8eb91ba96ee4c0f9bb365670c3e1807.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-20T03:35:02Z\",\n \"id\": \"pl_00b44101d4fa4bfb9c5bf725368dca15\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-20T03:35:02Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_dd15dd0231a14fa8937de22fc6ed3559\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-20T03:35:00+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-20T03:35:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_2d70dc53502811edb196ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1e1a9a31b5c34ef2bd006e820cc0e940\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_0281edd60b124ed2a67e74762d25524c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9ce44d0d64084d688b46dc0c690df8e7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-20T03:35:01Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9d75a18436de44dfa8a9413437a2d89c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-20T03:35:01Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_15c3b5ef8de14e39898be694e7b476ba\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-20T03:35:00+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-20T03:35:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_2d70dc53502811edb196ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144215659\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:20:42Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:20:44Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:44Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9d0ac84156e844f2afd02eee211f562f\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T16:20:44Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"tracking_code\": \"9400100106068144550354\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzJiZTgxZWUxN2VkNjQ4MTk4NzAwYjVmY2MwZTQzMWQ0\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T16:20:44Z\",\n \"signed_by\": null,\n \"id\": \"trk_2be81ee17ed648198700b5fcc0e431d4\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4f19e53a515c11eda7c3ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4f19e53a515c11eda7c3ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T16:20:44Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/2fa161927ec54895972e2dd6cc2b410f.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T16:20:44Z\",\n \"id\": \"pl_75da4c41528340029fbf954b6399a5a6\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T16:20:44Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:42Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:20:42Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_3a2cac0382cc430eb27dcea645b36b16\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-21T16:20:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_4f176858515c11edb09aac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_664d60a10a2948c5a319e0d6c368c5ab\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_679c2a45b0d5459d8e7b33f812d34b64\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9d0ac84156e844f2afd02eee211f562f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a69b5d73b370454cb021389169cb8e45\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-21T16:20:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_4f176858515c11edb09aac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144550354\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -223,7 +220,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -250,26 +247,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "c499f3b36350c1e6e2cba980000bf344" + "2c01d7cc6352c6dbe0db8b3e0001d305" ], "x-proxied": [ - "extlb1nuq 29913d444b", - "intlb2nuq 29913d444b" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.088560" + "0.918155" ], "etag": [ - "W/\"8a8d45eb29aad6051bf7f7b32635cc9b\"" + "W/\"50ab82b47e3a371fc9bf7b9b0194d7ef\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210192121-de6c7d8326-master" + "easypost-202210202007-e12f77437d-master" ], "cache-control": [ "private, no-cache, no-store" @@ -279,9 +277,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_9d75a18436de44dfa8a9413437a2d89c/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_f3991df6d4874a0091f2778e4deb5db9/buy" }, - "duration": 1238 + "duration": 1186 } ] \ No newline at end of file diff --git a/src/test/java/com/easypost/EasyPostTest.java b/src/test/java/com/easypost/EasyPostTest.java index 8a824faee..3bb1305cb 100644 --- a/src/test/java/com/easypost/EasyPostTest.java +++ b/src/test/java/com/easypost/EasyPostTest.java @@ -1,9 +1,10 @@ package com.easypost; -import com.easypost.net.EasyPostResource; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import com.easypost.http.Requestor; + import static org.junit.jupiter.api.Assertions.assertEquals; public final class EasyPostTest { @@ -25,12 +26,12 @@ public void testConnectionTimeout() { int testTimeout = 1; - EasyPostResource.setConnectTimeoutMilliseconds(testTimeout); + Requestor.setConnectTimeoutMilliseconds(testTimeout); - assertEquals(1, EasyPostResource.getConnectTimeoutMilliseconds()); + assertEquals(1, Requestor.getConnectTimeoutMilliseconds()); // We have to set the connection timeout back to default to avoid other unit tests getting timeout. - EasyPostResource.setConnectTimeoutMilliseconds(30000); + Requestor.setConnectTimeoutMilliseconds(30000); } /** @@ -40,11 +41,11 @@ public void testConnectionTimeout() { public void testRequestTimeout() { int testTimeout = 1; - EasyPostResource.setReadTimeoutMilliseconds(testTimeout); + Requestor.setReadTimeoutMilliseconds(testTimeout); - assertEquals(1, EasyPostResource.getReadTimeoutMilliseconds()); + assertEquals(1, Requestor.getReadTimeoutMilliseconds()); // We have to set the connection timeout back to default to avoid other unit tests getting timeout. - EasyPostResource.setReadTimeoutMilliseconds(60000); + Requestor.setReadTimeoutMilliseconds(60000); } } diff --git a/src/test/java/com/easypost/ErrorTest.java b/src/test/java/com/easypost/ErrorTest.java index b2fe9ded1..ce81bd1f3 100644 --- a/src/test/java/com/easypost/ErrorTest.java +++ b/src/test/java/com/easypost/ErrorTest.java @@ -1,12 +1,12 @@ package com.easypost; import com.easypost.exception.Constants; -import com.easypost.net.EasyPostResource; import com.easypost.exception.EasyPostException; import com.easypost.exception.API.RedirectError; import com.easypost.exception.API.ServiceUnavailablError; import com.easypost.exception.API.UnauthorizedError; import com.easypost.exception.API.UnknownApiError; +import com.easypost.http.Requestor; import com.easypost.exception.API.PaymentError; import com.easypost.exception.API.RateLimitError; import com.easypost.exception.API.NotFoundError; @@ -27,7 +27,7 @@ import java.util.HashMap; import java.util.Map; -public final class ErrorTest extends EasyPostResource{ +public final class ErrorTest extends Requestor { private static TestUtils.VCR vcr; /** @@ -91,7 +91,7 @@ public void testKnownApiException() throws EasyPostException { for (Map.Entry> entry: apiErrorsMap.entrySet()) { EasyPostException exception = assertThrows(EasyPostException.class, - () -> EasyPostResource.handleAPIError("{}", entry.getKey())); + () -> handleAPIError("{}", entry.getKey())); assertEquals(Constants.API_DID_NOT_RETURN_ERROR_DETAILS, exception.getMessage()); assertEquals("NO RESPONSE CODE", exception.getCode()); @@ -110,7 +110,7 @@ public void testExceptionErrorMessageParsing() throws EasyPostException { String errorMessageStringJson = "{\"error\": {\"code\": \"ERROR_CODE\", \"message\": \"ERROR_MESSAGE_1\", \"errors\": []}}"; EasyPostException exception = assertThrows(EasyPostException.class, - () -> EasyPostResource.handleAPIError(errorMessageStringJson, 400)); + () -> handleAPIError(errorMessageStringJson, 400)); assertEquals("ERROR_MESSAGE_1", exception.getMessage()); } @@ -126,7 +126,7 @@ public void testExceptionErrorArrayParsing() throws EasyPostException { "[\"ERROR_MESSAGE_1\", \"ERROR_MESSAGE_2\"], \"errors\": []}}"; EasyPostException exception = assertThrows(EasyPostException.class, - () -> EasyPostResource.handleAPIError(errorMessageArrayJson, 400)); + () -> handleAPIError(errorMessageArrayJson, 400)); assertEquals("ERROR_MESSAGE_1, ERROR_MESSAGE_2", exception.getMessage()); } diff --git a/src/test/java/com/easypost/Fixtures.java b/src/test/java/com/easypost/Fixtures.java index b05e8ec98..2142bfafb 100644 --- a/src/test/java/com/easypost/Fixtures.java +++ b/src/test/java/com/easypost/Fixtures.java @@ -231,7 +231,7 @@ public static HashMap basicPickup() { If you need to re-record cassettes, increment the date below and ensure it is one day in the future, USPS only does "next-day" pickups including Saturday but not Sunday or Holidays. */ - String pickupDate = "2022-10-01"; + String pickupDate = "2022-11-01"; fixture.put("min_datetime", pickupDate); fixture.put("max_datetime", pickupDate); From 63805fe981a971254c6eeff80db623cbf5a5ca72 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 3 Nov 2022 10:44:57 -0600 Subject: [PATCH 016/208] feat: add library docs --- .gitattributes | 5 + Makefile | 7 +- README.md | 3 + docs/allclasses-index.html | 309 ++ docs/allpackages-index.html | 99 + docs/com/easypost/EasyPost.html | 251 + docs/com/easypost/class-use/EasyPost.html | 66 + .../exception/API/ForbiddenError.html | 172 + .../exception/API/GatewayTimeoutError.html | 172 + .../exception/API/InternalServerError.html | 172 + .../exception/API/InvalidRequestError.html | 172 + .../exception/API/MethodNotAllowedError.html | 172 + .../easypost/exception/API/NotFoundError.html | 172 + .../easypost/exception/API/PaymentError.html | 172 + .../exception/API/RateLimitError.html | 172 + .../easypost/exception/API/RedirectError.html | 172 + .../exception/API/ServiceUnavailablError.html | 172 + .../easypost/exception/API/TimeoutError.html | 172 + .../exception/API/UnauthorizedError.html | 172 + .../exception/API/UnknownApiError.html | 172 + .../API/class-use/ForbiddenError.html | 66 + .../API/class-use/GatewayTimeoutError.html | 66 + .../API/class-use/InternalServerError.html | 66 + .../API/class-use/InvalidRequestError.html | 66 + .../API/class-use/MethodNotAllowedError.html | 66 + .../API/class-use/NotFoundError.html | 66 + .../exception/API/class-use/PaymentError.html | 66 + .../API/class-use/RateLimitError.html | 66 + .../API/class-use/RedirectError.html | 66 + .../API/class-use/ServiceUnavailablError.html | 66 + .../exception/API/class-use/TimeoutError.html | 66 + .../API/class-use/UnauthorizedError.html | 66 + .../API/class-use/UnknownApiError.html | 66 + .../exception/API/package-summary.html | 118 + .../easypost/exception/API/package-tree.html | 104 + .../easypost/exception/API/package-use.html | 66 + .../exception/Constants.ErrorCode.html | 329 ++ docs/com/easypost/exception/Constants.html | 314 ++ .../easypost/exception/EasyPostException.html | 319 ++ .../exception/General/ExternalApiError.html | 163 + .../exception/General/FilteringError.html | 163 + .../exception/General/InvalidObjectError.html | 163 + .../General/InvalidParameterError.html | 181 + .../General/MissingParameterError.html | 163 + .../General/SignatureVerificationError.html | 163 + .../General/class-use/ExternalApiError.html | 66 + .../General/class-use/FilteringError.html | 66 + .../General/class-use/InvalidObjectError.html | 66 + .../class-use/InvalidParameterError.html | 66 + .../class-use/MissingParameterError.html | 66 + .../class-use/SignatureVerificationError.html | 66 + .../exception/General/package-summary.html | 104 + .../exception/General/package-tree.html | 97 + .../exception/General/package-use.html | 66 + .../class-use/Constants.ErrorCode.html | 66 + .../exception/class-use/Constants.html | 66 + .../class-use/EasyPostException.html | 1715 ++++++ .../easypost/exception/package-summary.html | 103 + docs/com/easypost/exception/package-tree.html | 90 + docs/com/easypost/exception/package-use.html | 135 + docs/com/easypost/http/Constant.html | 248 + docs/com/easypost/http/EasyPostResponse.html | 232 + docs/com/easypost/http/HashMapSerializer.html | 180 + .../http/Requestor.RequestMethod.html | 246 + docs/com/easypost/http/Requestor.html | 388 ++ .../com/easypost/http/class-use/Constant.html | 66 + .../http/class-use/EasyPostResponse.html | 66 + .../http/class-use/HashMapSerializer.html | 66 + .../class-use/Requestor.RequestMethod.html | 134 + .../easypost/http/class-use/Requestor.html | 66 + docs/com/easypost/http/package-summary.html | 109 + docs/com/easypost/http/package-tree.html | 97 + docs/com/easypost/http/package-use.html | 90 + docs/com/easypost/model/Address.html | 548 ++ .../com/easypost/model/AddressCollection.html | 227 + docs/com/easypost/model/AddressDetail.html | 254 + .../easypost/model/AddressVerification.html | 254 + .../easypost/model/AddressVerifications.html | 227 + .../easypost/model/AddressVerifyResponse.html | 222 + docs/com/easypost/model/ApiKey.html | 195 + docs/com/easypost/model/ApiKeys.html | 267 + docs/com/easypost/model/BaseAddress.html | 487 ++ docs/com/easypost/model/BaseCreditCard.html | 392 ++ docs/com/easypost/model/BaseUser.html | 711 +++ docs/com/easypost/model/Batch.html | 1043 ++++ docs/com/easypost/model/BatchCollection.html | 227 + docs/com/easypost/model/BatchStatus.html | 286 + docs/com/easypost/model/Billing.html | 310 ++ docs/com/easypost/model/Brand.html | 451 ++ docs/com/easypost/model/CarbonOffset.html | 227 + docs/com/easypost/model/CarrierAccount.html | 718 +++ docs/com/easypost/model/CarrierDetail.html | 446 ++ docs/com/easypost/model/CarrierType.html | 331 ++ docs/com/easypost/model/CreditCard.html | 297 + .../easypost/model/CreditCardPriority.html | 242 + docs/com/easypost/model/CustomsInfo.html | 573 ++ docs/com/easypost/model/CustomsItem.html | 509 ++ docs/com/easypost/model/EasyPostResource.html | 396 ++ docs/com/easypost/model/EndShipper.html | 348 ++ .../easypost/model/EndShipperCollection.html | 222 + docs/com/easypost/model/Error.html | 318 ++ .../com/easypost/model/ErrorDeserializer.html | 192 + docs/com/easypost/model/Event.html | 407 ++ docs/com/easypost/model/EventCollection.html | 227 + docs/com/easypost/model/EventData.html | 227 + docs/com/easypost/model/Fee.html | 286 + docs/com/easypost/model/Field.html | 291 + docs/com/easypost/model/Fields.html | 291 + docs/com/easypost/model/Form.html | 259 + docs/com/easypost/model/Insurance.html | 735 +++ .../easypost/model/InsuranceCollection.html | 227 + docs/com/easypost/model/Order.html | 969 ++++ docs/com/easypost/model/OrderCollection.html | 227 + docs/com/easypost/model/Parcel.html | 413 ++ .../model/PaymentMethod.Priority.html | 230 + docs/com/easypost/model/PaymentMethod.html | 326 ++ ...PaymentMethodObject.PaymentMethodType.html | 230 + .../easypost/model/PaymentMethodObject.html | 372 ++ docs/com/easypost/model/Pickup.html | 945 ++++ docs/com/easypost/model/PickupCollection.html | 227 + docs/com/easypost/model/PickupRate.html | 200 + docs/com/easypost/model/PostageLabel.html | 803 +++ .../easypost/model/PrimaryPaymentMethod.html | 155 + docs/com/easypost/model/Rate.html | 724 +++ docs/com/easypost/model/ReferralCustomer.html | 406 ++ .../model/ReferralCustomerCollection.html | 227 + docs/com/easypost/model/Refund.html | 458 ++ docs/com/easypost/model/RefundCollection.html | 227 + docs/com/easypost/model/Report.html | 511 ++ docs/com/easypost/model/ReportCollection.html | 227 + docs/com/easypost/model/ScanForm.html | 586 ++ .../easypost/model/ScanFormCollection.html | 227 + .../model/SecondaryPaymentMethod.html | 155 + docs/com/easypost/model/Shipment.html | 2513 +++++++++ .../easypost/model/ShipmentCollection.html | 227 + docs/com/easypost/model/ShipmentMessage.html | 286 + docs/com/easypost/model/ShipmentOptions.html | 222 + docs/com/easypost/model/Smartrate.html | 184 + .../com/easypost/model/SmartrateAccuracy.html | 303 + .../easypost/model/SmartrateCollection.html | 224 + .../SmartrateCollectionDeserializer.html | 192 + docs/com/easypost/model/TaxIdentifier.html | 291 + docs/com/easypost/model/TimeInTransit.html | 431 ++ docs/com/easypost/model/Tracker.html | 691 +++ .../com/easypost/model/TrackerCollection.html | 227 + docs/com/easypost/model/TrackingDetail.html | 318 ++ docs/com/easypost/model/TrackingLocation.html | 286 + docs/com/easypost/model/User.html | 462 ++ docs/com/easypost/model/Utilities.html | 182 + docs/com/easypost/model/Webhook.html | 512 ++ .../com/easypost/model/WebhookCollection.html | 195 + .../com/easypost/model/class-use/Address.html | 291 + .../model/class-use/AddressCollection.html | 101 + .../model/class-use/AddressDetail.html | 106 + .../model/class-use/AddressVerification.html | 116 + .../model/class-use/AddressVerifications.html | 106 + .../class-use/AddressVerifyResponse.html | 66 + docs/com/easypost/model/class-use/ApiKey.html | 121 + .../com/easypost/model/class-use/ApiKeys.html | 122 + .../easypost/model/class-use/BaseAddress.html | 96 + .../model/class-use/BaseCreditCard.html | 111 + .../easypost/model/class-use/BaseUser.html | 96 + docs/com/easypost/model/class-use/Batch.html | 263 + .../model/class-use/BatchCollection.html | 101 + .../easypost/model/class-use/BatchStatus.html | 106 + .../com/easypost/model/class-use/Billing.html | 66 + docs/com/easypost/model/class-use/Brand.html | 101 + .../model/class-use/CarbonOffset.html | 106 + .../model/class-use/CarrierAccount.html | 181 + .../model/class-use/CarrierDetail.html | 106 + .../easypost/model/class-use/CarrierType.html | 100 + .../easypost/model/class-use/CreditCard.html | 66 + .../model/class-use/CreditCardPriority.html | 126 + .../easypost/model/class-use/CustomsInfo.html | 138 + .../easypost/model/class-use/CustomsItem.html | 134 + .../model/class-use/EasyPostResource.html | 302 + .../easypost/model/class-use/EndShipper.html | 145 + .../model/class-use/EndShipperCollection.html | 101 + docs/com/easypost/model/class-use/Error.html | 291 + .../model/class-use/ErrorDeserializer.html | 66 + docs/com/easypost/model/class-use/Event.html | 130 + .../model/class-use/EventCollection.html | 101 + .../easypost/model/class-use/EventData.html | 66 + docs/com/easypost/model/class-use/Fee.html | 104 + docs/com/easypost/model/class-use/Field.html | 116 + docs/com/easypost/model/class-use/Fields.html | 106 + docs/com/easypost/model/class-use/Form.html | 106 + .../easypost/model/class-use/Insurance.html | 155 + .../model/class-use/InsuranceCollection.html | 101 + docs/com/easypost/model/class-use/Order.html | 192 + .../model/class-use/OrderCollection.html | 66 + docs/com/easypost/model/class-use/Parcel.html | 128 + .../class-use/PaymentMethod.Priority.html | 141 + .../model/class-use/PaymentMethod.html | 114 + ...PaymentMethodObject.PaymentMethodType.html | 106 + .../model/class-use/PaymentMethodObject.html | 119 + docs/com/easypost/model/class-use/Pickup.html | 202 + .../model/class-use/PickupCollection.html | 66 + .../easypost/model/class-use/PickupRate.html | 139 + .../model/class-use/PostageLabel.html | 106 + .../model/class-use/PrimaryPaymentMethod.html | 97 + docs/com/easypost/model/class-use/Rate.html | 237 + .../model/class-use/ReferralCustomer.html | 123 + .../class-use/ReferralCustomerCollection.html | 101 + docs/com/easypost/model/class-use/Refund.html | 134 + .../model/class-use/RefundCollection.html | 101 + docs/com/easypost/model/class-use/Report.html | 134 + .../model/class-use/ReportCollection.html | 101 + .../easypost/model/class-use/ScanForm.html | 160 + .../model/class-use/ScanFormCollection.html | 101 + .../class-use/SecondaryPaymentMethod.html | 97 + .../easypost/model/class-use/Shipment.html | 382 ++ .../model/class-use/ShipmentCollection.html | 101 + .../model/class-use/ShipmentMessage.html | 126 + .../model/class-use/ShipmentOptions.html | 66 + .../easypost/model/class-use/Smartrate.html | 230 + .../model/class-use/SmartrateAccuracy.html | 130 + .../model/class-use/SmartrateCollection.html | 97 + .../SmartrateCollectionDeserializer.html | 66 + .../model/class-use/TaxIdentifier.html | 106 + .../model/class-use/TimeInTransit.html | 95 + .../com/easypost/model/class-use/Tracker.html | 160 + .../model/class-use/TrackerCollection.html | 101 + .../model/class-use/TrackingDetail.html | 106 + .../model/class-use/TrackingLocation.html | 106 + docs/com/easypost/model/class-use/User.html | 160 + .../easypost/model/class-use/Utilities.html | 66 + .../com/easypost/model/class-use/Webhook.html | 150 + .../model/class-use/WebhookCollection.html | 106 + docs/com/easypost/model/package-summary.html | 265 + docs/com/easypost/model/package-tree.html | 185 + docs/com/easypost/model/package-use.html | 270 + docs/com/easypost/package-summary.html | 96 + docs/com/easypost/package-tree.html | 80 + docs/com/easypost/package-use.html | 66 + .../utils/Cryptography.HmacAlgorithm.html | 247 + docs/com/easypost/utils/Cryptography.html | 335 ++ .../class-use/Cryptography.HmacAlgorithm.html | 114 + .../utils/class-use/Cryptography.html | 66 + docs/com/easypost/utils/package-summary.html | 107 + docs/com/easypost/utils/package-tree.html | 94 + docs/com/easypost/utils/package-use.html | 92 + docs/constant-values.html | 209 + docs/deprecated-list.html | 205 + docs/element-list | 7 + docs/help-doc.html | 171 + docs/index-all.html | 4908 +++++++++++++++++ docs/index.html | 101 + docs/jquery-ui.overrides.css | 34 + docs/member-search-index.js | 1 + docs/module-search-index.js | 1 + docs/overview-summary.html | 27 + docs/overview-tree.html | 232 + docs/package-search-index.js | 1 + docs/resources/glass.png | Bin 0 -> 499 bytes docs/resources/x.png | Bin 0 -> 394 bytes .../images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 -> 335 bytes .../images/ui-bg_glass_65_dadada_1x400.png | Bin 0 -> 262 bytes .../images/ui-bg_glass_75_dadada_1x400.png | Bin 0 -> 262 bytes .../images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 -> 262 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 0 -> 332 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 0 -> 280 bytes .../images/ui-icons_222222_256x240.png | Bin 0 -> 6922 bytes .../images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4549 bytes .../images/ui-icons_454545_256x240.png | Bin 0 -> 6992 bytes .../images/ui-icons_888888_256x240.png | Bin 0 -> 6999 bytes .../images/ui-icons_cd0a0a_256x240.png | Bin 0 -> 4549 bytes docs/script-dir/jquery-3.5.1.min.js | 2 + docs/script-dir/jquery-ui.min.css | 7 + docs/script-dir/jquery-ui.min.js | 6 + docs/script-dir/jquery-ui.structure.min.css | 5 + docs/script.js | 132 + docs/search.js | 354 ++ docs/serialized-form.html | 218 + docs/stylesheet.css | 827 +++ docs/tag-search-index.js | 1 + docs/type-search-index.js | 1 + pom.xml | 2 +- 278 files changed, 60769 insertions(+), 2 deletions(-) create mode 100644 docs/allclasses-index.html create mode 100644 docs/allpackages-index.html create mode 100644 docs/com/easypost/EasyPost.html create mode 100644 docs/com/easypost/class-use/EasyPost.html create mode 100644 docs/com/easypost/exception/API/ForbiddenError.html create mode 100644 docs/com/easypost/exception/API/GatewayTimeoutError.html create mode 100644 docs/com/easypost/exception/API/InternalServerError.html create mode 100644 docs/com/easypost/exception/API/InvalidRequestError.html create mode 100644 docs/com/easypost/exception/API/MethodNotAllowedError.html create mode 100644 docs/com/easypost/exception/API/NotFoundError.html create mode 100644 docs/com/easypost/exception/API/PaymentError.html create mode 100644 docs/com/easypost/exception/API/RateLimitError.html create mode 100644 docs/com/easypost/exception/API/RedirectError.html create mode 100644 docs/com/easypost/exception/API/ServiceUnavailablError.html create mode 100644 docs/com/easypost/exception/API/TimeoutError.html create mode 100644 docs/com/easypost/exception/API/UnauthorizedError.html create mode 100644 docs/com/easypost/exception/API/UnknownApiError.html create mode 100644 docs/com/easypost/exception/API/class-use/ForbiddenError.html create mode 100644 docs/com/easypost/exception/API/class-use/GatewayTimeoutError.html create mode 100644 docs/com/easypost/exception/API/class-use/InternalServerError.html create mode 100644 docs/com/easypost/exception/API/class-use/InvalidRequestError.html create mode 100644 docs/com/easypost/exception/API/class-use/MethodNotAllowedError.html create mode 100644 docs/com/easypost/exception/API/class-use/NotFoundError.html create mode 100644 docs/com/easypost/exception/API/class-use/PaymentError.html create mode 100644 docs/com/easypost/exception/API/class-use/RateLimitError.html create mode 100644 docs/com/easypost/exception/API/class-use/RedirectError.html create mode 100644 docs/com/easypost/exception/API/class-use/ServiceUnavailablError.html create mode 100644 docs/com/easypost/exception/API/class-use/TimeoutError.html create mode 100644 docs/com/easypost/exception/API/class-use/UnauthorizedError.html create mode 100644 docs/com/easypost/exception/API/class-use/UnknownApiError.html create mode 100644 docs/com/easypost/exception/API/package-summary.html create mode 100644 docs/com/easypost/exception/API/package-tree.html create mode 100644 docs/com/easypost/exception/API/package-use.html create mode 100644 docs/com/easypost/exception/Constants.ErrorCode.html create mode 100644 docs/com/easypost/exception/Constants.html create mode 100644 docs/com/easypost/exception/EasyPostException.html create mode 100644 docs/com/easypost/exception/General/ExternalApiError.html create mode 100644 docs/com/easypost/exception/General/FilteringError.html create mode 100644 docs/com/easypost/exception/General/InvalidObjectError.html create mode 100644 docs/com/easypost/exception/General/InvalidParameterError.html create mode 100644 docs/com/easypost/exception/General/MissingParameterError.html create mode 100644 docs/com/easypost/exception/General/SignatureVerificationError.html create mode 100644 docs/com/easypost/exception/General/class-use/ExternalApiError.html create mode 100644 docs/com/easypost/exception/General/class-use/FilteringError.html create mode 100644 docs/com/easypost/exception/General/class-use/InvalidObjectError.html create mode 100644 docs/com/easypost/exception/General/class-use/InvalidParameterError.html create mode 100644 docs/com/easypost/exception/General/class-use/MissingParameterError.html create mode 100644 docs/com/easypost/exception/General/class-use/SignatureVerificationError.html create mode 100644 docs/com/easypost/exception/General/package-summary.html create mode 100644 docs/com/easypost/exception/General/package-tree.html create mode 100644 docs/com/easypost/exception/General/package-use.html create mode 100644 docs/com/easypost/exception/class-use/Constants.ErrorCode.html create mode 100644 docs/com/easypost/exception/class-use/Constants.html create mode 100644 docs/com/easypost/exception/class-use/EasyPostException.html create mode 100644 docs/com/easypost/exception/package-summary.html create mode 100644 docs/com/easypost/exception/package-tree.html create mode 100644 docs/com/easypost/exception/package-use.html create mode 100644 docs/com/easypost/http/Constant.html create mode 100644 docs/com/easypost/http/EasyPostResponse.html create mode 100644 docs/com/easypost/http/HashMapSerializer.html create mode 100644 docs/com/easypost/http/Requestor.RequestMethod.html create mode 100644 docs/com/easypost/http/Requestor.html create mode 100644 docs/com/easypost/http/class-use/Constant.html create mode 100644 docs/com/easypost/http/class-use/EasyPostResponse.html create mode 100644 docs/com/easypost/http/class-use/HashMapSerializer.html create mode 100644 docs/com/easypost/http/class-use/Requestor.RequestMethod.html create mode 100644 docs/com/easypost/http/class-use/Requestor.html create mode 100644 docs/com/easypost/http/package-summary.html create mode 100644 docs/com/easypost/http/package-tree.html create mode 100644 docs/com/easypost/http/package-use.html create mode 100644 docs/com/easypost/model/Address.html create mode 100644 docs/com/easypost/model/AddressCollection.html create mode 100644 docs/com/easypost/model/AddressDetail.html create mode 100644 docs/com/easypost/model/AddressVerification.html create mode 100644 docs/com/easypost/model/AddressVerifications.html create mode 100644 docs/com/easypost/model/AddressVerifyResponse.html create mode 100644 docs/com/easypost/model/ApiKey.html create mode 100644 docs/com/easypost/model/ApiKeys.html create mode 100644 docs/com/easypost/model/BaseAddress.html create mode 100644 docs/com/easypost/model/BaseCreditCard.html create mode 100644 docs/com/easypost/model/BaseUser.html create mode 100644 docs/com/easypost/model/Batch.html create mode 100644 docs/com/easypost/model/BatchCollection.html create mode 100644 docs/com/easypost/model/BatchStatus.html create mode 100644 docs/com/easypost/model/Billing.html create mode 100644 docs/com/easypost/model/Brand.html create mode 100644 docs/com/easypost/model/CarbonOffset.html create mode 100644 docs/com/easypost/model/CarrierAccount.html create mode 100644 docs/com/easypost/model/CarrierDetail.html create mode 100644 docs/com/easypost/model/CarrierType.html create mode 100644 docs/com/easypost/model/CreditCard.html create mode 100644 docs/com/easypost/model/CreditCardPriority.html create mode 100644 docs/com/easypost/model/CustomsInfo.html create mode 100644 docs/com/easypost/model/CustomsItem.html create mode 100644 docs/com/easypost/model/EasyPostResource.html create mode 100644 docs/com/easypost/model/EndShipper.html create mode 100644 docs/com/easypost/model/EndShipperCollection.html create mode 100644 docs/com/easypost/model/Error.html create mode 100644 docs/com/easypost/model/ErrorDeserializer.html create mode 100644 docs/com/easypost/model/Event.html create mode 100644 docs/com/easypost/model/EventCollection.html create mode 100644 docs/com/easypost/model/EventData.html create mode 100644 docs/com/easypost/model/Fee.html create mode 100644 docs/com/easypost/model/Field.html create mode 100644 docs/com/easypost/model/Fields.html create mode 100644 docs/com/easypost/model/Form.html create mode 100644 docs/com/easypost/model/Insurance.html create mode 100644 docs/com/easypost/model/InsuranceCollection.html create mode 100644 docs/com/easypost/model/Order.html create mode 100644 docs/com/easypost/model/OrderCollection.html create mode 100644 docs/com/easypost/model/Parcel.html create mode 100644 docs/com/easypost/model/PaymentMethod.Priority.html create mode 100644 docs/com/easypost/model/PaymentMethod.html create mode 100644 docs/com/easypost/model/PaymentMethodObject.PaymentMethodType.html create mode 100644 docs/com/easypost/model/PaymentMethodObject.html create mode 100644 docs/com/easypost/model/Pickup.html create mode 100644 docs/com/easypost/model/PickupCollection.html create mode 100644 docs/com/easypost/model/PickupRate.html create mode 100644 docs/com/easypost/model/PostageLabel.html create mode 100644 docs/com/easypost/model/PrimaryPaymentMethod.html create mode 100644 docs/com/easypost/model/Rate.html create mode 100644 docs/com/easypost/model/ReferralCustomer.html create mode 100644 docs/com/easypost/model/ReferralCustomerCollection.html create mode 100644 docs/com/easypost/model/Refund.html create mode 100644 docs/com/easypost/model/RefundCollection.html create mode 100644 docs/com/easypost/model/Report.html create mode 100644 docs/com/easypost/model/ReportCollection.html create mode 100644 docs/com/easypost/model/ScanForm.html create mode 100644 docs/com/easypost/model/ScanFormCollection.html create mode 100644 docs/com/easypost/model/SecondaryPaymentMethod.html create mode 100644 docs/com/easypost/model/Shipment.html create mode 100644 docs/com/easypost/model/ShipmentCollection.html create mode 100644 docs/com/easypost/model/ShipmentMessage.html create mode 100644 docs/com/easypost/model/ShipmentOptions.html create mode 100644 docs/com/easypost/model/Smartrate.html create mode 100644 docs/com/easypost/model/SmartrateAccuracy.html create mode 100644 docs/com/easypost/model/SmartrateCollection.html create mode 100644 docs/com/easypost/model/SmartrateCollectionDeserializer.html create mode 100644 docs/com/easypost/model/TaxIdentifier.html create mode 100644 docs/com/easypost/model/TimeInTransit.html create mode 100644 docs/com/easypost/model/Tracker.html create mode 100644 docs/com/easypost/model/TrackerCollection.html create mode 100644 docs/com/easypost/model/TrackingDetail.html create mode 100644 docs/com/easypost/model/TrackingLocation.html create mode 100644 docs/com/easypost/model/User.html create mode 100644 docs/com/easypost/model/Utilities.html create mode 100644 docs/com/easypost/model/Webhook.html create mode 100644 docs/com/easypost/model/WebhookCollection.html create mode 100644 docs/com/easypost/model/class-use/Address.html create mode 100644 docs/com/easypost/model/class-use/AddressCollection.html create mode 100644 docs/com/easypost/model/class-use/AddressDetail.html create mode 100644 docs/com/easypost/model/class-use/AddressVerification.html create mode 100644 docs/com/easypost/model/class-use/AddressVerifications.html create mode 100644 docs/com/easypost/model/class-use/AddressVerifyResponse.html create mode 100644 docs/com/easypost/model/class-use/ApiKey.html create mode 100644 docs/com/easypost/model/class-use/ApiKeys.html create mode 100644 docs/com/easypost/model/class-use/BaseAddress.html create mode 100644 docs/com/easypost/model/class-use/BaseCreditCard.html create mode 100644 docs/com/easypost/model/class-use/BaseUser.html create mode 100644 docs/com/easypost/model/class-use/Batch.html create mode 100644 docs/com/easypost/model/class-use/BatchCollection.html create mode 100644 docs/com/easypost/model/class-use/BatchStatus.html create mode 100644 docs/com/easypost/model/class-use/Billing.html create mode 100644 docs/com/easypost/model/class-use/Brand.html create mode 100644 docs/com/easypost/model/class-use/CarbonOffset.html create mode 100644 docs/com/easypost/model/class-use/CarrierAccount.html create mode 100644 docs/com/easypost/model/class-use/CarrierDetail.html create mode 100644 docs/com/easypost/model/class-use/CarrierType.html create mode 100644 docs/com/easypost/model/class-use/CreditCard.html create mode 100644 docs/com/easypost/model/class-use/CreditCardPriority.html create mode 100644 docs/com/easypost/model/class-use/CustomsInfo.html create mode 100644 docs/com/easypost/model/class-use/CustomsItem.html create mode 100644 docs/com/easypost/model/class-use/EasyPostResource.html create mode 100644 docs/com/easypost/model/class-use/EndShipper.html create mode 100644 docs/com/easypost/model/class-use/EndShipperCollection.html create mode 100644 docs/com/easypost/model/class-use/Error.html create mode 100644 docs/com/easypost/model/class-use/ErrorDeserializer.html create mode 100644 docs/com/easypost/model/class-use/Event.html create mode 100644 docs/com/easypost/model/class-use/EventCollection.html create mode 100644 docs/com/easypost/model/class-use/EventData.html create mode 100644 docs/com/easypost/model/class-use/Fee.html create mode 100644 docs/com/easypost/model/class-use/Field.html create mode 100644 docs/com/easypost/model/class-use/Fields.html create mode 100644 docs/com/easypost/model/class-use/Form.html create mode 100644 docs/com/easypost/model/class-use/Insurance.html create mode 100644 docs/com/easypost/model/class-use/InsuranceCollection.html create mode 100644 docs/com/easypost/model/class-use/Order.html create mode 100644 docs/com/easypost/model/class-use/OrderCollection.html create mode 100644 docs/com/easypost/model/class-use/Parcel.html create mode 100644 docs/com/easypost/model/class-use/PaymentMethod.Priority.html create mode 100644 docs/com/easypost/model/class-use/PaymentMethod.html create mode 100644 docs/com/easypost/model/class-use/PaymentMethodObject.PaymentMethodType.html create mode 100644 docs/com/easypost/model/class-use/PaymentMethodObject.html create mode 100644 docs/com/easypost/model/class-use/Pickup.html create mode 100644 docs/com/easypost/model/class-use/PickupCollection.html create mode 100644 docs/com/easypost/model/class-use/PickupRate.html create mode 100644 docs/com/easypost/model/class-use/PostageLabel.html create mode 100644 docs/com/easypost/model/class-use/PrimaryPaymentMethod.html create mode 100644 docs/com/easypost/model/class-use/Rate.html create mode 100644 docs/com/easypost/model/class-use/ReferralCustomer.html create mode 100644 docs/com/easypost/model/class-use/ReferralCustomerCollection.html create mode 100644 docs/com/easypost/model/class-use/Refund.html create mode 100644 docs/com/easypost/model/class-use/RefundCollection.html create mode 100644 docs/com/easypost/model/class-use/Report.html create mode 100644 docs/com/easypost/model/class-use/ReportCollection.html create mode 100644 docs/com/easypost/model/class-use/ScanForm.html create mode 100644 docs/com/easypost/model/class-use/ScanFormCollection.html create mode 100644 docs/com/easypost/model/class-use/SecondaryPaymentMethod.html create mode 100644 docs/com/easypost/model/class-use/Shipment.html create mode 100644 docs/com/easypost/model/class-use/ShipmentCollection.html create mode 100644 docs/com/easypost/model/class-use/ShipmentMessage.html create mode 100644 docs/com/easypost/model/class-use/ShipmentOptions.html create mode 100644 docs/com/easypost/model/class-use/Smartrate.html create mode 100644 docs/com/easypost/model/class-use/SmartrateAccuracy.html create mode 100644 docs/com/easypost/model/class-use/SmartrateCollection.html create mode 100644 docs/com/easypost/model/class-use/SmartrateCollectionDeserializer.html create mode 100644 docs/com/easypost/model/class-use/TaxIdentifier.html create mode 100644 docs/com/easypost/model/class-use/TimeInTransit.html create mode 100644 docs/com/easypost/model/class-use/Tracker.html create mode 100644 docs/com/easypost/model/class-use/TrackerCollection.html create mode 100644 docs/com/easypost/model/class-use/TrackingDetail.html create mode 100644 docs/com/easypost/model/class-use/TrackingLocation.html create mode 100644 docs/com/easypost/model/class-use/User.html create mode 100644 docs/com/easypost/model/class-use/Utilities.html create mode 100644 docs/com/easypost/model/class-use/Webhook.html create mode 100644 docs/com/easypost/model/class-use/WebhookCollection.html create mode 100644 docs/com/easypost/model/package-summary.html create mode 100644 docs/com/easypost/model/package-tree.html create mode 100644 docs/com/easypost/model/package-use.html create mode 100644 docs/com/easypost/package-summary.html create mode 100644 docs/com/easypost/package-tree.html create mode 100644 docs/com/easypost/package-use.html create mode 100644 docs/com/easypost/utils/Cryptography.HmacAlgorithm.html create mode 100644 docs/com/easypost/utils/Cryptography.html create mode 100644 docs/com/easypost/utils/class-use/Cryptography.HmacAlgorithm.html create mode 100644 docs/com/easypost/utils/class-use/Cryptography.html create mode 100644 docs/com/easypost/utils/package-summary.html create mode 100644 docs/com/easypost/utils/package-tree.html create mode 100644 docs/com/easypost/utils/package-use.html create mode 100644 docs/constant-values.html create mode 100644 docs/deprecated-list.html create mode 100644 docs/element-list create mode 100644 docs/help-doc.html create mode 100644 docs/index-all.html create mode 100644 docs/index.html create mode 100644 docs/jquery-ui.overrides.css create mode 100644 docs/member-search-index.js create mode 100644 docs/module-search-index.js create mode 100644 docs/overview-summary.html create mode 100644 docs/overview-tree.html create mode 100644 docs/package-search-index.js create mode 100644 docs/resources/glass.png create mode 100644 docs/resources/x.png create mode 100644 docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png create mode 100644 docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png create mode 100644 docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png create mode 100644 docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png create mode 100644 docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png create mode 100644 docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png create mode 100644 docs/script-dir/images/ui-icons_222222_256x240.png create mode 100644 docs/script-dir/images/ui-icons_2e83ff_256x240.png create mode 100644 docs/script-dir/images/ui-icons_454545_256x240.png create mode 100644 docs/script-dir/images/ui-icons_888888_256x240.png create mode 100644 docs/script-dir/images/ui-icons_cd0a0a_256x240.png create mode 100644 docs/script-dir/jquery-3.5.1.min.js create mode 100644 docs/script-dir/jquery-ui.min.css create mode 100644 docs/script-dir/jquery-ui.min.js create mode 100644 docs/script-dir/jquery-ui.structure.min.css create mode 100644 docs/script.js create mode 100644 docs/search.js create mode 100644 docs/serialized-form.html create mode 100644 docs/stylesheet.css create mode 100644 docs/tag-search-index.js create mode 100644 docs/type-search-index.js diff --git a/.gitattributes b/.gitattributes index c9297177e..9271e9a6e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,9 @@ * text=auto +# Cassettes src/test/cassettes/**/* -diff src/test/cassettes/**/* linguist-generated + +# Docs +docs/**/* -diff +docs/**/* linguist-generated diff --git a/Makefile b/Makefile index 169d79b5d..2f6b41c17 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,11 @@ build: clean: mvn clean +## docs - Generates library documentation +docs: + mvn install -DskipTests=true -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true + cp -R target/apidocs docs + ## coverage - Test the project and generate a coverage report coverage: mvn --batch-mode install -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true jacoco:report @@ -52,4 +57,4 @@ scan: test: mvn --batch-mode install -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true -.PHONY: help build clean install-checkstyle install lint publish publish-dry release scan scan-strict test +.PHONY: help build clean docs install-checkstyle install lint publish publish-dry release scan scan-strict test diff --git a/README.md b/README.md index bbfaedc51..f43382f09 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,9 @@ EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... make coverage # Run security analysis make scan +# Generate library documentation +make docs + # Update submodules git submodule init git submodule update --remote diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html new file mode 100644 index 000000000..809565eae --- /dev/null +++ b/docs/allclasses-index.html @@ -0,0 +1,309 @@ + + + + + +All Classes (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + +

JavaScript is disabled on your browser.
+ +
+ +
+
+
+

All Classes

+
+
+
+
+
+
Class
+
Description
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
Deprecated. +
Use PaymentMethodObject instead.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
Deprecated. +
Use PaymentMethodObject instead.
+
+ +
Deprecated. + +
+ +
+
Class for various cryptography utilities.
+
+ +
+
Enums for the supported HMAC algorithms.
+
+ +
 
+ +
 
+ +
+
Hello weary traveler, welcome to the EasyPost Java client library.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
Deprecated. +
Use PaymentMethodObject instead.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
Deprecated. +
Use PaymentMethodObject instead.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/allpackages-index.html b/docs/allpackages-index.html new file mode 100644 index 000000000..9cbf60e6e --- /dev/null +++ b/docs/allpackages-index.html @@ -0,0 +1,99 @@ + + + + + +All Packages (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

All Packages

+
+
Package Summary
+
+
Package
+
Description
+ +
+
Interact with the EasyPost API in Java.
+
+ +
+
Custom exception classes for the EasyPost API.
+
+ +
+
Custom API exception classes for the EasyPost API.
+
+ +
+
Custom general exception classes for the EasyPost API.
+
+ +
+
Classes for handling requests and responses to the EasyPost API.
+
+ +
+
Classes for the EasyPost API.
+
+ +
+
Utility classes for the EasyPost API Java client library.
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/EasyPost.html b/docs/com/easypost/EasyPost.html new file mode 100644 index 000000000..606796a49 --- /dev/null +++ b/docs/com/easypost/EasyPost.html @@ -0,0 +1,251 @@ + + + + + +EasyPost (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package com.easypost
+

Class EasyPost

+
+
java.lang.Object +
com.easypost.EasyPost
+
+
+
+
public abstract class EasyPost +extends Object
+
Hello weary traveler, welcome to the EasyPost Java client library. +

+ This file exists as a template for the Templating Maven Plugin (https://www.mojohaus.org/templating-maven-plugin/) + If you notice the VERSION = 5.10.0 below, that's an example of a template variable. +

+ In Maven, you can set variables inside the pom.xml file + (https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#available-variables) +

+ The Templating Maven Plugin, at compile time, will extract these variables and add them into the source code. +

+ Specifically here, VERSION = 5.10.0 will be replaced with, i.e. VERSION = 1.0.0 when compiling the code. + NOTE: The VERSION will not populate if built with Gradle. +

+ The placement of this file is important. + The Templating Maven Plugin will look for any template files in this specific `java-templates` directory. + As a result, you can not remove this file. + (https://www.hascode.com/2013/09/filtering-source-files-using-the-templating-maven-plugin/) +

+ Most of the other variables in this file are not template variables. + Instead, we simply use this file as a catch-all for all global variables. +

+ If you ever run across a section of code where your IDE says it cannot find, i.e. `EasyPost.apiKey`, + it's likely because this file has not been compiled yet. + Simply run `make build` to compile this code and your IDE will be able to find the variable.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      VERSION

      +
      public static final String VERSION
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      API_BASE

      +
      public static final String API_BASE
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      BETA_API_BASE

      +
      public static final String BETA_API_BASE
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      apiKey

      +
      public static String apiKey
      +
      +
    • +
    • +
      +

      readTimeout

      +
      public static int readTimeout
      +
      +
    • +
    • +
      +

      _vcr

      +
      public static com.easypost.easyvcr.VCR _vcr
      +
      Set a VCR to be used for all HTTP requests. +

      + NOTE: This is meant for unit testing purposes only. Do not use in production.

      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EasyPost

      +
      public EasyPost()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/class-use/EasyPost.html b/docs/com/easypost/class-use/EasyPost.html new file mode 100644 index 000000000..b125ee526 --- /dev/null +++ b/docs/com/easypost/class-use/EasyPost.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.EasyPost (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.EasyPost

+
+No usage of com.easypost.EasyPost
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/ForbiddenError.html b/docs/com/easypost/exception/API/ForbiddenError.html new file mode 100644 index 000000000..b14de6da1 --- /dev/null +++ b/docs/com/easypost/exception/API/ForbiddenError.html @@ -0,0 +1,172 @@ + + + + + +ForbiddenError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ForbiddenError

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class ForbiddenError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ForbiddenError

      +
      public ForbiddenError(String message, + String code, + int statusCode, + List<Error> errors)
      +
      ForbiddenError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/GatewayTimeoutError.html b/docs/com/easypost/exception/API/GatewayTimeoutError.html new file mode 100644 index 000000000..5de5d6dc2 --- /dev/null +++ b/docs/com/easypost/exception/API/GatewayTimeoutError.html @@ -0,0 +1,172 @@ + + + + + +GatewayTimeoutError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class GatewayTimeoutError

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class GatewayTimeoutError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      GatewayTimeoutError

      +
      public GatewayTimeoutError(String message, + String code, + int statusCode, + List<Error> errors)
      +
      GatewayTimeoutError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/InternalServerError.html b/docs/com/easypost/exception/API/InternalServerError.html new file mode 100644 index 000000000..c15c7e71b --- /dev/null +++ b/docs/com/easypost/exception/API/InternalServerError.html @@ -0,0 +1,172 @@ + + + + + +InternalServerError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InternalServerError

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class InternalServerError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InternalServerError

      +
      public InternalServerError(String message, + String code, + int statusCode, + List<Error> errors)
      +
      InternalServerError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/InvalidRequestError.html b/docs/com/easypost/exception/API/InvalidRequestError.html new file mode 100644 index 000000000..f219e3f21 --- /dev/null +++ b/docs/com/easypost/exception/API/InvalidRequestError.html @@ -0,0 +1,172 @@ + + + + + +InvalidRequestError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InvalidRequestError

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class InvalidRequestError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidRequestError

      +
      public InvalidRequestError(String message, + String code, + int statusCode, + List<Error> errors)
      +
      InvalidRequestError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/MethodNotAllowedError.html b/docs/com/easypost/exception/API/MethodNotAllowedError.html new file mode 100644 index 000000000..0b04c7347 --- /dev/null +++ b/docs/com/easypost/exception/API/MethodNotAllowedError.html @@ -0,0 +1,172 @@ + + + + + +MethodNotAllowedError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MethodNotAllowedError

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
com.easypost.exception.EasyPostException +
com.easypost.exception.API.MethodNotAllowedError
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class MethodNotAllowedError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MethodNotAllowedError

      +
      public MethodNotAllowedError(String message, + String code, + int statusCode, + List<Error> errors)
      +
      MethodNotAllowedError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/NotFoundError.html b/docs/com/easypost/exception/API/NotFoundError.html new file mode 100644 index 000000000..b57aef0dc --- /dev/null +++ b/docs/com/easypost/exception/API/NotFoundError.html @@ -0,0 +1,172 @@ + + + + + +NotFoundError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NotFoundError

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class NotFoundError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NotFoundError

      +
      public NotFoundError(String message, + String code, + int statusCode, + List<Error> errors)
      +
      NotFoundError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/PaymentError.html b/docs/com/easypost/exception/API/PaymentError.html new file mode 100644 index 000000000..05bf8c5df --- /dev/null +++ b/docs/com/easypost/exception/API/PaymentError.html @@ -0,0 +1,172 @@ + + + + + +PaymentError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentError

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class PaymentError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PaymentError

      +
      public PaymentError(String message, + String code, + int statusCode, + List<Error> errors)
      +
      PaymentError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/RateLimitError.html b/docs/com/easypost/exception/API/RateLimitError.html new file mode 100644 index 000000000..e1a750877 --- /dev/null +++ b/docs/com/easypost/exception/API/RateLimitError.html @@ -0,0 +1,172 @@ + + + + + +RateLimitError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class RateLimitError

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class RateLimitError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      RateLimitError

      +
      public RateLimitError(String message, + String code, + int statusCode, + List<Error> errors)
      +
      RateLimitError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/RedirectError.html b/docs/com/easypost/exception/API/RedirectError.html new file mode 100644 index 000000000..6fb2eadf6 --- /dev/null +++ b/docs/com/easypost/exception/API/RedirectError.html @@ -0,0 +1,172 @@ + + + + + +RedirectError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class RedirectError

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class RedirectError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      RedirectError

      +
      public RedirectError(String message, + String code, + int statusCode, + List<Error> errors)
      +
      RedirectError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/ServiceUnavailablError.html b/docs/com/easypost/exception/API/ServiceUnavailablError.html new file mode 100644 index 000000000..60ed06ec2 --- /dev/null +++ b/docs/com/easypost/exception/API/ServiceUnavailablError.html @@ -0,0 +1,172 @@ + + + + + +ServiceUnavailablError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ServiceUnavailablError

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
com.easypost.exception.EasyPostException +
com.easypost.exception.API.ServiceUnavailablError
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class ServiceUnavailablError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ServiceUnavailablError

      +
      public ServiceUnavailablError(String message, + String code, + int statusCode, + List<Error> errors)
      +
      ServiceUnavailablError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/TimeoutError.html b/docs/com/easypost/exception/API/TimeoutError.html new file mode 100644 index 000000000..f4e4b689b --- /dev/null +++ b/docs/com/easypost/exception/API/TimeoutError.html @@ -0,0 +1,172 @@ + + + + + +TimeoutError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TimeoutError

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class TimeoutError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TimeoutError

      +
      public TimeoutError(String message, + String code, + int statusCode, + List<Error> errors)
      +
      TimeoutError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/UnauthorizedError.html b/docs/com/easypost/exception/API/UnauthorizedError.html new file mode 100644 index 000000000..9532bfc13 --- /dev/null +++ b/docs/com/easypost/exception/API/UnauthorizedError.html @@ -0,0 +1,172 @@ + + + + + +UnauthorizedError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class UnauthorizedError

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class UnauthorizedError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      UnauthorizedError

      +
      public UnauthorizedError(String message, + String code, + int statusCode, + List<Error> errors)
      +
      UnauthorizedError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/UnknownApiError.html b/docs/com/easypost/exception/API/UnknownApiError.html new file mode 100644 index 000000000..6322d895c --- /dev/null +++ b/docs/com/easypost/exception/API/UnknownApiError.html @@ -0,0 +1,172 @@ + + + + + +UnknownApiError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class UnknownApiError

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class UnknownApiError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      UnknownApiError

      +
      public UnknownApiError(String message, + String code, + int statusCode, + List<Error> errors)
      +
      UnknownApiError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/class-use/ForbiddenError.html b/docs/com/easypost/exception/API/class-use/ForbiddenError.html new file mode 100644 index 000000000..051003f9f --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/ForbiddenError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.API.ForbiddenError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.API.ForbiddenError

+
+No usage of com.easypost.exception.API.ForbiddenError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/class-use/GatewayTimeoutError.html b/docs/com/easypost/exception/API/class-use/GatewayTimeoutError.html new file mode 100644 index 000000000..7a74f692e --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/GatewayTimeoutError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.API.GatewayTimeoutError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.API.GatewayTimeoutError

+
+No usage of com.easypost.exception.API.GatewayTimeoutError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/class-use/InternalServerError.html b/docs/com/easypost/exception/API/class-use/InternalServerError.html new file mode 100644 index 000000000..0d6aed8e6 --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/InternalServerError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.API.InternalServerError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.API.InternalServerError

+
+No usage of com.easypost.exception.API.InternalServerError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/class-use/InvalidRequestError.html b/docs/com/easypost/exception/API/class-use/InvalidRequestError.html new file mode 100644 index 000000000..61befb493 --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/InvalidRequestError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.API.InvalidRequestError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.API.InvalidRequestError

+
+No usage of com.easypost.exception.API.InvalidRequestError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/class-use/MethodNotAllowedError.html b/docs/com/easypost/exception/API/class-use/MethodNotAllowedError.html new file mode 100644 index 000000000..491152cf7 --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/MethodNotAllowedError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.API.MethodNotAllowedError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.API.MethodNotAllowedError

+
+No usage of com.easypost.exception.API.MethodNotAllowedError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/class-use/NotFoundError.html b/docs/com/easypost/exception/API/class-use/NotFoundError.html new file mode 100644 index 000000000..73ddaaee6 --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/NotFoundError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.API.NotFoundError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.API.NotFoundError

+
+No usage of com.easypost.exception.API.NotFoundError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/class-use/PaymentError.html b/docs/com/easypost/exception/API/class-use/PaymentError.html new file mode 100644 index 000000000..878e19960 --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/PaymentError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.API.PaymentError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.API.PaymentError

+
+No usage of com.easypost.exception.API.PaymentError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/class-use/RateLimitError.html b/docs/com/easypost/exception/API/class-use/RateLimitError.html new file mode 100644 index 000000000..fcfd59e2c --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/RateLimitError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.API.RateLimitError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.API.RateLimitError

+
+No usage of com.easypost.exception.API.RateLimitError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/class-use/RedirectError.html b/docs/com/easypost/exception/API/class-use/RedirectError.html new file mode 100644 index 000000000..d35c89920 --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/RedirectError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.API.RedirectError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.API.RedirectError

+
+No usage of com.easypost.exception.API.RedirectError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/class-use/ServiceUnavailablError.html b/docs/com/easypost/exception/API/class-use/ServiceUnavailablError.html new file mode 100644 index 000000000..37e1ac34a --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/ServiceUnavailablError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.API.ServiceUnavailablError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.API.ServiceUnavailablError

+
+No usage of com.easypost.exception.API.ServiceUnavailablError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/class-use/TimeoutError.html b/docs/com/easypost/exception/API/class-use/TimeoutError.html new file mode 100644 index 000000000..01d655748 --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/TimeoutError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.API.TimeoutError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.API.TimeoutError

+
+No usage of com.easypost.exception.API.TimeoutError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/class-use/UnauthorizedError.html b/docs/com/easypost/exception/API/class-use/UnauthorizedError.html new file mode 100644 index 000000000..c94b9cf85 --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/UnauthorizedError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.API.UnauthorizedError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.API.UnauthorizedError

+
+No usage of com.easypost.exception.API.UnauthorizedError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/class-use/UnknownApiError.html b/docs/com/easypost/exception/API/class-use/UnknownApiError.html new file mode 100644 index 000000000..561c89bc2 --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/UnknownApiError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.API.UnknownApiError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.API.UnknownApiError

+
+No usage of com.easypost.exception.API.UnknownApiError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/package-summary.html b/docs/com/easypost/exception/API/package-summary.html new file mode 100644 index 000000000..174f34858 --- /dev/null +++ b/docs/com/easypost/exception/API/package-summary.html @@ -0,0 +1,118 @@ + + + + + +com.easypost.exception.API (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.easypost.exception.API

+
+
+
package com.easypost.exception.API
+
+
Custom API exception classes for the EasyPost API.
+
+
Since:
+
6.0
+
Version:
+
6.0
+
Author:
+
EasyPost developers
+
See Also:
+
EasyPost API documentation
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/package-tree.html b/docs/com/easypost/exception/API/package-tree.html new file mode 100644 index 000000000..73cefc094 --- /dev/null +++ b/docs/com/easypost/exception/API/package-tree.html @@ -0,0 +1,104 @@ + + + + + +com.easypost.exception.API Class Hierarchy (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.easypost.exception.API

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/API/package-use.html b/docs/com/easypost/exception/API/package-use.html new file mode 100644 index 000000000..6a1d1beec --- /dev/null +++ b/docs/com/easypost/exception/API/package-use.html @@ -0,0 +1,66 @@ + + + + + +Uses of Package com.easypost.exception.API (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
com.easypost.exception.API

+
+No usage of com.easypost.exception.API
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/Constants.ErrorCode.html b/docs/com/easypost/exception/Constants.ErrorCode.html new file mode 100644 index 000000000..5dbd778d4 --- /dev/null +++ b/docs/com/easypost/exception/Constants.ErrorCode.html @@ -0,0 +1,329 @@ + + + + + +Constants.ErrorCode (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Constants.ErrorCode

+
+
java.lang.Object +
com.easypost.exception.Constants.ErrorCode
+
+
+
+
Enclosing class:
+
Constants
+
+
+
public abstract class Constants.ErrorCode +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      REDIRECT_CODE_BEGIN

      +
      public static final int REDIRECT_CODE_BEGIN
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      REDIRECT_CODE_END

      +
      public static final int REDIRECT_CODE_END
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      UNAUTHORIZED_ERROR

      +
      public static final int UNAUTHORIZED_ERROR
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      PAYMENT_ERROR

      +
      public static final int PAYMENT_ERROR
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      FORBIDDEN_ERROR

      +
      public static final int FORBIDDEN_ERROR
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      NOT_FOUND_ERROR

      +
      public static final int NOT_FOUND_ERROR
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      METHOD_NOT_ALLOWED_ERROR

      +
      public static final int METHOD_NOT_ALLOWED_ERROR
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      TIMEOUT_ERROR

      +
      public static final int TIMEOUT_ERROR
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      INVALID_REQUEST_ERROR

      +
      public static final int INVALID_REQUEST_ERROR
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      RATE_LIMIT_ERROR

      +
      public static final int RATE_LIMIT_ERROR
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      INTERNAL_SERVER_ERROR

      +
      public static final int INTERNAL_SERVER_ERROR
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      SERVICE_UNAVAILABLE_ERROR

      +
      public static final int SERVICE_UNAVAILABLE_ERROR
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      GATEWAY_TIMEOUT_ERROR

      +
      public static final int GATEWAY_TIMEOUT_ERROR
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ErrorCode

      +
      public ErrorCode()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/Constants.html b/docs/com/easypost/exception/Constants.html new file mode 100644 index 000000000..7823554a1 --- /dev/null +++ b/docs/com/easypost/exception/Constants.html @@ -0,0 +1,314 @@ + + + + + +Constants (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Constants

+
+
java.lang.Object +
com.easypost.exception.Constants
+
+
+
+
public abstract class Constants +extends Object
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/EasyPostException.html b/docs/com/easypost/exception/EasyPostException.html new file mode 100644 index 000000000..bb62e097b --- /dev/null +++ b/docs/com/easypost/exception/EasyPostException.html @@ -0,0 +1,319 @@ + + + + + +EasyPostException (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class EasyPostException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
com.easypost.exception.EasyPostException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
ExternalApiError, FilteringError, ForbiddenError, GatewayTimeoutError, InternalServerError, InvalidObjectError, InvalidParameterError, InvalidRequestError, MethodNotAllowedError, MissingParameterError, NotFoundError, PaymentError, RateLimitError, RedirectError, ServiceUnavailablError, SignatureVerificationError, TimeoutError, UnauthorizedError, UnknownApiError
+
+
+
public class EasyPostException +extends Exception
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EasyPostException

      +
      public EasyPostException(String message)
      +
      EasyPostException constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      +
      +
    • +
    • +
      +

      EasyPostException

      +
      public EasyPostException(String message, + Throwable ex)
      +
      EasyPostException constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      ex - the exception cause
      +
      +
      +
    • +
    • +
      +

      EasyPostException

      +
      public EasyPostException(String message, + String code, + int statusCode, + List<Error> errors)
      +
      EasyPostException constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      +
      +
    • +
    • +
      +

      EasyPostException

      +
      public EasyPostException(String message, + String code, + Integer statusCode, + List<Error> errors, + Throwable ex)
      +
      EasyPostException constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      code - the exception code
      +
      statusCode - the exception status code
      +
      errors - the errors array
      +
      ex - the exception cause
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getStatusCode

      +
      public Integer getStatusCode()
      +
      Get status code of the error object.
      +
      +
      Returns:
      +
      statusCode the status code of the error object
      +
      +
      +
    • +
    • +
      +

      getCode

      +
      public String getCode()
      +
      Get code of the error object.
      +
      +
      Returns:
      +
      code the code of the error object
      +
      +
      +
    • +
    • +
      +

      getMessage

      +
      public String getMessage()
      +
      Get message of the error object.
      +
      +
      Overrides:
      +
      getMessage in class Throwable
      +
      Returns:
      +
      message the message of the error object
      +
      +
      +
    • +
    • +
      +

      getErrors

      +
      public List<Error> getErrors()
      +
      Get errors array of the exception.
      +
      +
      Returns:
      +
      errors of the exception
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/ExternalApiError.html b/docs/com/easypost/exception/General/ExternalApiError.html new file mode 100644 index 000000000..c2a542521 --- /dev/null +++ b/docs/com/easypost/exception/General/ExternalApiError.html @@ -0,0 +1,163 @@ + + + + + +ExternalApiError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ExternalApiError

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
com.easypost.exception.EasyPostException +
com.easypost.exception.General.ExternalApiError
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class ExternalApiError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ExternalApiError

      +
      public ExternalApiError(String message)
      +
      ExternalApiError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/FilteringError.html b/docs/com/easypost/exception/General/FilteringError.html new file mode 100644 index 000000000..5ea6a7e05 --- /dev/null +++ b/docs/com/easypost/exception/General/FilteringError.html @@ -0,0 +1,163 @@ + + + + + +FilteringError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FilteringError

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class FilteringError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      FilteringError

      +
      public FilteringError(String message)
      +
      FilteringError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/InvalidObjectError.html b/docs/com/easypost/exception/General/InvalidObjectError.html new file mode 100644 index 000000000..546805126 --- /dev/null +++ b/docs/com/easypost/exception/General/InvalidObjectError.html @@ -0,0 +1,163 @@ + + + + + +InvalidObjectError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InvalidObjectError

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
com.easypost.exception.EasyPostException +
com.easypost.exception.General.InvalidObjectError
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class InvalidObjectError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidObjectError

      +
      public InvalidObjectError(String message)
      +
      InvalidObjectError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/InvalidParameterError.html b/docs/com/easypost/exception/General/InvalidParameterError.html new file mode 100644 index 000000000..56603f9da --- /dev/null +++ b/docs/com/easypost/exception/General/InvalidParameterError.html @@ -0,0 +1,181 @@ + + + + + +InvalidParameterError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InvalidParameterError

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
com.easypost.exception.EasyPostException +
com.easypost.exception.General.InvalidParameterError
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class InvalidParameterError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidParameterError

      +
      public InvalidParameterError(String message)
      +
      InvalidParameterError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      +
      +
    • +
    • +
      +

      InvalidParameterError

      +
      public InvalidParameterError(String message, + Throwable e)
      +
      constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      e - the Throwable object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/MissingParameterError.html b/docs/com/easypost/exception/General/MissingParameterError.html new file mode 100644 index 000000000..17658a551 --- /dev/null +++ b/docs/com/easypost/exception/General/MissingParameterError.html @@ -0,0 +1,163 @@ + + + + + +MissingParameterError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MissingParameterError

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
com.easypost.exception.EasyPostException +
com.easypost.exception.General.MissingParameterError
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class MissingParameterError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MissingParameterError

      +
      public MissingParameterError(String message)
      +
      MissingParameterError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/SignatureVerificationError.html b/docs/com/easypost/exception/General/SignatureVerificationError.html new file mode 100644 index 000000000..0246a61db --- /dev/null +++ b/docs/com/easypost/exception/General/SignatureVerificationError.html @@ -0,0 +1,163 @@ + + + + + +SignatureVerificationError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SignatureVerificationError

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
com.easypost.exception.EasyPostException +
com.easypost.exception.General.SignatureVerificationError
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class SignatureVerificationError +extends EasyPostException
+
+
See Also:
+
Serialized Form
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SignatureVerificationError

      +
      public SignatureVerificationError(String message)
      +
      SignatureVerificationError constructor.
      +
      +
      Parameters:
      +
      message - the exception message
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/class-use/ExternalApiError.html b/docs/com/easypost/exception/General/class-use/ExternalApiError.html new file mode 100644 index 000000000..de987fa53 --- /dev/null +++ b/docs/com/easypost/exception/General/class-use/ExternalApiError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.General.ExternalApiError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.General.ExternalApiError

+
+No usage of com.easypost.exception.General.ExternalApiError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/class-use/FilteringError.html b/docs/com/easypost/exception/General/class-use/FilteringError.html new file mode 100644 index 000000000..36d396bb0 --- /dev/null +++ b/docs/com/easypost/exception/General/class-use/FilteringError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.General.FilteringError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.General.FilteringError

+
+No usage of com.easypost.exception.General.FilteringError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/class-use/InvalidObjectError.html b/docs/com/easypost/exception/General/class-use/InvalidObjectError.html new file mode 100644 index 000000000..817413049 --- /dev/null +++ b/docs/com/easypost/exception/General/class-use/InvalidObjectError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.General.InvalidObjectError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.General.InvalidObjectError

+
+No usage of com.easypost.exception.General.InvalidObjectError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/class-use/InvalidParameterError.html b/docs/com/easypost/exception/General/class-use/InvalidParameterError.html new file mode 100644 index 000000000..3109ff774 --- /dev/null +++ b/docs/com/easypost/exception/General/class-use/InvalidParameterError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.General.InvalidParameterError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.General.InvalidParameterError

+
+No usage of com.easypost.exception.General.InvalidParameterError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/class-use/MissingParameterError.html b/docs/com/easypost/exception/General/class-use/MissingParameterError.html new file mode 100644 index 000000000..f94d5500c --- /dev/null +++ b/docs/com/easypost/exception/General/class-use/MissingParameterError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.General.MissingParameterError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.General.MissingParameterError

+
+No usage of com.easypost.exception.General.MissingParameterError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/class-use/SignatureVerificationError.html b/docs/com/easypost/exception/General/class-use/SignatureVerificationError.html new file mode 100644 index 000000000..45b536b33 --- /dev/null +++ b/docs/com/easypost/exception/General/class-use/SignatureVerificationError.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.General.SignatureVerificationError (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.General.SignatureVerificationError

+
+No usage of com.easypost.exception.General.SignatureVerificationError
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/package-summary.html b/docs/com/easypost/exception/General/package-summary.html new file mode 100644 index 000000000..09d058f16 --- /dev/null +++ b/docs/com/easypost/exception/General/package-summary.html @@ -0,0 +1,104 @@ + + + + + +com.easypost.exception.General (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.easypost.exception.General

+
+
+
package com.easypost.exception.General
+
+
Custom general exception classes for the EasyPost API.
+
+
Since:
+
6.0
+
Version:
+
6.0
+
Author:
+
EasyPost developers
+
See Also:
+
EasyPost API documentation
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/package-tree.html b/docs/com/easypost/exception/General/package-tree.html new file mode 100644 index 000000000..5087cb59b --- /dev/null +++ b/docs/com/easypost/exception/General/package-tree.html @@ -0,0 +1,97 @@ + + + + + +com.easypost.exception.General Class Hierarchy (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.easypost.exception.General

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/General/package-use.html b/docs/com/easypost/exception/General/package-use.html new file mode 100644 index 000000000..1dadadb73 --- /dev/null +++ b/docs/com/easypost/exception/General/package-use.html @@ -0,0 +1,66 @@ + + + + + +Uses of Package com.easypost.exception.General (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
com.easypost.exception.General

+
+No usage of com.easypost.exception.General
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/class-use/Constants.ErrorCode.html b/docs/com/easypost/exception/class-use/Constants.ErrorCode.html new file mode 100644 index 000000000..3b7aa1212 --- /dev/null +++ b/docs/com/easypost/exception/class-use/Constants.ErrorCode.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.Constants.ErrorCode (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.Constants.ErrorCode

+
+No usage of com.easypost.exception.Constants.ErrorCode
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/class-use/Constants.html b/docs/com/easypost/exception/class-use/Constants.html new file mode 100644 index 000000000..fd936ba71 --- /dev/null +++ b/docs/com/easypost/exception/class-use/Constants.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.exception.Constants (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.Constants

+
+No usage of com.easypost.exception.Constants
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/class-use/EasyPostException.html b/docs/com/easypost/exception/class-use/EasyPostException.html new file mode 100644 index 000000000..467b6a248 --- /dev/null +++ b/docs/com/easypost/exception/class-use/EasyPostException.html @@ -0,0 +1,1715 @@ + + + + + +Uses of Class com.easypost.exception.EasyPostException (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.exception.EasyPostException

+
+
Packages that use EasyPostException
+
+
Package
+
Description
+ +
+
Custom API exception classes for the EasyPost API.
+
+ +
+
Custom general exception classes for the EasyPost API.
+
+ +
+
Classes for handling requests and responses to the EasyPost API.
+
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/package-summary.html b/docs/com/easypost/exception/package-summary.html new file mode 100644 index 000000000..9634f8133 --- /dev/null +++ b/docs/com/easypost/exception/package-summary.html @@ -0,0 +1,103 @@ + + + + + +com.easypost.exception (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.easypost.exception

+
+
+
package com.easypost.exception
+
+
Custom exception classes for the EasyPost API.
+
+
Since:
+
1.0
+
Version:
+
1.0
+
Author:
+
EasyPost developers
+
See Also:
+
EasyPost API documentation
+
+
+
+
    +
  • +
    Class Summary
    +
    +
    Class
    +
    Description
    + +
     
    +
    +
  • +
  • +
    Exception Summary
    +
    +
    Exception
    +
    Description
    + +
     
    +
    +
  • +
+
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/package-tree.html b/docs/com/easypost/exception/package-tree.html new file mode 100644 index 000000000..d014fef5c --- /dev/null +++ b/docs/com/easypost/exception/package-tree.html @@ -0,0 +1,90 @@ + + + + + +com.easypost.exception Class Hierarchy (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.easypost.exception

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/exception/package-use.html b/docs/com/easypost/exception/package-use.html new file mode 100644 index 000000000..f49dd0a58 --- /dev/null +++ b/docs/com/easypost/exception/package-use.html @@ -0,0 +1,135 @@ + + + + + +Uses of Package com.easypost.exception (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
com.easypost.exception

+
+
Packages that use com.easypost.exception
+
+
Package
+
Description
+ +
+
Custom API exception classes for the EasyPost API.
+
+ +
+
Custom general exception classes for the EasyPost API.
+
+ +
+
Classes for handling requests and responses to the EasyPost API.
+
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/http/Constant.html b/docs/com/easypost/http/Constant.html new file mode 100644 index 000000000..2a09d2482 --- /dev/null +++ b/docs/com/easypost/http/Constant.html @@ -0,0 +1,248 @@ + + + + + +Constant (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Constant

+
+
java.lang.Object +
com.easypost.http.Constant
+
+
+
+
public abstract class Constant +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      EASYPOST_SUPPORT_EMAIL

      +
      public static final String EASYPOST_SUPPORT_EMAIL
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      CHARSET

      +
      public static final String CHARSET
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      GLOBAL_FIELD_ACCESSORS

      +
      public static final ArrayList<String> GLOBAL_FIELD_ACCESSORS
      +
      +
    • +
    • +
      +

      DEFAULT_CONNECT_TIMEOUT_MILLISECONDS

      +
      public static final int DEFAULT_CONNECT_TIMEOUT_MILLISECONDS
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      DEFAULT_READ_TIMEOUT_MILLISECONDS

      +
      public static final int DEFAULT_READ_TIMEOUT_MILLISECONDS
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      DEFAULT_APP_ENGINE_TIMEOUT_SECONDS

      +
      public static final double DEFAULT_APP_ENGINE_TIMEOUT_SECONDS
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
      +
    • +
    • +
      +

      GSON

      +
      public static final com.google.gson.Gson GSON
      +
      +
    • +
    • +
      +

      PRETTY_PRINT_GSON

      +
      public static final com.google.gson.Gson PRETTY_PRINT_GSON
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Constant

      +
      public Constant()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/http/EasyPostResponse.html b/docs/com/easypost/http/EasyPostResponse.html new file mode 100644 index 000000000..2434c9c10 --- /dev/null +++ b/docs/com/easypost/http/EasyPostResponse.html @@ -0,0 +1,232 @@ + + + + + +EasyPostResponse (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class EasyPostResponse

+
+
java.lang.Object +
com.easypost.http.EasyPostResponse
+
+
+
+
public class EasyPostResponse +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EasyPostResponse

      +
      public EasyPostResponse(int responseCode, + String responseBody)
      +
      Constructor.
      +
      +
      Parameters:
      +
      responseCode - HTTP response code
      +
      responseBody - HTTP response body
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getResponseBody

      +
      public String getResponseBody()
      +
      Get HTTP response body.
      +
      +
      Returns:
      +
      HTTP response body
      +
      +
      +
    • +
    • +
      +

      setResponseBody

      +
      public void setResponseBody(String responseBody)
      +
      Set HTTP response body.
      +
      +
      Parameters:
      +
      responseBody - HTTP response body
      +
      +
      +
    • +
    • +
      +

      getResponseCode

      +
      public int getResponseCode()
      +
      Get HTTP response code.
      +
      +
      Returns:
      +
      HTTP response code
      +
      +
      +
    • +
    • +
      +

      setResponseCode

      +
      public void setResponseCode(int responseCode)
      +
      Set HTTP response code.
      +
      +
      Parameters:
      +
      responseCode - HTTP response code
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/http/HashMapSerializer.html b/docs/com/easypost/http/HashMapSerializer.html new file mode 100644 index 000000000..ea98c11bf --- /dev/null +++ b/docs/com/easypost/http/HashMapSerializer.html @@ -0,0 +1,180 @@ + + + + + +HashMapSerializer (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class HashMapSerializer

+
+
java.lang.Object +
com.easypost.http.HashMapSerializer
+
+
+
+
All Implemented Interfaces:
+
com.google.gson.JsonSerializer<HashMap<String,​Object>>
+
+
+
public final class HashMapSerializer +extends Object +implements com.google.gson.JsonSerializer<HashMap<String,​Object>>
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      HashMapSerializer

      +
      public HashMapSerializer()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      serialize

      +
      public com.google.gson.JsonElement serialize(HashMap<String,​Object> src, + Type typeOfSrc, + com.google.gson.JsonSerializationContext context)
      +
      +
      Specified by:
      +
      serialize in interface com.google.gson.JsonSerializer<HashMap<String,​Object>>
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/http/Requestor.RequestMethod.html b/docs/com/easypost/http/Requestor.RequestMethod.html new file mode 100644 index 000000000..36b239318 --- /dev/null +++ b/docs/com/easypost/http/Requestor.RequestMethod.html @@ -0,0 +1,246 @@ + + + + + +Requestor.RequestMethod (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Requestor.RequestMethod

+
+
java.lang.Object +
java.lang.Enum<Requestor.RequestMethod> +
com.easypost.http.Requestor.RequestMethod
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Requestor.RequestMethod>, java.lang.constant.Constable
+
+
+
Enclosing class:
+
Requestor
+
+
+
public static enum Requestor.RequestMethod +extends Enum<Requestor.RequestMethod>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Requestor.RequestMethod[] values()
      +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum type, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Requestor.RequestMethod valueOf(String name)
      +
      Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum type has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/http/Requestor.html b/docs/com/easypost/http/Requestor.html new file mode 100644 index 000000000..17d194b3a --- /dev/null +++ b/docs/com/easypost/http/Requestor.html @@ -0,0 +1,388 @@ + + + + + +Requestor (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Requestor

+
+
java.lang.Object +
com.easypost.http.Requestor
+
+
+
+
public abstract class Requestor +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Requestor

      +
      public Requestor()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getAppEngineTimeoutSeconds

      +
      public static double getAppEngineTimeoutSeconds()
      +
      Get the timeout in milliseconds for App Engine API requests.
      +
      +
      Returns:
      +
      the timeout in milliseconds
      +
      +
      +
    • +
    • +
      +

      setAppEngineTimeoutSeconds

      +
      public static void setAppEngineTimeoutSeconds(double seconds)
      +
      Set the timeout in seconds for App Engine API requests.
      +
      +
      Parameters:
      +
      seconds - the timeout in seconds
      +
      +
      +
    • +
    • +
      +

      getConnectTimeoutMilliseconds

      +
      public static int getConnectTimeoutMilliseconds()
      +
      Get the timeout in milliseconds for connecting to the API.
      +
      +
      Returns:
      +
      the timeout in milliseconds
      +
      +
      +
    • +
    • +
      +

      setConnectTimeoutMilliseconds

      +
      public static void setConnectTimeoutMilliseconds(int milliseconds)
      +
      Set the timeout in milliseconds for connecting to the API.
      +
      +
      Parameters:
      +
      milliseconds - the timeout in milliseconds
      +
      +
      +
    • +
    • +
      +

      getReadTimeoutMilliseconds

      +
      public static int getReadTimeoutMilliseconds()
      +
      Get the timeout in milliseconds for reading API responses.
      +
      +
      Returns:
      +
      the timeout in milliseconds
      +
      +
      +
    • +
    • +
      +

      setReadTimeoutMilliseconds

      +
      public static void setReadTimeoutMilliseconds(int milliseconds)
      +
      Set the timeout in milliseconds for reading API responses.
      +
      +
      Parameters:
      +
      milliseconds - the timeout in milliseconds
      +
      +
      +
    • +
    • +
      +

      request

      +
      public static <T> T request(Requestor.RequestMethod method, + String url, + Map<String,​Object> params, + Class<T> clazz, + String apiKey) + throws EasyPostException
      +
      Send an HTTP request to EasyPost.
      +
      +
      Type Parameters:
      +
      T - Any class.
      +
      Parameters:
      +
      method - The method of the API request.
      +
      url - The URL of the API request.
      +
      params - The params of the API request.
      +
      clazz - The class of the object for deserialization
      +
      apiKey - The API key for this API request.
      +
      Returns:
      +
      A class object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      request

      +
      protected static <T> T request(Requestor.RequestMethod method, + String url, + Map<String,​Object> params, + Class<T> clazz, + String apiKey, + boolean apiKeyRequired) + throws EasyPostException
      +
      Send an HTTP request to EasyPost.
      +
      +
      Type Parameters:
      +
      T - Any class.
      +
      Parameters:
      +
      method - The method of the API request.
      +
      url - The URL of the API request.
      +
      params - The params of the API request.
      +
      clazz - The class of the object for deserialization
      +
      apiKey - The API key for this API request.
      +
      apiKeyRequired - The API key for this HTTP request call if needed.
      +
      Returns:
      +
      A class object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      _request

      +
      protected static <T> T _request(Requestor.RequestMethod method, + String url, + Map<String,​Object> params, + Class<T> clazz, + String apiKey, + boolean apiKeyRequired) + throws EasyPostException
      +
      +
      Throws:
      +
      EasyPostException
      +
      +
      +
    • +
    • +
      +

      handleAPIError

      +
      protected static void handleAPIError(String rBody, + int rCode) + throws EasyPostException
      +
      Handles API error based on the error status code.
      +
      +
      Parameters:
      +
      rBody - Body of the error message.
      +
      rCode - Status code of the error messsage.
      +
      Throws:
      +
      EasyPostException
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/http/class-use/Constant.html b/docs/com/easypost/http/class-use/Constant.html new file mode 100644 index 000000000..44cb75b8c --- /dev/null +++ b/docs/com/easypost/http/class-use/Constant.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.http.Constant (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.http.Constant

+
+No usage of com.easypost.http.Constant
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/http/class-use/EasyPostResponse.html b/docs/com/easypost/http/class-use/EasyPostResponse.html new file mode 100644 index 000000000..2869e8e8b --- /dev/null +++ b/docs/com/easypost/http/class-use/EasyPostResponse.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.http.EasyPostResponse (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.http.EasyPostResponse

+
+No usage of com.easypost.http.EasyPostResponse
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/http/class-use/HashMapSerializer.html b/docs/com/easypost/http/class-use/HashMapSerializer.html new file mode 100644 index 000000000..c484ffb6d --- /dev/null +++ b/docs/com/easypost/http/class-use/HashMapSerializer.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.http.HashMapSerializer (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.http.HashMapSerializer

+
+No usage of com.easypost.http.HashMapSerializer
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/http/class-use/Requestor.RequestMethod.html b/docs/com/easypost/http/class-use/Requestor.RequestMethod.html new file mode 100644 index 000000000..d351b4c60 --- /dev/null +++ b/docs/com/easypost/http/class-use/Requestor.RequestMethod.html @@ -0,0 +1,134 @@ + + + + + +Uses of Enum com.easypost.http.Requestor.RequestMethod (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum
com.easypost.http.Requestor.RequestMethod

+
+
Packages that use Requestor.RequestMethod
+
+
Package
+
Description
+ +
+
Classes for handling requests and responses to the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/http/class-use/Requestor.html b/docs/com/easypost/http/class-use/Requestor.html new file mode 100644 index 000000000..1fa52dd10 --- /dev/null +++ b/docs/com/easypost/http/class-use/Requestor.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.http.Requestor (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.http.Requestor

+
+No usage of com.easypost.http.Requestor
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/http/package-summary.html b/docs/com/easypost/http/package-summary.html new file mode 100644 index 000000000..9859dfde6 --- /dev/null +++ b/docs/com/easypost/http/package-summary.html @@ -0,0 +1,109 @@ + + + + + +com.easypost.http (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.easypost.http

+
+
+
package com.easypost.http
+
+
Classes for handling requests and responses to the EasyPost API.
+
+
Since:
+
1.0
+
Version:
+
1.0
+
Author:
+
EasyPost developers
+
See Also:
+
EasyPost API
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/http/package-tree.html b/docs/com/easypost/http/package-tree.html new file mode 100644 index 000000000..ade7e4ec3 --- /dev/null +++ b/docs/com/easypost/http/package-tree.html @@ -0,0 +1,97 @@ + + + + + +com.easypost.http Class Hierarchy (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.easypost.http

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Enum Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/http/package-use.html b/docs/com/easypost/http/package-use.html new file mode 100644 index 000000000..dc8f39652 --- /dev/null +++ b/docs/com/easypost/http/package-use.html @@ -0,0 +1,90 @@ + + + + + +Uses of Package com.easypost.http (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
com.easypost.http

+
+
Packages that use com.easypost.http
+
+
Package
+
Description
+ +
+
Classes for handling requests and responses to the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Address.html b/docs/com/easypost/model/Address.html new file mode 100644 index 000000000..d155fad5a --- /dev/null +++ b/docs/com/easypost/model/Address.html @@ -0,0 +1,548 @@ + + + + + +Address (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Address

+
+ +
+
+
public final class Address +extends BaseAddress
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Address

      +
      public Address()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCarrierFacility

      +
      public String getCarrierFacility()
      +
      Get carrier facility for address.
      +
      +
      Returns:
      +
      address carrier facility
      +
      +
      +
    • +
    • +
      +

      setCarrierFacility

      +
      public void setCarrierFacility(String carrierFacility)
      +
      Set carrier facility for address.
      +
      +
      Parameters:
      +
      carrierFacility - address carrier facility
      +
      +
      +
    • +
    • +
      +

      getFederalTaxId

      +
      public String getFederalTaxId()
      +
      Get federal tax id of address.
      +
      +
      Returns:
      +
      address federal tax id
      +
      +
      +
    • +
    • +
      +

      setFederalTaxId

      +
      public void setFederalTaxId(String federalTaxId)
      +
      Set federal tax id of address.
      +
      +
      Parameters:
      +
      federalTaxId - address federal tax id
      +
      +
      +
    • +
    • +
      +

      getMessage

      +
      public String getMessage()
      +
      Get address message.
      +
      +
      Returns:
      +
      address message
      +
      +
      +
    • +
    • +
      +

      setMessage

      +
      public void setMessage(String message)
      +
      Set address message.
      +
      +
      Parameters:
      +
      message - address message
      +
      +
      +
    • +
    • +
      +

      getResidential

      +
      public Boolean getResidential()
      +
      Get whether address is residential.
      +
      +
      Returns:
      +
      whether address is residential
      +
      +
      +
    • +
    • +
      +

      setResidential

      +
      public void setResidential(Boolean residential)
      +
      Set whether address is residential.
      +
      +
      Parameters:
      +
      residential - whether address is residential
      +
      +
      +
    • +
    • +
      +

      getVerifications

      +
      public AddressVerifications getVerifications()
      +
      Get verifications for address.
      +
      +
      Returns:
      +
      address verifications
      +
      +
      +
    • +
    • +
      +

      setVerifications

      +
      public void setVerifications(AddressVerifications verifications)
      +
      Set verifications for address.
      +
      +
      Parameters:
      +
      verifications - address verifications
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Address create(Map<String,​Object> params) + throws EasyPostException
      +
      Create Address object from parameter map.
      +
      +
      Parameters:
      +
      params - Map of address parameters.
      +
      Returns:
      +
      Address object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Address create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create Address object from parameter map.
      +
      +
      Parameters:
      +
      params - Map of address parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Address object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Address retrieve(String id) + throws EasyPostException
      +
      Retrieve Address object from API.
      +
      +
      Parameters:
      +
      id - ID of address to retrieve.
      +
      Returns:
      +
      Address object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Address retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve Address object from API.
      +
      +
      Parameters:
      +
      id - ID of address to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Address object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static AddressCollection all(Map<String,​Object> params) + throws EasyPostException
      +
      List all Address objects.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      AddressCollection object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static AddressCollection all(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      List all Address objects.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      AddressCollection object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      createAndVerify

      +
      public static Address createAndVerify(Map<String,​Object> params) + throws EasyPostException
      +
      Create Address object from parameter map and immediately verify it.
      +
      +
      Parameters:
      +
      params - Map of address parameters.
      +
      Returns:
      +
      Address object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      createAndVerify

      +
      public static Address createAndVerify(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create Address object from parameter map and immediately verify it.
      +
      +
      Parameters:
      +
      params - Map of address parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Address object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      verify

      +
      public Address verify() + throws EasyPostException
      +
      Verify this Address object.
      +
      +
      Returns:
      +
      Address object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      verify

      +
      public Address verify(String apiKey) + throws EasyPostException
      +
      Verify this Address object.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Address object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/AddressCollection.html b/docs/com/easypost/model/AddressCollection.html new file mode 100644 index 000000000..a2a61af71 --- /dev/null +++ b/docs/com/easypost/model/AddressCollection.html @@ -0,0 +1,227 @@ + + + + + +AddressCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressCollection

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.AddressCollection
+
+
+
+
+
public final class AddressCollection +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AddressCollection

      +
      public AddressCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getAddresses

      +
      public List<Address> getAddresses()
      +
      Get a list of addresses.
      +
      +
      Returns:
      +
      List of Address objects
      +
      +
      +
    • +
    • +
      +

      setAddresses

      +
      public void setAddresses(List<Address> addresses)
      +
      Set a list of addresses.
      +
      +
      Parameters:
      +
      addresses - List of Address objects
      +
      +
      +
    • +
    • +
      +

      getHasMore

      +
      public Boolean getHasMore()
      +
      Get whether there are more addresses to retrieve.
      +
      +
      Returns:
      +
      whether there are more addresses to retrieve
      +
      +
      +
    • +
    • +
      +

      setHasMore

      +
      public void setHasMore(Boolean hasMore)
      +
      Set whether there are more addresses to retrieve.
      +
      +
      Parameters:
      +
      hasMore - Boolean whether there are more addresses to retrieve
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/AddressDetail.html b/docs/com/easypost/model/AddressDetail.html new file mode 100644 index 000000000..18deeeafa --- /dev/null +++ b/docs/com/easypost/model/AddressDetail.html @@ -0,0 +1,254 @@ + + + + + +AddressDetail (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressDetail

+
+
java.lang.Object +
com.easypost.model.AddressDetail
+
+
+
+
public final class AddressDetail +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AddressDetail

      +
      public AddressDetail()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getLatitude

      +
      public Float getLatitude()
      +
      Get latitude of the address.
      +
      +
      Returns:
      +
      latitude of the address.
      +
      +
      +
    • +
    • +
      +

      setLatitude

      +
      public void setLatitude(Float latitude)
      +
      Set latitude of the address.
      +
      +
      Parameters:
      +
      latitude - latitude of the address.
      +
      +
      +
    • +
    • +
      +

      getLongitude

      +
      public Float getLongitude()
      +
      Get longitude of the address.
      +
      +
      Returns:
      +
      longitude of the address.
      +
      +
      +
    • +
    • +
      +

      setLongitude

      +
      public void setLongitude(Float longitude)
      +
      Set longitude of the address.
      +
      +
      Parameters:
      +
      longitude - longitude of the address.
      +
      +
      +
    • +
    • +
      +

      getTimeZone

      +
      public String getTimeZone()
      +
      Get time zone of the address.
      +
      +
      Returns:
      +
      time zone of the address.
      +
      +
      +
    • +
    • +
      +

      setCode

      +
      public void setCode(String timeZone)
      +
      Set time zone of the address.
      +
      +
      Parameters:
      +
      timeZone - time zone of the address.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/AddressVerification.html b/docs/com/easypost/model/AddressVerification.html new file mode 100644 index 000000000..7e44408d2 --- /dev/null +++ b/docs/com/easypost/model/AddressVerification.html @@ -0,0 +1,254 @@ + + + + + +AddressVerification (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressVerification

+
+
java.lang.Object +
com.easypost.model.AddressVerification
+
+
+
+
public final class AddressVerification +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AddressVerification

      +
      public AddressVerification()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getAddressDetail

      +
      public AddressDetail getAddressDetail()
      +
      Get the address detail object.
      +
      +
      Returns:
      +
      AddressDetail object
      +
      +
      +
    • +
    • +
      +

      setAddressDetail

      +
      public void setAddressDetail(AddressDetail details)
      +
      Set the address detail object.
      +
      +
      Parameters:
      +
      details - AddressDetail object
      +
      +
      +
    • +
    • +
      +

      getErrors

      +
      public List<Error> getErrors()
      +
      Get the list of errors that occurred during the address verification.
      +
      +
      Returns:
      +
      list of Error objects
      +
      +
      +
    • +
    • +
      +

      setErrors

      +
      public void setErrors(List<Error> errors)
      +
      Set the list of errors that occurred during the address verification.
      +
      +
      Parameters:
      +
      errors - list of Error objects
      +
      +
      +
    • +
    • +
      +

      getSuccess

      +
      public Boolean getSuccess()
      +
      Get whether the address verification was successful.
      +
      +
      Returns:
      +
      true if the address was successfully verified
      +
      +
      +
    • +
    • +
      +

      setSuccess

      +
      public void setSuccess(Boolean success)
      +
      Set whether the address verification was successful.
      +
      +
      Parameters:
      +
      success - true if the address was successfully verified
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/AddressVerifications.html b/docs/com/easypost/model/AddressVerifications.html new file mode 100644 index 000000000..5f0563e36 --- /dev/null +++ b/docs/com/easypost/model/AddressVerifications.html @@ -0,0 +1,227 @@ + + + + + +AddressVerifications (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressVerifications

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.AddressVerifications
+
+
+
+
+
public class AddressVerifications +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AddressVerifications

      +
      public AddressVerifications()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getDelivery

      +
      public AddressVerification getDelivery()
      +
      Get the delivery of the AddressVerifications.
      +
      +
      Returns:
      +
      Delivery of the AddressVerifications.
      +
      +
      +
    • +
    • +
      +

      setDelivery

      +
      public void setDelivery(AddressVerification delivery)
      +
      Set the delivery of the AddressVerification.
      +
      +
      Parameters:
      +
      delivery - Delivery of the AddressVerification.
      +
      +
      +
    • +
    • +
      +

      getZip4

      +
      public AddressVerification getZip4()
      +
      Get the zip4 of the AddressVerification.
      +
      +
      Returns:
      +
      Zip4 of the AddressVerification.
      +
      +
      +
    • +
    • +
      +

      setZip4

      +
      public void setZip4(AddressVerification zip4)
      +
      Set the zip4 of the AddressVerification.
      +
      +
      Parameters:
      +
      zip4 - Zip4 of the AddressVerification.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/AddressVerifyResponse.html b/docs/com/easypost/model/AddressVerifyResponse.html new file mode 100644 index 000000000..8abcccc55 --- /dev/null +++ b/docs/com/easypost/model/AddressVerifyResponse.html @@ -0,0 +1,222 @@ + + + + + +AddressVerifyResponse (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressVerifyResponse

+
+
java.lang.Object +
com.easypost.model.AddressVerifyResponse
+
+
+
+
public class AddressVerifyResponse +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AddressVerifyResponse

      +
      public AddressVerifyResponse()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getAddress

      +
      public Address getAddress()
      +
      Get the Address object.
      +
      +
      Returns:
      +
      Address
      +
      +
      +
    • +
    • +
      +

      setAddress

      +
      public void setAddress(Address address)
      +
      Set the Address object.
      +
      +
      Parameters:
      +
      address - Address
      +
      +
      +
    • +
    • +
      +

      getMessage

      +
      public String getMessage()
      +
      Get the message.
      +
      +
      Returns:
      +
      message
      +
      +
      +
    • +
    • +
      +

      setMessage

      +
      public void setMessage(String message)
      +
      Set the message.
      +
      +
      Parameters:
      +
      message - message
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/ApiKey.html b/docs/com/easypost/model/ApiKey.html new file mode 100644 index 000000000..64ce99476 --- /dev/null +++ b/docs/com/easypost/model/ApiKey.html @@ -0,0 +1,195 @@ + + + + + +ApiKey (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ApiKey

+
+ +
+
+
public final class ApiKey +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ApiKey

      +
      public ApiKey()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getKey

      +
      public String getKey()
      +
      Get the API key.
      +
      +
      Returns:
      +
      API key
      +
      +
      +
    • +
    • +
      +

      setKey

      +
      public void setKey(String key)
      +
      Set the API key.
      +
      +
      Parameters:
      +
      key - API key
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/ApiKeys.html b/docs/com/easypost/model/ApiKeys.html new file mode 100644 index 000000000..c9b8ab219 --- /dev/null +++ b/docs/com/easypost/model/ApiKeys.html @@ -0,0 +1,267 @@ + + + + + +ApiKeys (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ApiKeys

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.ApiKeys
+
+
+
+
+
public final class ApiKeys +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ApiKeys

      +
      public ApiKeys()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getChildren

      +
      public List<ApiKeys> getChildren()
      +
      Get a list of API keys for a given parent key.
      +
      +
      Returns:
      +
      List of ApiKeys objects.
      +
      +
      +
    • +
    • +
      +

      setChildren

      +
      public void setChildren(List<ApiKeys> children)
      +
      Set a list of API keys for a given parent key.
      +
      +
      Parameters:
      +
      children - List of ApiKeys objects.
      +
      +
      +
    • +
    • +
      +

      getKeys

      +
      public List<ApiKey> getKeys()
      +
      Get a list of API keys.
      +
      +
      Returns:
      +
      List of ApiKey objects.
      +
      +
      +
    • +
    • +
      +

      setKeys

      +
      public void setKeys(List<ApiKey> keys)
      +
      Set list of API keys.
      +
      +
      Parameters:
      +
      keys - List of ApiKey objects.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static ApiKeys all() + throws EasyPostException
      +
      Get all API keys.
      +
      +
      Returns:
      +
      ApiKeys object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static ApiKeys all(String apiKey) + throws EasyPostException
      +
      Get all API keys.
      +
      +
      Parameters:
      +
      apiKey - API key to use for this request.
      +
      Returns:
      +
      ApiKeys object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/BaseAddress.html b/docs/com/easypost/model/BaseAddress.html new file mode 100644 index 000000000..be1aa538b --- /dev/null +++ b/docs/com/easypost/model/BaseAddress.html @@ -0,0 +1,487 @@ + + + + + +BaseAddress (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BaseAddress

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.BaseAddress
+
+
+
+
+
Direct Known Subclasses:
+
Address, EndShipper
+
+
+
public class BaseAddress +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BaseAddress

      +
      public BaseAddress()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCity

      +
      public String getCity()
      +
      Get city of address.
      +
      +
      Returns:
      +
      address city
      +
      +
      +
    • +
    • +
      +

      setCity

      +
      public void setCity(String city)
      +
      Set city of address.
      +
      +
      Parameters:
      +
      city - address city
      +
      +
      +
    • +
    • +
      +

      getCompany

      +
      public String getCompany()
      +
      Get company of Address.
      +
      +
      Returns:
      +
      Address company
      +
      +
      +
    • +
    • +
      +

      setCompany

      +
      public void setCompany(String company)
      +
      Set company of Address.
      +
      +
      Parameters:
      +
      company - Address company
      +
      +
      +
    • +
    • +
      +

      getCountry

      +
      public String getCountry()
      +
      Get country of Address.
      +
      +
      Returns:
      +
      Address country
      +
      +
      +
    • +
    • +
      +

      setCountry

      +
      public void setCountry(String country)
      +
      Set country of Address.
      +
      +
      Parameters:
      +
      country - Address country
      +
      +
      +
    • +
    • +
      +

      getEmail

      +
      public String getEmail()
      +
      Get email of Address.
      +
      +
      Returns:
      +
      Address email
      +
      +
      +
    • +
    • +
      +

      setEmail

      +
      public void setEmail(String email)
      +
      Set email of Address.
      +
      +
      Parameters:
      +
      email - Address email
      +
      +
      +
    • +
    • +
      +

      getName

      +
      public String getName()
      +
      Get name of Address.
      +
      +
      Returns:
      +
      Address name
      +
      +
      +
    • +
    • +
      +

      setName

      +
      public void setName(String name)
      +
      Set name of Address.
      +
      +
      Parameters:
      +
      name - Address name
      +
      +
      +
    • +
    • +
      +

      getPhone

      +
      public String getPhone()
      +
      Get phone number of Address.
      +
      +
      Returns:
      +
      Address phone number
      +
      +
      +
    • +
    • +
      +

      setPhone

      +
      public void setPhone(String phone)
      +
      Set phone number of Address.
      +
      +
      Parameters:
      +
      phone - Address phone number
      +
      +
      +
    • +
    • +
      +

      getState

      +
      public String getState()
      +
      Get state of Address.
      +
      +
      Returns:
      +
      Address state
      +
      +
      +
    • +
    • +
      +

      setState

      +
      public void setState(String state)
      +
      Set state of Address.
      +
      +
      Parameters:
      +
      state - Address state
      +
      +
      +
    • +
    • +
      +

      getStreet1

      +
      public String getStreet1()
      +
      Get first line of Address street.
      +
      +
      Returns:
      +
      first line of Address street
      +
      +
      +
    • +
    • +
      +

      setStreet1

      +
      public void setStreet1(String street1)
      +
      Set first line of Address street.
      +
      +
      Parameters:
      +
      street1 - first line of Address street
      +
      +
      +
    • +
    • +
      +

      getStreet2

      +
      public String getStreet2()
      +
      Get second line of Address street.
      +
      +
      Returns:
      +
      second line of Address street
      +
      +
      +
    • +
    • +
      +

      setStreet2

      +
      public void setStreet2(String street2)
      +
      Set second line of Address street.
      +
      +
      Parameters:
      +
      street2 - second line of Address street
      +
      +
      +
    • +
    • +
      +

      getZip

      +
      public String getZip()
      +
      Get zip code of Address.
      +
      +
      Returns:
      +
      Address zip code
      +
      +
      +
    • +
    • +
      +

      setZip

      +
      public void setZip(String zip)
      +
      Set zip code of Address.
      +
      +
      Parameters:
      +
      zip - Address zip code
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/BaseCreditCard.html b/docs/com/easypost/model/BaseCreditCard.html new file mode 100644 index 000000000..937001374 --- /dev/null +++ b/docs/com/easypost/model/BaseCreditCard.html @@ -0,0 +1,392 @@ + + + + + +BaseCreditCard (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BaseCreditCard

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.BaseCreditCard
+
+
+
+
+
Direct Known Subclasses:
+
CreditCard, PrimaryPaymentMethod, SecondaryPaymentMethod
+
+
+
@Deprecated +public class BaseCreditCard +extends EasyPostResource
+
Deprecated. +
Use PaymentMethodObject instead. + Deprecated: v5.5.0 - v7.0.0
+
+
BaseCreditCard is a model class that represents the base of any credit card.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BaseCreditCard

      +
      public BaseCreditCard()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getBrand

      +
      public String getBrand()
      +
      Deprecated.
      +
      Get the brand of this CreditCard object.
      +
      +
      Returns:
      +
      the brand of this CreditCard.
      +
      +
      +
    • +
    • +
      +

      setBrand

      +
      public void setBrand(String brand)
      +
      Deprecated.
      +
      Set the brand of this CreditCard object.
      +
      +
      Parameters:
      +
      brand - the brand of this CreditCard.
      +
      +
      +
    • +
    • +
      +

      getExpMonth

      +
      public String getExpMonth()
      +
      Deprecated.
      +
      Get the expMonth of this CreditCard object.
      +
      +
      Returns:
      +
      the expMonth of this CreditCard.
      +
      +
      +
    • +
    • +
      +

      setExpMonth

      +
      public void setExpMonth(String expMonth)
      +
      Deprecated.
      +
      Set the expMonth of this CreditCard object.
      +
      +
      Parameters:
      +
      expMonth - the expMonth of this CreditCard.
      +
      +
      +
    • +
    • +
      +

      getExpYear

      +
      public String getExpYear()
      +
      Deprecated.
      +
      Get the expYear of this CreditCard object.
      +
      +
      Returns:
      +
      the expYear of this CreditCard.
      +
      +
      +
    • +
    • +
      +

      setExpYear

      +
      public void setExpYear(String expYear)
      +
      Deprecated.
      +
      Set the expYear of this CreditCard object.
      +
      +
      Parameters:
      +
      expYear - the expYear of this CreditCard.
      +
      +
      +
    • +
    • +
      +

      getLast4

      +
      public String getLast4()
      +
      Deprecated.
      +
      Get the last 4 digits of this CreditCard object.
      +
      +
      Returns:
      +
      the last 4 digits of this CreditCard.
      +
      +
      +
    • +
    • +
      +

      setLast4

      +
      public void setLast4(String last4)
      +
      Deprecated.
      +
      Set the last 4 digits of this CreditCard object.
      +
      +
      Parameters:
      +
      last4 - the last 4 digits of this CreditCard.
      +
      +
      +
    • +
    • +
      +

      getName

      +
      public String getName()
      +
      Deprecated.
      +
      Get the name of this CreditCard object.
      +
      +
      Returns:
      +
      the name of this CreditCard.
      +
      +
      +
    • +
    • +
      +

      setName

      +
      public void setName(String name)
      +
      Deprecated.
      +
      Set the name of this CreditCard object.
      +
      +
      Parameters:
      +
      name - the name of this CreditCard.
      +
      +
      +
    • +
    • +
      +

      getObject

      +
      public String getObject()
      +
      Deprecated.
      +
      Get the object of this CreditCard object.
      +
      +
      Returns:
      +
      the object of this CreditCard.
      +
      +
      +
    • +
    • +
      +

      setObject

      +
      public void setObject(String object)
      +
      Deprecated.
      +
      Set the object of this CreditCard object.
      +
      +
      Parameters:
      +
      object - the object of this CreditCard.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/BaseUser.html b/docs/com/easypost/model/BaseUser.html new file mode 100644 index 000000000..4597d9afa --- /dev/null +++ b/docs/com/easypost/model/BaseUser.html @@ -0,0 +1,711 @@ + + + + + +BaseUser (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BaseUser

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.BaseUser
+
+
+
+
+
Direct Known Subclasses:
+
ReferralCustomer, User
+
+
+
public class BaseUser +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BaseUser

      +
      public BaseUser()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getBalance

      +
      public String getBalance()
      +
      Get the balance of the User.
      +
      +
      Returns:
      +
      the balance of the User.
      +
      +
      +
    • +
    • +
      +

      setBalance

      +
      public void setBalance(String balance)
      +
      Set the balance of the User.
      +
      +
      Parameters:
      +
      balance - the balance of the User.
      +
      +
      +
    • +
    • +
      +

      getCcFeeRate

      +
      public String getCcFeeRate()
      +
      Get the cc fee rate of the User.
      +
      +
      Returns:
      +
      the cc fee rate of the User.
      +
      +
      +
    • +
    • +
      +

      setCcFeeRate

      +
      public void setCcFeeRate(String ccFeeRate)
      +
      Set the cc fee rate of the User.
      +
      +
      Parameters:
      +
      ccFeeRate - the cc fee rate of the User.
      +
      +
      +
    • +
    • +
      +

      getChildren

      +
      public List<User> getChildren()
      +
      Get the children of the User.
      +
      +
      Returns:
      +
      List of User objects.
      +
      +
      +
    • +
    • +
      +

      setChildren

      +
      public void setChildren(List<User> children)
      +
      Set the children of the User.
      +
      +
      Parameters:
      +
      children - List of User objects.
      +
      +
      +
    • +
    • +
      +

      getDefaultInsuranceAmount

      +
      public String getDefaultInsuranceAmount()
      +
      Get the default insurance amount of the User.
      +
      +
      Returns:
      +
      the default insurance amount of the User.
      +
      +
      +
    • +
    • +
      +

      setDefaultInsuranceAmount

      +
      public void setDefaultInsuranceAmount(String defaultInsuranceAmount)
      +
      Set the default insurance amount of the User.
      +
      +
      Parameters:
      +
      defaultInsuranceAmount - the default insurance amount of the User.
      +
      +
      +
    • +
    • +
      +

      getEmail

      +
      public String getEmail()
      +
      Get the email of the User.
      +
      +
      Returns:
      +
      the email of the User.
      +
      +
      +
    • +
    • +
      +

      setEmail

      +
      public void setEmail(String email)
      +
      Set the email of the User.
      +
      +
      Parameters:
      +
      email - the email of the User.
      +
      +
      +
    • +
    • +
      +

      getHasBillingMethod

      +
      public boolean getHasBillingMethod()
      +
      Get the has billing method of the User.
      +
      +
      Returns:
      +
      the has billing method of the User.
      +
      +
      +
    • +
    • +
      +

      setHasBillingMethod

      +
      public void setHasBillingMethod(boolean hasBillingMethod)
      +
      Set the has billing method of the User.
      +
      +
      Parameters:
      +
      hasBillingMethod - the has billing method of the User.
      +
      +
      +
    • +
    • +
      +

      getInsuranceFeeMinimum

      +
      public String getInsuranceFeeMinimum()
      +
      Get the insurance fee minimum of the User.
      +
      +
      Returns:
      +
      the insurance fee minimum of the User.
      +
      +
      +
    • +
    • +
      +

      setInsuranceFeeMinimum

      +
      public void setInsuranceFeeMinimum(String insuranceFeeMinimum)
      +
      Set the insurance fee minimum of the User.
      +
      +
      Parameters:
      +
      insuranceFeeMinimum - the insurance fee minimum of the User.
      +
      +
      +
    • +
    • +
      +

      getInsuranceFeeRate

      +
      public String getInsuranceFeeRate()
      +
      Get the insurance fee rate of the User.
      +
      +
      Returns:
      +
      the insurance fee rate of the User.
      +
      +
      +
    • +
    • +
      +

      setInsuranceFeeRate

      +
      public void setInsuranceFeeRate(String insuranceFeeRate)
      +
      Set the insurance fee rate of the User.
      +
      +
      Parameters:
      +
      insuranceFeeRate - the insurance fee rate of the User.
      +
      +
      +
    • +
    • +
      +

      getName

      +
      public String getName()
      +
      Get the name of the User.
      +
      +
      Returns:
      +
      the name of the User.
      +
      +
      +
    • +
    • +
      +

      setName

      +
      public void setName(String name)
      +
      Set the name of the User.
      +
      +
      Parameters:
      +
      name - the name of the User.
      +
      +
      +
    • +
    • +
      +

      getObject

      +
      public String getObject()
      +
      Get the object of the User.
      +
      +
      Returns:
      +
      the object of the User.
      +
      +
      +
    • +
    • +
      +

      setObject

      +
      public void setObject(String object)
      +
      Set the object of the User.
      +
      +
      Parameters:
      +
      object - the object of the User.
      +
      +
      +
    • +
    • +
      +

      getParentId

      +
      public String getParentId()
      +
      Get the parent ID of the User.
      +
      +
      Returns:
      +
      the parent ID of the User.
      +
      +
      +
    • +
    • +
      +

      setParentId

      +
      public void setParentId(String parentId)
      +
      Set the parent ID of the User.
      +
      +
      Parameters:
      +
      parentId - the parent ID of the User.
      +
      +
      +
    • +
    • +
      +

      getPhoneNumber

      +
      public String getPhoneNumber()
      +
      Get the phone number of the User.
      +
      +
      Returns:
      +
      the phone number of the User.
      +
      +
      +
    • +
    • +
      +

      setPhoneNumber

      +
      public void setPhoneNumber(String phoneNumber)
      +
      Set the phone number of the User.
      +
      +
      Parameters:
      +
      phoneNumber - the phone number of the User.
      +
      +
      +
    • +
    • +
      +

      getPricePerShipment

      +
      public String getPricePerShipment()
      +
      Get the price per shipment of the User.
      +
      +
      Returns:
      +
      the price per shipment of the User.
      +
      +
      +
    • +
    • +
      +

      setPricePerShipment

      +
      public void setPricePerShipment(String pricePerShipment)
      +
      Set the price per shipment of the User.
      +
      +
      Parameters:
      +
      pricePerShipment - the price per shipment of the User.
      +
      +
      +
    • +
    • +
      +

      getRechargeAmount

      +
      public String getRechargeAmount()
      +
      Get the recharge amount of the User.
      +
      +
      Returns:
      +
      the recharge amount of the User.
      +
      +
      +
    • +
    • +
      +

      setRechargeAmount

      +
      public void setRechargeAmount(String rechargeAmount)
      +
      Set the recharge amount of the User.
      +
      +
      Parameters:
      +
      rechargeAmount - the recharge amount of the User.
      +
      +
      +
    • +
    • +
      +

      getRechargeThreshold

      +
      public String getRechargeThreshold()
      +
      Get the recharge threshold of the User.
      +
      +
      Returns:
      +
      the recharge threshold of the User.
      +
      +
      +
    • +
    • +
      +

      setRechargeThreshold

      +
      public void setRechargeThreshold(String rechargeThreshold)
      +
      Set the recharge threshold of the User.
      +
      +
      Parameters:
      +
      rechargeThreshold - the recharge threshold of the User.
      +
      +
      +
    • +
    • +
      +

      getSecondaryRechargeAmount

      +
      public String getSecondaryRechargeAmount()
      +
      Get the secondary recharge amount of the User.
      +
      +
      Returns:
      +
      the secondary recharge amount of the User.
      +
      +
      +
    • +
    • +
      +

      setSecondaryRechargeAmount

      +
      public void setSecondaryRechargeAmount(String secondaryRechargeAmount)
      +
      Set the secondary recharge amount of the User.
      +
      +
      Parameters:
      +
      secondaryRechargeAmount - the secondary recharge amount of the User.
      +
      +
      +
    • +
    • +
      +

      getVerified

      +
      public boolean getVerified()
      +
      Get the verified of the User.
      +
      +
      Returns:
      +
      the verified of the User.
      +
      +
      +
    • +
    • +
      +

      setVerified

      +
      public void setVerified(boolean verified)
      +
      Set the verified of the User.
      +
      +
      Parameters:
      +
      verified - the verified of the User.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Batch.html b/docs/com/easypost/model/Batch.html new file mode 100644 index 000000000..b53499a05 --- /dev/null +++ b/docs/com/easypost/model/Batch.html @@ -0,0 +1,1043 @@ + + + + + +Batch (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Batch

+
+ +
+
+
public final class Batch +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Batch

      +
      public Batch()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getBatchStatus

      +
      public BatchStatus getBatchStatus()
      +
      Get status of this batch.
      +
      +
      Returns:
      +
      status of this batch.
      +
      +
      +
    • +
    • +
      +

      setBatchStatus

      +
      public void setBatchStatus(BatchStatus status)
      +
      Set status of this batch.
      +
      +
      Parameters:
      +
      status - status of this batch.
      +
      +
      +
    • +
    • +
      +

      getNumShipments

      +
      public Number getNumShipments()
      +
      Get number of shipments in this batch.
      +
      +
      Returns:
      +
      number of shipments in this batch.
      +
      +
      +
    • +
    • +
      +

      setNumShipments

      +
      public void setNumShipments(Number numShipments)
      +
      Set number of shipments in this batch.
      +
      +
      Parameters:
      +
      numShipments - number of shipments in this batch.
      +
      +
      +
    • +
    • +
      +

      getReference

      +
      public String getReference()
      +
      Get reference of this batch.
      +
      +
      Returns:
      +
      reference of this batch.
      +
      +
      +
    • +
    • +
      +

      setReference

      +
      public void setReference(String reference)
      +
      Set reference of this batch.
      +
      +
      Parameters:
      +
      reference - reference of this batch.
      +
      +
      +
    • +
    • +
      +

      getScanForm

      +
      public ScanForm getScanForm()
      +
      Get scan form of this batch.
      +
      +
      Returns:
      +
      ScanForm object.
      +
      +
      +
    • +
    • +
      +

      setScanForm

      +
      public void setScanForm(ScanForm scanForm)
      +
      Set scan form of this batch.
      +
      +
      Parameters:
      +
      scanForm - ScanForm object.
      +
      +
      +
    • +
    • +
      +

      getState

      +
      public String getState()
      +
      Get state of this batch.
      +
      +
      Returns:
      +
      state of this batch.
      +
      +
      +
    • +
    • +
      +

      setState

      +
      public void setState(String state)
      +
      Set state of this batch.
      +
      +
      Parameters:
      +
      state - state of this batch.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Batch create() + throws EasyPostException
      +
      Create a Batch object.
      +
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Batch create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a Batch object.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Batch create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a Batch object.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Batch retrieve(String id) + throws EasyPostException
      +
      Retrieve a Batch object from the API.
      +
      +
      Parameters:
      +
      id - ID of the Batch to retrieve.
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Batch retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a Batch object from the API.
      +
      +
      Parameters:
      +
      id - ID of the Batch to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static BatchCollection all(Map<String,​Object> params) + throws EasyPostException
      +
      List all Batch objects.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      BatchCollection object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static BatchCollection all(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      List all Batch objects.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      BatchCollection object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      createAndBuy

      +
      public static Batch createAndBuy(Map<String,​Object> params) + throws EasyPostException
      +
      Create and buy a Batch object in one step.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      createAndBuy

      +
      public static Batch createAndBuy(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create and buy a Batch object in one step.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Batch refresh() + throws EasyPostException
      +
      Refresh this Batch object.
      +
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Batch refresh(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Refresh this Batch object.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getLabelUrl

      +
      public String getLabelUrl()
      +
      Get label URL of this batch.
      +
      +
      Returns:
      +
      Label URL of this batch.x
      +
      +
      +
    • +
    • +
      +

      getShipments

      +
      public List<Shipment> getShipments()
      +
      Get shipments in this batch.
      +
      +
      Returns:
      +
      list of Shipment objects.
      +
      +
      +
    • +
    • +
      +

      setShipments

      +
      public void setShipments(List<Shipment> shipments)
      +
      Set shipments in this batch.
      +
      +
      Parameters:
      +
      shipments - list of Shipment objects.
      +
      +
      +
    • +
    • +
      +

      setLabelUrl

      +
      public void setLabelUrl(String labelUrl)
      +
      Set label url of this batch.
      +
      +
      Parameters:
      +
      labelUrl - Label URL of this batch.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Batch refresh(Map<String,​Object> params) + throws EasyPostException
      +
      Refresh this Batch object.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Batch refresh(String apiKey) + throws EasyPostException
      +
      Refresh this Batch object.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      label

      +
      public Batch label() + throws EasyPostException
      +
      Label this Batch object.
      +
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      label

      +
      public Batch label(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Label this Batch object.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      label

      +
      public Batch label(Map<String,​Object> params) + throws EasyPostException
      +
      Label this Batch object.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      addShipments

      +
      public Batch addShipments(List<Shipment> shipments) + throws EasyPostException
      +
      Add shipments to this Batch object.
      +
      +
      Parameters:
      +
      shipments - List of Shipment objects.
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      addShipments

      +
      public Batch addShipments(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Add shipments to this Batch object.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      addShipments

      +
      public Batch addShipments(List<Shipment> shipments, + String apiKey) + throws EasyPostException
      +
      Add shipments to this Batch object.
      +
      +
      Parameters:
      +
      shipments - List of Shipment objects.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      addShipments

      +
      public Batch addShipments(Map<String,​Object> params) + throws EasyPostException
      +
      Add shipments to this Batch object.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      removeShipments

      +
      public Batch removeShipments(List<Shipment> shipments) + throws EasyPostException
      +
      Remove shipments from this Batch object.
      +
      +
      Parameters:
      +
      shipments - List of Shipment objects.
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      removeShipments

      +
      public Batch removeShipments(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Remove shipments from this Batch object.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      removeShipments

      +
      public Batch removeShipments(List<Shipment> shipments, + String apiKey) + throws EasyPostException
      +
      Remove shipments from this Batch object.
      +
      +
      Parameters:
      +
      shipments - List of Shipment objects.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      removeShipments

      +
      public Batch removeShipments(Map<String,​Object> params) + throws EasyPostException
      +
      Remove shipments from this Batch object.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Batch buy() + throws EasyPostException
      +
      Buy this batch.
      +
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Batch buy(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Buy this batch.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Batch buy(Map<String,​Object> params) + throws EasyPostException
      +
      Buy this batch.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      createScanForm

      +
      public Batch createScanForm() + throws EasyPostException
      +
      Create a scan form for this batch.
      +
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      createScanForm

      +
      public Batch createScanForm(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a scan form for this batch.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      createScanForm

      +
      public Batch createScanForm(Map<String,​Object> params) + throws EasyPostException
      +
      Create a scan form for this batch.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      Batch object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/BatchCollection.html b/docs/com/easypost/model/BatchCollection.html new file mode 100644 index 000000000..c03f5e168 --- /dev/null +++ b/docs/com/easypost/model/BatchCollection.html @@ -0,0 +1,227 @@ + + + + + +BatchCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BatchCollection

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.BatchCollection
+
+
+
+
+
public final class BatchCollection +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BatchCollection

      +
      public BatchCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getBatches

      +
      public List<Batch> getBatches()
      +
      Get a list of batches.
      +
      +
      Returns:
      +
      List of Batch objects.
      +
      +
      +
    • +
    • +
      +

      setBatches

      +
      public void setBatches(List<Batch> batches)
      +
      Set a list of batches.
      +
      +
      Parameters:
      +
      batches - List of Batch objects.
      +
      +
      +
    • +
    • +
      +

      getHasMore

      +
      public Boolean getHasMore()
      +
      Get whether there are more batches to retrieve.
      +
      +
      Returns:
      +
      true if there are more batches to retrieve, false otherwise.
      +
      +
      +
    • +
    • +
      +

      setHasMore

      +
      public void setHasMore(Boolean hasMore)
      +
      Set whether there are more batches to retrieve.
      +
      +
      Parameters:
      +
      hasMore - true if there are more batches to retrieve, false otherwise.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/BatchStatus.html b/docs/com/easypost/model/BatchStatus.html new file mode 100644 index 000000000..ae6adad1e --- /dev/null +++ b/docs/com/easypost/model/BatchStatus.html @@ -0,0 +1,286 @@ + + + + + +BatchStatus (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BatchStatus

+
+
java.lang.Object +
com.easypost.model.BatchStatus
+
+
+
+
public final class BatchStatus +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BatchStatus

      +
      public BatchStatus()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCreated

      +
      public int getCreated()
      +
      Get the number of batches created.
      +
      +
      Returns:
      +
      the number of batches created.
      +
      +
      +
    • +
    • +
      +

      setCreated

      +
      public void setCreated(int created)
      +
      Set the number of batches created.
      +
      +
      Parameters:
      +
      created - the number of batches created.
      +
      +
      +
    • +
    • +
      +

      getCreationFailed

      +
      public int getCreationFailed()
      +
      Get the number of batches that failed to be created.
      +
      +
      Returns:
      +
      the number of batches that failed to be created.
      +
      +
      +
    • +
    • +
      +

      setCreationFailed

      +
      public void setCreationFailed(int creationFailed)
      +
      Set the number of batches that failed to be created.
      +
      +
      Parameters:
      +
      creationFailed - the number of batches that failed to be created.
      +
      +
      +
    • +
    • +
      +

      getPostagePurchaseFailed

      +
      public int getPostagePurchaseFailed()
      +
      Get the number of postage purchases that failed.
      +
      +
      Returns:
      +
      the number of postage purchases that failed.
      +
      +
      +
    • +
    • +
      +

      setPostagePurchaseFailed

      +
      public void setPostagePurchaseFailed(int postagePurchaseFailed)
      +
      Set the number of postage purchases that failed.
      +
      +
      Parameters:
      +
      postagePurchaseFailed - the number of postage purchases that failed.
      +
      +
      +
    • +
    • +
      +

      getPostagePurchased

      +
      public int getPostagePurchased()
      +
      Get the number of postage purchases.
      +
      +
      Returns:
      +
      the number of postage purchases.
      +
      +
      +
    • +
    • +
      +

      setPostagePurchased

      +
      public void setPostagePurchased(int postagePurchased)
      +
      Set the number of postage purchases.
      +
      +
      Parameters:
      +
      postagePurchased - the number of postage purchases.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Billing.html b/docs/com/easypost/model/Billing.html new file mode 100644 index 000000000..873650ce7 --- /dev/null +++ b/docs/com/easypost/model/Billing.html @@ -0,0 +1,310 @@ + + + + + +Billing (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Billing

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.Billing
+
+
+
+
+
public final class Billing +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Billing

      +
      public Billing()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      deletePaymentMethod

      +
      public static void deletePaymentMethod(PaymentMethod.Priority priority) + throws EasyPostException
      +
      Delete a payment method.
      +
      +
      Parameters:
      +
      priority - Which type of payment method to delete.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      deletePaymentMethod

      +
      public static void deletePaymentMethod(PaymentMethod.Priority priority, + String apiKey) + throws EasyPostException
      +
      Delete a payment method.
      +
      +
      Parameters:
      +
      priority - Which type of payment method to delete.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      fundWallet

      +
      public static void fundWallet(String amount) + throws EasyPostException
      +
      Fund your wallet from the primary payment method.
      +
      +
      Parameters:
      +
      amount - amount to fund.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      fundWallet

      +
      public static void fundWallet(String amount, + PaymentMethod.Priority priority) + throws EasyPostException
      +
      Fund your wallet from a specific payment method.
      +
      +
      Parameters:
      +
      amount - amount to fund.
      +
      priority - which type of payment method to use to fund the wallet. Defaults to primary.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      fundWallet

      +
      public static void fundWallet(String amount, + PaymentMethod.Priority priority, + String apiKey) + throws EasyPostException
      +
      Fund your wallet from a specific payment method.
      +
      +
      Parameters:
      +
      amount - amount to fund.
      +
      priority - which type of payment method to use to fund the wallet.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrievePaymentMethods

      +
      public static PaymentMethod retrievePaymentMethods() + throws EasyPostException
      +
      List all payment methods for this account.
      +
      +
      Returns:
      +
      an EasyPost.PaymentMethod summary object.
      +
      Throws:
      +
      EasyPostException - when the request fails or billing has not been set up.
      +
      +
      +
    • +
    • +
      +

      retrievePaymentMethods

      +
      public static PaymentMethod retrievePaymentMethods(String apiKey) + throws EasyPostException
      +
      List all payment methods for this account.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      an EasyPost.PaymentMethod summary object.
      +
      Throws:
      +
      EasyPostException - when the request fails or billing has not been set up.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Brand.html b/docs/com/easypost/model/Brand.html new file mode 100644 index 000000000..ddeaf7178 --- /dev/null +++ b/docs/com/easypost/model/Brand.html @@ -0,0 +1,451 @@ + + + + + +Brand (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Brand

+
+ +
+
+
public class Brand +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Brand

      +
      public Brand()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getAd

      +
      public String getAd()
      +
      Get the ad of the Brand.
      +
      +
      Returns:
      +
      the ad of the Brand.
      +
      +
      +
    • +
    • +
      +

      setAd

      +
      public void setAd(String ad)
      +
      Set the ad of the Brand.
      +
      +
      Parameters:
      +
      ad - the ad of the Brand.
      +
      +
      +
    • +
    • +
      +

      getAdHref

      +
      public String getAdHref()
      +
      Get the ad href of the Brand.
      +
      +
      Returns:
      +
      the ad href of the Brand.
      +
      +
      +
    • +
    • +
      +

      setAdHref

      +
      public void setAdHref(String adHref)
      +
      Set the ad href of the Brand.
      +
      +
      Parameters:
      +
      adHref - the ad href of the Brand.
      +
      +
      +
    • +
    • +
      +

      getBackgroundColor

      +
      public String getBackgroundColor()
      +
      Get the background of the Brand.
      +
      +
      Returns:
      +
      the background of the Brand.
      +
      +
      +
    • +
    • +
      +

      setBackgroundColor

      +
      public void setBackgroundColor(String backgroundColor)
      +
      Set the background of the Brand.
      +
      +
      Parameters:
      +
      backgroundColor - the background of the Brand.
      +
      +
      +
    • +
    • +
      +

      getColor

      +
      public String getColor()
      +
      Get the color of the Brand.
      +
      +
      Returns:
      +
      the color of the Brand.
      +
      +
      +
    • +
    • +
      +

      setColor

      +
      public void setColor(String color)
      +
      Set the color of the Brand.
      +
      +
      Parameters:
      +
      color - the color of the Brand.
      +
      +
      +
    • +
    • +
      +

      getLogo

      +
      public String getLogo()
      +
      Get the logo of the Brand.
      +
      +
      Returns:
      +
      the logo of the Brand.
      +
      +
      +
    • +
    • +
      +

      setLogo

      +
      public void setLogo(String logo)
      +
      Set the logo of the Brand.
      +
      +
      Parameters:
      +
      logo - the logo of the Brand.
      +
      +
      +
    • +
    • +
      +

      getLogoHref

      +
      public String getLogoHref()
      +
      Get the logo href of the Brand.
      +
      +
      Returns:
      +
      the logo href of the Brand.
      +
      +
      +
    • +
    • +
      +

      setLogoHref

      +
      public void setLogoHref(String logoHref)
      +
      Set the logo href of the Brand.
      +
      +
      Parameters:
      +
      logoHref - the logo href of the Brand.
      +
      +
      +
    • +
    • +
      +

      getName

      +
      public String getName()
      +
      Get the name of the User.
      +
      +
      Returns:
      +
      the name of the User.
      +
      +
      +
    • +
    • +
      +

      setName

      +
      public void setName(String name)
      +
      Set the name of the User.
      +
      +
      Parameters:
      +
      name - the name of the User.
      +
      +
      +
    • +
    • +
      +

      getTheme

      +
      public String getTheme()
      +
      Get the theme of the Brand.
      +
      +
      Returns:
      +
      the theme of the Brand.
      +
      +
      +
    • +
    • +
      +

      setTheme

      +
      public void setTheme(String theme)
      +
      Set the theme of the Brand.
      +
      +
      Parameters:
      +
      theme - the theme of the Brand.
      +
      +
      +
    • +
    • +
      +

      getUserID

      +
      public String getUserID()
      +
      Get the user ID of the Brand.
      +
      +
      Returns:
      +
      the user ID of the Brand.
      +
      +
      +
    • +
    • +
      +

      setUserID

      +
      public void setUserID(String userID)
      +
      Set the user ID of the Brand.
      +
      +
      Parameters:
      +
      userID - the user ID of the Brand.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/CarbonOffset.html b/docs/com/easypost/model/CarbonOffset.html new file mode 100644 index 000000000..d464cb0c8 --- /dev/null +++ b/docs/com/easypost/model/CarbonOffset.html @@ -0,0 +1,227 @@ + + + + + +CarbonOffset (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CarbonOffset

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.CarbonOffset
+
+
+
+
+
public final class CarbonOffset +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CarbonOffset

      +
      public CarbonOffset()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCurrency

      +
      public String getCurrency()
      +
      Get the currency of the provided price. Currently always USD.
      +
      +
      Returns:
      +
      the currency of the provided price. Currently always USD.
      +
      +
      +
    • +
    • +
      +

      getGrams

      +
      public int getGrams()
      +
      Get the amount of carbon grams emitted by the shipment.
      +
      +
      Returns:
      +
      the amount of carbon grams emitted by the shipment.
      +
      +
      +
    • +
    • +
      +

      getPrice

      +
      public String getPrice()
      +
      Get the price to offset the number of carbon grams.
      +
      +
      Returns:
      +
      the price to offset the number of carbon grams.
      +
      +
      +
    • +
    • +
      +

      getObject

      +
      public String getObject()
      +
      Get the type of this object.
      +
      +
      Returns:
      +
      the type of this object.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/CarrierAccount.html b/docs/com/easypost/model/CarrierAccount.html new file mode 100644 index 000000000..d878866f3 --- /dev/null +++ b/docs/com/easypost/model/CarrierAccount.html @@ -0,0 +1,718 @@ + + + + + +CarrierAccount (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CarrierAccount

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.CarrierAccount
+
+
+
+
+
public final class CarrierAccount +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CarrierAccount

      +
      public CarrierAccount()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getBillingType

      +
      public String getBillingType()
      +
      Get billing type of the carrier account.
      +
      +
      Returns:
      +
      billing type of the carrier account.
      +
      +
      +
    • +
    • +
      +

      setBillingType

      +
      public void setBillingType(String billingType)
      +
      Set billing type of the carrier account.
      +
      +
      Parameters:
      +
      billingType - billing type of the carrier account.
      +
      +
      +
    • +
    • +
      +

      getCredentials

      +
      public Map<String,​Object> getCredentials()
      +
      Get credentials of the carrier account.
      +
      +
      Returns:
      +
      credentials of the carrier account.
      +
      +
      +
    • +
    • +
      +

      setCredentials

      +
      public void setCredentials(Map<String,​Object> credentials)
      +
      Set credentials of the carrier account.
      +
      +
      Parameters:
      +
      credentials - credentials of the carrier account.
      +
      +
      +
    • +
    • +
      +

      getDescription

      +
      public String getDescription()
      +
      Get description of the carrier account.
      +
      +
      Returns:
      +
      description of the carrier account.
      +
      +
      +
    • +
    • +
      +

      setDescription

      +
      public void setDescription(String description)
      +
      Set description of the carrier account.
      +
      +
      Parameters:
      +
      description - description of the carrier account.
      +
      +
      +
    • +
    • +
      +

      getReadable

      +
      public String getReadable()
      +
      Get readable name of the carrier account.
      +
      +
      Returns:
      +
      readable name of the carrier account.
      +
      +
      +
    • +
    • +
      +

      setReadable

      +
      public void setReadable(String readable)
      +
      Set readable name of the carrier account.
      +
      +
      Parameters:
      +
      readable - readable name of the carrier account.
      +
      +
      +
    • +
    • +
      +

      getReference

      +
      public String getReference()
      +
      Get reference of the carrier account.
      +
      +
      Returns:
      +
      reference of the carrier account.
      +
      +
      +
    • +
    • +
      +

      setReference

      +
      public void setReference(String reference)
      +
      Set reference of the carrier account.
      +
      +
      Parameters:
      +
      reference - reference of the carrier account.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static CarrierAccount create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a carrier account.
      +
      +
      Parameters:
      +
      params - parameters to create.
      +
      Returns:
      +
      created CarrierAccount object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static CarrierAccount create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a carrier account.
      +
      +
      Parameters:
      +
      params - parameters to create.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      created CarrierAccount object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static CarrierAccount retrieve(String id) + throws EasyPostException
      +
      Retrieve a carrier account from the API.
      +
      +
      Parameters:
      +
      id - id of the carrier account.
      +
      Returns:
      +
      CarrierAccount object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static CarrierAccount retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a carrier account from the API.
      +
      +
      Parameters:
      +
      id - id of the carrier account.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      CarrierAccount object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static List<CarrierAccount> all() + throws EasyPostException
      +
      List all carrier accounts.
      +
      +
      Returns:
      +
      List of CarrierAccount objects.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static List<CarrierAccount> all(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      List all carrier accounts.
      +
      +
      Parameters:
      +
      params - filters to apply to the list.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      List of CarrierAccount objects.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static List<CarrierAccount> all(Map<String,​Object> params) + throws EasyPostException
      +
      List all carrier accounts.
      +
      +
      Parameters:
      +
      params - filters to apply to the list.
      +
      Returns:
      +
      List of CarrierAccount objects.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getObject

      +
      public String getObject()
      +
      Get object type of the carrier account.
      +
      +
      Returns:
      +
      object type of the carrier account.
      +
      +
      +
    • +
    • +
      +

      setObject

      +
      public void setObject(String object)
      +
      Set object type of the carrier account.
      +
      +
      Parameters:
      +
      object - object type of the carrier account.
      +
      +
      +
    • +
    • +
      +

      getType

      +
      public String getType()
      +
      Get type of the carrier account.
      +
      +
      Returns:
      +
      type of the carrier account.
      +
      +
      +
    • +
    • +
      +

      setType

      +
      public void setType(String type)
      +
      Set type of the carrier account.
      +
      +
      Parameters:
      +
      type - type of the carrier account.
      +
      +
      +
    • +
    • +
      +

      getFields

      +
      public Fields getFields()
      +
      Get fields of the carrier account.
      +
      +
      Returns:
      +
      fields of the carrier account.
      +
      +
      +
    • +
    • +
      +

      setFields

      +
      public void setFields(Fields fields)
      +
      Set fields of the carrier account.
      +
      +
      Parameters:
      +
      fields - fields of the carrier account.
      +
      +
      +
    • +
    • +
      +

      isClone

      +
      public boolean isClone()
      +
      Get whether the carrier account is a clone.
      +
      +
      Returns:
      +
      True if carrier account is a clone, false otherwise.
      +
      +
      +
    • +
    • +
      +

      setClone

      +
      public void setClone(boolean clone)
      +
      Set whether the carrier account is a clone.
      +
      +
      Parameters:
      +
      clone - True if carrier account is a clone, false otherwise.
      +
      +
      +
    • +
    • +
      +

      getTestCredentials

      +
      public Map<String,​Object> getTestCredentials()
      +
      Get test credentials of the carrier account.
      +
      +
      Returns:
      +
      test credentials of the carrier account.
      +
      +
      +
    • +
    • +
      +

      setTestCredentials

      +
      public void setTestCredentials(Map<String,​Object> testCredentials)
      +
      Set test credentials of the carrier account.
      +
      +
      Parameters:
      +
      testCredentials - test credentials of the carrier account.
      +
      +
      +
    • +
    • +
      +

      update

      +
      public CarrierAccount update(Map<String,​Object> params) + throws EasyPostException
      +
      Update this carrier account.
      +
      +
      Parameters:
      +
      params - parameters to update.
      +
      Returns:
      +
      updated carrier account.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      update

      +
      public CarrierAccount update(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Update this carrier account.
      +
      +
      Parameters:
      +
      params - parameters to update.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      updated CarrierAccount object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      delete

      +
      public void delete() + throws EasyPostException
      +
      Delete this carrier account.
      +
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      delete

      +
      public void delete(String apiKey) + throws EasyPostException
      +
      Delete this carrier account.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/CarrierDetail.html b/docs/com/easypost/model/CarrierDetail.html new file mode 100644 index 000000000..4f34f6373 --- /dev/null +++ b/docs/com/easypost/model/CarrierDetail.html @@ -0,0 +1,446 @@ + + + + + +CarrierDetail (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CarrierDetail

+
+
java.lang.Object +
com.easypost.model.CarrierDetail
+
+
+
+
public final class CarrierDetail +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CarrierDetail

      +
      public CarrierDetail()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getAlternateIdentifier

      +
      public String getAlternateIdentifier()
      +
      Get alternate identifier.
      +
      +
      Returns:
      +
      alternate identifier
      +
      +
      +
    • +
    • +
      +

      setAlternateIdentifier

      +
      public void setAlternateIdentifier(String alternateIdentifier)
      +
      Set alternate identifier.
      +
      +
      Parameters:
      +
      alternateIdentifier - alternate identifier
      +
      +
      +
    • +
    • +
      +

      getContainerType

      +
      public String getContainerType()
      +
      Get carrier container type.
      +
      +
      Returns:
      +
      carrier container type
      +
      +
      +
    • +
    • +
      +

      setContainerType

      +
      public void setContainerType(String containerType)
      +
      Set carrier container type.
      +
      +
      Parameters:
      +
      containerType - carrier container type
      +
      +
      +
    • +
    • +
      +

      getDestinationLocation

      +
      public String getDestinationLocation()
      +
      Get destination location.
      +
      +
      Returns:
      +
      destination location
      +
      +
      +
    • +
    • +
      +

      setDestinationLocation

      +
      public void setDestinationLocation(String destinationLocation)
      +
      Set destination location.
      +
      +
      Parameters:
      +
      destinationLocation - destination location
      +
      +
      +
    • +
    • +
      +

      getEstDeliveryDateLocal

      +
      public String getEstDeliveryDateLocal()
      +
      Get the estimated delivery date in local time.
      +
      +
      Returns:
      +
      estimated delivery date in local time
      +
      +
      +
    • +
    • +
      +

      setEstDeliveryDateLocal

      +
      public void setEstDeliveryDateLocal(String estDeliveryDateLocal)
      +
      Set the estimated delivery date in local time.
      +
      +
      Parameters:
      +
      estDeliveryDateLocal - estimated delivery date in local time
      +
      +
      +
    • +
    • +
      +

      getEstDeliveryTimeLocal

      +
      public String getEstDeliveryTimeLocal()
      +
      Get the estimated delivery time in local time.
      +
      +
      Returns:
      +
      estimated delivery time in local time
      +
      +
      +
    • +
    • +
      +

      setEstDeliveryTimeLocal

      +
      public void setEstDeliveryTimeLocal(String estDeliveryTimeLocal)
      +
      Set the estimated delivery time in local time.
      +
      +
      Parameters:
      +
      estDeliveryTimeLocal - estimated delivery time in local time
      +
      +
      +
    • +
    • +
      +

      getGuaranteedDeliveryDate

      +
      public String getGuaranteedDeliveryDate()
      +
      Get the guaranteed delivery date.
      +
      +
      Returns:
      +
      guaranteed delivery date
      +
      +
      +
    • +
    • +
      +

      setGuaranteedDeliveryDate

      +
      public void setGuaranteedDeliveryDate(String guaranteedDeliveryDate)
      +
      Set the guaranteed delivery date.
      +
      +
      Parameters:
      +
      guaranteedDeliveryDate - guaranteed delivery date
      +
      +
      +
    • +
    • +
      +

      getInitialDeliveryAttempt

      +
      public String getInitialDeliveryAttempt()
      +
      Get initial delivery attempt.
      +
      +
      Returns:
      +
      initial delivery attempt
      +
      +
      +
    • +
    • +
      +

      setInitialDeliveryAttempt

      +
      public void setInitialDeliveryAttempt(String initialDeliveryAttempt)
      +
      Set initial delivery attempt.
      +
      +
      Parameters:
      +
      initialDeliveryAttempt - initial delivery attempt
      +
      +
      +
    • +
    • +
      +

      getOriginLocation

      +
      public String getOriginLocation()
      +
      Get origin location.
      +
      +
      Returns:
      +
      origin location
      +
      +
      +
    • +
    • +
      +

      setOriginLocation

      +
      public void setOriginLocation(String originLocation)
      +
      Set origin location.
      +
      +
      Parameters:
      +
      originLocation - origin location
      +
      +
      +
    • +
    • +
      +

      getService

      +
      public String getService()
      +
      Get carrier service.
      +
      +
      Returns:
      +
      carrier service
      +
      +
      +
    • +
    • +
      +

      setService

      +
      public void setService(String service)
      +
      Set carrier service.
      +
      +
      Parameters:
      +
      service - carrier service
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/CarrierType.html b/docs/com/easypost/model/CarrierType.html new file mode 100644 index 000000000..9f0d1c3a2 --- /dev/null +++ b/docs/com/easypost/model/CarrierType.html @@ -0,0 +1,331 @@ + + + + + +CarrierType (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CarrierType

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.CarrierType
+
+
+
+
+
public final class CarrierType +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CarrierType

      +
      public CarrierType()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getFields

      +
      public Map<String,​Object> getFields()
      +
      Get the fields of the carrier.
      +
      +
      Returns:
      +
      fields from a carrier.
      +
      +
      +
    • +
    • +
      +

      setFields

      +
      public void setFields(Map<String,​Object> fields)
      +
      Set the fields of carrier.
      +
      +
      Parameters:
      +
      fields - fields for a carrier.
      +
      +
      +
    • +
    • +
      +

      getLogo

      +
      public String getLogo()
      +
      Get the logo of the carrier.
      +
      +
      Returns:
      +
      logo of a carrier.
      +
      +
      +
    • +
    • +
      +

      setLogo

      +
      public void setLogo(String logo)
      +
      Set the logo of carrier.
      +
      +
      Parameters:
      +
      logo - logo of a carrier.
      +
      +
      +
    • +
    • +
      +

      getReadable

      +
      public String getReadable()
      +
      Get the readable name of the carrier.
      +
      +
      Returns:
      +
      return readable name of the carrier.
      +
      +
      +
    • +
    • +
      +

      setReadable

      +
      public void setReadable(String readable)
      +
      Set the readable name of the carrier.
      +
      +
      Parameters:
      +
      readable - readable name of the carrier.
      +
      +
      +
    • +
    • +
      +

      getType

      +
      public String getType()
      +
      Get the type of the carrier.
      +
      +
      Returns:
      +
      type of a carrier.
      +
      +
      +
    • +
    • +
      +

      setType

      +
      public void setType(String type)
      +
      Set the type of carrier.
      +
      +
      Parameters:
      +
      type - type of a carrier.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static List<CarrierType> all() + throws EasyPostException
      +
      Retrieve a list of available carriers for the account.
      +
      +
      Returns:
      +
      list of carrier types that are available to the account.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static List<CarrierType> all(String apikey) + throws EasyPostException
      +
      Retrieve a list of available carriers for the given account.
      +
      +
      Parameters:
      +
      apikey - the API key from the user input.
      +
      Returns:
      +
      list of carrier types that are available for the given account.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/CreditCard.html b/docs/com/easypost/model/CreditCard.html new file mode 100644 index 000000000..e1fd1c807 --- /dev/null +++ b/docs/com/easypost/model/CreditCard.html @@ -0,0 +1,297 @@ + + + + + +CreditCard (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CreditCard

+
+ +
+
+
@Deprecated +public class CreditCard +extends BaseCreditCard
+
Deprecated. +
Use PaymentMethodObject instead. + Deprecated: v5.5.0 - v7.0.0
+
+
CreditCard is a model class that represents a credit card.
+
+
+ +
+
+ +
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/CreditCardPriority.html b/docs/com/easypost/model/CreditCardPriority.html new file mode 100644 index 000000000..ff9354d88 --- /dev/null +++ b/docs/com/easypost/model/CreditCardPriority.html @@ -0,0 +1,242 @@ + + + + + +CreditCardPriority (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum CreditCardPriority

+
+
java.lang.Object +
java.lang.Enum<CreditCardPriority> +
com.easypost.model.CreditCardPriority
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<CreditCardPriority>, java.lang.constant.Constable
+
+
+
@Deprecated +public enum CreditCardPriority +extends Enum<CreditCardPriority>
+
Deprecated. +
Use PaymentMethod.Priority instead. + Deprecated: v5.5.0 - v7.0.0
+
+
CreditCardPriority is an enum class that represents the payment method priority levels.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static CreditCardPriority[] values()
      +
      Deprecated.
      +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum type, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static CreditCardPriority valueOf(String name)
      +
      Deprecated.
      +
      Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum type has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/CustomsInfo.html b/docs/com/easypost/model/CustomsInfo.html new file mode 100644 index 000000000..108ccd6c7 --- /dev/null +++ b/docs/com/easypost/model/CustomsInfo.html @@ -0,0 +1,573 @@ + + + + + +CustomsInfo (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CustomsInfo

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.CustomsInfo
+
+
+
+
+
public final class CustomsInfo +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CustomsInfo

      +
      public CustomsInfo()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getContentsExplanation

      +
      public String getContentsExplanation()
      +
      Get an explanation of this CustomsInfo's contents.
      +
      +
      Returns:
      +
      the explanation of this CustomsInfo's contents.
      +
      +
      +
    • +
    • +
      +

      setContentsExplanation

      +
      public void setContentsExplanation(String contentsExplanation)
      +
      Set an explanation of this CustomsInfo's contents.
      +
      +
      Parameters:
      +
      contentsExplanation - the explanation of this CustomsInfo's contents.
      +
      +
      +
    • +
    • +
      +

      getContentsType

      +
      public String getContentsType()
      +
      Get this CustomsInfo's contents type.
      +
      +
      Returns:
      +
      the contents type of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      setContentsType

      +
      public void setContentsType(String contentsType)
      +
      Set this CustomsInfo's contents type.
      +
      +
      Parameters:
      +
      contentsType - the contents type of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      getCustomsCertify

      +
      public boolean getCustomsCertify()
      +
      Get whether this CustomsInfo is certified by customs.
      +
      +
      Returns:
      +
      true if this CustomsInfo is certified by customs.
      +
      +
      +
    • +
    • +
      +

      setCustomsCertify

      +
      public void setCustomsCertify(boolean customsCertify)
      +
      Set whether this CustomsInfo is certified by customs.
      +
      +
      Parameters:
      +
      customsCertify - true if this CustomsInfo is certified by customs.
      +
      +
      +
    • +
    • +
      +

      getCustomsItems

      +
      public List<CustomsItem> getCustomsItems()
      +
      Get this CustomsInfo's customs items.
      +
      +
      Returns:
      +
      the customs items of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      setCustomsItems

      +
      public void setCustomsItems(List<CustomsItem> customsItems)
      +
      Set this CustomsInfo's customs items.
      +
      +
      Parameters:
      +
      customsItems - the customs items of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      getCustomsSigner

      +
      public String getCustomsSigner()
      +
      Get this CustomsInfo's signer.
      +
      +
      Returns:
      +
      the signer of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      setCustomsSigner

      +
      public void setCustomsSigner(String customsSigner)
      +
      Set this CustomsInfo's signer.
      +
      +
      Parameters:
      +
      customsSigner - the signer of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      getDeclaration

      +
      public String getDeclaration()
      +
      Get this CustomsInfo's declaration.
      +
      +
      Returns:
      +
      the declaration of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      setDeclaration

      +
      public void setDeclaration(String declaration)
      +
      Set this CustomsInfo's declaration.
      +
      +
      Parameters:
      +
      declaration - the declaration of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      getEelPfc

      +
      public String getEelPfc()
      +
      Get this CustomsInfo's EEL or PFC.
      +
      +
      Returns:
      +
      the EEL or PFC of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      setEelPfc

      +
      public void setEelPfc(String eelPfc)
      +
      Set this CustomsInfo's EEL or PFC.
      +
      +
      Parameters:
      +
      eelPfc - the EEL or PFC of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      getNonDeliveryOption

      +
      public String getNonDeliveryOption()
      +
      Get the non-delivery option of this CustomsInfo.
      +
      +
      Returns:
      +
      the non-delivery option of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      setNonDeliveryOption

      +
      public void setNonDeliveryOption(String nonDeliveryOption)
      +
      Set this CustomsInfo's non-delivery option.
      +
      +
      Parameters:
      +
      nonDeliveryOption - the non-delivery option of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      getRestrictionComments

      +
      public String getRestrictionComments()
      +
      Get this CustomsInfo's restriction comments.
      +
      +
      Returns:
      +
      the restriction comments of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      setRestrictionComments

      +
      public void setRestrictionComments(String restrictionComments)
      +
      Set this CustomsInfo's restriction comments.
      +
      +
      Parameters:
      +
      restrictionComments - the restriction comments of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      getRestrictionType

      +
      public String getRestrictionType()
      +
      Get this CustomsInfo's restriction type.
      +
      +
      Returns:
      +
      the restriction type of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      setRestrictionType

      +
      public void setRestrictionType(String restrictionType)
      +
      Set this CustomsInfo's restriction type.
      +
      +
      Parameters:
      +
      restrictionType - the restriction type of this CustomsInfo.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static CustomsInfo create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a CustomsInfo from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of parameters.
      +
      Returns:
      +
      CustomsInfo object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static CustomsInfo create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a CustomsInfo from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      CustomsInfo object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static CustomsInfo retrieve(String id) + throws EasyPostException
      +
      Retrieve a CustomsInfo from the API.
      +
      +
      Parameters:
      +
      id - the ID of the CustomsInfo to retrieve.
      +
      Returns:
      +
      CustomsInfo object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static CustomsInfo retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a CustomsInfo from the API.
      +
      +
      Parameters:
      +
      id - the ID of the CustomsInfo to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      CustomsInfo object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/CustomsItem.html b/docs/com/easypost/model/CustomsItem.html new file mode 100644 index 000000000..bf376b550 --- /dev/null +++ b/docs/com/easypost/model/CustomsItem.html @@ -0,0 +1,509 @@ + + + + + +CustomsItem (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CustomsItem

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.CustomsItem
+
+
+
+
+
public final class CustomsItem +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CustomsItem

      +
      public CustomsItem()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCode

      +
      public String getCode()
      +
      Get this CustomsItem's code.
      +
      +
      Returns:
      +
      the code of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      setCode

      +
      public void setCode(String code)
      +
      Set this CustomsItem's code.
      +
      +
      Parameters:
      +
      code - the code of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      getCurrency

      +
      public String getCurrency()
      +
      Get this CustomsItem's currency.
      +
      +
      Returns:
      +
      the currency of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      setCurrency

      +
      public void setCurrency(String currency)
      +
      Set this CustomsItem's currency.
      +
      +
      Parameters:
      +
      currency - the currency of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      getDescription

      +
      public String getDescription()
      +
      Get this CustomsItem's description.
      +
      +
      Returns:
      +
      the description of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      setDescription

      +
      public void setDescription(String description)
      +
      Set this CustomsItem's description.
      +
      +
      Parameters:
      +
      description - the description of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      getHsTariffNumber

      +
      public String getHsTariffNumber()
      +
      Get this CustomsItem's HS Tariff Number.
      +
      +
      Returns:
      +
      the HS Tariff Number of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      setHsTariffNumber

      +
      public void setHsTariffNumber(String hsTariffNumber)
      +
      Set this CustomsItem's HS Tariff Number.
      +
      +
      Parameters:
      +
      hsTariffNumber - the HS Tariff Number of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      getOriginCountry

      +
      public String getOriginCountry()
      +
      Get this CustomsItem's origin country.
      +
      +
      Returns:
      +
      the origin country of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      setOriginCountry

      +
      public void setOriginCountry(String originCountry)
      +
      Set this CustomsItem's origin country.
      +
      +
      Parameters:
      +
      originCountry - the origin country of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      getQuantity

      +
      public int getQuantity()
      +
      Get this CustomsItem's quantity.
      +
      +
      Returns:
      +
      the quantity of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      setQuantity

      +
      public void setQuantity(int quantity)
      +
      Set this CustomsItem's quantity.
      +
      +
      Parameters:
      +
      quantity - the quantity of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      getValue

      +
      public Float getValue()
      +
      Get this CustomsItem's value.
      +
      +
      Returns:
      +
      the value of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      setValue

      +
      public void setValue(Float value)
      +
      Set this CustomsItem's value.
      +
      +
      Parameters:
      +
      value - the value of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      getWeight

      +
      public Float getWeight()
      +
      Get this CustomsItem's weight.
      +
      +
      Returns:
      +
      the weight of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      setWeight

      +
      public void setWeight(Float weight)
      +
      Set this CustomsItem's weight.
      +
      +
      Parameters:
      +
      weight - the weight of this CustomsItem.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static CustomsItem create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a CustomsItem from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of parameters.
      +
      Returns:
      +
      CustomsItem object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static CustomsItem create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a CustomsItem from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      CustomsItem object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static CustomsItem retrieve(String id) + throws EasyPostException
      +
      Retrieve a CustomsItem from the API.
      +
      +
      Parameters:
      +
      id - the ID of the CustomsItem to retrieve.
      +
      Returns:
      +
      CustomsItem object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static CustomsItem retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a CustomsItem from the API.
      +
      +
      Parameters:
      +
      id - the ID of the CustomsItem to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      CustomsItem object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/EasyPostResource.html b/docs/com/easypost/model/EasyPostResource.html new file mode 100644 index 000000000..3fc7b5508 --- /dev/null +++ b/docs/com/easypost/model/EasyPostResource.html @@ -0,0 +1,396 @@ + + + + + +EasyPostResource (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class EasyPostResource

+
+
java.lang.Object +
com.easypost.model.EasyPostResource
+
+
+
+
Direct Known Subclasses:
+
AddressCollection, AddressVerifications, ApiKey, ApiKeys, BaseAddress, BaseCreditCard, BaseUser, Batch, BatchCollection, Billing, Brand, CarbonOffset, CarrierAccount, CarrierType, CustomsInfo, CustomsItem, Event, EventCollection, EventData, Field, Fields, Form, Insurance, InsuranceCollection, Order, OrderCollection, Parcel, PaymentMethod, PaymentMethodObject, Pickup, PickupCollection, PostageLabel, Rate, ReferralCustomerCollection, Refund, RefundCollection, Report, ReportCollection, ScanForm, ScanFormCollection, Shipment, ShipmentCollection, TaxIdentifier, Tracker, TrackerCollection, Webhook, WebhookCollection
+
+
+
public abstract class EasyPostResource +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EasyPostResource

      +
      public EasyPostResource()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCreatedAt

      +
      public Date getCreatedAt()
      +
      +
      Returns:
      +
      the Date this object was created
      +
      +
      +
    • +
    • +
      +

      setCreatedAt

      +
      public void setCreatedAt(Date createdAt)
      +
      Set the Date this object was created.
      +
      +
      Parameters:
      +
      createdAt - the Date this object was created
      +
      +
      +
    • +
    • +
      +

      getId

      +
      public String getId()
      +
      +
      Returns:
      +
      the ID of this object
      +
      +
      +
    • +
    • +
      +

      setId

      +
      public void setId(String id)
      +
      Set the ID of this object.
      +
      +
      Parameters:
      +
      id - the ID of this object
      +
      +
      +
    • +
    • +
      +

      getMode

      +
      public String getMode()
      +
      +
      Returns:
      +
      the API mode used to create this object
      +
      +
      +
    • +
    • +
      +

      setMode

      +
      public void setMode(String mode)
      +
      Set the API mode used to create this object.
      +
      +
      Parameters:
      +
      mode - the Mode of this object
      +
      +
      +
    • +
    • +
      +

      getUpdatedAt

      +
      public Date getUpdatedAt()
      +
      +
      Returns:
      +
      the Date this object was last updated
      +
      +
      +
    • +
    • +
      +

      setUpdatedAt

      +
      public void setUpdatedAt(Date updatedAt)
      +
      Set the Date this object was last updated.
      +
      +
      Parameters:
      +
      updatedAt - the Date this object was last updated
      +
      +
      +
    • +
    • +
      +

      instanceURL

      +
      protected static String instanceURL(Class<?> clazz, + String id)
      +
      +
    • +
    • +
      +

      classURL

      +
      protected static String classURL(Class<?> clazz)
      +
      +
    • +
    • +
      +

      singleClassURL

      +
      protected static String singleClassURL(Class<?> clazz)
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      Returns a string representation of the object.
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      prettyPrint

      +
      public String prettyPrint()
      +
      Pretty print the JSON representation of the object.
      +
      +
      Returns:
      +
      the JSON representation of the object.
      +
      +
      +
    • +
    • +
      +

      merge

      +
      public void merge(EasyPostResource obj, + EasyPostResource update)
      +
      Merge two EasyPostResource objects.
      +
      +
      Parameters:
      +
      obj - the base object
      +
      update - the object to merge
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      Override the hashCode method because it is needed when overriding equals().
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      Returns:
      +
      The hashcode of current object.
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object object)
      +
      Override the equals method, convert objects to Json strings for comparsion.
      +
      +
      Overrides:
      +
      equals in class Object
      +
      Parameters:
      +
      object - Object of any class.
      +
      Returns:
      +
      If two objects have the same properties.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/EndShipper.html b/docs/com/easypost/model/EndShipper.html new file mode 100644 index 000000000..3175b4d43 --- /dev/null +++ b/docs/com/easypost/model/EndShipper.html @@ -0,0 +1,348 @@ + + + + + +EndShipper (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class EndShipper

+
+ +
+
+
public final class EndShipper +extends BaseAddress
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EndShipper

      +
      public EndShipper()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      create

      +
      public static EndShipper create(Map<String,​Object> params) + throws EasyPostException
      +
      Create EndShipper object from parameter map.
      +
      +
      Parameters:
      +
      params - Map of EndShipper parameters.
      +
      Returns:
      +
      EndShipper object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static EndShipper create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create EndShipper object from parameter map.
      +
      +
      Parameters:
      +
      params - Map of EndShipper parameters.
      +
      apiKey - Optional API key to use for this request.
      +
      Returns:
      +
      EndShipper object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static EndShipper retrieve(String id) + throws EasyPostException
      +
      Retrieve EndShipper object from API.
      +
      +
      Parameters:
      +
      id - ID of EndShipper to retrieve.
      +
      Returns:
      +
      EndShipper object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static EndShipper retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve EndShipper object from API.
      +
      +
      Parameters:
      +
      id - ID of EndShipper to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      EndShipper object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static EndShipperCollection all(Map<String,​Object> params) + throws EasyPostException
      +
      List all EndShipper objects.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      EndShipperCollection object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static EndShipperCollection all(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      List all EndShipper objects.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      EndShipperCollection object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      update

      +
      public EndShipper update(Map<String,​Object> params) + throws EasyPostException
      +
      Update an EndShipper object.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      EndShipper object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      update

      +
      public EndShipper update(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Update an EndShipper object.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      EndShipper object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/EndShipperCollection.html b/docs/com/easypost/model/EndShipperCollection.html new file mode 100644 index 000000000..38f3107b9 --- /dev/null +++ b/docs/com/easypost/model/EndShipperCollection.html @@ -0,0 +1,222 @@ + + + + + +EndShipperCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class EndShipperCollection

+
+
java.lang.Object +
com.easypost.model.EndShipperCollection
+
+
+
+
public class EndShipperCollection +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EndShipperCollection

      +
      public EndShipperCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getEndShippers

      +
      public List<EndShipper> getEndShippers()
      +
      Get a list of EndShippers.
      +
      +
      Returns:
      +
      List of EndShipper objects
      +
      +
      +
    • +
    • +
      +

      setEndShippers

      +
      public void setEndShippers(List<EndShipper> addresses)
      +
      Set a list of EndShippers.
      +
      +
      Parameters:
      +
      addresses - List of EndShipper objects
      +
      +
      +
    • +
    • +
      +

      getHasMore

      +
      public Boolean getHasMore()
      +
      Get whether there are more EndShippers to retrieve.
      +
      +
      Returns:
      +
      whether there are more EndShippers to retrieve
      +
      +
      +
    • +
    • +
      +

      setHasMore

      +
      public void setHasMore(Boolean hasMore)
      +
      Set whether there are more EndShippers to retrieve.
      +
      +
      Parameters:
      +
      hasMore - Boolean whether there are more EndShippers to retrieve
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Error.html b/docs/com/easypost/model/Error.html new file mode 100644 index 000000000..88ca3ad92 --- /dev/null +++ b/docs/com/easypost/model/Error.html @@ -0,0 +1,318 @@ + + + + + +Error (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Error

+
+
java.lang.Object +
com.easypost.model.Error
+
+
+
+
public final class Error +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Error

      +
      public Error()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getField

      +
      public String getField()
      +
      Get the field of the error.
      +
      +
      Returns:
      +
      field
      +
      +
      +
    • +
    • +
      +

      setField

      +
      public void setField(String field)
      +
      Set the field of the error.
      +
      +
      Parameters:
      +
      field - field
      +
      +
      +
    • +
    • +
      +

      getSuggestion

      +
      public String getSuggestion()
      +
      Get the suggestion of the error.
      +
      +
      Returns:
      +
      suggestion
      +
      +
      +
    • +
    • +
      +

      setSuggestion

      +
      public void setSuggestion(String suggestion)
      +
      Set the suggestion of the error.
      +
      +
      Parameters:
      +
      suggestion - suggestion
      +
      +
      +
    • +
    • +
      +

      getErrors

      +
      public List<Error> getErrors()
      +
      Get the errors from an Error object.
      +
      +
      Returns:
      +
      errors
      +
      +
      +
    • +
    • +
      +

      setErrors

      +
      public void setErrors(List<Error> errors)
      +
      Set the errors for an Error object.
      +
      +
      Parameters:
      +
      errors - errors
      +
      +
      +
    • +
    • +
      +

      getCode

      +
      public String getCode()
      +
      Get the error code.
      +
      +
      Returns:
      +
      code
      +
      +
      +
    • +
    • +
      +

      setCode

      +
      public void setCode(String code)
      +
      Set the error code.
      +
      +
      Parameters:
      +
      code - code
      +
      +
      +
    • +
    • +
      +

      getMessage

      +
      public String getMessage()
      +
      Get the error message.
      +
      +
      Returns:
      +
      message
      +
      +
      +
    • +
    • +
      +

      setMessage

      +
      public void setMessage(String message)
      +
      Set the error message.
      +
      +
      Parameters:
      +
      message - message
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/ErrorDeserializer.html b/docs/com/easypost/model/ErrorDeserializer.html new file mode 100644 index 000000000..094a53615 --- /dev/null +++ b/docs/com/easypost/model/ErrorDeserializer.html @@ -0,0 +1,192 @@ + + + + + +ErrorDeserializer (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ErrorDeserializer

+
+
java.lang.Object +
com.easypost.model.ErrorDeserializer
+
+
+
+
All Implemented Interfaces:
+
com.google.gson.JsonDeserializer<Error>
+
+
+
public final class ErrorDeserializer +extends Object +implements com.google.gson.JsonDeserializer<Error>
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ErrorDeserializer

      +
      public ErrorDeserializer()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      deserialize

      +
      public Error deserialize(com.google.gson.JsonElement json, + Type typeOfT, + com.google.gson.JsonDeserializationContext context) + throws com.google.gson.JsonParseException
      +
      Deserialize an Error from a JSON object.
      +
      +
      Specified by:
      +
      deserialize in interface com.google.gson.JsonDeserializer<Error>
      +
      Parameters:
      +
      json - JSON object to deserialize.
      +
      typeOfT - Type of the object to deserialize.
      +
      context - Deserialization context.
      +
      Returns:
      +
      Deserialized Error object.
      +
      Throws:
      +
      com.google.gson.JsonParseException - if the JSON object is not a valid SmartrateCollection.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Event.html b/docs/com/easypost/model/Event.html new file mode 100644 index 000000000..5095002de --- /dev/null +++ b/docs/com/easypost/model/Event.html @@ -0,0 +1,407 @@ + + + + + +Event (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Event

+
+ +
+
+
public final class Event +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Event

      +
      public Event()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getDescription

      +
      public String getDescription()
      +
      Get the description of this Event.
      +
      +
      Returns:
      +
      Event's description
      +
      +
      +
    • +
    • +
      +

      setDescription

      +
      public void setDescription(String description)
      +
      Set the description of this Event.
      +
      +
      Parameters:
      +
      description - Event's description
      +
      +
      +
    • +
    • +
      +

      getPreviousAttributes

      +
      public Map<String,​Object> getPreviousAttributes()
      +
      Get the previous attributes of this Event.
      +
      +
      Returns:
      +
      Event's previous attributes
      +
      +
      +
    • +
    • +
      +

      setPreviousAttributes

      +
      public void setPreviousAttributes(Map<String,​Object> previousAttributes)
      +
      Set the previous attributes of this Event.
      +
      +
      Parameters:
      +
      previousAttributes - Event's previous attributes
      +
      +
      +
    • +
    • +
      +

      getResult

      +
      public Map<String,​Object> getResult()
      +
      Get the result of this Event.
      +
      +
      Returns:
      +
      Event's result
      +
      +
      +
    • +
    • +
      +

      setResult

      +
      public void setResult(Map<String,​Object> result)
      +
      Set the result of this Event.
      +
      +
      Parameters:
      +
      result - Event's result
      +
      +
      +
    • +
    • +
      +

      getPendingUrls

      +
      public List<String> getPendingUrls()
      +
      Get the pendingUrls of this Event.
      +
      +
      Returns:
      +
      Event's pendingUrls
      +
      +
      +
    • +
    • +
      +

      setPendingUrls

      +
      public void setPendingUrls(List<String> pendingUrls)
      +
      +
      Parameters:
      +
      pendingUrls - pendingUrls of this Event
      +
      +
      +
    • +
    • +
      +

      getCompletedUrls

      +
      public List<String> getCompletedUrls()
      +
      Get the completedUrls of this Event.
      +
      +
      Returns:
      +
      Event's completedUrls
      +
      +
      +
    • +
    • +
      +

      setCompletedUrls

      +
      public void setCompletedUrls(List<String> completedUrls)
      +
      +
      Parameters:
      +
      completedUrls - pendingUrls of this Event
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Event retrieve(String id) + throws EasyPostException
      +
      Retrieve a Event from the API.
      +
      +
      Parameters:
      +
      id - ID of the Event to retrieve
      +
      Returns:
      +
      Event object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Event retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a Event from the API.
      +
      +
      Parameters:
      +
      id - ID of the Event to retrieve
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Event object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static EventCollection all(Map<String,​Object> params) + throws EasyPostException
      +
      Get a list of Events.
      +
      +
      Parameters:
      +
      params - A map of parameters to pass to the API.
      +
      Returns:
      +
      EventCollection object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static EventCollection all(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Get a list of Events.
      +
      +
      Parameters:
      +
      params - A map of parameters to pass to the API.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      EventCollection object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/EventCollection.html b/docs/com/easypost/model/EventCollection.html new file mode 100644 index 000000000..94b53ef77 --- /dev/null +++ b/docs/com/easypost/model/EventCollection.html @@ -0,0 +1,227 @@ + + + + + +EventCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class EventCollection

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.EventCollection
+
+
+
+
+
public final class EventCollection +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EventCollection

      +
      public EventCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getEvents

      +
      public List<Event> getEvents()
      +
      Get a list of events.
      +
      +
      Returns:
      +
      List of Event objects.
      +
      +
      +
    • +
    • +
      +

      setEvents

      +
      public void setEvents(List<Event> events)
      +
      Set a list of events.
      +
      +
      Parameters:
      +
      events - List of Event objects.
      +
      +
      +
    • +
    • +
      +

      getHasMore

      +
      public Boolean getHasMore()
      +
      Get whether there are more events to retrieve.
      +
      +
      Returns:
      +
      whether there are more events to retrieve.
      +
      +
      +
    • +
    • +
      +

      setHasMore

      +
      public void setHasMore(Boolean hasMore)
      +
      Set whether there are more events to retrieve.
      +
      +
      Parameters:
      +
      hasMore - whether there are more events to retrieve.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/EventData.html b/docs/com/easypost/model/EventData.html new file mode 100644 index 000000000..e26691dca --- /dev/null +++ b/docs/com/easypost/model/EventData.html @@ -0,0 +1,227 @@ + + + + + +EventData (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class EventData

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.EventData
+
+
+
+
+
public final class EventData +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EventData

      +
      public EventData()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getObject

      +
      public EasyPostResource getObject()
      +
      Get the object of this EventData.
      +
      +
      Returns:
      +
      EasyPostResource object
      +
      +
      +
    • +
    • +
      +

      setObject

      +
      public void setObject(EasyPostResource object)
      +
      Set the object of this EventData.
      +
      +
      Parameters:
      +
      object - EasyPostResource object
      +
      +
      +
    • +
    • +
      +

      getPreviousAttributes

      +
      public Map<String,​Object> getPreviousAttributes()
      +
      Get the previous attributes of this EventData.
      +
      +
      Returns:
      +
      Map of previous attributes
      +
      +
      +
    • +
    • +
      +

      setPreviousAttributes

      +
      public void setPreviousAttributes(Map<String,​Object> previousAttributes)
      +
      Set the previous attributes of this EventData.
      +
      +
      Parameters:
      +
      previousAttributes - Map of previous attributes
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Fee.html b/docs/com/easypost/model/Fee.html new file mode 100644 index 000000000..c03519338 --- /dev/null +++ b/docs/com/easypost/model/Fee.html @@ -0,0 +1,286 @@ + + + + + +Fee (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Fee

+
+
java.lang.Object +
com.easypost.model.Fee
+
+
+
+
public final class Fee +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Fee

      +
      public Fee()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getAmount

      +
      public float getAmount()
      +
      Get Fee amount.
      +
      +
      Returns:
      +
      amount
      +
      +
      +
    • +
    • +
      +

      setAmount

      +
      public void setAmount(float amount)
      +
      Set Fee amount.
      +
      +
      Parameters:
      +
      amount - amount
      +
      +
      +
    • +
    • +
      +

      getCharged

      +
      public Boolean getCharged()
      +
      Get whether the fee is charged.
      +
      +
      Returns:
      +
      true if the fee is charged
      +
      +
      +
    • +
    • +
      +

      setCharged

      +
      public void setCharged(Boolean charged)
      +
      Set whether the fee is charged.
      +
      +
      Parameters:
      +
      charged - true if the fee is charged
      +
      +
      +
    • +
    • +
      +

      getRefunded

      +
      public Boolean getRefunded()
      +
      Check if the fee is refunded.
      +
      +
      Returns:
      +
      true if the fee is refunded
      +
      +
      +
    • +
    • +
      +

      setRefunded

      +
      public void setRefunded(Boolean refunded)
      +
      Set whether the fee is refunded.
      +
      +
      Parameters:
      +
      refunded - true if the fee is refunded
      +
      +
      +
    • +
    • +
      +

      getType

      +
      public String getType()
      +
      Get Fee type.
      +
      +
      Returns:
      +
      type
      +
      +
      +
    • +
    • +
      +

      setType

      +
      public void setType(String type)
      +
      Set Fee type.
      +
      +
      Parameters:
      +
      type - type
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Field.html b/docs/com/easypost/model/Field.html new file mode 100644 index 000000000..b1a49fb04 --- /dev/null +++ b/docs/com/easypost/model/Field.html @@ -0,0 +1,291 @@ + + + + + +Field (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Field

+
+ +
+
+
public class Field +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Field

      +
      public Field()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getKey

      +
      public String getKey()
      +
      Get the key of this field.
      +
      +
      Returns:
      +
      the key of this field.
      +
      +
      +
    • +
    • +
      +

      setKey

      +
      public void setKey(String key)
      +
      Set the key of this field.
      +
      +
      Parameters:
      +
      key - the key of this field.
      +
      +
      +
    • +
    • +
      +

      getVisibility

      +
      public String getVisibility()
      +
      Get the visibility of this field.
      +
      +
      Returns:
      +
      the visibility of this field.
      +
      +
      +
    • +
    • +
      +

      setVisibility

      +
      public void setVisibility(String visibility)
      +
      Set the visibility of this field.
      +
      +
      Parameters:
      +
      visibility - the visibility of this field.
      +
      +
      +
    • +
    • +
      +

      getLabel

      +
      public String getLabel()
      +
      Get the label of this field.
      +
      +
      Returns:
      +
      the label of this field.
      +
      +
      +
    • +
    • +
      +

      setLabel

      +
      public void setLabel(String label)
      +
      Set the label of this field.
      +
      +
      Parameters:
      +
      label - the label of this field.
      +
      +
      +
    • +
    • +
      +

      getValue

      +
      public String getValue()
      +
      Get the value of this field.
      +
      +
      Returns:
      +
      the value of this field.
      +
      +
      +
    • +
    • +
      +

      setValue

      +
      public void setValue(String value)
      +
      Set the value of this field.
      +
      +
      Parameters:
      +
      value - the value of this field.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Fields.html b/docs/com/easypost/model/Fields.html new file mode 100644 index 000000000..e609b80c7 --- /dev/null +++ b/docs/com/easypost/model/Fields.html @@ -0,0 +1,291 @@ + + + + + +Fields (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Fields

+
+ +
+
+
public class Fields +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Fields

      +
      public Fields()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCredentials

      +
      public Field getCredentials()
      +
      Get the credentials for this Fields object.
      +
      +
      Returns:
      +
      the credentials for this Fields object.
      +
      +
      +
    • +
    • +
      +

      setCredentials

      +
      public void setCredentials(Field credentials)
      +
      Set the credentials for this Fields object.
      +
      +
      Parameters:
      +
      credentials - the credentials for this Fields object.
      +
      +
      +
    • +
    • +
      +

      getTestCredentials

      +
      public Field getTestCredentials()
      +
      Get the test credentials for this Fields object.
      +
      +
      Returns:
      +
      the test credentials for this Fields object.
      +
      +
      +
    • +
    • +
      +

      setTestCredentials

      +
      public void setTestCredentials(Field testCredentials)
      +
      Set the test credentials for this Fields object.
      +
      +
      Parameters:
      +
      testCredentials - the test credentials for this Fields object.
      +
      +
      +
    • +
    • +
      +

      isAutoLink

      +
      public boolean isAutoLink()
      +
      Get whether this Fields object is auto-linked.
      +
      +
      Returns:
      +
      true if this Fields object is auto-linked, false otherwise.
      +
      +
      +
    • +
    • +
      +

      setAutoLink

      +
      public void setAutoLink(boolean autoLink)
      +
      Set whether this Fields object is auto-linked.
      +
      +
      Parameters:
      +
      autoLink - true if this Fields object is auto-linked, false otherwise.
      +
      +
      +
    • +
    • +
      +

      isCustomWorkflow

      +
      public boolean isCustomWorkflow()
      +
      Get whether this Fields object is a custom workflow.
      +
      +
      Returns:
      +
      true if this Fields object is a custom workflow, false otherwise.
      +
      +
      +
    • +
    • +
      +

      setCustomWorkflow

      +
      public void setCustomWorkflow(boolean customWorkflow)
      +
      Set whether this Fields object is a custom workflow.
      +
      +
      Parameters:
      +
      customWorkflow - true if this Fields object is a custom workflow, false otherwise.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Form.html b/docs/com/easypost/model/Form.html new file mode 100644 index 000000000..e224f30fa --- /dev/null +++ b/docs/com/easypost/model/Form.html @@ -0,0 +1,259 @@ + + + + + +Form (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Form

+
+ +
+
+
public final class Form +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Form

      +
      public Form()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getFormType

      +
      public String getFormType()
      +
      Get the form type of the Form.
      +
      +
      Returns:
      +
      the form type of the Form.
      +
      +
      +
    • +
    • +
      +

      setFormType

      +
      public void setFormType(String formType)
      +
      Set the form type of the Form.
      +
      +
      Parameters:
      +
      formType - the form type of the Form.
      +
      +
      +
    • +
    • +
      +

      getFormUrl

      +
      public String getFormUrl()
      +
      Get the form url of the Form.
      +
      +
      Returns:
      +
      the form url of the Form.
      +
      +
      +
    • +
    • +
      +

      setFormUrl

      +
      public void setFormUrl(String formUrl)
      +
      Set the form url of the Form.
      +
      +
      Parameters:
      +
      formUrl - the form url of the Form.
      +
      +
      +
    • +
    • +
      +

      getSubmittedElectronically

      +
      public Boolean getSubmittedElectronically()
      +
      Get whether the Form is submitted electronically.
      +
      +
      Returns:
      +
      whether the Form is submitted electronically.
      +
      +
      +
    • +
    • +
      +

      setSubmittedElectronically

      +
      public void setSubmittedElectronically(Boolean submittedElectronically)
      +
      Set whether the Form is submitted electronically.
      +
      +
      Parameters:
      +
      submittedElectronically - if the Form is submitted electronically.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Insurance.html b/docs/com/easypost/model/Insurance.html new file mode 100644 index 000000000..2547297dd --- /dev/null +++ b/docs/com/easypost/model/Insurance.html @@ -0,0 +1,735 @@ + + + + + +Insurance (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Insurance

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.Insurance
+
+
+
+
+
public final class Insurance +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Insurance

      +
      public Insurance()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getAmount

      +
      public String getAmount()
      +
      Get the amount of this Insurance.
      +
      +
      Returns:
      +
      the amount of the Insurance
      +
      +
      +
    • +
    • +
      +

      setAmount

      +
      public void setAmount(String amount)
      +
      Set the amount of this Insurance.
      +
      +
      Parameters:
      +
      amount - the amount of the Insurance
      +
      +
      +
    • +
    • +
      +

      getFromAddress

      +
      public Address getFromAddress()
      +
      Get the from address of this Insurance.
      +
      +
      Returns:
      +
      the from address of the Insurance
      +
      +
      +
    • +
    • +
      +

      setFromAddress

      +
      public void setFromAddress(Address fromAddress)
      +
      Set the from address of this Insurance.
      +
      +
      Parameters:
      +
      fromAddress - the from address of the Insurance
      +
      +
      +
    • +
    • +
      +

      getMessages

      +
      public List<String> getMessages()
      +
      Get the messages of this Insurance.
      +
      +
      Returns:
      +
      list of messages of the Insurance
      +
      +
      +
    • +
    • +
      +

      setMessages

      +
      public void setMessages(List<String> messages)
      +
      Set the messages of this Insurance.
      +
      +
      Parameters:
      +
      messages - list of messages of the Insurance
      +
      +
      +
    • +
    • +
      +

      getProvider

      +
      public String getProvider()
      +
      Get the provider of this Insurance.
      +
      +
      Returns:
      +
      the provider of the Insurance
      +
      +
      +
    • +
    • +
      +

      setProvider

      +
      public void setProvider(String provider)
      +
      Set the provider of this Insurance.
      +
      +
      Parameters:
      +
      provider - the provider of the Insurance
      +
      +
      +
    • +
    • +
      +

      getProviderId

      +
      public String getProviderId()
      +
      Get the provider ID of this Insurance.
      +
      +
      Returns:
      +
      the provider ID of the Insurance
      +
      +
      +
    • +
    • +
      +

      setProviderId

      +
      public void setProviderId(String providerId)
      +
      Set the provider ID of this Insurance.
      +
      +
      Parameters:
      +
      providerId - the provider ID of the Insurance
      +
      +
      +
    • +
    • +
      +

      getReference

      +
      public String getReference()
      +
      Get the reference of this Insurance.
      +
      +
      Returns:
      +
      the reference of the Insurance
      +
      +
      +
    • +
    • +
      +

      setReference

      +
      public void setReference(String reference)
      +
      Set the reference of this Insurance.
      +
      +
      Parameters:
      +
      reference - the reference of the Insurance
      +
      +
      +
    • +
    • +
      +

      getToAddress

      +
      public Address getToAddress()
      +
      Get the to address of this Insurance.
      +
      +
      Returns:
      +
      the to address of the Insurance
      +
      +
      +
    • +
    • +
      +

      setToAddress

      +
      public void setToAddress(Address toAddress)
      +
      Set the to address of this Insurance.
      +
      +
      Parameters:
      +
      toAddress - the to address of the Insurance
      +
      +
      +
    • +
    • +
      +

      getTracker

      +
      public Tracker getTracker()
      +
      Get the tracker of this Insurance.
      +
      +
      Returns:
      +
      Tracker object
      +
      +
      +
    • +
    • +
      +

      setTracker

      +
      public void setTracker(Tracker tracker)
      +
      Set the tracker of this Insurance.
      +
      +
      Parameters:
      +
      tracker - Tracker object
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Insurance create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a new Insurance object from a map of parameters.
      +
      +
      Parameters:
      +
      params - map of parameters
      +
      Returns:
      +
      Insurance object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Insurance create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a new Insurance object from a map of parameters.
      +
      +
      Parameters:
      +
      params - a map of parameters
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Insurance object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Insurance retrieve(String id) + throws EasyPostException
      +
      Retrieve an Insurance from the API.
      +
      +
      Parameters:
      +
      id - the id of the Insurance to retrieve
      +
      Returns:
      +
      Insurance object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Insurance retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve an Insurance from the API.
      +
      +
      Parameters:
      +
      id - the id of the Insurance to retrieve
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Insurance object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static InsuranceCollection all(Map<String,​Object> params) + throws EasyPostException
      +
      Get a list of Insurances.
      +
      +
      Parameters:
      +
      params - a map of parameters
      +
      Returns:
      +
      InsuranceCollection object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static InsuranceCollection all(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Get a list of Insurances.
      +
      +
      Parameters:
      +
      params - a map of parameters
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      InsuranceCollection object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Insurance refresh() + throws EasyPostException
      +
      Refresh this Insurance.
      +
      +
      Returns:
      +
      Insurance object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Insurance refresh(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Refresh this Insurance.
      +
      +
      Parameters:
      +
      params - a map of parameters
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Insurance object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getShipmentId

      +
      public String getShipmentId()
      +
      Get the shipment ID of this Insurance.
      +
      +
      Returns:
      +
      the shipment ID of the Insurance
      +
      +
      +
    • +
    • +
      +

      getStatus

      +
      public String getStatus()
      +
      Get the status of this Insurance.
      +
      +
      Returns:
      +
      the status of the Insurance
      +
      +
      +
    • +
    • +
      +

      getTrackingCode

      +
      public String getTrackingCode()
      +
      Get the tracking code of this Insurance.
      +
      +
      Returns:
      +
      the tracking code of the Insurance
      +
      +
      +
    • +
    • +
      +

      setTrackingCode

      +
      public void setTrackingCode(String trackingCode)
      +
      Set the tracking code of this Insurance.
      +
      +
      Parameters:
      +
      trackingCode - the tracking code of the Insurance
      +
      +
      +
    • +
    • +
      +

      setStatus

      +
      public void setStatus(String status)
      +
      Set the status of this Insurance.
      +
      +
      Parameters:
      +
      status - the status of the Insurance
      +
      +
      +
    • +
    • +
      +

      setShipmentId

      +
      public void setShipmentId(String shipmentId)
      +
      Set the shipment ID of this Insurance.
      +
      +
      Parameters:
      +
      shipmentId - the shipment ID of the Insurance
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Insurance refresh(Map<String,​Object> params) + throws EasyPostException
      +
      Refresh this Insurance.
      +
      +
      Parameters:
      +
      params - a map of parameters
      +
      Returns:
      +
      Insurance object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Insurance refresh(String apiKey) + throws EasyPostException
      +
      Refresh this Insurance.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Insurance object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/InsuranceCollection.html b/docs/com/easypost/model/InsuranceCollection.html new file mode 100644 index 000000000..9e31a8382 --- /dev/null +++ b/docs/com/easypost/model/InsuranceCollection.html @@ -0,0 +1,227 @@ + + + + + +InsuranceCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InsuranceCollection

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.InsuranceCollection
+
+
+
+
+
public final class InsuranceCollection +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InsuranceCollection

      +
      public InsuranceCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getHasMore

      +
      public Boolean getHasMore()
      +
      Get whether there are more insurances.
      +
      +
      Returns:
      +
      true if there are more insurances.
      +
      +
      +
    • +
    • +
      +

      setHasMore

      +
      public void setHasMore(Boolean hasMore)
      +
      Set whether there are more insurances.
      +
      +
      Parameters:
      +
      hasMore - true if there are more insurances.
      +
      +
      +
    • +
    • +
      +

      getInsurances

      +
      public List<Insurance> getInsurances()
      +
      Get the list of insurances.
      +
      +
      Returns:
      +
      List of Insurance objects.
      +
      +
      +
    • +
    • +
      +

      setInsurances

      +
      public void setInsurances(List<Insurance> insurances)
      +
      Set the list of insurances.
      +
      +
      Parameters:
      +
      insurances - List of Insurance objects.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Order.html b/docs/com/easypost/model/Order.html new file mode 100644 index 000000000..54ef373e2 --- /dev/null +++ b/docs/com/easypost/model/Order.html @@ -0,0 +1,969 @@ + + + + + +Order (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Order

+
+ +
+
+
public final class Order +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Order

      +
      public Order()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getBuyerAddress

      +
      public Address getBuyerAddress()
      +
      Get the buyer address of the Order.
      +
      +
      Returns:
      +
      the buyer address of the Order.
      +
      +
      +
    • +
    • +
      +

      setBuyerAddress

      +
      public void setBuyerAddress(Address buyerAddress)
      +
      Set the buyer address of the Order.
      +
      +
      Parameters:
      +
      buyerAddress - the buyer address of the Order.
      +
      +
      +
    • +
    • +
      +

      getCarrierAccounts

      +
      public List<CarrierAccount> getCarrierAccounts()
      +
      Get the list of carrier accounts of the Order.
      +
      +
      Returns:
      +
      List of CarrierAccount object.
      +
      +
      +
    • +
    • +
      +

      setCarrierAccounts

      +
      public void setCarrierAccounts(List<CarrierAccount> carrierAccounts)
      +
      Set the carrier accounts of the Order.
      +
      +
      Parameters:
      +
      carrierAccounts - List of CarrierAccount objects
      +
      +
      +
    • +
    • +
      +

      getCustomsInfo

      +
      public CustomsInfo getCustomsInfo()
      +
      Get the customs info of the Order.
      +
      +
      Returns:
      +
      CustomsInfo object.
      +
      +
      +
    • +
    • +
      +

      setCustomsInfo

      +
      public void setCustomsInfo(CustomsInfo customsInfo)
      +
      Set the customs info of the Order.
      +
      +
      Parameters:
      +
      customsInfo - CustomsInfo object.
      +
      +
      +
    • +
    • +
      +

      getFromAddress

      +
      public Address getFromAddress()
      +
      Get the from address of the Order.
      +
      +
      Returns:
      +
      the from address of the Order.
      +
      +
      +
    • +
    • +
      +

      setFromAddress

      +
      public void setFromAddress(Address fromAddress)
      +
      Set the from address of the Order.
      +
      +
      Parameters:
      +
      fromAddress - the from address of the Order.
      +
      +
      +
    • +
    • +
      +

      getIsReturn

      +
      public Boolean getIsReturn()
      +
      Get whether the order is a return.
      +
      +
      Returns:
      +
      true if the order is a return.
      +
      +
      +
    • +
    • +
      +

      setIsReturn

      +
      public void setIsReturn(Boolean isReturn)
      +
      Set whether the order is a return.
      +
      +
      Parameters:
      +
      isReturn - true if the order is a return.
      +
      +
      +
    • +
    • +
      +

      getMessages

      +
      public List<ShipmentMessage> getMessages()
      +
      Get the messages of the Order.
      +
      +
      Returns:
      +
      List of ShipmentMessage objects.
      +
      +
      +
    • +
    • +
      +

      setMessages

      +
      public void setMessages(List<ShipmentMessage> messages)
      +
      Set the messages of the Order.
      +
      +
      Parameters:
      +
      messages - List of ShipmentMessage objects.
      +
      +
      +
    • +
    • +
      +

      getOptions

      +
      public Map<String,​Object> getOptions()
      +
      Get the options of the Order.
      +
      +
      Returns:
      +
      map of options.
      +
      +
      +
    • +
    • +
      +

      setOptions

      +
      public void setOptions(Map<String,​Object> options)
      +
      Set the options of the Order.
      +
      +
      Parameters:
      +
      options - map of options.
      +
      +
      +
    • +
    • +
      +

      getRates

      +
      public List<Rate> getRates()
      +
      Get the rates of the Order.
      +
      +
      Returns:
      +
      List of Rate objects.
      +
      +
      +
    • +
    • +
      +

      setRates

      +
      public void setRates(List<Rate> rates)
      +
      Set the rates of the Order.
      +
      +
      Parameters:
      +
      rates - List of Rate objects.
      +
      +
      +
    • +
    • +
      +

      getReference

      +
      public String getReference()
      +
      Get the reference of the Order.
      +
      +
      Returns:
      +
      the reference of the Order.
      +
      +
      +
    • +
    • +
      +

      setReference

      +
      public void setReference(String reference)
      +
      Set the reference of the Order.
      +
      +
      Parameters:
      +
      reference - the reference of the Order.
      +
      +
      +
    • +
    • +
      +

      getReturnAddress

      +
      public Address getReturnAddress()
      +
      Get the return address of the Order.
      +
      +
      Returns:
      +
      the return address of the Order.
      +
      +
      +
    • +
    • +
      +

      setReturnAddress

      +
      public void setReturnAddress(Address returnAddress)
      +
      Set the return address of the Order.
      +
      +
      Parameters:
      +
      returnAddress - the return address of the Order.
      +
      +
      +
    • +
    • +
      +

      getService

      +
      public String getService()
      +
      Get the service of the Order.
      +
      +
      Returns:
      +
      the service of the Order.
      +
      +
      +
    • +
    • +
      +

      setService

      +
      public void setService(String service)
      +
      Set the service of the Order.
      +
      +
      Parameters:
      +
      service - the service of the Order.
      +
      +
      +
    • +
    • +
      +

      getToAddress

      +
      public Address getToAddress()
      +
      Get the to address of the Order.
      +
      +
      Returns:
      +
      the to address of the Order.
      +
      +
      +
    • +
    • +
      +

      setToAddress

      +
      public void setToAddress(Address toAddress)
      +
      Set the to address of the Order.
      +
      +
      Parameters:
      +
      toAddress - the to address of the Order.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Order create(Map<String,​Object> params) + throws EasyPostException
      +
      Create an Order object from a map of paramters.
      +
      +
      Parameters:
      +
      params - map of parameters.
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Order create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create an Order object from a map of paramters.
      +
      +
      Parameters:
      +
      params - map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Order retrieve(String id) + throws EasyPostException
      +
      Retrieve an Order object from the API.
      +
      +
      Parameters:
      +
      id - ID of the Order to retrieve.
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Order retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve an Order object from the API.
      +
      +
      Parameters:
      +
      id - ID of the Order to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Order refresh() + throws EasyPostException
      +
      Refresh this Order object.
      +
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Order refresh(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Refresh this Order object.
      +
      +
      Parameters:
      +
      params - map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getShipments

      +
      public List<Shipment> getShipments()
      +
      Get the shipments of the Order.
      +
      +
      Returns:
      +
      List of Shipment objects.
      +
      +
      +
    • +
    • +
      +

      setShipments

      +
      public void setShipments(List<Shipment> shipments)
      +
      Set the shipments of the Order.
      +
      +
      Parameters:
      +
      shipments - List of Shipment objects.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Order refresh(Map<String,​Object> params) + throws EasyPostException
      +
      Refresh this Order object.
      +
      +
      Parameters:
      +
      params - map of parameters.
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Order refresh(String apiKey) + throws EasyPostException
      +
      Refresh this Order object.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      newRates

      +
      public Order newRates() + throws EasyPostException
      +
      Get new rates for this Order.
      +
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      newRates

      +
      public Order newRates(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Get new rates for this Order.
      +
      +
      Parameters:
      +
      params - map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      newRates

      +
      public Order newRates(Map<String,​Object> params) + throws EasyPostException
      +
      Get new rates for this Order.
      +
      +
      Parameters:
      +
      params - map of parameters.
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      newRates

      +
      public Order newRates(String apiKey) + throws EasyPostException
      +
      Get new rates for this Order.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Order buy(Map<String,​Object> params) + throws EasyPostException
      +
      Buy this Order.
      +
      +
      Parameters:
      +
      params - map of parameters.
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Order buy(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Buy this Order.
      +
      +
      Parameters:
      +
      params - map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Order buy(Rate rate) + throws EasyPostException
      +
      Buy this Order.
      +
      +
      Parameters:
      +
      rate - Rate to buy.
      +
      Returns:
      +
      Order object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      lowestRate

      +
      public Rate lowestRate() + throws EasyPostException
      +
      Get the lowest rate for this Order.
      +
      +
      Returns:
      +
      lowest Rate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      lowestRate

      +
      public Rate lowestRate(List<String> carriers, + List<String> services) + throws EasyPostException
      +
      Get the lowest rate for this Order.
      +
      +
      Parameters:
      +
      carriers - the carriers to use in the filter.
      +
      services - the services to use in the filter.
      +
      Returns:
      +
      lowest Rate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      lowestRate

      +
      public Rate lowestRate(List<String> carriers) + throws EasyPostException
      +
      Get the lowest rate for this order.
      +
      +
      Parameters:
      +
      carriers - the carriers to use in the query.
      +
      Returns:
      +
      Rate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/OrderCollection.html b/docs/com/easypost/model/OrderCollection.html new file mode 100644 index 000000000..aa5ec735f --- /dev/null +++ b/docs/com/easypost/model/OrderCollection.html @@ -0,0 +1,227 @@ + + + + + +OrderCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class OrderCollection

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.OrderCollection
+
+
+
+
+
public final class OrderCollection +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      OrderCollection

      +
      public OrderCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getHasMore

      +
      public Boolean getHasMore()
      +
      Get whether there are more orders to retrieve.
      +
      +
      Returns:
      +
      true if there are more orders to retrieve, false otherwise.
      +
      +
      +
    • +
    • +
      +

      setHasMore

      +
      public void setHasMore(Boolean hasMore)
      +
      Set whether there are more orders to retrieve.
      +
      +
      Parameters:
      +
      hasMore - true if there are more orders to retrieve, false otherwise.
      +
      +
      +
    • +
    • +
      +

      getOrders

      +
      public List<Order> getOrders()
      +
      Get a list of orders.
      +
      +
      Returns:
      +
      List of Order objects.
      +
      +
      +
    • +
    • +
      +

      setOrders

      +
      public void setOrders(List<Order> orders)
      +
      Set a list of orders.
      +
      +
      Parameters:
      +
      orders - List of Order objects.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Parcel.html b/docs/com/easypost/model/Parcel.html new file mode 100644 index 000000000..55c18c271 --- /dev/null +++ b/docs/com/easypost/model/Parcel.html @@ -0,0 +1,413 @@ + + + + + +Parcel (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Parcel

+
+ +
+
+
public final class Parcel +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Parcel

      +
      public Parcel()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getHeight

      +
      public Float getHeight()
      +
      Get the height of this Parcel.
      +
      +
      Returns:
      +
      the height of this Parcel.
      +
      +
      +
    • +
    • +
      +

      setHeight

      +
      public void setHeight(Float height)
      +
      Set the height of this Parcel.
      +
      +
      Parameters:
      +
      height - the height of this Parcel.
      +
      +
      +
    • +
    • +
      +

      getLength

      +
      public Float getLength()
      +
      Get the length of this Parcel.
      +
      +
      Returns:
      +
      the length of this Parcel.
      +
      +
      +
    • +
    • +
      +

      setLength

      +
      public void setLength(Float length)
      +
      Set the length of this Parcel.
      +
      +
      Parameters:
      +
      length - the length of this Parcel.
      +
      +
      +
    • +
    • +
      +

      getPredefinedPackage

      +
      public String getPredefinedPackage()
      +
      Get the predefined package of this Parcel.
      +
      +
      Returns:
      +
      the predefined package of this Parcel.
      +
      +
      +
    • +
    • +
      +

      setPredefinedPackage

      +
      public void setPredefinedPackage(String predefinedPackage)
      +
      Set the predefined package of this Parcel.
      +
      +
      Parameters:
      +
      predefinedPackage - the predefined package of this Parcel.
      +
      +
      +
    • +
    • +
      +

      getWeight

      +
      public Float getWeight()
      +
      Get the weight of this Parcel.
      +
      +
      Returns:
      +
      the weight of this Parcel.
      +
      +
      +
    • +
    • +
      +

      setWeight

      +
      public void setWeight(Float weight)
      +
      Set the weight of this Parcel.
      +
      +
      Parameters:
      +
      weight - the weight of this Parcel.
      +
      +
      +
    • +
    • +
      +

      getWidth

      +
      public Float getWidth()
      +
      Get the width of this Parcel.
      +
      +
      Returns:
      +
      the width of this Parcel.
      +
      +
      +
    • +
    • +
      +

      setWidth

      +
      public void setWidth(Float width)
      +
      Set the width of this Parcel.
      +
      +
      Parameters:
      +
      width - the width of this Parcel.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Parcel create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a Parcel from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of the parameters to create a Parcel from.
      +
      Returns:
      +
      Parcel object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Parcel create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a Parcel from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of the parameters to create a Parcel from.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Parcel object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Parcel retrieve(String id) + throws EasyPostException
      +
      Retrieve a Parcel from the API.
      +
      +
      Parameters:
      +
      id - the ID of the Parcel to retrieve.
      +
      Returns:
      +
      Parcel object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Parcel retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a Parcel from the API.
      +
      +
      Parameters:
      +
      id - the ID of the Parcel to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Parcel object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/PaymentMethod.Priority.html b/docs/com/easypost/model/PaymentMethod.Priority.html new file mode 100644 index 000000000..2f8356042 --- /dev/null +++ b/docs/com/easypost/model/PaymentMethod.Priority.html @@ -0,0 +1,230 @@ + + + + + +PaymentMethod.Priority (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum PaymentMethod.Priority

+
+
java.lang.Object +
java.lang.Enum<PaymentMethod.Priority> +
com.easypost.model.PaymentMethod.Priority
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<PaymentMethod.Priority>, java.lang.constant.Constable
+
+
+
Enclosing class:
+
PaymentMethod
+
+
+
public static enum PaymentMethod.Priority +extends Enum<PaymentMethod.Priority>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static PaymentMethod.Priority[] values()
      +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum type, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static PaymentMethod.Priority valueOf(String name)
      +
      Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum type has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/PaymentMethod.html b/docs/com/easypost/model/PaymentMethod.html new file mode 100644 index 000000000..faca7c1a9 --- /dev/null +++ b/docs/com/easypost/model/PaymentMethod.html @@ -0,0 +1,326 @@ + + + + + +PaymentMethod (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentMethod

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.PaymentMethod
+
+
+
+
+
public class PaymentMethod +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PaymentMethod

      +
      public PaymentMethod()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getPrimaryPaymentMethod

      +
      @Deprecated +public PrimaryPaymentMethod getPrimaryPaymentMethod()
      +
      Deprecated. +
      Use getPrimaryPaymentMethodObject() instead. + Deprecated: v5.5.0 - v7.0.0
      +
      +
      Get the PrimaryPaymentMethod of this PaymentMethod object.
      +
      +
      Returns:
      +
      the PrimaryPaymentMethod of this PaymentMethod.
      +
      +
      +
    • +
    • +
      +

      getSecondaryPaymentMethod

      +
      @Deprecated +public SecondaryPaymentMethod getSecondaryPaymentMethod()
      +
      Deprecated. +
      Use getSecondaryPaymentMethodObject() instead. + Deprecated: v5.5.0 - v7.0.0
      +
      +
      Get the SecondaryPaymentMethod of this PaymentMethod object.
      +
      +
      Returns:
      +
      the SecondaryPaymentMethod of this PaymentMethod.
      +
      +
      +
    • +
    • +
      +

      all

      +
      @Deprecated +public static PaymentMethod all() + throws EasyPostException
      +
      Deprecated. +
      Use Billing.retrievePaymentMethods() instead. + Deprecated: v5.5.0 - v7.0.0
      +
      +
      List all payment methods.
      +
      +
      Returns:
      +
      Billing object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      @Deprecated +public static PaymentMethod all(String apiKey) + throws EasyPostException
      +
      Deprecated. +
      Use Billing.retrievePaymentMethods() instead. + Deprecated: v5.5.0 - v7.0.0
      +
      +
      List all payment methods.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Billing object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getObject

      +
      public String getObject()
      +
      Get the object of this PaymentMethod object.
      +
      +
      Returns:
      +
      the object of this PaymentMethod.
      +
      +
      +
    • +
    • +
      +

      getPrimaryPaymentMethodObject

      +
      public PaymentMethodObject getPrimaryPaymentMethodObject()
      +
      Get the primary payment method of this PaymentMethod object.
      +
      +
      Returns:
      +
      a PaymentMethodObject representing the primary payment method.
      +
      +
      +
    • +
    • +
      +

      getSecondaryPaymentMethodObject

      +
      public PaymentMethodObject getSecondaryPaymentMethodObject()
      +
      Get the secondary payment method of this PaymentMethod object.
      +
      +
      Returns:
      +
      a PaymentMethodObject representing the secondary payment method.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/PaymentMethodObject.PaymentMethodType.html b/docs/com/easypost/model/PaymentMethodObject.PaymentMethodType.html new file mode 100644 index 000000000..8e6cb1bbe --- /dev/null +++ b/docs/com/easypost/model/PaymentMethodObject.PaymentMethodType.html @@ -0,0 +1,230 @@ + + + + + +PaymentMethodObject.PaymentMethodType (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum PaymentMethodObject.PaymentMethodType

+
+
java.lang.Object +
java.lang.Enum<PaymentMethodObject.PaymentMethodType> +
com.easypost.model.PaymentMethodObject.PaymentMethodType
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<PaymentMethodObject.PaymentMethodType>, java.lang.constant.Constable
+
+
+
Enclosing class:
+
PaymentMethodObject
+
+
+
public static enum PaymentMethodObject.PaymentMethodType +extends Enum<PaymentMethodObject.PaymentMethodType>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static PaymentMethodObject.PaymentMethodType[] values()
      +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum type, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static PaymentMethodObject.PaymentMethodType valueOf(String name)
      +
      Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum type has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/PaymentMethodObject.html b/docs/com/easypost/model/PaymentMethodObject.html new file mode 100644 index 000000000..70281e994 --- /dev/null +++ b/docs/com/easypost/model/PaymentMethodObject.html @@ -0,0 +1,372 @@ + + + + + +PaymentMethodObject (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentMethodObject

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.PaymentMethodObject
+
+
+
+
+
public class PaymentMethodObject +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PaymentMethodObject

      +
      public PaymentMethodObject()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getBankName

      +
      public String getBankName()
      +
      Get the bank name of this PaymentMethodObject object.
      +
      +
      Returns:
      +
      the bank name of this PaymentMethodObject.
      +
      +
      +
    • +
    • +
      +

      getBrand

      +
      public String getBrand()
      +
      Get the brand of this PaymentMethodObject object.
      +
      +
      Returns:
      +
      the brand of this PaymentMethodObject.
      +
      +
      +
    • +
    • +
      +

      getCountry

      +
      public String getCountry()
      +
      Get the country of this PaymentMethodObject object.
      +
      +
      Returns:
      +
      the country of this PaymentMethodObject.
      +
      +
      +
    • +
    • +
      +

      getDisabledAt

      +
      public String getDisabledAt()
      +
      Get when this PaymentMethodObject object was disabled.
      +
      +
      Returns:
      +
      when this PaymentMethodObject was disabled.
      +
      +
      +
    • +
    • +
      +

      getExpMonth

      +
      public int getExpMonth()
      +
      Get the expMonth of this PaymentMethodObject object.
      +
      +
      Returns:
      +
      the expMonth of this PaymentMethodObject.
      +
      +
      +
    • +
    • +
      +

      getExpYear

      +
      public int getExpYear()
      +
      Get the expYear of this PaymentMethodObject object.
      +
      +
      Returns:
      +
      the expYear of this PaymentMethodObject.
      +
      +
      +
    • +
    • +
      +

      getId

      +
      public String getId()
      +
      Get ID of this PaymentMethodObject object.
      +
      +
      Overrides:
      +
      getId in class EasyPostResource
      +
      Returns:
      +
      ID of this PaymentMethodObject.
      +
      +
      +
    • +
    • +
      +

      getLast4

      +
      public String getLast4()
      +
      Get the last 4 digits of this PaymentMethodObject object.
      +
      +
      Returns:
      +
      the last 4 digits of this PaymentMethodObject.
      +
      +
      +
    • +
    • +
      +

      getName

      +
      public String getName()
      +
      Get the name of this PaymentMethodObject object.
      +
      +
      Returns:
      +
      the name of this PaymentMethodObject.
      +
      +
      +
    • +
    • +
      +

      getObject

      +
      public String getObject()
      +
      Get the object of this PaymentMethodObject object.
      +
      +
      Returns:
      +
      the object of this PaymentMethodObject.
      +
      +
      +
    • +
    • +
      +

      isVerified

      +
      public boolean isVerified()
      +
      Get whether this PaymentMethodObject object is verified.
      +
      +
      Returns:
      +
      true if this PaymentMethodObject is verified, false otherwise.
      +
      +
      +
    • +
    • +
      +

      getType

      + +
      Get the type of this PaymentMethodObject object.
      +
      +
      Returns:
      +
      the type of this PaymentMethodObject.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Pickup.html b/docs/com/easypost/model/Pickup.html new file mode 100644 index 000000000..0a2455fd8 --- /dev/null +++ b/docs/com/easypost/model/Pickup.html @@ -0,0 +1,945 @@ + + + + + +Pickup (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Pickup

+
+ +
+
+
public final class Pickup +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Pickup

      +
      public Pickup()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getAddress

      +
      public Address getAddress()
      +
      Get the address of this Pickup.
      +
      +
      Returns:
      +
      Address object.
      +
      +
      +
    • +
    • +
      +

      setAddress

      +
      public void setAddress(Address address)
      +
      Set the address of this Pickup.
      +
      +
      Parameters:
      +
      address - Address object.
      +
      +
      +
    • +
    • +
      +

      getCarrierAccounts

      +
      public List<CarrierAccount> getCarrierAccounts()
      +
      Get the carrier accounts of this Pickup.
      +
      +
      Returns:
      +
      List of CarrierAccount objects.
      +
      +
      +
    • +
    • +
      +

      setCarrierAccounts

      +
      public void setCarrierAccounts(List<CarrierAccount> carrierAccounts)
      +
      Set the carrier accounts of this Pickup.
      +
      +
      Parameters:
      +
      carrierAccounts - List of CarrierAccount objects.
      +
      +
      +
    • +
    • +
      +

      getConfirmation

      +
      public String getConfirmation()
      +
      Get the confirmation of this Pickup.
      +
      +
      Returns:
      +
      the confirmation of this Pickup.
      +
      +
      +
    • +
    • +
      +

      setConfirmation

      +
      public void setConfirmation(String confirmation)
      +
      Set the confirmation of this Pickup.
      +
      +
      Parameters:
      +
      confirmation - the confirmation of this Pickup.
      +
      +
      +
    • +
    • +
      +

      getInstructions

      +
      public String getInstructions()
      +
      Get instructions for the pickup.
      +
      +
      Returns:
      +
      instructions for the pickup.
      +
      +
      +
    • +
    • +
      +

      setInstructions

      +
      public void setInstructions(String instructions)
      +
      Set instructions for the pickup.
      +
      +
      Parameters:
      +
      instructions - instructions for the pickup.
      +
      +
      +
    • +
    • +
      +

      getIsAccountAddress

      +
      public Boolean getIsAccountAddress()
      +
      Get whether the address is an account address.
      +
      +
      Returns:
      +
      whether the address is an account address.
      +
      +
      +
    • +
    • +
      +

      setIsAccountAddress

      +
      public void setIsAccountAddress(Boolean isAccountAddress)
      +
      Set whether the address is an account address.
      +
      +
      Parameters:
      +
      isAccountAddress - if the address is an account address.
      +
      +
      +
    • +
    • +
      +

      getMaxDatetime

      +
      public Date getMaxDatetime()
      +
      Get the latest date of this Pickup.
      +
      +
      Returns:
      +
      the latest date of this Pickup.
      +
      +
      +
    • +
    • +
      +

      setMaxDatetime

      +
      public void setMaxDatetime(Date maxDatetime)
      +
      Set the latest date of this Pickup.
      +
      +
      Parameters:
      +
      maxDatetime - the latest date of this Pickup.
      +
      +
      +
    • +
    • +
      +

      getMessages

      +
      public List<ShipmentMessage> getMessages()
      +
      Get the messages of this Pickup.
      +
      +
      Returns:
      +
      List of ShipmentMessages objects.
      +
      +
      +
    • +
    • +
      +

      setMessages

      +
      public void setMessages(List<ShipmentMessage> messages)
      +
      Set the messages of this Pickup.
      +
      +
      Parameters:
      +
      messages - List of ShipmentMessages objects.
      +
      +
      +
    • +
    • +
      +

      getMinDatetime

      +
      public Date getMinDatetime()
      +
      Get the earliest date of this Pickup.
      +
      +
      Returns:
      +
      the earliest date of this Pickup.
      +
      +
      +
    • +
    • +
      +

      setMinDatetime

      +
      public void setMinDatetime(Date minDatetime)
      +
      Set the earliest date of this Pickup.
      +
      +
      Parameters:
      +
      minDatetime - the earliest date of this Pickup.
      +
      +
      +
    • +
    • +
      +

      getReference

      +
      public String getReference()
      +
      Get the reference of this Pickup.
      +
      +
      Returns:
      +
      the reference of this Pickup.
      +
      +
      +
    • +
    • +
      +

      setReference

      +
      public void setReference(String reference)
      +
      Set the reference of this Pickup.
      +
      +
      Parameters:
      +
      reference - the reference of this Pickup.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Pickup create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a new Pickup object from a map of parameters.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Pickup create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a new Pickup object from a map of parameters.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Pickup retrieve(String id) + throws EasyPostException
      +
      Retrieve a Pickup from the API.
      +
      +
      Parameters:
      +
      id - ID of Pickup to retrieve.
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Pickup retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a Pickup from the API.
      +
      +
      Parameters:
      +
      id - ID of Pickup to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Pickup refresh() + throws EasyPostException
      +
      Refresh this Pickup.
      +
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Pickup refresh(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Refresh this Pickup.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getStatus

      +
      public String getStatus()
      +
      Get the status of this Pickup.
      +
      +
      Returns:
      +
      the status of this Pickup.
      +
      +
      +
    • +
    • +
      +

      setStatus

      +
      public void setStatus(String status)
      +
      Set the status of this Pickup.
      +
      +
      Parameters:
      +
      status - the status of this Pickup.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Pickup refresh(Map<String,​Object> params) + throws EasyPostException
      +
      Refresh this Pickup.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Pickup refresh(String apiKey) + throws EasyPostException
      +
      Refresh this Pickup.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Pickup buy() + throws EasyPostException
      +
      Buy this Pickup.
      +
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Pickup buy(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Buy this Pickup.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Pickup buy(Map<String,​Object> params) + throws EasyPostException
      +
      Buy this Pickup.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Pickup buy(String apiKey) + throws EasyPostException
      +
      Buy this Pickup.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Pickup buy(PickupRate pickupRate) + throws EasyPostException
      +
      Buy this Pickup.
      +
      +
      Parameters:
      +
      pickupRate - PickupRate to buy.
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      cancel

      +
      public Pickup cancel() + throws EasyPostException
      +
      Cancel this Pickup.
      +
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      cancel

      +
      public Pickup cancel(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Cancel this Pickup.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      cancel

      +
      public Pickup cancel(Map<String,​Object> params) + throws EasyPostException
      +
      Cancel this Pickup.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      cancel

      +
      public Pickup cancel(String apiKey) + throws EasyPostException
      +
      Cancel this Pickup.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Pickup object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      lowestRate

      +
      public PickupRate lowestRate() + throws EasyPostException
      +
      Get the lowest rate for this Pickup.
      +
      +
      Returns:
      +
      lowest PickupRate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      lowestRate

      +
      public PickupRate lowestRate(List<String> carriers, + List<String> services) + throws EasyPostException
      +
      Get the lowest rate for this Pickup.
      +
      +
      Parameters:
      +
      carriers - the carriers to use in the filter.
      +
      services - the services to use in the filter.
      +
      Returns:
      +
      lowest PickupRate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getPickupRates

      +
      public List<PickupRate> getPickupRates()
      +
      Get the pickup rates of this Pickup.
      +
      +
      Returns:
      +
      List of PickupRate objects.
      +
      +
      +
    • +
    • +
      +

      setPickupRates

      +
      public void setPickupRates(List<PickupRate> pickupRates)
      +
      Set the pickup rates of this Pickup.
      +
      +
      Parameters:
      +
      pickupRates - List of PickupRate objects.
      +
      +
      +
    • +
    • +
      +

      lowestRate

      +
      public PickupRate lowestRate(List<String> carriers) + throws EasyPostException
      +
      Get the lowest rate for this pickup.
      +
      +
      Parameters:
      +
      carriers - the carriers to use in the query.
      +
      Returns:
      +
      PickupRate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/PickupCollection.html b/docs/com/easypost/model/PickupCollection.html new file mode 100644 index 000000000..db0ed5044 --- /dev/null +++ b/docs/com/easypost/model/PickupCollection.html @@ -0,0 +1,227 @@ + + + + + +PickupCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PickupCollection

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.PickupCollection
+
+
+
+
+
public final class PickupCollection +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PickupCollection

      +
      public PickupCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getHasMore

      +
      public Boolean getHasMore()
      +
      Get whether there are more Pickup objects to retrieve.
      +
      +
      Returns:
      +
      whether there are more Pickup objects to retrieve.
      +
      +
      +
    • +
    • +
      +

      setHasMore

      +
      public void setHasMore(Boolean hasMore)
      +
      Set whether there are more Pickup objects to retrieve.
      +
      +
      Parameters:
      +
      hasMore - whether there are more Pickup objects to retrieve.
      +
      +
      +
    • +
    • +
      +

      getPickups

      +
      public List<Pickup> getPickups()
      +
      Get this PickupCollection's Pickup objects.
      +
      +
      Returns:
      +
      List of Pickup objects.
      +
      +
      +
    • +
    • +
      +

      setPickups

      +
      public void setPickups(List<Pickup> pickups)
      +
      Set this PickupCollection's Pickup objects.
      +
      +
      Parameters:
      +
      pickups - List of Pickup objects.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/PickupRate.html b/docs/com/easypost/model/PickupRate.html new file mode 100644 index 000000000..773e1bd9b --- /dev/null +++ b/docs/com/easypost/model/PickupRate.html @@ -0,0 +1,200 @@ + + + + + +PickupRate (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PickupRate

+
+ +
+
+
public final class PickupRate +extends Rate
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PickupRate

      +
      public PickupRate()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getPickupID

      +
      public String getPickupID()
      +
      Get the ID of this Pickup.
      +
      +
      Returns:
      +
      the ID of this Pickup.
      +
      +
      +
    • +
    • +
      +

      setPickupID

      +
      public void setPickupID(String pickupId)
      +
      Set the ID of this Pickup.
      +
      +
      Parameters:
      +
      pickupId - the ID of this Pickup.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/PostageLabel.html b/docs/com/easypost/model/PostageLabel.html new file mode 100644 index 000000000..2019206a2 --- /dev/null +++ b/docs/com/easypost/model/PostageLabel.html @@ -0,0 +1,803 @@ + + + + + +PostageLabel (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PostageLabel

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.PostageLabel
+
+
+
+
+
public final class PostageLabel +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PostageLabel

      +
      public PostageLabel()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getDateAdvance

      +
      public int getDateAdvance()
      +
      Get the date advance of this PostageLabel.
      +
      +
      Returns:
      +
      Date advance of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setDateAdvance

      +
      public void setDateAdvance(int dateAdvance)
      +
      Set the date advance of this PostageLabel.
      +
      +
      Parameters:
      +
      dateAdvance - Date advance of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getEpl2LabelType

      +
      public String getEpl2LabelType()
      +
      Get the EPL2 type of this PostageLabel.
      +
      +
      Returns:
      +
      EPL2 type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelUrl

      +
      public String getLabelUrl()
      +
      Get the URL of this PostageLabel.
      +
      +
      Returns:
      +
      URL of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelUrl

      +
      public void setLabelUrl(String labelUrl)
      +
      Set the URL of this PostageLabel.
      +
      +
      Parameters:
      +
      labelUrl - URL of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getIntegratedForm

      +
      public String getIntegratedForm()
      +
      Get the integrated form of this PostageLabel.
      +
      +
      Returns:
      +
      Integrated form of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setIntegratedForm

      +
      public void setIntegratedForm(String integratedForm)
      +
      Set the integrated form of this PostageLabel.
      +
      +
      Parameters:
      +
      integratedForm - Integrated form of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelEpl2FileType

      +
      public String getLabelEpl2FileType()
      +
      Get the EPL2 file type of this PostageLabel.
      +
      +
      Returns:
      +
      EPL2 file type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelEpl2FileType

      +
      public void setLabelEpl2FileType(String labelEpl2FileType)
      +
      Set the EPL2 file type of this PostageLabel.
      +
      +
      Parameters:
      +
      labelEpl2FileType - EPL2 file type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelEpl2Size

      +
      public String getLabelEpl2Size()
      +
      Get the EPL2 size of this PostageLabel.
      +
      +
      Returns:
      +
      EPL2 size of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelEpl2Size

      +
      public void setLabelEpl2Size(String labelEpl2Size)
      +
      Set the EPL2 size of this PostageLabel.
      +
      +
      Parameters:
      +
      labelEpl2Size - EPL2 size of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelEpl2Url

      +
      public String getLabelEpl2Url()
      +
      Get the EPL2 URL of this PostageLabel.
      +
      +
      Returns:
      +
      EPL2 URL of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelEpl2Url

      +
      public void setLabelEpl2Url(String labelEpl2Url)
      +
      Set the EPL2 URL of this PostageLabel.
      +
      +
      Parameters:
      +
      labelEpl2Url - EPL2 URL of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelFile

      +
      public String getLabelFile()
      +
      Get the file of this PostageLabel.
      +
      +
      Returns:
      +
      File of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelFile

      +
      public void setLabelFile(String labelFile)
      +
      Set the file of this PostageLabel.
      +
      +
      Parameters:
      +
      labelFile - File of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelFileType

      +
      public String getLabelFileType()
      +
      Get the file type of this PostageLabel.
      +
      +
      Returns:
      +
      File type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelFileType

      +
      public void setLabelFileType(String labelFileType)
      +
      Set the file type of this PostageLabel.
      +
      +
      Parameters:
      +
      labelFileType - File type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelPdfFileType

      +
      public String getLabelPdfFileType()
      +
      Get the PDF file type of this PostageLabel.
      +
      +
      Returns:
      +
      PDF file type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelPdfFileType

      +
      public void setLabelPdfFileType(String labelPdfFileType)
      +
      Set the PDF file type of this PostageLabel.
      +
      +
      Parameters:
      +
      labelPdfFileType - PDF file type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelPdfSize

      +
      public String getLabelPdfSize()
      +
      Get the PDF size of this PostageLabel.
      +
      +
      Returns:
      +
      PDF size of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelPdfSize

      +
      public void setLabelPdfSize(String labelPdfSize)
      +
      Set the PDF size of this PostageLabel.
      +
      +
      Parameters:
      +
      labelPdfSize - PDF size of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelPdfUrl

      +
      public String getLabelPdfUrl()
      +
      Get the PDF URL of this PostageLabel.
      +
      +
      Returns:
      +
      PDF URL of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelPdfUrl

      +
      public void setLabelPdfUrl(String labelPdfUrl)
      +
      Set the PDF URL of this PostageLabel.
      +
      +
      Parameters:
      +
      labelPdfUrl - PDF URL of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelResolution

      +
      public int getLabelResolution()
      +
      Get the resolution of this PostageLabel.
      +
      +
      Returns:
      +
      Resolution of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelResolution

      +
      public void setLabelResolution(int labelResolution)
      +
      Set the resolution of this PostageLabel.
      +
      +
      Parameters:
      +
      labelResolution - Resolution of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelSize

      +
      public String getLabelSize()
      +
      Get the size of this PostageLabel.
      +
      +
      Returns:
      +
      Size of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelSize

      +
      public void setLabelSize(String labelSize)
      +
      Set the size of this PostageLabel.
      +
      +
      Parameters:
      +
      labelSize - Size of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelType

      +
      public String getLabelType()
      +
      Get the type of this PostageLabel.
      +
      +
      Returns:
      +
      Type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelType

      +
      public void setLabelType(String labelType)
      +
      Set the type of this PostageLabel.
      +
      +
      Parameters:
      +
      labelType - Type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelZplFileType

      +
      public String getLabelZplFileType()
      +
      Get the ZPL file type of this PostageLabel.
      +
      +
      Returns:
      +
      ZPL file type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelZplFileType

      +
      public void setLabelZplFileType(String labelZplFileType)
      +
      Set the ZPL file type of this PostageLabel.
      +
      +
      Parameters:
      +
      labelZplFileType - ZPL file type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelZplSize

      +
      public String getLabelZplSize()
      +
      Get the ZPL size of this PostageLabel.
      +
      +
      Returns:
      +
      ZPL size of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelZplSize

      +
      public void setLabelZplSize(String labelZplSize)
      +
      Set the ZPL size of this PostageLabel.
      +
      +
      Parameters:
      +
      labelZplSize - ZPL size of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getLabelZplUrl

      +
      public String getLabelZplUrl()
      +
      Get the ZPL URL of this PostageLabel.
      +
      +
      Returns:
      +
      ZPL URL of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelZplUrl

      +
      public void setLabelZplUrl(String labelZplUrl)
      +
      Set the ZPL URL of this PostageLabel.
      +
      +
      Parameters:
      +
      labelZplUrl - ZPL URL of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getPdfLabelType

      +
      public String getPdfLabelType()
      +
      Get the PDF type of this PostageLabel.
      +
      +
      Returns:
      +
      PDF type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      getZplLabelType

      +
      public String getZplLabelType()
      +
      Get the ZPL type of this PostageLabel.
      +
      +
      Returns:
      +
      ZPL type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelPdfType

      +
      public void setLabelPdfType(String labelPdfType)
      +
      Set the PDF type of this PostageLabel.
      +
      +
      Parameters:
      +
      labelPdfType - PDF type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelEpl2Type

      +
      public void setLabelEpl2Type(String labelEpl2Type)
      +
      Set the EPL2 type of this PostageLabel.
      +
      +
      Parameters:
      +
      labelEpl2Type - EPL2 type of this PostageLabel.
      +
      +
      +
    • +
    • +
      +

      setLabelZplType

      +
      public void setLabelZplType(String labelZplType)
      +
      Set the ZPL type of this PostageLabel.
      +
      +
      Parameters:
      +
      labelZplType - ZPL type of this PostageLabel.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/PrimaryPaymentMethod.html b/docs/com/easypost/model/PrimaryPaymentMethod.html new file mode 100644 index 000000000..593d0ab56 --- /dev/null +++ b/docs/com/easypost/model/PrimaryPaymentMethod.html @@ -0,0 +1,155 @@ + + + + + +PrimaryPaymentMethod (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PrimaryPaymentMethod

+
+ +
+
+
@Deprecated +public class PrimaryPaymentMethod +extends BaseCreditCard
+
Deprecated. +
Use PaymentMethodObject instead. + Deprecated: v5.5.0 - v7.0.0
+
+
PrimaryPaymentMethod is a model class that represents the primary payment method.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PrimaryPaymentMethod

      +
      public PrimaryPaymentMethod()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Rate.html b/docs/com/easypost/model/Rate.html new file mode 100644 index 000000000..fcc7f95ae --- /dev/null +++ b/docs/com/easypost/model/Rate.html @@ -0,0 +1,724 @@ + + + + + +Rate (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Rate

+
+ +
+
+
Direct Known Subclasses:
+
PickupRate, Smartrate
+
+
+
public class Rate +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Rate

      +
      public Rate()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getBillingType

      +
      public String getBillingType()
      +
      Get billing type of this rate.
      +
      +
      Returns:
      +
      billing type of this rate.
      +
      +
      +
    • +
    • +
      +

      setBillingType

      +
      public void setBillingType(String billingType)
      +
      Set billing type of this rate.
      +
      +
      Parameters:
      +
      billingType - billing type of this rate.
      +
      +
      +
    • +
    • +
      +

      getCarbonOffset

      +
      public CarbonOffset getCarbonOffset()
      +
      Get the carbon offset of this Rate.
      +
      +
      Returns:
      +
      Carbon offset of this Rate.
      +
      +
      +
    • +
    • +
      +

      setCarbonOffset

      +
      public void setCarbonOffset(CarbonOffset carbonOffset)
      +
      Set the carbon offset of this Rate.
      +
      +
      Parameters:
      +
      carbonOffset - Carbon offset of this Rate.
      +
      +
      +
    • +
    • +
      +

      getCarrier

      +
      public String getCarrier()
      +
      Get the carrier of this Rate.
      +
      +
      Returns:
      +
      Carrier of this Rate.
      +
      +
      +
    • +
    • +
      +

      setCarrier

      +
      public void setCarrier(String carrier)
      +
      Set the carrier of this Rate.
      +
      +
      Parameters:
      +
      carrier - Carrier of this Rate.
      +
      +
      +
    • +
    • +
      +

      getCarrierAccountId

      +
      public String getCarrierAccountId()
      +
      Get the ID of the carrier account of this Rate.
      +
      +
      Returns:
      +
      ID of the carrier account of this Rate.
      +
      +
      +
    • +
    • +
      +

      setCarrierAccountId

      +
      public void setCarrierAccountId(String carrierAccountId)
      +
      Set the ID of the carrier account of this Rate.
      +
      +
      Parameters:
      +
      carrierAccountId - ID of the carrier account of this Rate.
      +
      +
      +
    • +
    • +
      +

      getCurrency

      +
      public String getCurrency()
      +
      Get the currency of this Rate.
      +
      +
      Returns:
      +
      Currency of this Rate.
      +
      +
      +
    • +
    • +
      +

      setCurrency

      +
      public void setCurrency(String currency)
      +
      Set the currency of this Rate.
      +
      +
      Parameters:
      +
      currency - Currency of this Rate.
      +
      +
      +
    • +
    • +
      +

      getDeliveryDate

      +
      public String getDeliveryDate()
      +
      Get the delivery date of this Rate.
      +
      +
      Returns:
      +
      Delivery date of this Rate.
      +
      +
      +
    • +
    • +
      +

      setDeliveryDate

      +
      public void setDeliveryDate(String deliveryDate)
      +
      Set the delivery date of this Rate.
      +
      +
      Parameters:
      +
      deliveryDate - Delivery date of this Rate.
      +
      +
      +
    • +
    • +
      +

      getDeliveryDateGuaranteed

      +
      public Boolean getDeliveryDateGuaranteed()
      +
      Get whether the delivery date is guaranteed for this Rate.
      +
      +
      Returns:
      +
      true if the delivery date is guaranteed for this Rate.
      +
      +
      +
    • +
    • +
      +

      setDeliveryDateGuaranteed

      +
      public void setDeliveryDateGuaranteed(Boolean deliveryDateGuaranteed)
      +
      Set whether the delivery date is guaranteed for this Rate.
      +
      +
      Parameters:
      +
      deliveryDateGuaranteed - true if the delivery date is guaranteed for this Rate.
      +
      +
      +
    • +
    • +
      +

      getDeliveryDays

      +
      public Number getDeliveryDays()
      +
      Get the delivery days of this Rate.
      +
      +
      Returns:
      +
      Delivery days of this Rate.
      +
      +
      +
    • +
    • +
      +

      setDeliveryDays

      +
      public void setDeliveryDays(Number deliveryDays)
      +
      Set the delivery days of this Rate.
      +
      +
      Parameters:
      +
      deliveryDays - Delivery days of this Rate.
      +
      +
      +
    • +
    • +
      +

      getEstDeliveryDays

      +
      public Number getEstDeliveryDays()
      +
      Get the estimated delivery days for this Rate.
      +
      +
      Returns:
      +
      Estimated delivery days for this Rate.
      +
      +
      +
    • +
    • +
      +

      setEstDeliveryDays

      +
      public void setEstDeliveryDays(Number estDeliveryDays)
      +
      Set the estimated delivery days for this Rate.
      +
      +
      Parameters:
      +
      estDeliveryDays - Estimated delivery days for this Rate.
      +
      +
      +
    • +
    • +
      +

      getShipmentId

      +
      public String getShipmentId()
      +
      Get the ID of the shipment of this Rate.
      +
      +
      Returns:
      +
      ID of the shipment of this Rate.
      +
      +
      +
    • +
    • +
      +

      setShipmentId

      +
      public void setShipmentId(String shipmentId)
      +
      Set the ID of the shipment of this Rate.
      +
      +
      Parameters:
      +
      shipmentId - ID of the shipment of this Rate.
      +
      +
      +
    • +
    • +
      +

      getListCurrency

      +
      public String getListCurrency()
      +
      Get the list currency of this Rate.
      +
      +
      Returns:
      +
      List currency of this Rate.
      +
      +
      +
    • +
    • +
      +

      setListCurrency

      +
      public void setListCurrency(String listCurrency)
      +
      Set the list currency of this Rate.
      +
      +
      Parameters:
      +
      listCurrency - List currency of this Rate.
      +
      +
      +
    • +
    • +
      +

      getListRate

      +
      public Float getListRate()
      +
      Get the list rate of this Rate.
      +
      +
      Returns:
      +
      List rate of this Rate.
      +
      +
      +
    • +
    • +
      +

      setListRate

      +
      public void setListRate(Float listRate)
      +
      Set the list rate of this Rate.
      +
      +
      Parameters:
      +
      listRate - List rate of this Rate.
      +
      +
      +
    • +
    • +
      +

      getRate

      +
      public Float getRate()
      +
      Get the rate of this Rate.
      +
      +
      Returns:
      +
      Rate of this Rate.
      +
      +
      +
    • +
    • +
      +

      setRate

      +
      public void setRate(Float rate)
      +
      Set the rate of this Rate.
      +
      +
      Parameters:
      +
      rate - Rate of this Rate.
      +
      +
      +
    • +
    • +
      +

      getRetailCurrency

      +
      public String getRetailCurrency()
      +
      Get the retail currency of this Rate.
      +
      +
      Returns:
      +
      Retail currency of this Rate.
      +
      +
      +
    • +
    • +
      +

      setRetailCurrency

      +
      public void setRetailCurrency(String retailCurrency)
      +
      Set the retail currency of this Rate.
      +
      +
      Parameters:
      +
      retailCurrency - Retail currency of this Rate.
      +
      +
      +
    • +
    • +
      +

      getRetailRate

      +
      public Float getRetailRate()
      +
      Get the retail rate of this Rate.
      +
      +
      Returns:
      +
      Retail rate of this Rate.
      +
      +
      +
    • +
    • +
      +

      setRetailRate

      +
      public void setRetailRate(Float retailRate)
      +
      Set the retail rate of this Rate.
      +
      +
      Parameters:
      +
      retailRate - Retail rate of this Rate.
      +
      +
      +
    • +
    • +
      +

      getService

      +
      public String getService()
      +
      Get the service of this Rate.
      +
      +
      Returns:
      +
      Service of this Rate.
      +
      +
      +
    • +
    • +
      +

      setService

      +
      public void setService(String service)
      +
      Set the service of this Rate.
      +
      +
      Parameters:
      +
      service - Service of this Rate.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Rate retrieve(String id) + throws EasyPostException
      +
      Retrieve a Rate from the API.
      +
      +
      Parameters:
      +
      id - ID of the Rate to retrieve.
      +
      Returns:
      +
      Rate object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Rate retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a Rate from the API.
      +
      +
      Parameters:
      +
      id - ID of the Rate to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Rate object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/ReferralCustomer.html b/docs/com/easypost/model/ReferralCustomer.html new file mode 100644 index 000000000..fa8c2a1fa --- /dev/null +++ b/docs/com/easypost/model/ReferralCustomer.html @@ -0,0 +1,406 @@ + + + + + +ReferralCustomer (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ReferralCustomer

+
+ +
+
+
public class ReferralCustomer +extends BaseUser
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ReferralCustomer

      +
      public ReferralCustomer()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getApiKeys

      +
      public List<ApiKey> getApiKeys()
      +
      Get the api keys of the Referral user.
      +
      +
      Returns:
      +
      the api keys of the Referral user.
      +
      +
      +
    • +
    • +
      +

      setApiKeys

      +
      public void setApiKeys(List<ApiKey> apiKeys)
      +
      Set the api keys of the Referral user.
      +
      +
      Parameters:
      +
      apiKeys - the api keys of the Referral user.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static ReferralCustomer create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a Referral object from parameter map. This function requires the Partner User's API key.
      +
      +
      Parameters:
      +
      params - Map of the referral user parameters.
      +
      Returns:
      +
      Referral object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static ReferralCustomer create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a Referral Customer object from parameter map. This function requires the Partner User's API key.
      +
      +
      Parameters:
      +
      params - Map of the referral user parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Referral object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      updateEmail

      +
      public static void updateEmail(String email, + String userId) + throws EasyPostException
      +
      Update a Referral object email. This function requires the Partner User's API key.
      +
      +
      Parameters:
      +
      email - Email of the referral user to update.
      +
      userId - ID of the referral user to update.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      updateEmail

      +
      public static void updateEmail(String email, + String userId, + String apiKey) + throws EasyPostException
      +
      Update a Referral object email. This function requires the Partner User's API key.
      +
      +
      Parameters:
      +
      email - Email of the referral user to update.
      +
      userId - ID of the referral user to update.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static ReferralCustomerCollection all(Map<String,​Object> params) + throws EasyPostException
      +
      List all Referral objects. This function requires the Partner User's API key.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      List object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static ReferralCustomerCollection all(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      List all Referral objects. This function requires the Partner User's API key.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      ReferralCustomerCollection object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      addCreditCardToUser

      +
      public static PaymentMethodObject addCreditCardToUser(String referralApiKey, + String number, + int expirationMonth, + int expirationYear, + String cvc) + throws Exception
      +
      Add credit card to a referral user. This function requires the Referral User's API key.
      +
      +
      Parameters:
      +
      referralApiKey - API key of the referral user.
      +
      number - Credit card number.
      +
      expirationMonth - Expiration month of the credit card.
      +
      expirationYear - Expiration year of the credit card.
      +
      cvc - CVC of the credit card.
      +
      Returns:
      +
      PaymentMethodObject object.
      +
      Throws:
      +
      Exception - when the request fails.
      +
      +
      +
    • +
    • +
      +

      addCreditCardToUser

      +
      public static PaymentMethodObject addCreditCardToUser(String referralApiKey, + String number, + int expirationMonth, + int expirationYear, + String cvc, + PaymentMethod.Priority priority) + throws Exception
      +
      Add credit card to a referral user. This function requires the Referral User's API key.
      +
      +
      Parameters:
      +
      referralApiKey - API key of the referral user.
      +
      number - Credit card number.
      +
      expirationMonth - Expiration month of the credit card.
      +
      expirationYear - Expiration year of the credit card.
      +
      cvc - CVC of the credit card.
      +
      priority - Priority of this credit card.
      +
      Returns:
      +
      PaymentMethodObject object.
      +
      Throws:
      +
      Exception - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/ReferralCustomerCollection.html b/docs/com/easypost/model/ReferralCustomerCollection.html new file mode 100644 index 000000000..c42864bcd --- /dev/null +++ b/docs/com/easypost/model/ReferralCustomerCollection.html @@ -0,0 +1,227 @@ + + + + + +ReferralCustomerCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ReferralCustomerCollection

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.ReferralCustomerCollection
+
+
+
+
+
public final class ReferralCustomerCollection +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ReferralCustomerCollection

      +
      public ReferralCustomerCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getReferralCustomers

      +
      public List<ReferralCustomer> getReferralCustomers()
      +
      Get a list of ReferralCustomers.
      +
      +
      Returns:
      +
      List of ReferralCustomers objects
      +
      +
      +
    • +
    • +
      +

      setReferralCustomers

      +
      public void setReferralCustomers(List<ReferralCustomer> referralCustomers)
      +
      Set a list of ReferralCustomers.
      +
      +
      Parameters:
      +
      referralCustomers - List of ReferralCustomers objects
      +
      +
      +
    • +
    • +
      +

      getHasMore

      +
      public boolean getHasMore()
      +
      Get whether there are more ReferralCustomers to retrieve.
      +
      +
      Returns:
      +
      whether there are more ReferralCustomers to retrieve
      +
      +
      +
    • +
    • +
      +

      setHasMore

      +
      public void setHasMore(boolean hasMore)
      +
      Set whether there are more ReferralCustomers to retrieve.
      +
      +
      Parameters:
      +
      hasMore - Boolean whether there are more ReferralCustomers to retrieve
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Refund.html b/docs/com/easypost/model/Refund.html new file mode 100644 index 000000000..2f635b872 --- /dev/null +++ b/docs/com/easypost/model/Refund.html @@ -0,0 +1,458 @@ + + + + + +Refund (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Refund

+
+ +
+
+
public final class Refund +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Refund

      +
      public Refund()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCarrier

      +
      public String getCarrier()
      +
      Get refund carrier.
      +
      +
      Returns:
      +
      refund carrier
      +
      +
      +
    • +
    • +
      +

      setCarrier

      +
      public void setCarrier(String carrier)
      +
      Set refund carrier.
      +
      +
      Parameters:
      +
      carrier - refund carrier
      +
      +
      +
    • +
    • +
      +

      getConfirmationNumber

      +
      public String getConfirmationNumber()
      +
      Get refund confirmation number.
      +
      +
      Returns:
      +
      refund confirmation number
      +
      +
      +
    • +
    • +
      +

      setConfirmationNumber

      +
      public void setConfirmationNumber(String confirmationNumber)
      +
      Set refund confirmation number.
      +
      +
      Parameters:
      +
      confirmationNumber - refund confirmation number
      +
      +
      +
    • +
    • +
      +

      getShipmentId

      +
      public String getShipmentId()
      +
      Get refund shipment ID.
      +
      +
      Returns:
      +
      refund shipment ID
      +
      +
      +
    • +
    • +
      +

      getStatus

      +
      public String getStatus()
      +
      Get refund status.
      +
      +
      Returns:
      +
      refund status
      +
      +
      +
    • +
    • +
      +

      getTrackingCode

      +
      public String getTrackingCode()
      +
      Get refund tracking code.
      +
      +
      Returns:
      +
      refund tracking code
      +
      +
      +
    • +
    • +
      +

      setTrackingCode

      +
      public void setTrackingCode(String trackingCode)
      +
      Set refund tracking code.
      +
      +
      Parameters:
      +
      trackingCode - refund tracking code
      +
      +
      +
    • +
    • +
      +

      setStatus

      +
      public void setStatus(String status)
      +
      Set refund status.
      +
      +
      Parameters:
      +
      status - refund status
      +
      +
      +
    • +
    • +
      +

      setShipmentId

      +
      public void setShipmentId(String shipmentId)
      +
      Set refund shipment ID.
      +
      +
      Parameters:
      +
      shipmentId - refund shipment ID
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static List<Refund> create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a Refund object from a map of parameters.
      +
      +
      Parameters:
      +
      params - Map of parameters
      +
      Returns:
      +
      Refund object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static List<Refund> create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a Refund object from a map of parameters.
      +
      +
      Parameters:
      +
      params - Map of parameters
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Refund object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Refund retrieve(String id) + throws EasyPostException
      +
      Retrieve a Refund object from the API.
      +
      +
      Parameters:
      +
      id - ID of refund to retrieve
      +
      Returns:
      +
      Refund object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Refund retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a Refund object from the API.
      +
      +
      Parameters:
      +
      id - ID of refund to retrieve
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Refund object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static RefundCollection all(Map<String,​Object> params) + throws EasyPostException
      +
      List all Refunds objects.
      +
      +
      Parameters:
      +
      params - Map of parameters
      +
      Returns:
      +
      RefundCollection object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static RefundCollection all(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      List all Refunds objects.
      +
      +
      Parameters:
      +
      params - Map of parameters
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      RefundCollection object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/RefundCollection.html b/docs/com/easypost/model/RefundCollection.html new file mode 100644 index 000000000..1a7a86c72 --- /dev/null +++ b/docs/com/easypost/model/RefundCollection.html @@ -0,0 +1,227 @@ + + + + + +RefundCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class RefundCollection

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.RefundCollection
+
+
+
+
+
public final class RefundCollection +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      RefundCollection

      +
      public RefundCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getHasMore

      +
      public Boolean getHasMore()
      +
      Get whether there are more Refund objects to retrieve.
      +
      +
      Returns:
      +
      true if there are more Refund objects to retrieve.
      +
      +
      +
    • +
    • +
      +

      setHasMore

      +
      public void setHasMore(Boolean hasMore)
      +
      Set whether there are more Refund objects to retrieve.
      +
      +
      Parameters:
      +
      hasMore - true if there are more Refund objects to retrieve.
      +
      +
      +
    • +
    • +
      +

      getRefunds

      +
      public List<Refund> getRefunds()
      +
      Get this RefundCollection's Refund objects.
      +
      +
      Returns:
      +
      a List of Refund objects.
      +
      +
      +
    • +
    • +
      +

      setRefunds

      +
      public void setRefunds(List<Refund> refunds)
      +
      Set this RefundCollection's Refund objects.
      +
      +
      Parameters:
      +
      refunds - a List of Refund objects.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Report.html b/docs/com/easypost/model/Report.html new file mode 100644 index 000000000..c4cf9c252 --- /dev/null +++ b/docs/com/easypost/model/Report.html @@ -0,0 +1,511 @@ + + + + + +Report (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Report

+
+ +
+
+
public final class Report +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Report

      +
      public Report()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getEndDate

      +
      public Date getEndDate()
      +
      Get the end date of this Report.
      +
      +
      Returns:
      +
      the end date of this Report.
      +
      +
      +
    • +
    • +
      +

      setEndDate

      +
      public void setEndDate(Date endDate)
      +
      Set the end date of this Report.
      +
      +
      Parameters:
      +
      endDate - the end date of this Report.
      +
      +
      +
    • +
    • +
      +

      getStatus

      +
      public String getStatus()
      +
      Get the status of this Report.
      +
      +
      Returns:
      +
      the status of this Report.
      +
      +
      +
    • +
    • +
      +

      setStatus

      +
      public void setStatus(String status)
      +
      Set the status of this Report.
      +
      +
      Parameters:
      +
      status - the status of this Report.
      +
      +
      +
    • +
    • +
      +

      getIncludeChildren

      +
      public Boolean getIncludeChildren()
      +
      Get whether this Report includes children.
      +
      +
      Returns:
      +
      whether this Report includes children.
      +
      +
      +
    • +
    • +
      +

      setIncludeChildren

      +
      public void setIncludeChildren(Boolean includeChildren)
      +
      Set whether this Report includes children.
      +
      +
      Parameters:
      +
      includeChildren - whether this Report includes children.
      +
      +
      +
    • +
    • +
      +

      getStartDate

      +
      public Date getStartDate()
      +
      Get the start date of this Report.
      +
      +
      Returns:
      +
      the start date of this Report.
      +
      +
      +
    • +
    • +
      +

      setStartDate

      +
      public void setStartDate(Date startDate)
      +
      Set the start date of this Report.
      +
      +
      Parameters:
      +
      startDate - the start date of this Report.
      +
      +
      +
    • +
    • +
      +

      getUrl

      +
      public String getUrl()
      +
      Get the URL of this Report.
      +
      +
      Returns:
      +
      the URL of this Report.
      +
      +
      +
    • +
    • +
      +

      setUrl

      +
      public void setUrl(String url)
      +
      Set the URL of this Report.
      +
      +
      Parameters:
      +
      url - the URL of this Report.
      +
      +
      +
    • +
    • +
      +

      getUrlExpiresAt

      +
      public Date getUrlExpiresAt()
      +
      Get when the URL for this Report expires.
      +
      +
      Returns:
      +
      when the URL for this Report expires.
      +
      +
      +
    • +
    • +
      +

      setUrlExpiresAt

      +
      public void setUrlExpiresAt(Date urlExpiresAt)
      +
      Set when the URL for this Report expires.
      +
      +
      Parameters:
      +
      urlExpiresAt - when the URL for this Report expires.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Report create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a Report from a map of parameters.
      +
      +
      Parameters:
      +
      params - a map of parameters.
      +
      Returns:
      +
      Report object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Report create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a Report from a map of parameters.
      +
      +
      Parameters:
      +
      params - a map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Report object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      reportURL

      +
      protected static String reportURL(String type) + throws EasyPostException
      +
      Generate a report URL.
      +
      +
      Parameters:
      +
      type - the type of report to generate.
      +
      Returns:
      +
      the URL to generate the report.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Report retrieve(String id) + throws EasyPostException
      +
      Retrieve a Report from the API.
      +
      +
      Parameters:
      +
      id - the ID of the Report to retrieve.
      +
      Returns:
      +
      Report object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Report retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a Report from the API.
      +
      +
      Parameters:
      +
      id - the ID of the Report to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Report object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static ReportCollection all(Map<String,​Object> params) + throws EasyPostException
      +
      Get a list of Reports from the API.
      +
      +
      Parameters:
      +
      params - a map of parameters.
      +
      Returns:
      +
      ReportCollection object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static ReportCollection all(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Get a list of Reports from the API.
      +
      +
      Parameters:
      +
      params - a map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      ReportCollection object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/ReportCollection.html b/docs/com/easypost/model/ReportCollection.html new file mode 100644 index 000000000..ee3d93a07 --- /dev/null +++ b/docs/com/easypost/model/ReportCollection.html @@ -0,0 +1,227 @@ + + + + + +ReportCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ReportCollection

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.ReportCollection
+
+
+
+
+
public final class ReportCollection +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ReportCollection

      +
      public ReportCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getHasMore

      +
      public Boolean getHasMore()
      +
      Get whether there are more reports to retrieve.
      +
      +
      Returns:
      +
      true if there are more reports to retrieve, false otherwise.
      +
      +
      +
    • +
    • +
      +

      setHasMore

      +
      public void setHasMore(Boolean hasMore)
      +
      Set whether there are more reports to retrieve.
      +
      +
      Parameters:
      +
      hasMore - true if there are more reports to retrieve, false otherwise.
      +
      +
      +
    • +
    • +
      +

      getReports

      +
      public List<Report> getReports()
      +
      Get this ReportCollection's Report objects.
      +
      +
      Returns:
      +
      List of Report objects.
      +
      +
      +
    • +
    • +
      +

      setReports

      +
      public void setReports(List<Report> reports)
      +
      Set this ReportCollection's Report objects.
      +
      +
      Parameters:
      +
      reports - List of Report objects.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/ScanForm.html b/docs/com/easypost/model/ScanForm.html new file mode 100644 index 000000000..3138431f9 --- /dev/null +++ b/docs/com/easypost/model/ScanForm.html @@ -0,0 +1,586 @@ + + + + + +ScanForm (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ScanForm

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.ScanForm
+
+
+
+
+
public class ScanForm +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ScanForm

      +
      public ScanForm()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getBatchId

      +
      public String getBatchId()
      +
      Get the batch ID of the ScanForm.
      +
      +
      Returns:
      +
      the batch ID of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      setBatchId

      +
      public void setBatchId(String batchId)
      +
      Set the batch ID of the ScanForm.
      +
      +
      Parameters:
      +
      batchId - the batch ID of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      getConfirmation

      +
      public String getConfirmation()
      +
      Get the confirmation of the ScanForm.
      +
      +
      Returns:
      +
      the confirmation of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      setConfirmation

      +
      public void setConfirmation(String confirmation)
      +
      Set the confirmation of the ScanForm.
      +
      +
      Parameters:
      +
      confirmation - the confirmation of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      getFromAddress

      +
      public Address getFromAddress()
      +
      Get the from address of the ScanForm.
      +
      +
      Returns:
      +
      the from address of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      setFromAddress

      +
      public void setFromAddress(Address fromAddress)
      +
      Set the from address of the ScanForm.
      +
      +
      Parameters:
      +
      fromAddress - the from address of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      getLabelUrl

      +
      public String getLabelUrl()
      +
      Get the the label URL of the ScanForm.
      +
      +
      Returns:
      +
      the label URL of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      getStatus

      +
      public String getStatus()
      +
      Get the status of the ScanForm.
      +
      +
      Returns:
      +
      the status of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      setStatus

      +
      public void setStatus(String status)
      +
      Set the status of the ScanForm.
      +
      +
      Parameters:
      +
      status - the status of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      getFormUrl

      +
      public String getFormUrl()
      +
      Get the URL for the ScanForm.
      +
      +
      Returns:
      +
      the URL for the ScanForm.
      +
      +
      +
    • +
    • +
      +

      setFormUrl

      +
      public void setFormUrl(String formUrl)
      +
      Set the URL for the ScanForm.
      +
      +
      Parameters:
      +
      formUrl - the URL for the ScanForm.
      +
      +
      +
    • +
    • +
      +

      getLabelFileType

      +
      public String getLabelFileType()
      +
      Get the label file type of the ScanForm.
      +
      +
      Returns:
      +
      the label file type of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      getFormFileType

      +
      public String getFormFileType()
      +
      Get the form file type of the ScanForm.
      +
      +
      Returns:
      +
      the file type of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      setFormFileType

      +
      public void setFormFileType(String formFileType)
      +
      Get the form file type of the ScanForm.
      +
      +
      Parameters:
      +
      formFileType - the file type of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      getMessage

      +
      public String getMessage()
      +
      Get the message of the ScanForm.
      +
      +
      Returns:
      +
      the message of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      setMessage

      +
      public void setMessage(String message)
      +
      Set the message of the ScanForm.
      +
      +
      Parameters:
      +
      message - the message of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      getTrackingCodes

      +
      public List<String> getTrackingCodes()
      +
      Get the tracking codes of the ScanForm.
      +
      +
      Returns:
      +
      the tracking codes of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      setTrackingCodes

      +
      public void setTrackingCodes(List<String> trackingCodes)
      +
      Set the tracking codes of the ScanForm.
      +
      +
      Parameters:
      +
      trackingCodes - the tracking codes of the ScanForm.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static ScanForm create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a ScanForm from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of parameters.
      +
      Returns:
      +
      ScanForm object.
      +
      Throws:
      +
      EasyPostException - when the request fails. when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static ScanForm create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a ScanForm from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      ScanForm object.
      +
      Throws:
      +
      EasyPostException - when the request fails. when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static ScanForm retrieve(String id) + throws EasyPostException
      +
      Retrieve a ScanForm from the API.
      +
      +
      Parameters:
      +
      id - the id of the ScanForm to retrieve.
      +
      Returns:
      +
      ScanForm object.
      +
      Throws:
      +
      EasyPostException - when the request fails. when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static ScanForm retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a ScanForm from the API.
      +
      +
      Parameters:
      +
      id - the id of the ScanForm to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      ScanForm object.
      +
      Throws:
      +
      EasyPostException - when the request fails. when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static ScanFormCollection all(Map<String,​Object> params) + throws EasyPostException
      +
      Get a list of ScanForms from the API.
      +
      +
      Parameters:
      +
      params - the parameters to send to the API.
      +
      Returns:
      +
      ScanFormCollection object.
      +
      Throws:
      +
      EasyPostException - when the request fails. when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static ScanFormCollection all(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Get a list of ScanForms from the API.
      +
      +
      Parameters:
      +
      params - the parameters to send to the API.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      ScanFormCollection object.
      +
      Throws:
      +
      EasyPostException - when the request fails. when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/ScanFormCollection.html b/docs/com/easypost/model/ScanFormCollection.html new file mode 100644 index 000000000..6f932fb8f --- /dev/null +++ b/docs/com/easypost/model/ScanFormCollection.html @@ -0,0 +1,227 @@ + + + + + +ScanFormCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ScanFormCollection

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.ScanFormCollection
+
+
+
+
+
public final class ScanFormCollection +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ScanFormCollection

      +
      public ScanFormCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getHasMore

      +
      public Boolean getHasMore()
      +
      Get whether there are more ScanForms to retrieve.
      +
      +
      Returns:
      +
      true if there are more ScanForms to retrieve, false otherwise.
      +
      +
      +
    • +
    • +
      +

      setHasMore

      +
      public void setHasMore(Boolean hasMore)
      +
      Set whether there are more ScanForms to retrieve.
      +
      +
      Parameters:
      +
      hasMore - true if there are more ScanForms to retrieve, false otherwise.
      +
      +
      +
    • +
    • +
      +

      getScanForms

      +
      public List<ScanForm> getScanForms()
      +
      Get this ScanFormCollection's ScanForm objects.
      +
      +
      Returns:
      +
      List of ScanForm objects.
      +
      +
      +
    • +
    • +
      +

      setScanForms

      +
      public void setScanForms(List<ScanForm> scanForms)
      +
      Set this ScanFormCollection's ScanForm objects.
      +
      +
      Parameters:
      +
      scanForms - List of ScanForm objects.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/SecondaryPaymentMethod.html b/docs/com/easypost/model/SecondaryPaymentMethod.html new file mode 100644 index 000000000..2c38666f9 --- /dev/null +++ b/docs/com/easypost/model/SecondaryPaymentMethod.html @@ -0,0 +1,155 @@ + + + + + +SecondaryPaymentMethod (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SecondaryPaymentMethod

+
+ +
+
+
@Deprecated +public class SecondaryPaymentMethod +extends BaseCreditCard
+
Deprecated. +
Use PaymentMethodObject instead. + Deprecated: v5.5.0 - v7.0.0
+
+
SecondaryPaymentMethod is a model class that represents the secondary payment method.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SecondaryPaymentMethod

      +
      public SecondaryPaymentMethod()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Shipment.html b/docs/com/easypost/model/Shipment.html new file mode 100644 index 000000000..c2b500ef8 --- /dev/null +++ b/docs/com/easypost/model/Shipment.html @@ -0,0 +1,2513 @@ + + + + + +Shipment (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Shipment

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.Shipment
+
+
+
+
+
public final class Shipment +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Shipment

      +
      public Shipment()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getBatchId

      +
      public String getBatchId()
      +
      Get the batch ID of this Shipment.
      +
      +
      Returns:
      +
      the batch ID of this Shipment.
      +
      +
      +
    • +
    • +
      +

      setBatchId

      +
      public void setBatchId(String batchId)
      +
      Set the batch ID of this Shipment.
      +
      +
      Parameters:
      +
      batchId - the batch ID of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getBatchMessage

      +
      public String getBatchMessage()
      +
      Get the batch message of this Shipment.
      +
      +
      Returns:
      +
      the batch message of this Shipment.
      +
      +
      +
    • +
    • +
      +

      setBatchMessage

      +
      public void setBatchMessage(String batchMessage)
      +
      Set the batch message of this Shipment.
      +
      +
      Parameters:
      +
      batchMessage - the batch message of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getBatchStatus

      +
      public String getBatchStatus()
      +
      Get the batch status of this Shipment.
      +
      +
      Returns:
      +
      the batch status of this Shipment.
      +
      +
      +
    • +
    • +
      +

      setBatchStatus

      +
      public void setBatchStatus(String batchStatus)
      +
      Set the batch status of this Shipment.
      +
      +
      Parameters:
      +
      batchStatus - the batch status of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getBuyerAddress

      +
      public Address getBuyerAddress()
      +
      Get the buyer address of this Shipment.
      +
      +
      Returns:
      +
      Address object
      +
      +
      +
    • +
    • +
      +

      setBuyerAddress

      +
      public void setBuyerAddress(Address buyerAddress)
      +
      Set the buyer address of this Shipment.
      +
      +
      Parameters:
      +
      buyerAddress - the buyer address of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getCarrierAccounts

      +
      public List<CarrierAccount> getCarrierAccounts()
      +
      Get the carrier accounts of this shipment.
      +
      +
      Returns:
      +
      List of carrier accounts.
      +
      +
      +
    • +
    • +
      +

      setCarrierAccounts

      +
      public void setCarrierAccounts(List<CarrierAccount> carrierAccounts)
      +
      Set the carrier accounts list.
      +
      +
      Parameters:
      +
      carrierAccounts - the list of carrier accounts.
      +
      +
      +
    • +
    • +
      +

      getCustomsInfo

      +
      public CustomsInfo getCustomsInfo()
      +
      Get the customs info of this Shipment.
      +
      +
      Returns:
      +
      CustomsInfo object
      +
      +
      +
    • +
    • +
      +

      setCustomsInfo

      +
      public void setCustomsInfo(CustomsInfo customsInfo)
      +
      Set the customs info of this Shipment.
      +
      +
      Parameters:
      +
      customsInfo - the customs info of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getForms

      +
      public List<Form> getForms()
      +
      Get the forms of this Shipment.
      +
      +
      Returns:
      +
      List of Form objects
      +
      +
      +
    • +
    • +
      +

      setForms

      +
      public void setForms(List<Form> forms)
      +
      Set the forms of this Shipment.
      +
      +
      Parameters:
      +
      forms - the forms of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getFromAddress

      +
      public Address getFromAddress()
      +
      Get the from address of this Shipment.
      +
      +
      Returns:
      +
      Address object
      +
      +
      +
    • +
    • +
      +

      setFromAddress

      +
      public void setFromAddress(Address fromAddress)
      +
      Set the from address of this Shipment.
      +
      +
      Parameters:
      +
      fromAddress - the from address of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getInsurance

      +
      public String getInsurance()
      +
      Get the insurance of this Shipment.
      +
      +
      Returns:
      +
      the insurance of this Shipment.
      +
      +
      +
    • +
    • +
      +

      setInsurance

      +
      public void setInsurance(String insurance)
      +
      Set the insurance of this Shipment.
      +
      +
      Parameters:
      +
      insurance - the insurance of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getIsReturn

      +
      public Boolean getIsReturn()
      +
      Get whether this Shipment is a return shipment.
      +
      +
      Returns:
      +
      whether this Shipment is a return shipment.
      +
      +
      +
    • +
    • +
      +

      setIsReturn

      +
      public void setIsReturn(Boolean isReturn)
      +
      Set whether this Shipment is a return shipment.
      +
      +
      Parameters:
      +
      isReturn - whether this Shipment is a return shipment.
      +
      +
      +
    • +
    • +
      +

      getMessages

      +
      public List<ShipmentMessage> getMessages()
      +
      Get the messages of this Shipment.
      +
      +
      Returns:
      +
      List of ShipmentMessage objects
      +
      +
      +
    • +
    • +
      +

      setMessages

      +
      public void setMessages(List<ShipmentMessage> messages)
      +
      Set the messages of this Shipment.
      +
      +
      Parameters:
      +
      messages - the messages of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getOptions

      +
      public Map<String,​Object> getOptions()
      +
      Get the options of this Shipment.
      +
      +
      Returns:
      +
      the options of this Shipment.
      +
      +
      +
    • +
    • +
      +

      setOptions

      +
      public void setOptions(Map<String,​Object> options)
      +
      Set the options of this Shipment.
      +
      +
      Parameters:
      +
      options - the options of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getOrderId

      +
      public String getOrderId()
      +
      Get the ID of the order of this Shipment.
      +
      +
      Returns:
      +
      the ID of the order of this Shipment.
      +
      +
      +
    • +
    • +
      +

      setOrderId

      +
      public void setOrderId(String orderId)
      +
      Set the ID of the order of this Shipment.
      +
      +
      Parameters:
      +
      orderId - the ID of the order of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getParcel

      +
      public Parcel getParcel()
      +
      Get the parcel of this Shipment.
      +
      +
      Returns:
      +
      Parcel object
      +
      +
      +
    • +
    • +
      +

      setParcel

      +
      public void setParcel(Parcel parcel)
      +
      Set the parcel of this Shipment.
      +
      +
      Parameters:
      +
      parcel - the parcel of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getPostageLabel

      +
      public PostageLabel getPostageLabel()
      +
      Get the postage label of this Shipment.
      +
      +
      Returns:
      +
      PostageLabel object
      +
      +
      +
    • +
    • +
      +

      setPostageLabel

      +
      public void setPostageLabel(PostageLabel postageLabel)
      +
      Set the postage label of this Shipment.
      +
      +
      Parameters:
      +
      postageLabel - the postage label of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getRates

      +
      public List<Rate> getRates()
      +
      Get all rates of this Shipment.
      +
      +
      Returns:
      +
      List of Rate objects
      +
      +
      +
    • +
    • +
      +

      setRates

      +
      public void setRates(List<Rate> rates)
      +
      Set all rates of this Shipment.
      +
      +
      Parameters:
      +
      rates - the rates of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getReference

      +
      public String getReference()
      +
      Get the reference of this Shipment.
      +
      +
      Returns:
      +
      the reference of this Shipment.
      +
      +
      +
    • +
    • +
      +

      setReference

      +
      public void setReference(String reference)
      +
      Set the reference of this Shipment.
      +
      +
      Parameters:
      +
      reference - the reference of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getRefundStatus

      +
      public String getRefundStatus()
      +
      Get the refund status of this Shipment.
      +
      +
      Returns:
      +
      the refund status of this Shipment.
      +
      +
      +
    • +
    • +
      +

      setRefundStatus

      +
      public void setRefundStatus(String refundStatus)
      +
      Set the refund status of this Shipment.
      +
      +
      Parameters:
      +
      refundStatus - the refund status of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getReturnAddress

      +
      public Address getReturnAddress()
      +
      Get the return address of this Shipment.
      +
      +
      Returns:
      +
      Address object
      +
      +
      +
    • +
    • +
      +

      setReturnAddress

      +
      public void setReturnAddress(Address returnAddress)
      +
      Set the return address of this Shipment.
      +
      +
      Parameters:
      +
      returnAddress - the return address of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getScanForm

      +
      public ScanForm getScanForm()
      +
      Get the scan form of this Shipment.
      +
      +
      Returns:
      +
      ScanForm object
      +
      +
      +
    • +
    • +
      +

      setScanForm

      +
      public void setScanForm(ScanForm scanForm)
      +
      Set the scan form of this Shipment.
      +
      +
      Parameters:
      +
      scanForm - the scan form of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getSelectedRate

      +
      public Rate getSelectedRate()
      +
      Get the selected rate of this Shipment.
      +
      +
      Returns:
      +
      Rate object
      +
      +
      +
    • +
    • +
      +

      setSelectedRate

      +
      public void setSelectedRate(Rate selectedRate)
      +
      Set the selected rate of this Shipment.
      +
      +
      Parameters:
      +
      selectedRate - the selected rate of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getService

      +
      public String getService()
      +
      Get the service used.
      +
      +
      Returns:
      +
      the service used.
      +
      +
      +
    • +
    • +
      +

      setService

      +
      public void setService(String service)
      +
      Set the service used.
      +
      +
      Parameters:
      +
      service - the service.
      +
      +
      +
    • +
    • +
      +

      getTaxIdentifiers

      +
      public List<TaxIdentifier> getTaxIdentifiers()
      +
      Get the tax identifiers of this Shipment.
      +
      +
      Returns:
      +
      List of TaxIdentifier objects
      +
      +
      +
    • +
    • +
      +

      setTaxIdentifiers

      +
      public void setTaxIdentifiers(List<TaxIdentifier> taxIdentifiers)
      +
      Set the tax identifiers of this Shipment.
      +
      +
      Parameters:
      +
      taxIdentifiers - the tax identifiers of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getToAddress

      +
      public Address getToAddress()
      +
      Get the to address of this Shipment.
      +
      +
      Returns:
      +
      Address object
      +
      +
      +
    • +
    • +
      +

      setToAddress

      +
      public void setToAddress(Address toAddress)
      +
      Set the to address of this Shipment.
      +
      +
      Parameters:
      +
      toAddress - the to address of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getTracker

      +
      public Tracker getTracker()
      +
      Get the tracker of this Shipment.
      +
      +
      Returns:
      +
      Tracker object
      +
      +
      +
    • +
    • +
      +

      setTracker

      +
      public void setTracker(Tracker tracker)
      +
      Set the tracker of this Shipment.
      +
      +
      Parameters:
      +
      tracker - the tracker of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getUspsZone

      +
      public String getUspsZone()
      +
      Get the USPS zone of this Shipment.
      +
      +
      Returns:
      +
      the USPS zone of this Shipment.
      +
      +
      +
    • +
    • +
      +

      setUspsZone

      +
      public void setUspsZone(String uspsZone)
      +
      Set the USPS zone of this Shipment.
      +
      +
      Parameters:
      +
      uspsZone - the USPS zone of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getFees

      +
      public List<Fee> getFees()
      +
      +
      Returns:
      +
      the Fees associated with this object
      +
      +
      +
    • +
    • +
      +

      setFees

      +
      public void setFees(List<Fee> fees)
      +
      Set the Fees associated with this object.
      +
      +
      Parameters:
      +
      fees - the Fees associated with this object
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Shipment create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a new Shipment object from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of parameters.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Shipment create(Map<String,​Object> params, + boolean withCarbonOffset) + throws EasyPostException
      +
      Create a new Shipment object from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of parameters.
      +
      withCarbonOffset - whether to include a carbon offset when creating the shipment.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Shipment create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a new Shipment object from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Shipment create(Map<String,​Object> params, + boolean withCarbonOffset, + String apiKey) + throws EasyPostException
      +
      Create a new Shipment object from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of parameters.
      +
      withCarbonOffset - whether to include a carbon offset when creating the shipment.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Shipment retrieve(String id) + throws EasyPostException
      +
      Retrieve a Shipment from the API.
      +
      +
      Parameters:
      +
      id - the id of the Shipment to retrieve.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Shipment retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a Shipment from the API.
      +
      +
      Parameters:
      +
      id - the id of the Shipment to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static ShipmentCollection all(Map<String,​Object> params) + throws EasyPostException
      +
      Get a list of all Shipment objects.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      Returns:
      +
      ShipmentCollection object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static ShipmentCollection all(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Get a list of all Shipment objects.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      ShipmentCollection object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Shipment refresh() + throws EasyPostException
      +
      Refresh this Shipment.
      +
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Shipment refresh(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Refresh this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getStatus

      +
      public String getStatus()
      +
      Get the status of this Shipment.
      +
      +
      Returns:
      +
      the status of this Shipment.
      +
      +
      +
    • +
    • +
      +

      getTrackingCode

      +
      public String getTrackingCode()
      +
      Get the tracking code of this Shipment.
      +
      +
      Returns:
      +
      the tracking code of this Shipment.
      +
      +
      +
    • +
    • +
      +

      setTrackingCode

      +
      public void setTrackingCode(String trackingCode)
      +
      Set the tracking code of this Shipment.
      +
      +
      Parameters:
      +
      trackingCode - the tracking code of this Shipment.
      +
      +
      +
    • +
    • +
      +

      setStatus

      +
      public void setStatus(String status)
      +
      Set the status of this Shipment.
      +
      +
      Parameters:
      +
      status - the status of this Shipment.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Shipment refresh(Map<String,​Object> params) + throws EasyPostException
      +
      Refresh this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refresh

      +
      public Shipment refresh(String apiKey) + throws EasyPostException
      +
      Refresh this Shipment.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      newRates

      +
      public Shipment newRates() + throws EasyPostException
      +
      Get new rates for this Shipment.
      +
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      newRates

      +
      public Shipment newRates(boolean withCarbonOffset) + throws EasyPostException
      +
      Get new rates for this Shipment.
      +
      +
      Parameters:
      +
      withCarbonOffset - whether to include a carbon offset when re-rating the shipment.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      newRates

      +
      public Shipment newRates(Map<String,​Object> params) + throws EasyPostException
      +
      Get new rates for this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      newRates

      +
      public Shipment newRates(Map<String,​Object> params, + boolean withCarbonOffset) + throws EasyPostException
      +
      Get new rates for this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      withCarbonOffset - whether to include a carbon offset when re-rating the shipment.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      newRates

      +
      public Shipment newRates(String apiKey) + throws EasyPostException
      +
      Get new rates for this Shipment.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      newRates

      +
      public Shipment newRates(boolean withCarbonOffset, + String apiKey) + throws EasyPostException
      +
      Get new rates for this Shipment.
      +
      +
      Parameters:
      +
      withCarbonOffset - whether to include a carbon offset when re-rating the shipment.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      newRates

      +
      public Shipment newRates(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Get new rates for this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      newRates

      +
      public Shipment newRates(Map<String,​Object> params, + boolean withCarbonOffset, + String apiKey) + throws EasyPostException
      +
      Get new rates for this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      withCarbonOffset - whether to include a carbon offset when re-rating the shipment.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getSmartrates

      +
      @Deprecated +public List<Smartrate> getSmartrates(Map<String,​Object> params) + throws EasyPostException
      +
      Deprecated. +
      Use smartrates(Map) instead. + Deprecated: v5.5.0 - v7.0.0
      +
      +
      Get Smartrates for this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      Returns:
      +
      List of Smartrate objects
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      smartrates

      +
      public List<Smartrate> smartrates(Map<String,​Object> params) + throws EasyPostException
      +
      Get Smartrates for this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      Returns:
      +
      List of Smartrate objects
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getSmartrates

      +
      @Deprecated +public List<Smartrate> getSmartrates(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Deprecated. +
      Use smartrates(Map, String) instead. + Deprecated: v5.5.0 - v7.0.0
      +
      +
      Get Smartrates for this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      List of Smartrate objects
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      smartrates

      +
      public List<Smartrate> smartrates(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Get Smartrates for this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      List of Smartrate objects
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getSmartrates

      +
      @Deprecated +public List<Smartrate> getSmartrates(String apiKey) + throws EasyPostException
      +
      Deprecated. +
      Use smartrates(String) instead. + Deprecated: v5.5.0 - v7.0.0
      +
      +
      Get Smartrates for this Shipment.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      List of Smartrate objects
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      smartrates

      +
      public List<Smartrate> smartrates(String apiKey) + throws EasyPostException
      +
      Get Smartrates for this Shipment.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      List of Smartrate objects
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Shipment buy(Map<String,​Object> params) + throws EasyPostException
      +
      Buy this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Shipment buy(Rate rate) + throws EasyPostException
      +
      Buy this Shipment.
      +
      +
      Parameters:
      +
      rate - the Rate to use for this Shipment.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Shipment buy(Rate rate, + boolean withCarbonOffset) + throws EasyPostException
      +
      Buy this Shipment.
      +
      +
      Parameters:
      +
      rate - the Rate to use for this Shipment.
      +
      withCarbonOffset - whether to include a carbon offset when buying the shipment.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Shipment buy(Rate rate, + String endShipperId) + throws EasyPostException
      +
      Buy this Shipment.
      +
      +
      Parameters:
      +
      rate - the Rate to use for this Shipment.
      +
      endShipperId - the id of the end shipper to use for this purchase.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Shipment buy(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Buy this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Shipment buy(Map<String,​Object> params, + boolean withCarbonOffset) + throws EasyPostException
      +
      Buy this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      withCarbonOffset - whether to include a carbon offset when buying the shipment.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Shipment buy(Rate rate, + boolean withCarbonOffset, + String endShipperId, + String apiKey) + throws EasyPostException
      +
      Buy this Shipment.
      +
      +
      Parameters:
      +
      rate - the Rate to use for this Shipment.
      +
      withCarbonOffset - whether to include a carbon offset when buying the shipment.
      +
      endShipperId - the id of the end shipper to use for this purchase.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Shipment buy(Map<String,​Object> params, + boolean withCarbonOffset, + String apiKey) + throws EasyPostException
      +
      Buy this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      withCarbonOffset - whether to include a carbon offset when buying the shipment.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Shipment buy(Map<String,​Object> params, + String endShipperId, + String apiKey) + throws EasyPostException
      +
      Buy this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      endShipperId - the id of the end shipper to use for this purchase.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      buy

      +
      public Shipment buy(Map<String,​Object> params, + boolean withCarbonOffset, + String endShipperId, + String apiKey) + throws EasyPostException
      +
      Buy this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      withCarbonOffset - whether to include a carbon offset when buying the shipment.
      +
      endShipperId - the id of the end shipper to use for this purchase.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refund

      +
      public Shipment refund() + throws EasyPostException
      +
      Refund this Shipment.
      +
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refund

      +
      public Shipment refund(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Refund this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refund

      +
      public Shipment refund(Map<String,​Object> params) + throws EasyPostException
      +
      Refund this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      refund

      +
      public Shipment refund(String apiKey) + throws EasyPostException
      +
      Refund this Shipment.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      label

      +
      public Shipment label() + throws EasyPostException
      +
      Label this Shipment.
      +
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      label

      +
      public Shipment label(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Label this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      label

      +
      public Shipment label(Map<String,​Object> params) + throws EasyPostException
      +
      Label this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      label

      +
      public Shipment label(String apiKey) + throws EasyPostException
      +
      Label this Shipment.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      insure

      +
      public Shipment insure() + throws EasyPostException
      +
      Insure this Shipment.
      +
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      insure

      +
      public Shipment insure(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Insure this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      insure

      +
      public Shipment insure(Map<String,​Object> params) + throws EasyPostException
      +
      Insure this Shipment.
      +
      +
      Parameters:
      +
      params - the options for the query.
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      insure

      +
      public Shipment insure(String apiKey) + throws EasyPostException
      +
      Insure this Shipment.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Shipment object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      lowestSmartRate

      +
      @Deprecated +public Smartrate lowestSmartRate(int deliveryDay, + String deliveryAccuracy) + throws EasyPostException
      +
      Deprecated. +
      use lowestSmartRate(int, SmartrateAccuracy) instead. + Deprecated: v5.5.0 - v7.0.0
      +
      +
      Get the lowest smartrate for this Shipment.
      +
      +
      Parameters:
      +
      deliveryDay - Delivery days restriction to use when filtering.
      +
      deliveryAccuracy - Delivery days accuracy restriction to use when filtering.
      +
      Returns:
      +
      lowest Smartrate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      lowestSmartRate

      +
      public Smartrate lowestSmartRate(int deliveryDay, + SmartrateAccuracy deliveryAccuracy) + throws EasyPostException
      +
      Get the lowest smartrate for this Shipment.
      +
      +
      Parameters:
      +
      deliveryDay - Delivery days restriction to use when filtering.
      +
      deliveryAccuracy - Delivery days accuracy restriction to use when filtering.
      +
      Returns:
      +
      lowest Smartrate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getSmartrates

      +
      @Deprecated +public List<Smartrate> getSmartrates() + throws EasyPostException
      +
      Deprecated. +
      Use smartrates() instead. + Deprecated: v5.5.0 - v7.0.0
      +
      +
      Get Smartrates for this Shipment.
      +
      +
      Returns:
      +
      List of Smartrate objects
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      smartrates

      +
      public List<Smartrate> smartrates() + throws EasyPostException
      +
      Get Smartrates for this Shipment.
      +
      +
      Returns:
      +
      List of Smartrate objects
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getLowestSmartRate

      +
      @Deprecated +public static Smartrate getLowestSmartRate(List<Smartrate> smartrates, + int deliveryDay, + String deliveryAccuracy) + throws EasyPostException
      +
      Deprecated. +
      Use findLowestSmartrate(List, int, SmartrateAccuracy) instead. + Deprecated: v5.5.0 - v7.0.0
      +
      +
      Get the lowest Smartrate from a list of Smartrates.
      +
      +
      Parameters:
      +
      smartrates - List of Smartrates to filter from.
      +
      deliveryDay - Delivery days restriction to use when filtering.
      +
      deliveryAccuracy - Delivery days accuracy restriction to use when filtering.
      +
      Returns:
      +
      lowest Smartrate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      findLowestSmartrate

      +
      public static Smartrate findLowestSmartrate(List<Smartrate> smartrates, + int deliveryDay, + SmartrateAccuracy deliveryAccuracy) + throws EasyPostException
      +
      Find the lowest Smartrate from a list of Smartrates.
      +
      +
      Parameters:
      +
      smartrates - List of Smartrates to filter from.
      +
      deliveryDay - Delivery days restriction to use when filtering.
      +
      deliveryAccuracy - Delivery days accuracy restriction to use when filtering.
      +
      Returns:
      +
      lowest Smartrate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      lowestRate

      +
      public Rate lowestRate() + throws EasyPostException
      +
      Get the lowest rate for this Shipment.
      +
      +
      Returns:
      +
      lowest Rate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      lowestRate

      +
      public Rate lowestRate(List<String> carriers, + List<String> services) + throws EasyPostException
      +
      Get the lowest rate for this Shipment.
      +
      +
      Parameters:
      +
      carriers - the carriers to use in the filter.
      +
      services - the services to use in the filter.
      +
      Returns:
      +
      lowest Rate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      lowestRate

      +
      public Rate lowestRate(List<String> carriers) + throws EasyPostException
      +
      Get the lowest rate for this shipment.
      +
      +
      Parameters:
      +
      carriers - the carriers to use in the query.
      +
      Returns:
      +
      Rate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      generateForm

      +
      public void generateForm(String formType) + throws EasyPostException
      +
      Generate a form for this shipment.
      +
      +
      Parameters:
      +
      formType - the form type for this shipment.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      generateForm

      +
      public void generateForm(String formType, + String apiKey) + throws EasyPostException
      +
      Generate a form for this shipment.
      +
      +
      Parameters:
      +
      formType - the form type for this shipment.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      generateForm

      +
      public void generateForm(String formType, + Map<String,​Object> formOptions) + throws EasyPostException
      +
      Generate a form for this shipment.
      +
      +
      Parameters:
      +
      formType - the form type for this shipment.
      +
      formOptions - the form options for this shipment.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      generateForm

      +
      public void generateForm(String formType, + Map<String,​Object> formOptions, + String apiKey) + throws EasyPostException
      +
      Generate a form for this shipment.
      +
      +
      Parameters:
      +
      formType - the form type for this shipment.
      +
      formOptions - the form options for this shipment.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/ShipmentCollection.html b/docs/com/easypost/model/ShipmentCollection.html new file mode 100644 index 000000000..b1fdfbfbb --- /dev/null +++ b/docs/com/easypost/model/ShipmentCollection.html @@ -0,0 +1,227 @@ + + + + + +ShipmentCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ShipmentCollection

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.ShipmentCollection
+
+
+
+
+
public final class ShipmentCollection +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ShipmentCollection

      +
      public ShipmentCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getHasMore

      +
      public Boolean getHasMore()
      +
      Get whether there are more Shipment objects to retrieve.
      +
      +
      Returns:
      +
      true if there are more Shipment objects to retrieve, false otherwise.
      +
      +
      +
    • +
    • +
      +

      setHasMore

      +
      public void setHasMore(Boolean hasMore)
      +
      Set whether there are more Shipment objects to retrieve.
      +
      +
      Parameters:
      +
      hasMore - true if there are more Shipment objects to retrieve, false otherwise.
      +
      +
      +
    • +
    • +
      +

      getShipments

      +
      public List<Shipment> getShipments()
      +
      Get this ShipmentCollection's Shipment objects.
      +
      +
      Returns:
      +
      List of Shipment objects.
      +
      +
      +
    • +
    • +
      +

      setShipments

      +
      public void setShipments(List<Shipment> shipments)
      +
      Set this ShipmentCollection's Shipment objects.
      +
      +
      Parameters:
      +
      shipments - List of Shipment objects.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/ShipmentMessage.html b/docs/com/easypost/model/ShipmentMessage.html new file mode 100644 index 000000000..a63133910 --- /dev/null +++ b/docs/com/easypost/model/ShipmentMessage.html @@ -0,0 +1,286 @@ + + + + + +ShipmentMessage (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ShipmentMessage

+
+
java.lang.Object +
com.easypost.model.ShipmentMessage
+
+
+
+
public final class ShipmentMessage +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ShipmentMessage

      +
      public ShipmentMessage()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCarrier

      +
      public String getCarrier()
      +
      Get the carrier associated with this message.
      +
      +
      Returns:
      +
      the carrier associated with this message.
      +
      +
      +
    • +
    • +
      +

      setCarrier

      +
      public void setCarrier(String carrier)
      +
      Set the carrier associated with this message.
      +
      +
      Parameters:
      +
      carrier - the carrier associated with this message.
      +
      +
      +
    • +
    • +
      +

      getCarrierAccountId

      +
      public String getCarrierAccountId()
      +
      Get the carrier account id associated with this message.
      +
      +
      Returns:
      +
      the carrier account id associated with this message.
      +
      +
      +
    • +
    • +
      +

      setCarrierAccountId

      +
      public void setCarrierAccountId(String carrierAccountId)
      +
      Set the carrier account id associated with this message.
      +
      +
      Parameters:
      +
      carrierAccountId - the carrier account id associated with this message.
      +
      +
      +
    • +
    • +
      +

      getMessage

      +
      public Object getMessage()
      +
      Get the contents of this message.
      +
      +
      Returns:
      +
      the contents of this message.
      +
      +
      +
    • +
    • +
      +

      setMessage

      +
      public void setMessage(Object message)
      +
      Set the contents of this message.
      +
      +
      Parameters:
      +
      message - the contents of this message.
      +
      +
      +
    • +
    • +
      +

      getType

      +
      public String getType()
      +
      Get the type of this message.
      +
      +
      Returns:
      +
      the type of this message.
      +
      +
      +
    • +
    • +
      +

      setType

      +
      public void setType(String type)
      +
      Set the type of this message.
      +
      +
      Parameters:
      +
      type - the type of this message.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/ShipmentOptions.html b/docs/com/easypost/model/ShipmentOptions.html new file mode 100644 index 000000000..946552742 --- /dev/null +++ b/docs/com/easypost/model/ShipmentOptions.html @@ -0,0 +1,222 @@ + + + + + +ShipmentOptions (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ShipmentOptions

+
+
java.lang.Object +
com.easypost.model.ShipmentOptions
+
+
+
+
public final class ShipmentOptions +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ShipmentOptions

      +
      public ShipmentOptions()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getSmartpostHub

      +
      public String getSmartpostHub()
      +
      Get the SmartPost hub of the shipment.
      +
      +
      Returns:
      +
      the SmartPost hub of the shipment
      +
      +
      +
    • +
    • +
      +

      setSmartpostHub

      +
      public void setSmartpostHub(String smartpostHub)
      +
      Set the SmartPost hub of the shipment.
      +
      +
      Parameters:
      +
      smartpostHub - the SmartPost hub of the shipment
      +
      +
      +
    • +
    • +
      +

      getSmartpostManifest

      +
      public String getSmartpostManifest()
      +
      Get the SmartPost manifest of the shipment.
      +
      +
      Returns:
      +
      the SmartPost manifest of the shipment
      +
      +
      +
    • +
    • +
      +

      setSmartpostManifest

      +
      public void setSmartpostManifest(String smartpostManifest)
      +
      Set the SmartPost manifest of the shipment.
      +
      +
      Parameters:
      +
      smartpostManifest - the SmartPost manifest of the shipment
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Smartrate.html b/docs/com/easypost/model/Smartrate.html new file mode 100644 index 000000000..c2fbce40e --- /dev/null +++ b/docs/com/easypost/model/Smartrate.html @@ -0,0 +1,184 @@ + + + + + +Smartrate (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Smartrate

+
+ +
+
+
public class Smartrate +extends Rate
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Smartrate

      +
      public Smartrate()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getTimeInTransit

      +
      public TimeInTransit getTimeInTransit()
      +
      Get the time in transit for this rate.
      +
      +
      Returns:
      +
      timeInTransit
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/SmartrateAccuracy.html b/docs/com/easypost/model/SmartrateAccuracy.html new file mode 100644 index 000000000..f5c69ee06 --- /dev/null +++ b/docs/com/easypost/model/SmartrateAccuracy.html @@ -0,0 +1,303 @@ + + + + + +SmartrateAccuracy (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum SmartrateAccuracy

+
+
java.lang.Object +
java.lang.Enum<SmartrateAccuracy> +
com.easypost.model.SmartrateAccuracy
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<SmartrateAccuracy>, java.lang.constant.Constable
+
+
+
public enum SmartrateAccuracy +extends Enum<SmartrateAccuracy>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static SmartrateAccuracy[] values()
      +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum type, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static SmartrateAccuracy valueOf(String name)
      +
      Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum type has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      getKeyName

      +
      public String getKeyName()
      +
      Get the internal key name for this enum value.
      +
      +
      Returns:
      +
      the internal key name
      +
      +
      +
    • +
    • +
      +

      getByKeyName

      +
      public static SmartrateAccuracy getByKeyName(String keyName) + throws EasyPostException
      +
      Get the enum value for a given internal key name.
      +
      +
      Parameters:
      +
      keyName - the internal key name
      +
      Returns:
      +
      the enum value
      +
      Throws:
      +
      EasyPostException - if the key name is not found
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/SmartrateCollection.html b/docs/com/easypost/model/SmartrateCollection.html new file mode 100644 index 000000000..1b75d7382 --- /dev/null +++ b/docs/com/easypost/model/SmartrateCollection.html @@ -0,0 +1,224 @@ + + + + + +SmartrateCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SmartrateCollection

+
+
java.lang.Object +
com.easypost.model.SmartrateCollection
+
+
+
+
public final class SmartrateCollection +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SmartrateCollection

      +
      public SmartrateCollection()
      +
      Constructor.
      +
      +
    • +
    • +
      +

      SmartrateCollection

      +
      public SmartrateCollection(List<Smartrate> smartrates)
      +
      Create a SmartrateCollection from a list of rates.
      +
      +
      Parameters:
      +
      smartrates - List of Smartrate objects
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getSmartrates

      +
      public List<Smartrate> getSmartrates()
      +
      Get this SmartrateCollection's Smartrate objects.
      +
      +
      Returns:
      +
      List of Smartrate objects.
      +
      +
      +
    • +
    • +
      +

      setSmartrates

      +
      public void setSmartrates(List<Smartrate> smartrates)
      +
      Set this SmartrateCollection's Smartrate objects.
      +
      +
      Parameters:
      +
      smartrates - List of Smartrate objects.
      +
      +
      +
    • +
    • +
      +

      addRate

      +
      public void addRate(Smartrate rate)
      +
      Add a SmartRate object to this SmartrateCollection.
      +
      +
      Parameters:
      +
      rate - Rate object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/SmartrateCollectionDeserializer.html b/docs/com/easypost/model/SmartrateCollectionDeserializer.html new file mode 100644 index 000000000..63cdfc3c0 --- /dev/null +++ b/docs/com/easypost/model/SmartrateCollectionDeserializer.html @@ -0,0 +1,192 @@ + + + + + +SmartrateCollectionDeserializer (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SmartrateCollectionDeserializer

+
+
java.lang.Object +
com.easypost.model.SmartrateCollectionDeserializer
+
+
+
+
All Implemented Interfaces:
+
com.google.gson.JsonDeserializer<SmartrateCollection>
+
+
+
public final class SmartrateCollectionDeserializer +extends Object +implements com.google.gson.JsonDeserializer<SmartrateCollection>
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SmartrateCollectionDeserializer

      +
      public SmartrateCollectionDeserializer()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      deserialize

      +
      public SmartrateCollection deserialize(com.google.gson.JsonElement json, + Type typeOfT, + com.google.gson.JsonDeserializationContext context) + throws com.google.gson.JsonParseException
      +
      Deserialize a SmartrateCollection from a JSON object.
      +
      +
      Specified by:
      +
      deserialize in interface com.google.gson.JsonDeserializer<SmartrateCollection>
      +
      Parameters:
      +
      json - JSON object to deserialize.
      +
      typeOfT - Type of the object to deserialize.
      +
      context - Deserialization context.
      +
      Returns:
      +
      Deserialized SmartrateCollection object.
      +
      Throws:
      +
      com.google.gson.JsonParseException - if the JSON object is not a valid SmartrateCollection.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/TaxIdentifier.html b/docs/com/easypost/model/TaxIdentifier.html new file mode 100644 index 000000000..9d6387aef --- /dev/null +++ b/docs/com/easypost/model/TaxIdentifier.html @@ -0,0 +1,291 @@ + + + + + +TaxIdentifier (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TaxIdentifier

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.TaxIdentifier
+
+
+
+
+
public final class TaxIdentifier +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TaxIdentifier

      +
      public TaxIdentifier()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getEntity

      +
      public String getEntity()
      +
      Get the entity associated with this TaxIdentifier.
      +
      +
      Returns:
      +
      the entity associated with this TaxIdentifier.
      +
      +
      +
    • +
    • +
      +

      setEntity

      +
      public void setEntity(String entity)
      +
      Set the entity associated with this TaxIdentifier.
      +
      +
      Parameters:
      +
      entity - the entity associated with this TaxIdentifier.
      +
      +
      +
    • +
    • +
      +

      getIssuingCountry

      +
      public String getIssuingCountry()
      +
      Get the issuing country associated with this TaxIdentifier.
      +
      +
      Returns:
      +
      the issuing country associated with this TaxIdentifier.
      +
      +
      +
    • +
    • +
      +

      setIssuingCountry

      +
      public void setIssuingCountry(String issuingCountry)
      +
      Set the issuing country associated with this TaxIdentifier.
      +
      +
      Parameters:
      +
      issuingCountry - the issuing country associated with this TaxIdentifier.
      +
      +
      +
    • +
    • +
      +

      getTaxId

      +
      public String getTaxId()
      +
      Get the tax ID associated with this TaxIdentifier.
      +
      +
      Returns:
      +
      the tax ID associated with this TaxIdentifier.
      +
      +
      +
    • +
    • +
      +

      setTaxId

      +
      public void setTaxId(String taxId)
      +
      Set the tax ID associated with this TaxIdentifier.
      +
      +
      Parameters:
      +
      taxId - the tax ID associated with this TaxIdentifier.
      +
      +
      +
    • +
    • +
      +

      getTaxIdType

      +
      public String getTaxIdType()
      +
      Get the tax ID type associated with this TaxIdentifier.
      +
      +
      Returns:
      +
      the tax ID type associated with this TaxIdentifier.
      +
      +
      +
    • +
    • +
      +

      setTaxIdType

      +
      public void setTaxIdType(String taxIdType)
      +
      Set the tax ID type associated with this TaxIdentifier.
      +
      +
      Parameters:
      +
      taxIdType - the tax ID type associated with this TaxIdentifier.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/TimeInTransit.html b/docs/com/easypost/model/TimeInTransit.html new file mode 100644 index 000000000..f8475aedb --- /dev/null +++ b/docs/com/easypost/model/TimeInTransit.html @@ -0,0 +1,431 @@ + + + + + +TimeInTransit (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TimeInTransit

+
+
java.lang.Object +
com.easypost.model.TimeInTransit
+
+
+
+
public final class TimeInTransit +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TimeInTransit

      +
      public TimeInTransit()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getPercentile50

      +
      public Integer getPercentile50()
      +
      Get the 50th percentile of this TimeInTransit.
      +
      +
      Returns:
      +
      the 50th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      setPercentile50

      +
      public void setPercentile50(Integer percentile50)
      +
      Set the 50th percentile of this TimeInTransit.
      +
      +
      Parameters:
      +
      percentile50 - the 50th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      getPercentile75

      +
      public Integer getPercentile75()
      +
      Get the 75th percentile of this TimeInTransit.
      +
      +
      Returns:
      +
      the 75th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      setPercentile75

      +
      public void setPercentile75(Integer percentile75)
      +
      Get the 75th percentile of this TimeInTransit.
      +
      +
      Parameters:
      +
      percentile75 - the 75th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      getPercentile85

      +
      public Integer getPercentile85()
      +
      Get the 85th percentile of this TimeInTransit.
      +
      +
      Returns:
      +
      the 85th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      setPercentile85

      +
      public void setPercentile85(Integer percentile85)
      +
      Get the 85th percentile of this TimeInTransit.
      +
      +
      Parameters:
      +
      percentile85 - the 85th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      getPercentile90

      +
      public Integer getPercentile90()
      +
      Get the 90th percentile of this TimeInTransit.
      +
      +
      Returns:
      +
      the 90th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      setPercentile90

      +
      public void setPercentile90(Integer percentile90)
      +
      Set the 90th percentile of this TimeInTransit.
      +
      +
      Parameters:
      +
      percentile90 - the 90th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      getPercentile95

      +
      public Integer getPercentile95()
      +
      Get the 95th percentile of this TimeInTransit.
      +
      +
      Returns:
      +
      the 95th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      setPercentile95

      +
      public void setPercentile95(Integer percentile95)
      +
      Set the 95th percentile of this TimeInTransit.
      +
      +
      Parameters:
      +
      percentile95 - the 95th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      getPercentile97

      +
      public Integer getPercentile97()
      +
      Get the 97th percentile of this TimeInTransit.
      +
      +
      Returns:
      +
      the 97th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      setPercentile97

      +
      public void setPercentile97(Integer percentile97)
      +
      Set the 97th percentile of this TimeInTransit.
      +
      +
      Parameters:
      +
      percentile97 - the 97th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      getPercentile99

      +
      public Integer getPercentile99()
      +
      Get the 99th percentile of this TimeInTransit.
      +
      +
      Returns:
      +
      the 99th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      setPercentile99

      +
      public void setPercentile99(Integer percentile99)
      +
      Set the 99th percentile of this TimeInTransit.
      +
      +
      Parameters:
      +
      percentile99 - the 99th percentile of this TimeInTransit
      +
      +
      +
    • +
    • +
      +

      getSmartRateAccuracy

      +
      @Deprecated +public int getSmartRateAccuracy(String percentile) + throws EasyPostException
      +
      Deprecated. +
      Use getBySmartrateAccuracy(SmartrateAccuracy) instead. + Deprecated: v5.5.0 - v7.0.0
      +
      +
      Get the delivery accuracy of a specific percentile of this TimeInTransit.
      +
      +
      Parameters:
      +
      percentile - the percentile to find the corresponding accuracy for
      +
      Returns:
      +
      the delivery accuracy of the specified percentile
      +
      Throws:
      +
      EasyPostException - when the percentile is not valid
      +
      +
      +
    • +
    • +
      +

      getBySmartrateAccuracy

      +
      public int getBySmartrateAccuracy(SmartrateAccuracy accuracy) + throws EasyPostException
      +
      Get the delivery accuracy of a specific percentile of this TimeInTransit.
      +
      +
      Parameters:
      +
      accuracy - the SmartrateAccuracy to find the corresponding accuracy for
      +
      Returns:
      +
      the delivery accuracy of the specified percentile
      +
      Throws:
      +
      EasyPostException - when the percentile is not valid
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Tracker.html b/docs/com/easypost/model/Tracker.html new file mode 100644 index 000000000..3b4573fa6 --- /dev/null +++ b/docs/com/easypost/model/Tracker.html @@ -0,0 +1,691 @@ + + + + + +Tracker (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Tracker

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.Tracker
+
+
+
+
+
public final class Tracker +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Tracker

      +
      public Tracker()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCarrier

      +
      public String getCarrier()
      +
      Get the carrier of the Tracker.
      +
      +
      Returns:
      +
      the carrier of the Tracker.
      +
      +
      +
    • +
    • +
      +

      setCarrier

      +
      public void setCarrier(String carrier)
      +
      Set the carrier of the Tracker.
      +
      +
      Parameters:
      +
      carrier - the carrier of the Tracker.
      +
      +
      +
    • +
    • +
      +

      getCarrierDetail

      +
      public CarrierDetail getCarrierDetail()
      +
      Get details about the carrier associated with the Tracker.
      +
      +
      Returns:
      +
      CarrierDetail object.
      +
      +
      +
    • +
    • +
      +

      setCarrierDetail

      +
      public void setCarrierDetail(CarrierDetail carrierDetail)
      +
      Set details about the carrier associated with the Tracker.
      +
      +
      Parameters:
      +
      carrierDetail - details about the carrier associated with the Tracker.
      +
      +
      +
    • +
    • +
      +

      getEstDeliveryDate

      +
      public Date getEstDeliveryDate()
      +
      Get the estimated delivery date of the Tracker.
      +
      +
      Returns:
      +
      the estimated delivery date of the Tracker.
      +
      +
      +
    • +
    • +
      +

      setEstDeliveryDate

      +
      public void setEstDeliveryDate(Date estDeliveryDate)
      +
      Set the estimated delivery date of the Tracker.
      +
      +
      Parameters:
      +
      estDeliveryDate - the estimated delivery date of the Tracker.
      +
      +
      +
    • +
    • +
      +

      getShipmentId

      +
      public String getShipmentId()
      +
      Get the ID of the shipment associated with this tracker.
      +
      +
      Returns:
      +
      the ID of the shipment associated with this tracker.
      +
      +
      +
    • +
    • +
      +

      setShipmentId

      +
      public void setShipmentId(String shipmentId)
      +
      Set the ID of the shipment associated with this tracker.
      +
      +
      Parameters:
      +
      shipmentId - the ID of the shipment associated with this tracker.
      +
      +
      +
    • +
    • +
      +

      getStatus

      +
      public String getStatus()
      +
      Get the status of the Tracker.
      +
      +
      Returns:
      +
      the status of the Tracker.
      +
      +
      +
    • +
    • +
      +

      getTrackingCode

      +
      public String getTrackingCode()
      +
      Get the tracking code of the Tracker.
      +
      +
      Returns:
      +
      the tracking code of the Tracker.
      +
      +
      +
    • +
    • +
      +

      setTrackingCode

      +
      public void setTrackingCode(String trackingCode)
      +
      Set the tracking code of the Tracker.
      +
      +
      Parameters:
      +
      trackingCode - the tracking code of the Tracker.
      +
      +
      +
    • +
    • +
      +

      getTrackingDetails

      +
      public List<TrackingDetail> getTrackingDetails()
      +
      Get the tracking details of the Tracker.
      +
      +
      Returns:
      +
      List of TrackingDetail objects.
      +
      +
      +
    • +
    • +
      +

      setTrackingDetails

      +
      public void setTrackingDetails(List<TrackingDetail> trackingDetails)
      +
      Set the tracking details of the Tracker.
      +
      +
      Parameters:
      +
      trackingDetails - List of TrackingDetail objects.
      +
      +
      +
    • +
    • +
      +

      setStatus

      +
      public void setStatus(String status)
      +
      Set the status of the Tracker.
      +
      +
      Parameters:
      +
      status - the status of the Tracker.
      +
      +
      +
    • +
    • +
      +

      getPublicUrl

      +
      public String getPublicUrl()
      +
      Get the public URL of the Tracker.
      +
      +
      Returns:
      +
      the public URL of the Tracker.
      +
      +
      +
    • +
    • +
      +

      setPublicUrl

      +
      public void setPublicUrl(String publicUrl)
      +
      Set the public URL of the Tracker.
      +
      +
      Parameters:
      +
      publicUrl - the public URL of the Tracker.
      +
      +
      +
    • +
    • +
      +

      getSignedBy

      +
      public String getSignedBy()
      +
      Get who signed for the package associated Tracker.
      +
      +
      Returns:
      +
      who signed for the package associated Tracker.
      +
      +
      +
    • +
    • +
      +

      setSignedBy

      +
      public void setSignedBy(String signedBy)
      +
      Set who signed for the package associated Tracker.
      +
      +
      Parameters:
      +
      signedBy - who signed for the package associated Tracker.
      +
      +
      +
    • +
    • +
      +

      getStatusDetail

      +
      public String getStatusDetail()
      +
      Get the status of the Tracker.
      +
      +
      Returns:
      +
      the status of the Tracker.
      +
      +
      +
    • +
    • +
      +

      setStatusDetail

      +
      public void setStatusDetail(String statusDetail)
      +
      Set the status of the Tracker.
      +
      +
      Parameters:
      +
      statusDetail - the status of the Tracker.
      +
      +
      +
    • +
    • +
      +

      getWeight

      +
      public float getWeight()
      +
      Get the weight of the Tracker.
      +
      +
      Returns:
      +
      the weight of the Tracker.
      +
      +
      +
    • +
    • +
      +

      setWeight

      +
      public void setWeight(float weight)
      +
      Set the weight of the Tracker.
      +
      +
      Parameters:
      +
      weight - the weight of the Tracker.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Tracker create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a new Tracker object using a map of parameters.
      +
      +
      Parameters:
      +
      params - Map of parameters used to create the Tracker.
      +
      Returns:
      +
      Tracker object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Tracker create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a new Tracker object using a map of parameters.
      +
      +
      Parameters:
      +
      params - Map of parameters used to create the Tracker.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Tracker object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Tracker retrieve(String id) + throws EasyPostException
      +
      Retrieve a Tracker object from the API.
      +
      +
      Parameters:
      +
      id - ID of the Tracker to retrieve.
      +
      Returns:
      +
      Tracker object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Tracker retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a Tracker object from the API.
      +
      +
      Parameters:
      +
      id - ID of the Tracker to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Tracker object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static TrackerCollection all(Map<String,​Object> params) + throws EasyPostException
      +
      Get a list of all Tracker objects.
      +
      +
      Parameters:
      +
      params - Map of parameters used to filter the list of Trackers.
      +
      Returns:
      +
      TrackerCollection object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static TrackerCollection all(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Get a list of all Tracker objects.
      +
      +
      Parameters:
      +
      params - Map of parameters used to filter the list of Trackers.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      TrackerCollection object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      createList

      +
      public static void createList(Map<String,​Object> params) + throws EasyPostException
      +
      Create a list of Trackers.
      +
      +
      Parameters:
      +
      params - Map of parameters used to create the Trackers.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      createList

      +
      public static void createList(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a list of Trackers.
      +
      +
      Parameters:
      +
      params - Map of parameters used to create the Trackers.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/TrackerCollection.html b/docs/com/easypost/model/TrackerCollection.html new file mode 100644 index 000000000..e4457d278 --- /dev/null +++ b/docs/com/easypost/model/TrackerCollection.html @@ -0,0 +1,227 @@ + + + + + +TrackerCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TrackerCollection

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.TrackerCollection
+
+
+
+
+
public final class TrackerCollection +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TrackerCollection

      +
      public TrackerCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getHasMore

      +
      public Boolean getHasMore()
      +
      Get whether there are more Trackers to retrieve.
      +
      +
      Returns:
      +
      true if there are more Trackers to retrieve, false otherwise.
      +
      +
      +
    • +
    • +
      +

      setHasMore

      +
      public void setHasMore(Boolean hasMore)
      +
      Set whether there are more Trackers to retrieve.
      +
      +
      Parameters:
      +
      hasMore - true if there are more Trackers to retrieve, false otherwise.
      +
      +
      +
    • +
    • +
      +

      getTrackers

      +
      public List<Tracker> getTrackers()
      +
      Get this TrackerCollection's Tracker objects.
      +
      +
      Returns:
      +
      List of Tracker objects.
      +
      +
      +
    • +
    • +
      +

      setTrackers

      +
      public void setTrackers(List<Tracker> trackers)
      +
      Set this TrackerCollection's Tracker objects.
      +
      +
      Parameters:
      +
      trackers - List of Tracker objects.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/TrackingDetail.html b/docs/com/easypost/model/TrackingDetail.html new file mode 100644 index 000000000..96edb9ee9 --- /dev/null +++ b/docs/com/easypost/model/TrackingDetail.html @@ -0,0 +1,318 @@ + + + + + +TrackingDetail (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TrackingDetail

+
+
java.lang.Object +
com.easypost.model.TrackingDetail
+
+
+
+
public final class TrackingDetail +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TrackingDetail

      +
      public TrackingDetail()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getDatetime

      +
      public Date getDatetime()
      +
      Get the datetime of the tracking detail.
      +
      +
      Returns:
      +
      the datetime of the tracking detail.
      +
      +
      +
    • +
    • +
      +

      setDatetime

      +
      public void setDatetime(Date datetime)
      +
      Set the datetime of the tracking detail.
      +
      +
      Parameters:
      +
      datetime - the datetime of the tracking detail.
      +
      +
      +
    • +
    • +
      +

      getMessage

      +
      public String getMessage()
      +
      Get the message of the tracking detail.
      +
      +
      Returns:
      +
      the message of the tracking detail.
      +
      +
      +
    • +
    • +
      +

      setMessage

      +
      public void setMessage(String message)
      +
      Set the message of the tracking detail.
      +
      +
      Parameters:
      +
      message - the message of the tracking detail.
      +
      +
      +
    • +
    • +
      +

      getStatus

      +
      public String getStatus()
      +
      Get the status of the tracking detail.
      +
      +
      Returns:
      +
      the status of the tracking detail.
      +
      +
      +
    • +
    • +
      +

      setStatus

      +
      public void setStatus(String status)
      +
      Set the status of the tracking detail.
      +
      +
      Parameters:
      +
      status - the status of the tracking detail.
      +
      +
      +
    • +
    • +
      +

      getStatusDetail

      +
      public String getStatusDetail()
      +
      Get the status detail of the tracking detail.
      +
      +
      Returns:
      +
      the status detail of the tracking detail.
      +
      +
      +
    • +
    • +
      +

      setStatusDetail

      +
      public void setStatusDetail(String statusDetail)
      +
      Set the status detail of the tracking detail.
      +
      +
      Parameters:
      +
      statusDetail - the status detail of the tracking detail.
      +
      +
      +
    • +
    • +
      +

      getTrackingLocation

      +
      public TrackingLocation getTrackingLocation()
      +
      Get the tracking location of the tracking detail.
      +
      +
      Returns:
      +
      TrackingLocation object.
      +
      +
      +
    • +
    • +
      +

      setTrackingLocation

      +
      public void setTrackingLocation(TrackingLocation location)
      +
      Set the tracking location of the tracking detail.
      +
      +
      Parameters:
      +
      location - TrackingLocation object.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/TrackingLocation.html b/docs/com/easypost/model/TrackingLocation.html new file mode 100644 index 000000000..6f7fc30bb --- /dev/null +++ b/docs/com/easypost/model/TrackingLocation.html @@ -0,0 +1,286 @@ + + + + + +TrackingLocation (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TrackingLocation

+
+
java.lang.Object +
com.easypost.model.TrackingLocation
+
+
+
+
public final class TrackingLocation +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TrackingLocation

      +
      public TrackingLocation()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getCity

      +
      public String getCity()
      +
      Get the city of the tracking location.
      +
      +
      Returns:
      +
      the city of the tracking location.
      +
      +
      +
    • +
    • +
      +

      setCity

      +
      public void setCity(String city)
      +
      Set the city of the tracking location.
      +
      +
      Parameters:
      +
      city - the city of the tracking location.
      +
      +
      +
    • +
    • +
      +

      getCountry

      +
      public String getCountry()
      +
      Get the country of the tracking location.
      +
      +
      Returns:
      +
      the country of the tracking location.
      +
      +
      +
    • +
    • +
      +

      setCountry

      +
      public void setCountry(String country)
      +
      Set the country of the tracking location.
      +
      +
      Parameters:
      +
      country - the country of the tracking location.
      +
      +
      +
    • +
    • +
      +

      getState

      +
      public String getState()
      +
      Get the state of the tracking location.
      +
      +
      Returns:
      +
      the state of the tracking location.
      +
      +
      +
    • +
    • +
      +

      setState

      +
      public void setState(String state)
      +
      Set the state of the tracking location.
      +
      +
      Parameters:
      +
      state - the state of the tracking location.
      +
      +
      +
    • +
    • +
      +

      getZip

      +
      public String getZip()
      +
      Get the zip code of the tracking location.
      +
      +
      Returns:
      +
      the zip code of the tracking location.
      +
      +
      +
    • +
    • +
      +

      setZip

      +
      public void setZip(String zip)
      +
      Set the zip code of the tracking location.
      +
      +
      Parameters:
      +
      zip - the zip code of the tracking location.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/User.html b/docs/com/easypost/model/User.html new file mode 100644 index 000000000..8873cacf8 --- /dev/null +++ b/docs/com/easypost/model/User.html @@ -0,0 +1,462 @@ + + + + + +User (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class User

+
+ +
+
+
public class User +extends BaseUser
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      User

      +
      public User()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      retrieve

      +
      public static User retrieve(String id) + throws EasyPostException
      +
      Retrieve a User from the API.
      +
      +
      Parameters:
      +
      id - The ID of the User to retrieve.
      +
      Returns:
      +
      User object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static User retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a User from the API.
      +
      +
      Parameters:
      +
      id - The ID of the User to retrieve.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      User object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieveMe

      +
      public static User retrieveMe() + throws EasyPostException
      +
      Retrieve your User from the API.
      +
      +
      Returns:
      +
      User object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieveMe

      +
      public static User retrieveMe(String apiKey) + throws EasyPostException
      +
      Retrieve your User from the API.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      User object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static User create() + throws EasyPostException
      +
      Create a User object with a map of parameters.
      +
      +
      Returns:
      +
      User object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static User create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a User object with a map of parameters.
      +
      +
      Parameters:
      +
      params - map of User parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      User object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static User create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a User object with a map of parameters.
      +
      +
      Parameters:
      +
      params - map of User parameters.
      +
      Returns:
      +
      User object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      update

      +
      public User update(Map<String,​Object> params) + throws EasyPostException
      +
      Update this User.
      +
      +
      Parameters:
      +
      params - map of User parameters.
      +
      Returns:
      +
      User object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      update

      +
      public User update(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Update this User.
      +
      +
      Parameters:
      +
      params - map of User parameters.
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      User object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      delete

      +
      public void delete() + throws EasyPostException
      +
      Delete this User.
      +
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      delete

      +
      public void delete(String apiKey) + throws EasyPostException
      +
      Delete this User.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      apiKeys

      +
      public List<ApiKey> apiKeys() + throws EasyPostException
      +
      Get this User's API keys.
      +
      +
      Returns:
      +
      List of ApiKey objects.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      updateBrand

      +
      public Brand updateBrand(Map<String,​Object> params) + throws EasyPostException
      +
      Update the user brand.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      Returns:
      +
      Brand object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      updateBrand

      +
      public Brand updateBrand(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Update the user brand.
      +
      +
      Parameters:
      +
      params - Map of parameters.
      +
      apiKey - User API key.
      +
      Returns:
      +
      Brand object.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Utilities.html b/docs/com/easypost/model/Utilities.html new file mode 100644 index 000000000..6a85f8525 --- /dev/null +++ b/docs/com/easypost/model/Utilities.html @@ -0,0 +1,182 @@ + + + + + +Utilities (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Utilities

+
+
java.lang.Object +
com.easypost.model.Utilities
+
+
+
+
public final class Utilities +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getLowestObjectRate

      +
      public static Rate getLowestObjectRate(List<Rate> rates, + List<String> carriers, + List<String> services) + throws EasyPostException
      +
      Get the lowest rate from a list of rates.
      +
      +
      Parameters:
      +
      rates - the list of rates.
      +
      carriers - the carriers to use in the filter.
      +
      services - the services to use in the filter.
      +
      Returns:
      +
      lowest Rate object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      getEncodedURL

      +
      public static String getEncodedURL(Map<String,​String> params, + String parentKey) + throws Exception
      +
      Create Encoded URL from a Map.
      +
      +
      Parameters:
      +
      params - Map of parameters to be encoded.
      +
      parentKey - Parent key in the encoded URL.
      +
      Returns:
      +
      Encoded URL for Stripe API call.
      +
      Throws:
      +
      Exception
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/Webhook.html b/docs/com/easypost/model/Webhook.html new file mode 100644 index 000000000..d637427ed --- /dev/null +++ b/docs/com/easypost/model/Webhook.html @@ -0,0 +1,512 @@ + + + + + +Webhook (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Webhook

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.Webhook
+
+
+
+
+
public final class Webhook +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Webhook

      +
      public Webhook()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getDisabledAt

      +
      public Date getDisabledAt()
      +
      Get the date and time when the webhook was disabled.
      +
      +
      Returns:
      +
      the date and time when the webhook was disabled
      +
      +
      +
    • +
    • +
      +

      setDisabledAt

      +
      public void setDisabledAt(Date disabledAt)
      +
      Set the date and time when the webhook was disabled.
      +
      +
      Parameters:
      +
      disabledAt - the date and time when the webhook was disabled
      +
      +
      +
    • +
    • +
      +

      getUrl

      +
      public String getUrl()
      +
      Get the URL of the webhook.
      +
      +
      Returns:
      +
      the URL of the webhook
      +
      +
      +
    • +
    • +
      +

      setUrl

      +
      public void setUrl(String url)
      +
      Set the URL of the webhook.
      +
      +
      Parameters:
      +
      url - the URL of the webhook
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Webhook create(Map<String,​Object> params) + throws EasyPostException
      +
      Create a Webhook object from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of parameters
      +
      Returns:
      +
      Webhook object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      create

      +
      public static Webhook create(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Create a Webhook object from a map of parameters.
      +
      +
      Parameters:
      +
      params - the map of parameters
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Webhook object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Webhook retrieve(String id) + throws EasyPostException
      +
      Retrieve a Webhook object from the API.
      +
      +
      Parameters:
      +
      id - the ID of the Webhook to retrieve
      +
      Returns:
      +
      Webhook object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      retrieve

      +
      public static Webhook retrieve(String id, + String apiKey) + throws EasyPostException
      +
      Retrieve a Webhook object from the API.
      +
      +
      Parameters:
      +
      id - the ID of the Webhook to retrieve
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Webhook object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static WebhookCollection all() + throws EasyPostException
      +
      Get a list of all Webhook objects.
      +
      +
      Returns:
      +
      WebhookCollection object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static WebhookCollection all(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Get a list of all Webhook objects.
      +
      +
      Parameters:
      +
      params - params for request
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      WebhookCollection object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      all

      +
      public static WebhookCollection all(Map<String,​Object> params) + throws EasyPostException
      +
      Get a list of all Webhook objects.
      +
      +
      Parameters:
      +
      params - params for request
      +
      Returns:
      +
      WebhookCollection object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      delete

      +
      public void delete() + throws EasyPostException
      +
      Delete this Webhook.
      +
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      delete

      +
      public void delete(String apiKey) + throws EasyPostException
      +
      Delete this Webhook.
      +
      +
      Parameters:
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      update

      +
      public Webhook update() + throws EasyPostException
      +
      Update this webhook.
      +
      +
      Returns:
      +
      Webhook object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      update

      +
      public Webhook update(Map<String,​Object> params, + String apiKey) + throws EasyPostException
      +
      Update this webhook.
      +
      +
      Parameters:
      +
      params - the map of parameters
      +
      apiKey - API key to use in request (overrides default API key).
      +
      Returns:
      +
      Webhook object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      update

      +
      public Webhook update(Map<String,​Object> params) + throws EasyPostException
      +
      Update this webhook.
      +
      +
      Parameters:
      +
      params - the map of parameters
      +
      Returns:
      +
      Webhook object
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    • +
      +

      validateWebhook

      +
      public static Event validateWebhook(byte[] eventBody, + Map<String,​Object> headers, + String webhookSecret) + throws EasyPostException
      +
      Validate a webhook by comparing the HMAC signature header sent from EasyPost to your shared secret. + If the signatures do not match, an error will be raised signifying + the webhook either did not originate from EasyPost or the secrets do not match. + If the signatures do match, the `event_body` will be returned as JSON.
      +
      +
      Parameters:
      +
      eventBody - Data to validate
      +
      headers - Headers received from the webhook
      +
      webhookSecret - Shared secret to use in validation
      +
      Returns:
      +
      JSON string of the event body if the signatures match, otherwise an + error will be raised.
      +
      Throws:
      +
      EasyPostException - when the request fails.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/WebhookCollection.html b/docs/com/easypost/model/WebhookCollection.html new file mode 100644 index 000000000..de4d3850d --- /dev/null +++ b/docs/com/easypost/model/WebhookCollection.html @@ -0,0 +1,195 @@ + + + + + +WebhookCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WebhookCollection

+
+
java.lang.Object +
com.easypost.model.EasyPostResource +
com.easypost.model.WebhookCollection
+
+
+
+
+
public final class WebhookCollection +extends EasyPostResource
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WebhookCollection

      +
      public WebhookCollection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getWebhooks

      +
      public List<Webhook> getWebhooks()
      +
      Get this WebhookCollection's Webhook objects.
      +
      +
      Returns:
      +
      List of Webhook objects.
      +
      +
      +
    • +
    • +
      +

      setWebhooks

      +
      public void setWebhooks(List<Webhook> webhooks)
      +
      Set this WebhookCollection's Webhook objects.
      +
      +
      Parameters:
      +
      webhooks - List of Webhook objects.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Address.html b/docs/com/easypost/model/class-use/Address.html new file mode 100644 index 000000000..04be62801 --- /dev/null +++ b/docs/com/easypost/model/class-use/Address.html @@ -0,0 +1,291 @@ + + + + + +Uses of Class com.easypost.model.Address (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Address

+
+
Packages that use Address
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/AddressCollection.html b/docs/com/easypost/model/class-use/AddressCollection.html new file mode 100644 index 000000000..a4765323f --- /dev/null +++ b/docs/com/easypost/model/class-use/AddressCollection.html @@ -0,0 +1,101 @@ + + + + + +Uses of Class com.easypost.model.AddressCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.AddressCollection

+
+
Packages that use AddressCollection
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/AddressDetail.html b/docs/com/easypost/model/class-use/AddressDetail.html new file mode 100644 index 000000000..f7693ac4d --- /dev/null +++ b/docs/com/easypost/model/class-use/AddressDetail.html @@ -0,0 +1,106 @@ + + + + + +Uses of Class com.easypost.model.AddressDetail (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.AddressDetail

+
+
Packages that use AddressDetail
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/AddressVerification.html b/docs/com/easypost/model/class-use/AddressVerification.html new file mode 100644 index 000000000..785fbdbc0 --- /dev/null +++ b/docs/com/easypost/model/class-use/AddressVerification.html @@ -0,0 +1,116 @@ + + + + + +Uses of Class com.easypost.model.AddressVerification (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.AddressVerification

+
+
Packages that use AddressVerification
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/AddressVerifications.html b/docs/com/easypost/model/class-use/AddressVerifications.html new file mode 100644 index 000000000..6ed636b3f --- /dev/null +++ b/docs/com/easypost/model/class-use/AddressVerifications.html @@ -0,0 +1,106 @@ + + + + + +Uses of Class com.easypost.model.AddressVerifications (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.AddressVerifications

+
+
Packages that use AddressVerifications
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/AddressVerifyResponse.html b/docs/com/easypost/model/class-use/AddressVerifyResponse.html new file mode 100644 index 000000000..ea9bd2760 --- /dev/null +++ b/docs/com/easypost/model/class-use/AddressVerifyResponse.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.model.AddressVerifyResponse (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.AddressVerifyResponse

+
+No usage of com.easypost.model.AddressVerifyResponse
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/ApiKey.html b/docs/com/easypost/model/class-use/ApiKey.html new file mode 100644 index 000000000..de02ab197 --- /dev/null +++ b/docs/com/easypost/model/class-use/ApiKey.html @@ -0,0 +1,121 @@ + + + + + +Uses of Class com.easypost.model.ApiKey (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.ApiKey

+
+
Packages that use ApiKey
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/ApiKeys.html b/docs/com/easypost/model/class-use/ApiKeys.html new file mode 100644 index 000000000..fd27ca815 --- /dev/null +++ b/docs/com/easypost/model/class-use/ApiKeys.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class com.easypost.model.ApiKeys (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.ApiKeys

+
+
Packages that use ApiKeys
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/BaseAddress.html b/docs/com/easypost/model/class-use/BaseAddress.html new file mode 100644 index 000000000..d47120013 --- /dev/null +++ b/docs/com/easypost/model/class-use/BaseAddress.html @@ -0,0 +1,96 @@ + + + + + +Uses of Class com.easypost.model.BaseAddress (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.BaseAddress

+
+
Packages that use BaseAddress
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/BaseCreditCard.html b/docs/com/easypost/model/class-use/BaseCreditCard.html new file mode 100644 index 000000000..db7c449fe --- /dev/null +++ b/docs/com/easypost/model/class-use/BaseCreditCard.html @@ -0,0 +1,111 @@ + + + + + +Uses of Class com.easypost.model.BaseCreditCard (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.BaseCreditCard

+
+
Packages that use BaseCreditCard
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/BaseUser.html b/docs/com/easypost/model/class-use/BaseUser.html new file mode 100644 index 000000000..d61a878f7 --- /dev/null +++ b/docs/com/easypost/model/class-use/BaseUser.html @@ -0,0 +1,96 @@ + + + + + +Uses of Class com.easypost.model.BaseUser (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.BaseUser

+
+
Packages that use BaseUser
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Batch.html b/docs/com/easypost/model/class-use/Batch.html new file mode 100644 index 000000000..f78f88507 --- /dev/null +++ b/docs/com/easypost/model/class-use/Batch.html @@ -0,0 +1,263 @@ + + + + + +Uses of Class com.easypost.model.Batch (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Batch

+
+
Packages that use Batch
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/BatchCollection.html b/docs/com/easypost/model/class-use/BatchCollection.html new file mode 100644 index 000000000..348ad7035 --- /dev/null +++ b/docs/com/easypost/model/class-use/BatchCollection.html @@ -0,0 +1,101 @@ + + + + + +Uses of Class com.easypost.model.BatchCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.BatchCollection

+
+
Packages that use BatchCollection
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/BatchStatus.html b/docs/com/easypost/model/class-use/BatchStatus.html new file mode 100644 index 000000000..6fa636a14 --- /dev/null +++ b/docs/com/easypost/model/class-use/BatchStatus.html @@ -0,0 +1,106 @@ + + + + + +Uses of Class com.easypost.model.BatchStatus (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.BatchStatus

+
+
Packages that use BatchStatus
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Billing.html b/docs/com/easypost/model/class-use/Billing.html new file mode 100644 index 000000000..927cde7a2 --- /dev/null +++ b/docs/com/easypost/model/class-use/Billing.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.model.Billing (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Billing

+
+No usage of com.easypost.model.Billing
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Brand.html b/docs/com/easypost/model/class-use/Brand.html new file mode 100644 index 000000000..2fd9ceda3 --- /dev/null +++ b/docs/com/easypost/model/class-use/Brand.html @@ -0,0 +1,101 @@ + + + + + +Uses of Class com.easypost.model.Brand (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Brand

+
+
Packages that use Brand
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/CarbonOffset.html b/docs/com/easypost/model/class-use/CarbonOffset.html new file mode 100644 index 000000000..9ab1cf7fd --- /dev/null +++ b/docs/com/easypost/model/class-use/CarbonOffset.html @@ -0,0 +1,106 @@ + + + + + +Uses of Class com.easypost.model.CarbonOffset (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.CarbonOffset

+
+
Packages that use CarbonOffset
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/CarrierAccount.html b/docs/com/easypost/model/class-use/CarrierAccount.html new file mode 100644 index 000000000..f1e194d52 --- /dev/null +++ b/docs/com/easypost/model/class-use/CarrierAccount.html @@ -0,0 +1,181 @@ + + + + + +Uses of Class com.easypost.model.CarrierAccount (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.CarrierAccount

+
+
Packages that use CarrierAccount
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/CarrierDetail.html b/docs/com/easypost/model/class-use/CarrierDetail.html new file mode 100644 index 000000000..30d3801bb --- /dev/null +++ b/docs/com/easypost/model/class-use/CarrierDetail.html @@ -0,0 +1,106 @@ + + + + + +Uses of Class com.easypost.model.CarrierDetail (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.CarrierDetail

+
+
Packages that use CarrierDetail
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/CarrierType.html b/docs/com/easypost/model/class-use/CarrierType.html new file mode 100644 index 000000000..fee4c5468 --- /dev/null +++ b/docs/com/easypost/model/class-use/CarrierType.html @@ -0,0 +1,100 @@ + + + + + +Uses of Class com.easypost.model.CarrierType (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.CarrierType

+
+
Packages that use CarrierType
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/CreditCard.html b/docs/com/easypost/model/class-use/CreditCard.html new file mode 100644 index 000000000..0d10944b4 --- /dev/null +++ b/docs/com/easypost/model/class-use/CreditCard.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.model.CreditCard (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.CreditCard

+
+No usage of com.easypost.model.CreditCard
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/CreditCardPriority.html b/docs/com/easypost/model/class-use/CreditCardPriority.html new file mode 100644 index 000000000..9fc50a454 --- /dev/null +++ b/docs/com/easypost/model/class-use/CreditCardPriority.html @@ -0,0 +1,126 @@ + + + + + +Uses of Enum com.easypost.model.CreditCardPriority (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum
com.easypost.model.CreditCardPriority

+
+
Packages that use CreditCardPriority
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/CustomsInfo.html b/docs/com/easypost/model/class-use/CustomsInfo.html new file mode 100644 index 000000000..085913128 --- /dev/null +++ b/docs/com/easypost/model/class-use/CustomsInfo.html @@ -0,0 +1,138 @@ + + + + + +Uses of Class com.easypost.model.CustomsInfo (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.CustomsInfo

+
+
Packages that use CustomsInfo
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/CustomsItem.html b/docs/com/easypost/model/class-use/CustomsItem.html new file mode 100644 index 000000000..a3007ada7 --- /dev/null +++ b/docs/com/easypost/model/class-use/CustomsItem.html @@ -0,0 +1,134 @@ + + + + + +Uses of Class com.easypost.model.CustomsItem (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.CustomsItem

+
+
Packages that use CustomsItem
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/EasyPostResource.html b/docs/com/easypost/model/class-use/EasyPostResource.html new file mode 100644 index 000000000..f39994c6f --- /dev/null +++ b/docs/com/easypost/model/class-use/EasyPostResource.html @@ -0,0 +1,302 @@ + + + + + +Uses of Class com.easypost.model.EasyPostResource (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.EasyPostResource

+
+
Packages that use EasyPostResource
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/EndShipper.html b/docs/com/easypost/model/class-use/EndShipper.html new file mode 100644 index 000000000..3aeb5d564 --- /dev/null +++ b/docs/com/easypost/model/class-use/EndShipper.html @@ -0,0 +1,145 @@ + + + + + +Uses of Class com.easypost.model.EndShipper (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.EndShipper

+
+
Packages that use EndShipper
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/EndShipperCollection.html b/docs/com/easypost/model/class-use/EndShipperCollection.html new file mode 100644 index 000000000..35a0c1163 --- /dev/null +++ b/docs/com/easypost/model/class-use/EndShipperCollection.html @@ -0,0 +1,101 @@ + + + + + +Uses of Class com.easypost.model.EndShipperCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.EndShipperCollection

+
+
Packages that use EndShipperCollection
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Error.html b/docs/com/easypost/model/class-use/Error.html new file mode 100644 index 000000000..76d055085 --- /dev/null +++ b/docs/com/easypost/model/class-use/Error.html @@ -0,0 +1,291 @@ + + + + + +Uses of Class com.easypost.model.Error (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Error

+
+
Packages that use Error
+
+
Package
+
Description
+ +
+
Custom exception classes for the EasyPost API.
+
+ +
+
Custom API exception classes for the EasyPost API.
+
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/ErrorDeserializer.html b/docs/com/easypost/model/class-use/ErrorDeserializer.html new file mode 100644 index 000000000..2d2a427f3 --- /dev/null +++ b/docs/com/easypost/model/class-use/ErrorDeserializer.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.model.ErrorDeserializer (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.ErrorDeserializer

+
+No usage of com.easypost.model.ErrorDeserializer
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Event.html b/docs/com/easypost/model/class-use/Event.html new file mode 100644 index 000000000..42f7e10af --- /dev/null +++ b/docs/com/easypost/model/class-use/Event.html @@ -0,0 +1,130 @@ + + + + + +Uses of Class com.easypost.model.Event (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Event

+
+
Packages that use Event
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/EventCollection.html b/docs/com/easypost/model/class-use/EventCollection.html new file mode 100644 index 000000000..9d67d7ec0 --- /dev/null +++ b/docs/com/easypost/model/class-use/EventCollection.html @@ -0,0 +1,101 @@ + + + + + +Uses of Class com.easypost.model.EventCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.EventCollection

+
+
Packages that use EventCollection
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/EventData.html b/docs/com/easypost/model/class-use/EventData.html new file mode 100644 index 000000000..7be99e1a1 --- /dev/null +++ b/docs/com/easypost/model/class-use/EventData.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.model.EventData (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.EventData

+
+No usage of com.easypost.model.EventData
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Fee.html b/docs/com/easypost/model/class-use/Fee.html new file mode 100644 index 000000000..4d1a8e1ad --- /dev/null +++ b/docs/com/easypost/model/class-use/Fee.html @@ -0,0 +1,104 @@ + + + + + +Uses of Class com.easypost.model.Fee (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Fee

+
+
Packages that use Fee
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Field.html b/docs/com/easypost/model/class-use/Field.html new file mode 100644 index 000000000..c8c156e67 --- /dev/null +++ b/docs/com/easypost/model/class-use/Field.html @@ -0,0 +1,116 @@ + + + + + +Uses of Class com.easypost.model.Field (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Field

+
+
Packages that use Field
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Fields.html b/docs/com/easypost/model/class-use/Fields.html new file mode 100644 index 000000000..7e0f63e40 --- /dev/null +++ b/docs/com/easypost/model/class-use/Fields.html @@ -0,0 +1,106 @@ + + + + + +Uses of Class com.easypost.model.Fields (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Fields

+
+
Packages that use Fields
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Form.html b/docs/com/easypost/model/class-use/Form.html new file mode 100644 index 000000000..9f2c0c269 --- /dev/null +++ b/docs/com/easypost/model/class-use/Form.html @@ -0,0 +1,106 @@ + + + + + +Uses of Class com.easypost.model.Form (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Form

+
+
Packages that use Form
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Insurance.html b/docs/com/easypost/model/class-use/Insurance.html new file mode 100644 index 000000000..bb25d1b18 --- /dev/null +++ b/docs/com/easypost/model/class-use/Insurance.html @@ -0,0 +1,155 @@ + + + + + +Uses of Class com.easypost.model.Insurance (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Insurance

+
+
Packages that use Insurance
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/InsuranceCollection.html b/docs/com/easypost/model/class-use/InsuranceCollection.html new file mode 100644 index 000000000..9078b02bf --- /dev/null +++ b/docs/com/easypost/model/class-use/InsuranceCollection.html @@ -0,0 +1,101 @@ + + + + + +Uses of Class com.easypost.model.InsuranceCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.InsuranceCollection

+
+
Packages that use InsuranceCollection
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Order.html b/docs/com/easypost/model/class-use/Order.html new file mode 100644 index 000000000..3088703e0 --- /dev/null +++ b/docs/com/easypost/model/class-use/Order.html @@ -0,0 +1,192 @@ + + + + + +Uses of Class com.easypost.model.Order (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Order

+
+
Packages that use Order
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/OrderCollection.html b/docs/com/easypost/model/class-use/OrderCollection.html new file mode 100644 index 000000000..2e7266259 --- /dev/null +++ b/docs/com/easypost/model/class-use/OrderCollection.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.model.OrderCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.OrderCollection

+
+No usage of com.easypost.model.OrderCollection
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Parcel.html b/docs/com/easypost/model/class-use/Parcel.html new file mode 100644 index 000000000..67ecd7bb4 --- /dev/null +++ b/docs/com/easypost/model/class-use/Parcel.html @@ -0,0 +1,128 @@ + + + + + +Uses of Class com.easypost.model.Parcel (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Parcel

+
+
Packages that use Parcel
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/PaymentMethod.Priority.html b/docs/com/easypost/model/class-use/PaymentMethod.Priority.html new file mode 100644 index 000000000..e0771daef --- /dev/null +++ b/docs/com/easypost/model/class-use/PaymentMethod.Priority.html @@ -0,0 +1,141 @@ + + + + + +Uses of Enum com.easypost.model.PaymentMethod.Priority (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum
com.easypost.model.PaymentMethod.Priority

+
+
Packages that use PaymentMethod.Priority
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/PaymentMethod.html b/docs/com/easypost/model/class-use/PaymentMethod.html new file mode 100644 index 000000000..625a082d3 --- /dev/null +++ b/docs/com/easypost/model/class-use/PaymentMethod.html @@ -0,0 +1,114 @@ + + + + + +Uses of Class com.easypost.model.PaymentMethod (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.PaymentMethod

+
+
Packages that use PaymentMethod
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/PaymentMethodObject.PaymentMethodType.html b/docs/com/easypost/model/class-use/PaymentMethodObject.PaymentMethodType.html new file mode 100644 index 000000000..e91b36102 --- /dev/null +++ b/docs/com/easypost/model/class-use/PaymentMethodObject.PaymentMethodType.html @@ -0,0 +1,106 @@ + + + + + +Uses of Enum com.easypost.model.PaymentMethodObject.PaymentMethodType (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum
com.easypost.model.PaymentMethodObject.PaymentMethodType

+
+ +
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/PaymentMethodObject.html b/docs/com/easypost/model/class-use/PaymentMethodObject.html new file mode 100644 index 000000000..999dc02b0 --- /dev/null +++ b/docs/com/easypost/model/class-use/PaymentMethodObject.html @@ -0,0 +1,119 @@ + + + + + +Uses of Class com.easypost.model.PaymentMethodObject (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.PaymentMethodObject

+
+
Packages that use PaymentMethodObject
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Pickup.html b/docs/com/easypost/model/class-use/Pickup.html new file mode 100644 index 000000000..210277041 --- /dev/null +++ b/docs/com/easypost/model/class-use/Pickup.html @@ -0,0 +1,202 @@ + + + + + +Uses of Class com.easypost.model.Pickup (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Pickup

+
+
Packages that use Pickup
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/PickupCollection.html b/docs/com/easypost/model/class-use/PickupCollection.html new file mode 100644 index 000000000..6df833e70 --- /dev/null +++ b/docs/com/easypost/model/class-use/PickupCollection.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.model.PickupCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.PickupCollection

+
+No usage of com.easypost.model.PickupCollection
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/PickupRate.html b/docs/com/easypost/model/class-use/PickupRate.html new file mode 100644 index 000000000..ca218cbae --- /dev/null +++ b/docs/com/easypost/model/class-use/PickupRate.html @@ -0,0 +1,139 @@ + + + + + +Uses of Class com.easypost.model.PickupRate (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.PickupRate

+
+
Packages that use PickupRate
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/PostageLabel.html b/docs/com/easypost/model/class-use/PostageLabel.html new file mode 100644 index 000000000..b3105b18b --- /dev/null +++ b/docs/com/easypost/model/class-use/PostageLabel.html @@ -0,0 +1,106 @@ + + + + + +Uses of Class com.easypost.model.PostageLabel (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.PostageLabel

+
+
Packages that use PostageLabel
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/PrimaryPaymentMethod.html b/docs/com/easypost/model/class-use/PrimaryPaymentMethod.html new file mode 100644 index 000000000..0f8bd2fcd --- /dev/null +++ b/docs/com/easypost/model/class-use/PrimaryPaymentMethod.html @@ -0,0 +1,97 @@ + + + + + +Uses of Class com.easypost.model.PrimaryPaymentMethod (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.PrimaryPaymentMethod

+
+
Packages that use PrimaryPaymentMethod
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Rate.html b/docs/com/easypost/model/class-use/Rate.html new file mode 100644 index 000000000..a3d69fc3a --- /dev/null +++ b/docs/com/easypost/model/class-use/Rate.html @@ -0,0 +1,237 @@ + + + + + +Uses of Class com.easypost.model.Rate (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Rate

+
+
Packages that use Rate
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/ReferralCustomer.html b/docs/com/easypost/model/class-use/ReferralCustomer.html new file mode 100644 index 000000000..b9db03a8a --- /dev/null +++ b/docs/com/easypost/model/class-use/ReferralCustomer.html @@ -0,0 +1,123 @@ + + + + + +Uses of Class com.easypost.model.ReferralCustomer (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.ReferralCustomer

+
+
Packages that use ReferralCustomer
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/ReferralCustomerCollection.html b/docs/com/easypost/model/class-use/ReferralCustomerCollection.html new file mode 100644 index 000000000..1015f3ae4 --- /dev/null +++ b/docs/com/easypost/model/class-use/ReferralCustomerCollection.html @@ -0,0 +1,101 @@ + + + + + +Uses of Class com.easypost.model.ReferralCustomerCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.ReferralCustomerCollection

+
+
Packages that use ReferralCustomerCollection
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Refund.html b/docs/com/easypost/model/class-use/Refund.html new file mode 100644 index 000000000..feae3e9ad --- /dev/null +++ b/docs/com/easypost/model/class-use/Refund.html @@ -0,0 +1,134 @@ + + + + + +Uses of Class com.easypost.model.Refund (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Refund

+
+
Packages that use Refund
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/RefundCollection.html b/docs/com/easypost/model/class-use/RefundCollection.html new file mode 100644 index 000000000..34294dcff --- /dev/null +++ b/docs/com/easypost/model/class-use/RefundCollection.html @@ -0,0 +1,101 @@ + + + + + +Uses of Class com.easypost.model.RefundCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.RefundCollection

+
+
Packages that use RefundCollection
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Report.html b/docs/com/easypost/model/class-use/Report.html new file mode 100644 index 000000000..000d62182 --- /dev/null +++ b/docs/com/easypost/model/class-use/Report.html @@ -0,0 +1,134 @@ + + + + + +Uses of Class com.easypost.model.Report (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Report

+
+
Packages that use Report
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/ReportCollection.html b/docs/com/easypost/model/class-use/ReportCollection.html new file mode 100644 index 000000000..f90ed3811 --- /dev/null +++ b/docs/com/easypost/model/class-use/ReportCollection.html @@ -0,0 +1,101 @@ + + + + + +Uses of Class com.easypost.model.ReportCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.ReportCollection

+
+
Packages that use ReportCollection
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/ScanForm.html b/docs/com/easypost/model/class-use/ScanForm.html new file mode 100644 index 000000000..455bc7750 --- /dev/null +++ b/docs/com/easypost/model/class-use/ScanForm.html @@ -0,0 +1,160 @@ + + + + + +Uses of Class com.easypost.model.ScanForm (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.ScanForm

+
+
Packages that use ScanForm
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/ScanFormCollection.html b/docs/com/easypost/model/class-use/ScanFormCollection.html new file mode 100644 index 000000000..d79e97485 --- /dev/null +++ b/docs/com/easypost/model/class-use/ScanFormCollection.html @@ -0,0 +1,101 @@ + + + + + +Uses of Class com.easypost.model.ScanFormCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.ScanFormCollection

+
+
Packages that use ScanFormCollection
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/SecondaryPaymentMethod.html b/docs/com/easypost/model/class-use/SecondaryPaymentMethod.html new file mode 100644 index 000000000..6656badea --- /dev/null +++ b/docs/com/easypost/model/class-use/SecondaryPaymentMethod.html @@ -0,0 +1,97 @@ + + + + + +Uses of Class com.easypost.model.SecondaryPaymentMethod (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.SecondaryPaymentMethod

+
+
Packages that use SecondaryPaymentMethod
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Shipment.html b/docs/com/easypost/model/class-use/Shipment.html new file mode 100644 index 000000000..d38a815de --- /dev/null +++ b/docs/com/easypost/model/class-use/Shipment.html @@ -0,0 +1,382 @@ + + + + + +Uses of Class com.easypost.model.Shipment (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Shipment

+
+
Packages that use Shipment
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/ShipmentCollection.html b/docs/com/easypost/model/class-use/ShipmentCollection.html new file mode 100644 index 000000000..a6e7cdfea --- /dev/null +++ b/docs/com/easypost/model/class-use/ShipmentCollection.html @@ -0,0 +1,101 @@ + + + + + +Uses of Class com.easypost.model.ShipmentCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.ShipmentCollection

+
+
Packages that use ShipmentCollection
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/ShipmentMessage.html b/docs/com/easypost/model/class-use/ShipmentMessage.html new file mode 100644 index 000000000..78dc1ab11 --- /dev/null +++ b/docs/com/easypost/model/class-use/ShipmentMessage.html @@ -0,0 +1,126 @@ + + + + + +Uses of Class com.easypost.model.ShipmentMessage (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.ShipmentMessage

+
+
Packages that use ShipmentMessage
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/ShipmentOptions.html b/docs/com/easypost/model/class-use/ShipmentOptions.html new file mode 100644 index 000000000..086aaeb94 --- /dev/null +++ b/docs/com/easypost/model/class-use/ShipmentOptions.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.model.ShipmentOptions (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.ShipmentOptions

+
+No usage of com.easypost.model.ShipmentOptions
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Smartrate.html b/docs/com/easypost/model/class-use/Smartrate.html new file mode 100644 index 000000000..7daca1e8f --- /dev/null +++ b/docs/com/easypost/model/class-use/Smartrate.html @@ -0,0 +1,230 @@ + + + + + +Uses of Class com.easypost.model.Smartrate (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Smartrate

+
+
Packages that use Smartrate
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/SmartrateAccuracy.html b/docs/com/easypost/model/class-use/SmartrateAccuracy.html new file mode 100644 index 000000000..946158255 --- /dev/null +++ b/docs/com/easypost/model/class-use/SmartrateAccuracy.html @@ -0,0 +1,130 @@ + + + + + +Uses of Enum com.easypost.model.SmartrateAccuracy (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum
com.easypost.model.SmartrateAccuracy

+
+
Packages that use SmartrateAccuracy
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/SmartrateCollection.html b/docs/com/easypost/model/class-use/SmartrateCollection.html new file mode 100644 index 000000000..f39d5e15f --- /dev/null +++ b/docs/com/easypost/model/class-use/SmartrateCollection.html @@ -0,0 +1,97 @@ + + + + + +Uses of Class com.easypost.model.SmartrateCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.SmartrateCollection

+
+
Packages that use SmartrateCollection
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/SmartrateCollectionDeserializer.html b/docs/com/easypost/model/class-use/SmartrateCollectionDeserializer.html new file mode 100644 index 000000000..069ac1654 --- /dev/null +++ b/docs/com/easypost/model/class-use/SmartrateCollectionDeserializer.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.model.SmartrateCollectionDeserializer (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.SmartrateCollectionDeserializer

+
+No usage of com.easypost.model.SmartrateCollectionDeserializer
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/TaxIdentifier.html b/docs/com/easypost/model/class-use/TaxIdentifier.html new file mode 100644 index 000000000..1ddd1edfb --- /dev/null +++ b/docs/com/easypost/model/class-use/TaxIdentifier.html @@ -0,0 +1,106 @@ + + + + + +Uses of Class com.easypost.model.TaxIdentifier (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.TaxIdentifier

+
+
Packages that use TaxIdentifier
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/TimeInTransit.html b/docs/com/easypost/model/class-use/TimeInTransit.html new file mode 100644 index 000000000..4e0c38fe2 --- /dev/null +++ b/docs/com/easypost/model/class-use/TimeInTransit.html @@ -0,0 +1,95 @@ + + + + + +Uses of Class com.easypost.model.TimeInTransit (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.TimeInTransit

+
+
Packages that use TimeInTransit
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Tracker.html b/docs/com/easypost/model/class-use/Tracker.html new file mode 100644 index 000000000..a764b99c9 --- /dev/null +++ b/docs/com/easypost/model/class-use/Tracker.html @@ -0,0 +1,160 @@ + + + + + +Uses of Class com.easypost.model.Tracker (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Tracker

+
+
Packages that use Tracker
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/TrackerCollection.html b/docs/com/easypost/model/class-use/TrackerCollection.html new file mode 100644 index 000000000..9a63be255 --- /dev/null +++ b/docs/com/easypost/model/class-use/TrackerCollection.html @@ -0,0 +1,101 @@ + + + + + +Uses of Class com.easypost.model.TrackerCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.TrackerCollection

+
+
Packages that use TrackerCollection
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/TrackingDetail.html b/docs/com/easypost/model/class-use/TrackingDetail.html new file mode 100644 index 000000000..5d20b8db8 --- /dev/null +++ b/docs/com/easypost/model/class-use/TrackingDetail.html @@ -0,0 +1,106 @@ + + + + + +Uses of Class com.easypost.model.TrackingDetail (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.TrackingDetail

+
+
Packages that use TrackingDetail
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/TrackingLocation.html b/docs/com/easypost/model/class-use/TrackingLocation.html new file mode 100644 index 000000000..ee6a69c76 --- /dev/null +++ b/docs/com/easypost/model/class-use/TrackingLocation.html @@ -0,0 +1,106 @@ + + + + + +Uses of Class com.easypost.model.TrackingLocation (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.TrackingLocation

+
+
Packages that use TrackingLocation
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/User.html b/docs/com/easypost/model/class-use/User.html new file mode 100644 index 000000000..a24f05fc5 --- /dev/null +++ b/docs/com/easypost/model/class-use/User.html @@ -0,0 +1,160 @@ + + + + + +Uses of Class com.easypost.model.User (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.User

+
+
Packages that use User
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Utilities.html b/docs/com/easypost/model/class-use/Utilities.html new file mode 100644 index 000000000..4d68bc2e9 --- /dev/null +++ b/docs/com/easypost/model/class-use/Utilities.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.model.Utilities (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Utilities

+
+No usage of com.easypost.model.Utilities
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/Webhook.html b/docs/com/easypost/model/class-use/Webhook.html new file mode 100644 index 000000000..88490f6e4 --- /dev/null +++ b/docs/com/easypost/model/class-use/Webhook.html @@ -0,0 +1,150 @@ + + + + + +Uses of Class com.easypost.model.Webhook (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.Webhook

+
+
Packages that use Webhook
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/class-use/WebhookCollection.html b/docs/com/easypost/model/class-use/WebhookCollection.html new file mode 100644 index 000000000..5e21dc231 --- /dev/null +++ b/docs/com/easypost/model/class-use/WebhookCollection.html @@ -0,0 +1,106 @@ + + + + + +Uses of Class com.easypost.model.WebhookCollection (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.model.WebhookCollection

+
+
Packages that use WebhookCollection
+
+
Package
+
Description
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/package-summary.html b/docs/com/easypost/model/package-summary.html new file mode 100644 index 000000000..4d5cd98db --- /dev/null +++ b/docs/com/easypost/model/package-summary.html @@ -0,0 +1,265 @@ + + + + + +com.easypost.model (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.easypost.model

+
+
+
package com.easypost.model
+
+
Classes for the EasyPost API.
+
+
Since:
+
1.0
+
Version:
+
1.0
+
Author:
+
EasyPost developers
+
See Also:
+
EasyPost API documentation
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/package-tree.html b/docs/com/easypost/model/package-tree.html new file mode 100644 index 000000000..e358df7f7 --- /dev/null +++ b/docs/com/easypost/model/package-tree.html @@ -0,0 +1,185 @@ + + + + + +com.easypost.model Class Hierarchy (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.easypost.model

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Enum Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/model/package-use.html b/docs/com/easypost/model/package-use.html new file mode 100644 index 000000000..2d3b373a9 --- /dev/null +++ b/docs/com/easypost/model/package-use.html @@ -0,0 +1,270 @@ + + + + + +Uses of Package com.easypost.model (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
com.easypost.model

+
+
Packages that use com.easypost.model
+
+
Package
+
Description
+ +
+
Custom exception classes for the EasyPost API.
+
+ +
+
Custom API exception classes for the EasyPost API.
+
+ +
+
Classes for the EasyPost API.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/package-summary.html b/docs/com/easypost/package-summary.html new file mode 100644 index 000000000..908d2cf7b --- /dev/null +++ b/docs/com/easypost/package-summary.html @@ -0,0 +1,96 @@ + + + + + +com.easypost (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.easypost

+
+
+
package com.easypost
+
+
Interact with the EasyPost API in Java.
+
+
Since:
+
1.0
+
Version:
+
1.0
+
Author:
+
EasyPost developers
+
See Also:
+
EasyPost API documentation
+
+
+
+
    +
  • +
    Class Summary
    +
    +
    Class
    +
    Description
    + +
    +
    Hello weary traveler, welcome to the EasyPost Java client library.
    +
    +
    +
  • +
+
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/package-tree.html b/docs/com/easypost/package-tree.html new file mode 100644 index 000000000..12ca90f82 --- /dev/null +++ b/docs/com/easypost/package-tree.html @@ -0,0 +1,80 @@ + + + + + +com.easypost Class Hierarchy (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.easypost

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/package-use.html b/docs/com/easypost/package-use.html new file mode 100644 index 000000000..86c6d720c --- /dev/null +++ b/docs/com/easypost/package-use.html @@ -0,0 +1,66 @@ + + + + + +Uses of Package com.easypost (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
com.easypost

+
+No usage of com.easypost
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/utils/Cryptography.HmacAlgorithm.html b/docs/com/easypost/utils/Cryptography.HmacAlgorithm.html new file mode 100644 index 000000000..bfea67d95 --- /dev/null +++ b/docs/com/easypost/utils/Cryptography.HmacAlgorithm.html @@ -0,0 +1,247 @@ + + + + + +Cryptography.HmacAlgorithm (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Cryptography.HmacAlgorithm

+
+
java.lang.Object +
java.lang.Enum<Cryptography.HmacAlgorithm> +
com.easypost.utils.Cryptography.HmacAlgorithm
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Cryptography.HmacAlgorithm>, java.lang.constant.Constable
+
+
+
Enclosing class:
+
Cryptography
+
+
+
public static enum Cryptography.HmacAlgorithm +extends Enum<Cryptography.HmacAlgorithm>
+
Enums for the supported HMAC algorithms.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Cryptography.HmacAlgorithm[] values()
      +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum type, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Cryptography.HmacAlgorithm valueOf(String name)
      +
      Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum type has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/utils/Cryptography.html b/docs/com/easypost/utils/Cryptography.html new file mode 100644 index 000000000..aeb98ed23 --- /dev/null +++ b/docs/com/easypost/utils/Cryptography.html @@ -0,0 +1,335 @@ + + + + + +Cryptography (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Cryptography

+
+
java.lang.Object +
com.easypost.utils.Cryptography
+
+
+
+
public abstract class Cryptography +extends Object
+
Class for various cryptography utilities.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Cryptography

      +
      public Cryptography()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      hexEncodeToString

      +
      public static String hexEncodeToString(byte @NotNull [] bytes)
      +
      Hex-encode a byte array to a string.
      +
      +
      Parameters:
      +
      bytes - the byte array to hex-encode.
      +
      Returns:
      +
      the hex-encoded byte array string.
      +
      +
      +
    • +
    • +
      +

      hexEncode

      +
      public static char[] hexEncode(byte @NotNull [] bytes)
      +
      Hex-encode a byte array to a char array.
      +
      +
      Parameters:
      +
      bytes - the byte array to hex-encode.
      +
      Returns:
      +
      the hex-encoded byte array char array.
      +
      +
      +
    • +
    • +
      +

      toHMACSHA256HexDigest

      +
      public static String toHMACSHA256HexDigest(byte @NotNull [] data, + @NotNull + @NotNull String key, + @Nullable + Normalizer.Form normalizationForm)
      +
      Calculate the HMAC-SHA256 hex digest of a string.
      +
      +
      Parameters:
      +
      data - Data to calculate hex digest for.
      +
      key - Key to use in HMAC calculation.
      +
      normalizationForm - Normalizer.Form to use when normalizing key. No normalization when null.
      +
      Returns:
      +
      Hex digest of data.
      +
      +
      +
    • +
    • +
      +

      toHMACSHA256HexDigest

      +
      public static String toHMACSHA256HexDigest(@NotNull + @NotNull String data, + @NotNull + @NotNull String key, + @Nullable + Normalizer.Form normalizationForm)
      +
      Calculate the HMAC-SHA256 hex digest of a string.
      +
      +
      Parameters:
      +
      data - Data to calculate hex digest for.
      +
      key - Key to use in HMAC calculation.
      +
      normalizationForm - Normalizer.Form to use when normalizing key. No normalization when null.
      +
      Returns:
      +
      Hex digest of data.
      +
      +
      +
    • +
    • +
      +

      createHMAC

      +
      public static byte[] createHMAC(byte @NotNull [] data, + @NotNull + @NotNull String key, + @NotNull + @NotNull Cryptography.HmacAlgorithm algorithm)
      +
      Calculate the HMAC hex digest of a string.
      +
      +
      Parameters:
      +
      data - Data to calculate hex digest for.
      +
      key - Key to use in HMAC calculation.
      +
      algorithm - Cryptography.HmacAlgorithm to use to calculate HMAC.
      +
      Returns:
      +
      Hex digest of data.
      +
      +
      +
    • +
    • +
      +

      signaturesMatch

      +
      public static boolean signaturesMatch(byte @NotNull [] signature1, + byte @NotNull [] signature2)
      +
      Check whether two signatures match. This is safe against timing attacks.
      +
      +
      Parameters:
      +
      signature1 - First signature to check.
      +
      signature2 - Second signature to check.
      +
      Returns:
      +
      True if signatures match, false otherwise.
      +
      +
      +
    • +
    • +
      +

      signaturesMatch

      +
      public static boolean signaturesMatch(@NotNull + @NotNull String signature1, + @NotNull + @NotNull String signature2)
      +
      Check whether two signatures match. This is safe against timing attacks.
      +
      +
      Parameters:
      +
      signature1 - First signature to check.
      +
      signature2 - Second signature to check.
      +
      Returns:
      +
      True if signatures match, false otherwise.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/utils/class-use/Cryptography.HmacAlgorithm.html b/docs/com/easypost/utils/class-use/Cryptography.HmacAlgorithm.html new file mode 100644 index 000000000..187874736 --- /dev/null +++ b/docs/com/easypost/utils/class-use/Cryptography.HmacAlgorithm.html @@ -0,0 +1,114 @@ + + + + + +Uses of Enum com.easypost.utils.Cryptography.HmacAlgorithm (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum
com.easypost.utils.Cryptography.HmacAlgorithm

+
+
Packages that use Cryptography.HmacAlgorithm
+
+
Package
+
Description
+ +
+
Utility classes for the EasyPost API Java client library.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/utils/class-use/Cryptography.html b/docs/com/easypost/utils/class-use/Cryptography.html new file mode 100644 index 000000000..e66470b1c --- /dev/null +++ b/docs/com/easypost/utils/class-use/Cryptography.html @@ -0,0 +1,66 @@ + + + + + +Uses of Class com.easypost.utils.Cryptography (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
com.easypost.utils.Cryptography

+
+No usage of com.easypost.utils.Cryptography
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/utils/package-summary.html b/docs/com/easypost/utils/package-summary.html new file mode 100644 index 000000000..3b32314be --- /dev/null +++ b/docs/com/easypost/utils/package-summary.html @@ -0,0 +1,107 @@ + + + + + +com.easypost.utils (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Package com.easypost.utils

+
+
+
package com.easypost.utils
+
+
Utility classes for the EasyPost API Java client library.
+
+
Since:
+
1.0
+
Version:
+
1.0
+
Author:
+
EasyPost developers
+
See Also:
+
EasyPost API
+
+
+
+
    +
  • +
    Class Summary
    +
    +
    Class
    +
    Description
    + +
    +
    Class for various cryptography utilities.
    +
    +
    +
  • +
  • +
    Enum Summary
    +
    +
    Enum
    +
    Description
    + +
    +
    Enums for the supported HMAC algorithms.
    +
    +
    +
  • +
+
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/utils/package-tree.html b/docs/com/easypost/utils/package-tree.html new file mode 100644 index 000000000..346aa023b --- /dev/null +++ b/docs/com/easypost/utils/package-tree.html @@ -0,0 +1,94 @@ + + + + + +com.easypost.utils Class Hierarchy (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package com.easypost.utils

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Enum Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/com/easypost/utils/package-use.html b/docs/com/easypost/utils/package-use.html new file mode 100644 index 000000000..5dc3a35bd --- /dev/null +++ b/docs/com/easypost/utils/package-use.html @@ -0,0 +1,92 @@ + + + + + +Uses of Package com.easypost.utils (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
com.easypost.utils

+
+
Packages that use com.easypost.utils
+
+
Package
+
Description
+ +
+
Utility classes for the EasyPost API Java client library.
+
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/constant-values.html b/docs/constant-values.html new file mode 100644 index 000000000..a781e2e8a --- /dev/null +++ b/docs/constant-values.html @@ -0,0 +1,209 @@ + + + + + +Constant Field Values (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Constant Field Values

+
+

Contents

+ +
+
+
+

com.easypost.*

+
    +
  • +
    com.easypost.EasyPost
    +
    +
    Modifier and Type
    +
    Constant Field
    +
    Value
    +
    public static final String
    + +
    "https://api.easypost.com/v2"
    +
    public static final String
    + +
    "https://api.easypost.com/beta"
    +
    public static final String
    + +
    "5.10.0"
    +
    +
  • +
+ + +
+
+
+
+ +
+
+
+ + diff --git a/docs/deprecated-list.html b/docs/deprecated-list.html new file mode 100644 index 000000000..99a61604a --- /dev/null +++ b/docs/deprecated-list.html @@ -0,0 +1,205 @@ + + + + + +Deprecated List (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Deprecated API

+

Contents

+ +
+ + + +
+
+
+ +
+
+
+ + diff --git a/docs/element-list b/docs/element-list new file mode 100644 index 000000000..5fde577ac --- /dev/null +++ b/docs/element-list @@ -0,0 +1,7 @@ +com.easypost +com.easypost.exception +com.easypost.exception.API +com.easypost.exception.General +com.easypost.http +com.easypost.model +com.easypost.utils diff --git a/docs/help-doc.html b/docs/help-doc.html new file mode 100644 index 000000000..bfb43d963 --- /dev/null +++ b/docs/help-doc.html @@ -0,0 +1,171 @@ + + + + + +API Help (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+

Overview

+

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

+
+
+

Package

+

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain six categories:

+
    +
  • Interfaces
  • +
  • Classes
  • +
  • Enums
  • +
  • Exceptions
  • +
  • Errors
  • +
  • Annotation Types
  • +
+
+
+

Class or Interface

+

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

+
    +
  • Class Inheritance Diagram
  • +
  • Direct Subclasses
  • +
  • All Known Subinterfaces
  • +
  • All Known Implementing Classes
  • +
  • Class or Interface Declaration
  • +
  • Class or Interface Description
  • +
+
+
    +
  • Nested Class Summary
  • +
  • Field Summary
  • +
  • Property Summary
  • +
  • Constructor Summary
  • +
  • Method Summary
  • +
+
+
    +
  • Field Details
  • +
  • Property Details
  • +
  • Constructor Details
  • +
  • Method Details
  • +
+

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

+
+
+

Annotation Type

+

Each annotation type has its own separate page with the following sections:

+
    +
  • Annotation Type Declaration
  • +
  • Annotation Type Description
  • +
  • Required Element Summary
  • +
  • Optional Element Summary
  • +
  • Element Details
  • +
+
+
+

Enum

+

Each enum has its own separate page with the following sections:

+
    +
  • Enum Declaration
  • +
  • Enum Description
  • +
  • Enum Constant Summary
  • +
  • Enum Constant Details
  • +
+
+
+

Use

+

Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its "Use" page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

+
+
+

Tree (Class Hierarchy)

+

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

+
    +
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • +
  • When viewing a particular package, class or interface page, clicking on "Tree" displays the hierarchy for only that package.
  • +
+
+
+

Deprecated API

+

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to shortcomings, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

+
+
+

Index

+

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields, as well as lists of all packages and all classes.

+
+
+

Serialized Form

+

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.

+
+
+

Constant Field Values

+

The Constant Field Values page lists the static final fields and their values.

+
+
+

Search

+

You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camel-case" abbreviations. For example:

+
    +
  • j.l.obj will match "java.lang.Object"
  • +
  • InpStr will match "java.io.InputStream"
  • +
  • HM.cK will match "java.util.HashMap.containsKey(Object)"
  • +
+

Refer to the Javadoc Search Specification for a full description of search features.

+
+
+This help file applies to API documentation generated by the standard doclet.
+
+
+ +
+
+
+ + diff --git a/docs/index-all.html b/docs/index-all.html new file mode 100644 index 000000000..cbe4195a8 --- /dev/null +++ b/docs/index-all.html @@ -0,0 +1,4908 @@ + + + + + +Index (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+A B C D E F G H I L M N O P R S T U V W _ 
All Classes|All Packages|Constant Field Values|Deprecated API|Serialized Form +

A

+
+
addCreditCardToUser(String, String, int, int, String) - Static method in class com.easypost.model.ReferralCustomer
+
+
Add credit card to a referral user.
+
+
addCreditCardToUser(String, String, int, int, String, PaymentMethod.Priority) - Static method in class com.easypost.model.ReferralCustomer
+
+
Add credit card to a referral user.
+
+
addRate(Smartrate) - Method in class com.easypost.model.SmartrateCollection
+
+
Add a SmartRate object to this SmartrateCollection.
+
+
Address - Class in com.easypost.model
+
 
+
Address() - Constructor for class com.easypost.model.Address
+
 
+
AddressCollection - Class in com.easypost.model
+
 
+
AddressCollection() - Constructor for class com.easypost.model.AddressCollection
+
 
+
AddressDetail - Class in com.easypost.model
+
 
+
AddressDetail() - Constructor for class com.easypost.model.AddressDetail
+
 
+
AddressVerification - Class in com.easypost.model
+
 
+
AddressVerification() - Constructor for class com.easypost.model.AddressVerification
+
 
+
AddressVerifications - Class in com.easypost.model
+
 
+
AddressVerifications() - Constructor for class com.easypost.model.AddressVerifications
+
 
+
AddressVerifyResponse - Class in com.easypost.model
+
 
+
AddressVerifyResponse() - Constructor for class com.easypost.model.AddressVerifyResponse
+
 
+
addShipments(List<Shipment>) - Method in class com.easypost.model.Batch
+
+
Add shipments to this Batch object.
+
+
addShipments(List<Shipment>, String) - Method in class com.easypost.model.Batch
+
+
Add shipments to this Batch object.
+
+
addShipments(Map<String, Object>) - Method in class com.easypost.model.Batch
+
+
Add shipments to this Batch object.
+
+
addShipments(Map<String, Object>, String) - Method in class com.easypost.model.Batch
+
+
Add shipments to this Batch object.
+
+
all() - Static method in class com.easypost.model.ApiKeys
+
+
Get all API keys.
+
+
all() - Static method in class com.easypost.model.CarrierAccount
+
+
List all carrier accounts.
+
+
all() - Static method in class com.easypost.model.CarrierType
+
+
Retrieve a list of available carriers for the account.
+
+
all() - Static method in class com.easypost.model.PaymentMethod
+
+
Deprecated. +
Use Billing.retrievePaymentMethods() instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
all() - Static method in class com.easypost.model.Webhook
+
+
Get a list of all Webhook objects.
+
+
all(String) - Static method in class com.easypost.model.ApiKeys
+
+
Get all API keys.
+
+
all(String) - Static method in class com.easypost.model.CarrierType
+
+
Retrieve a list of available carriers for the given account.
+
+
all(String) - Static method in class com.easypost.model.PaymentMethod
+
+
Deprecated. +
Use Billing.retrievePaymentMethods() instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
all(Map<String, Object>) - Static method in class com.easypost.model.Address
+
+
List all Address objects.
+
+
all(Map<String, Object>) - Static method in class com.easypost.model.Batch
+
+
List all Batch objects.
+
+
all(Map<String, Object>) - Static method in class com.easypost.model.CarrierAccount
+
+
List all carrier accounts.
+
+
all(Map<String, Object>) - Static method in class com.easypost.model.EndShipper
+
+
List all EndShipper objects.
+
+
all(Map<String, Object>) - Static method in class com.easypost.model.Event
+
+
Get a list of Events.
+
+
all(Map<String, Object>) - Static method in class com.easypost.model.Insurance
+
+
Get a list of Insurances.
+
+
all(Map<String, Object>) - Static method in class com.easypost.model.ReferralCustomer
+
+
List all Referral objects.
+
+
all(Map<String, Object>) - Static method in class com.easypost.model.Refund
+
+
List all Refunds objects.
+
+
all(Map<String, Object>) - Static method in class com.easypost.model.Report
+
+
Get a list of Reports from the API.
+
+
all(Map<String, Object>) - Static method in class com.easypost.model.ScanForm
+
+
Get a list of ScanForms from the API.
+
+
all(Map<String, Object>) - Static method in class com.easypost.model.Shipment
+
+
Get a list of all Shipment objects.
+
+
all(Map<String, Object>) - Static method in class com.easypost.model.Tracker
+
+
Get a list of all Tracker objects.
+
+
all(Map<String, Object>) - Static method in class com.easypost.model.Webhook
+
+
Get a list of all Webhook objects.
+
+
all(Map<String, Object>, String) - Static method in class com.easypost.model.Address
+
+
List all Address objects.
+
+
all(Map<String, Object>, String) - Static method in class com.easypost.model.Batch
+
+
List all Batch objects.
+
+
all(Map<String, Object>, String) - Static method in class com.easypost.model.CarrierAccount
+
+
List all carrier accounts.
+
+
all(Map<String, Object>, String) - Static method in class com.easypost.model.EndShipper
+
+
List all EndShipper objects.
+
+
all(Map<String, Object>, String) - Static method in class com.easypost.model.Event
+
+
Get a list of Events.
+
+
all(Map<String, Object>, String) - Static method in class com.easypost.model.Insurance
+
+
Get a list of Insurances.
+
+
all(Map<String, Object>, String) - Static method in class com.easypost.model.ReferralCustomer
+
+
List all Referral objects.
+
+
all(Map<String, Object>, String) - Static method in class com.easypost.model.Refund
+
+
List all Refunds objects.
+
+
all(Map<String, Object>, String) - Static method in class com.easypost.model.Report
+
+
Get a list of Reports from the API.
+
+
all(Map<String, Object>, String) - Static method in class com.easypost.model.ScanForm
+
+
Get a list of ScanForms from the API.
+
+
all(Map<String, Object>, String) - Static method in class com.easypost.model.Shipment
+
+
Get a list of all Shipment objects.
+
+
all(Map<String, Object>, String) - Static method in class com.easypost.model.Tracker
+
+
Get a list of all Tracker objects.
+
+
all(Map<String, Object>, String) - Static method in class com.easypost.model.Webhook
+
+
Get a list of all Webhook objects.
+
+
API_BASE - Static variable in class com.easypost.EasyPost
+
 
+
API_DID_NOT_RETURN_ERROR_DETAILS - Static variable in class com.easypost.exception.Constants
+
 
+
apiKey - Static variable in class com.easypost.EasyPost
+
 
+
ApiKey - Class in com.easypost.model
+
 
+
ApiKey() - Constructor for class com.easypost.model.ApiKey
+
 
+
apiKeys() - Method in class com.easypost.model.User
+
+
Get this User's API keys.
+
+
ApiKeys - Class in com.easypost.model
+
 
+
ApiKeys() - Constructor for class com.easypost.model.ApiKeys
+
 
+
+

B

+
+
BANK_ACCOUNT - Enum constant in enum com.easypost.model.PaymentMethodObject.PaymentMethodType
+
 
+
BaseAddress - Class in com.easypost.model
+
 
+
BaseAddress() - Constructor for class com.easypost.model.BaseAddress
+
 
+
BaseCreditCard - Class in com.easypost.model
+
+
Deprecated. +
Use PaymentMethodObject instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
BaseCreditCard() - Constructor for class com.easypost.model.BaseCreditCard
+
+
Deprecated.
+
BaseUser - Class in com.easypost.model
+
 
+
BaseUser() - Constructor for class com.easypost.model.BaseUser
+
 
+
Batch - Class in com.easypost.model
+
 
+
Batch() - Constructor for class com.easypost.model.Batch
+
 
+
BatchCollection - Class in com.easypost.model
+
 
+
BatchCollection() - Constructor for class com.easypost.model.BatchCollection
+
 
+
BatchStatus - Class in com.easypost.model
+
 
+
BatchStatus() - Constructor for class com.easypost.model.BatchStatus
+
 
+
BETA_API_BASE - Static variable in class com.easypost.EasyPost
+
 
+
Billing - Class in com.easypost.model
+
 
+
Billing() - Constructor for class com.easypost.model.Billing
+
 
+
Brand - Class in com.easypost.model
+
 
+
Brand() - Constructor for class com.easypost.model.Brand
+
 
+
buy() - Method in class com.easypost.model.Batch
+
+
Buy this batch.
+
+
buy() - Method in class com.easypost.model.Pickup
+
+
Buy this Pickup.
+
+
buy(PickupRate) - Method in class com.easypost.model.Pickup
+
+
Buy this Pickup.
+
+
buy(Rate) - Method in class com.easypost.model.Order
+
+
Buy this Order.
+
+
buy(Rate) - Method in class com.easypost.model.Shipment
+
+
Buy this Shipment.
+
+
buy(Rate, boolean) - Method in class com.easypost.model.Shipment
+
+
Buy this Shipment.
+
+
buy(Rate, boolean, String, String) - Method in class com.easypost.model.Shipment
+
+
Buy this Shipment.
+
+
buy(Rate, String) - Method in class com.easypost.model.Shipment
+
+
Buy this Shipment.
+
+
buy(String) - Method in class com.easypost.model.Pickup
+
+
Buy this Pickup.
+
+
buy(Map<String, Object>) - Method in class com.easypost.model.Batch
+
+
Buy this batch.
+
+
buy(Map<String, Object>) - Method in class com.easypost.model.Order
+
+
Buy this Order.
+
+
buy(Map<String, Object>) - Method in class com.easypost.model.Pickup
+
+
Buy this Pickup.
+
+
buy(Map<String, Object>) - Method in class com.easypost.model.Shipment
+
+
Buy this Shipment.
+
+
buy(Map<String, Object>, boolean) - Method in class com.easypost.model.Shipment
+
+
Buy this Shipment.
+
+
buy(Map<String, Object>, boolean, String) - Method in class com.easypost.model.Shipment
+
+
Buy this Shipment.
+
+
buy(Map<String, Object>, boolean, String, String) - Method in class com.easypost.model.Shipment
+
+
Buy this Shipment.
+
+
buy(Map<String, Object>, String) - Method in class com.easypost.model.Batch
+
+
Buy this batch.
+
+
buy(Map<String, Object>, String) - Method in class com.easypost.model.Order
+
+
Buy this Order.
+
+
buy(Map<String, Object>, String) - Method in class com.easypost.model.Pickup
+
+
Buy this Pickup.
+
+
buy(Map<String, Object>, String) - Method in class com.easypost.model.Shipment
+
+
Buy this Shipment.
+
+
buy(Map<String, Object>, String, String) - Method in class com.easypost.model.Shipment
+
+
Buy this Shipment.
+
+
+

C

+
+
cancel() - Method in class com.easypost.model.Pickup
+
+
Cancel this Pickup.
+
+
cancel(String) - Method in class com.easypost.model.Pickup
+
+
Cancel this Pickup.
+
+
cancel(Map<String, Object>) - Method in class com.easypost.model.Pickup
+
+
Cancel this Pickup.
+
+
cancel(Map<String, Object>, String) - Method in class com.easypost.model.Pickup
+
+
Cancel this Pickup.
+
+
CarbonOffset - Class in com.easypost.model
+
 
+
CarbonOffset() - Constructor for class com.easypost.model.CarbonOffset
+
 
+
CarrierAccount - Class in com.easypost.model
+
 
+
CarrierAccount() - Constructor for class com.easypost.model.CarrierAccount
+
 
+
CarrierDetail - Class in com.easypost.model
+
 
+
CarrierDetail() - Constructor for class com.easypost.model.CarrierDetail
+
 
+
CarrierType - Class in com.easypost.model
+
 
+
CarrierType() - Constructor for class com.easypost.model.CarrierType
+
 
+
CHARSET - Static variable in class com.easypost.http.Constant
+
 
+
classURL(Class<?>) - Static method in class com.easypost.model.EasyPostResource
+
 
+
com.easypost - package com.easypost
+
+
Interact with the EasyPost API in Java.
+
+
com.easypost.exception - package com.easypost.exception
+
+
Custom exception classes for the EasyPost API.
+
+
com.easypost.exception.API - package com.easypost.exception.API
+
+
Custom API exception classes for the EasyPost API.
+
+
com.easypost.exception.General - package com.easypost.exception.General
+
+
Custom general exception classes for the EasyPost API.
+
+
com.easypost.http - package com.easypost.http
+
+
Classes for handling requests and responses to the EasyPost API.
+
+
com.easypost.model - package com.easypost.model
+
+
Classes for the EasyPost API.
+
+
com.easypost.utils - package com.easypost.utils
+
+
Utility classes for the EasyPost API Java client library.
+
+
Constant - Class in com.easypost.http
+
 
+
Constant() - Constructor for class com.easypost.http.Constant
+
 
+
Constants - Class in com.easypost.exception
+
 
+
Constants() - Constructor for class com.easypost.exception.Constants
+
 
+
Constants.ErrorCode - Class in com.easypost.exception
+
 
+
create() - Static method in class com.easypost.model.Batch
+
+
Create a Batch object.
+
+
create() - Static method in class com.easypost.model.User
+
+
Create a User object with a map of parameters.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.Address
+
+
Create Address object from parameter map.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.Batch
+
+
Create a Batch object.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.CarrierAccount
+
+
Create a carrier account.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.CustomsInfo
+
+
Create a CustomsInfo from a map of parameters.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.CustomsItem
+
+
Create a CustomsItem from a map of parameters.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.EndShipper
+
+
Create EndShipper object from parameter map.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.Insurance
+
+
Create a new Insurance object from a map of parameters.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.Order
+
+
Create an Order object from a map of paramters.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.Parcel
+
+
Create a Parcel from a map of parameters.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.Pickup
+
+
Create a new Pickup object from a map of parameters.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.ReferralCustomer
+
+
Create a Referral object from parameter map.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.Refund
+
+
Create a Refund object from a map of parameters.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.Report
+
+
Create a Report from a map of parameters.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.ScanForm
+
+
Create a ScanForm from a map of parameters.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.Shipment
+
+
Create a new Shipment object from a map of parameters.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.Tracker
+
+
Create a new Tracker object using a map of parameters.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.User
+
+
Create a User object with a map of parameters.
+
+
create(Map<String, Object>) - Static method in class com.easypost.model.Webhook
+
+
Create a Webhook object from a map of parameters.
+
+
create(Map<String, Object>, boolean) - Static method in class com.easypost.model.Shipment
+
+
Create a new Shipment object from a map of parameters.
+
+
create(Map<String, Object>, boolean, String) - Static method in class com.easypost.model.Shipment
+
+
Create a new Shipment object from a map of parameters.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.Address
+
+
Create Address object from parameter map.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.Batch
+
+
Create a Batch object.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.CarrierAccount
+
+
Create a carrier account.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.CustomsInfo
+
+
Create a CustomsInfo from a map of parameters.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.CustomsItem
+
+
Create a CustomsItem from a map of parameters.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.EndShipper
+
+
Create EndShipper object from parameter map.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.Insurance
+
+
Create a new Insurance object from a map of parameters.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.Order
+
+
Create an Order object from a map of paramters.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.Parcel
+
+
Create a Parcel from a map of parameters.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.Pickup
+
+
Create a new Pickup object from a map of parameters.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.ReferralCustomer
+
+
Create a Referral Customer object from parameter map.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.Refund
+
+
Create a Refund object from a map of parameters.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.Report
+
+
Create a Report from a map of parameters.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.ScanForm
+
+
Create a ScanForm from a map of parameters.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.Shipment
+
+
Create a new Shipment object from a map of parameters.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.Tracker
+
+
Create a new Tracker object using a map of parameters.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.User
+
+
Create a User object with a map of parameters.
+
+
create(Map<String, Object>, String) - Static method in class com.easypost.model.Webhook
+
+
Create a Webhook object from a map of parameters.
+
+
createAndBuy(Map<String, Object>) - Static method in class com.easypost.model.Batch
+
+
Create and buy a Batch object in one step.
+
+
createAndBuy(Map<String, Object>, String) - Static method in class com.easypost.model.Batch
+
+
Create and buy a Batch object in one step.
+
+
createAndVerify(Map<String, Object>) - Static method in class com.easypost.model.Address
+
+
Create Address object from parameter map and immediately verify it.
+
+
createAndVerify(Map<String, Object>, String) - Static method in class com.easypost.model.Address
+
+
Create Address object from parameter map and immediately verify it.
+
+
createHMAC(byte[], String, Cryptography.HmacAlgorithm) - Static method in class com.easypost.utils.Cryptography
+
+
Calculate the HMAC hex digest of a string.
+
+
createList(Map<String, Object>) - Static method in class com.easypost.model.Tracker
+
+
Create a list of Trackers.
+
+
createList(Map<String, Object>, String) - Static method in class com.easypost.model.Tracker
+
+
Create a list of Trackers.
+
+
createScanForm() - Method in class com.easypost.model.Batch
+
+
Create a scan form for this batch.
+
+
createScanForm(Map<String, Object>) - Method in class com.easypost.model.Batch
+
+
Create a scan form for this batch.
+
+
createScanForm(Map<String, Object>, String) - Method in class com.easypost.model.Batch
+
+
Create a scan form for this batch.
+
+
CREDIT_CARD - Enum constant in enum com.easypost.model.PaymentMethodObject.PaymentMethodType
+
 
+
CreditCard - Class in com.easypost.model
+
+
Deprecated. +
Use PaymentMethodObject instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
CreditCard() - Constructor for class com.easypost.model.CreditCard
+
+
Deprecated.
+
CreditCardPriority - Enum in com.easypost.model
+
+
Deprecated. +
Use PaymentMethod.Priority instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
Cryptography - Class in com.easypost.utils
+
+
Class for various cryptography utilities.
+
+
Cryptography() - Constructor for class com.easypost.utils.Cryptography
+
 
+
Cryptography.HmacAlgorithm - Enum in com.easypost.utils
+
+
Enums for the supported HMAC algorithms.
+
+
CustomsInfo - Class in com.easypost.model
+
 
+
CustomsInfo() - Constructor for class com.easypost.model.CustomsInfo
+
 
+
CustomsItem - Class in com.easypost.model
+
 
+
CustomsItem() - Constructor for class com.easypost.model.CustomsItem
+
 
+
+

D

+
+
DEFAULT_APP_ENGINE_TIMEOUT_SECONDS - Static variable in class com.easypost.http.Constant
+
 
+
DEFAULT_CONNECT_TIMEOUT_MILLISECONDS - Static variable in class com.easypost.http.Constant
+
 
+
DEFAULT_READ_TIMEOUT_MILLISECONDS - Static variable in class com.easypost.http.Constant
+
 
+
delete() - Method in class com.easypost.model.CarrierAccount
+
+
Delete this carrier account.
+
+
delete() - Method in class com.easypost.model.User
+
+
Delete this User.
+
+
delete() - Method in class com.easypost.model.Webhook
+
+
Delete this Webhook.
+
+
delete(String) - Method in class com.easypost.model.CarrierAccount
+
+
Delete this carrier account.
+
+
delete(String) - Static method in class com.easypost.model.CreditCard
+
+
Deprecated. +
Use Billing.deletePaymentMethod(PaymentMethod.Priority) instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
delete(String) - Method in class com.easypost.model.User
+
+
Delete this User.
+
+
delete(String) - Method in class com.easypost.model.Webhook
+
+
Delete this Webhook.
+
+
delete(String, String) - Static method in class com.easypost.model.CreditCard
+
+
Deprecated. +
Use Billing.deletePaymentMethod(PaymentMethod.Priority, String) instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
DELETE - Enum constant in enum com.easypost.http.Requestor.RequestMethod
+
 
+
deletePaymentMethod(PaymentMethod.Priority) - Static method in class com.easypost.model.Billing
+
+
Delete a payment method.
+
+
deletePaymentMethod(PaymentMethod.Priority, String) - Static method in class com.easypost.model.Billing
+
+
Delete a payment method.
+
+
deserialize(JsonElement, Type, JsonDeserializationContext) - Method in class com.easypost.model.ErrorDeserializer
+
+
Deserialize an Error from a JSON object.
+
+
deserialize(JsonElement, Type, JsonDeserializationContext) - Method in class com.easypost.model.SmartrateCollectionDeserializer
+
+
Deserialize a SmartrateCollection from a JSON object.
+
+
+

E

+
+
EasyPost - Class in com.easypost
+
+
Hello weary traveler, welcome to the EasyPost Java client library.
+
+
EasyPost() - Constructor for class com.easypost.EasyPost
+
 
+
EASYPOST_SUPPORT_EMAIL - Static variable in class com.easypost.http.Constant
+
 
+
EasyPostException - Exception in com.easypost.exception
+
 
+
EasyPostException(String) - Constructor for exception com.easypost.exception.EasyPostException
+
+
EasyPostException constructor.
+
+
EasyPostException(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.EasyPostException
+
+
EasyPostException constructor.
+
+
EasyPostException(String, String, Integer, List<Error>, Throwable) - Constructor for exception com.easypost.exception.EasyPostException
+
+
EasyPostException constructor.
+
+
EasyPostException(String, Throwable) - Constructor for exception com.easypost.exception.EasyPostException
+
+
EasyPostException constructor.
+
+
EasyPostResource - Class in com.easypost.model
+
 
+
EasyPostResource() - Constructor for class com.easypost.model.EasyPostResource
+
 
+
EasyPostResponse - Class in com.easypost.http
+
 
+
EasyPostResponse(int, String) - Constructor for class com.easypost.http.EasyPostResponse
+
+
Constructor.
+
+
ENCODED_ERROR - Static variable in class com.easypost.exception.Constants
+
 
+
EndShipper - Class in com.easypost.model
+
 
+
EndShipper() - Constructor for class com.easypost.model.EndShipper
+
 
+
EndShipperCollection - Class in com.easypost.model
+
 
+
EndShipperCollection() - Constructor for class com.easypost.model.EndShipperCollection
+
 
+
equals(Object) - Method in class com.easypost.model.EasyPostResource
+
+
Override the equals method, convert objects to Json strings for comparsion.
+
+
Error - Class in com.easypost.model
+
 
+
Error() - Constructor for class com.easypost.model.Error
+
 
+
ErrorCode() - Constructor for class com.easypost.exception.Constants.ErrorCode
+
 
+
ErrorDeserializer - Class in com.easypost.model
+
 
+
ErrorDeserializer() - Constructor for class com.easypost.model.ErrorDeserializer
+
 
+
Event - Class in com.easypost.model
+
 
+
Event() - Constructor for class com.easypost.model.Event
+
 
+
EventCollection - Class in com.easypost.model
+
 
+
EventCollection() - Constructor for class com.easypost.model.EventCollection
+
 
+
EventData - Class in com.easypost.model
+
 
+
EventData() - Constructor for class com.easypost.model.EventData
+
 
+
EXTERNAL_API_CALL_FAILED - Static variable in class com.easypost.exception.Constants
+
 
+
ExternalApiError - Exception in com.easypost.exception.General
+
 
+
ExternalApiError(String) - Constructor for exception com.easypost.exception.General.ExternalApiError
+
+
ExternalApiError constructor.
+
+
+

F

+
+
Fee - Class in com.easypost.model
+
 
+
Fee() - Constructor for class com.easypost.model.Fee
+
 
+
Field - Class in com.easypost.model
+
 
+
Field() - Constructor for class com.easypost.model.Field
+
 
+
Fields - Class in com.easypost.model
+
 
+
Fields() - Constructor for class com.easypost.model.Fields
+
 
+
FilteringError - Exception in com.easypost.exception.General
+
 
+
FilteringError(String) - Constructor for exception com.easypost.exception.General.FilteringError
+
+
FilteringError constructor.
+
+
findLowestSmartrate(List<Smartrate>, int, SmartrateAccuracy) - Static method in class com.easypost.model.Shipment
+
+
Find the lowest Smartrate from a list of Smartrates.
+
+
FORBIDDEN_ERROR - Static variable in class com.easypost.exception.Constants.ErrorCode
+
 
+
ForbiddenError - Exception in com.easypost.exception.API
+
 
+
ForbiddenError(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.API.ForbiddenError
+
+
ForbiddenError constructor.
+
+
Form - Class in com.easypost.model
+
 
+
Form() - Constructor for class com.easypost.model.Form
+
 
+
fund(String, CreditCardPriority) - Static method in class com.easypost.model.CreditCard
+
+
Deprecated. +
Use Billing.fundWallet(String, PaymentMethod.Priority) instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
fund(String, CreditCardPriority, String) - Static method in class com.easypost.model.CreditCard
+
+
Deprecated. +
Use Billing.fundWallet(String, PaymentMethod.Priority, String) instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
fundWallet(String) - Static method in class com.easypost.model.Billing
+
+
Fund your wallet from the primary payment method.
+
+
fundWallet(String, PaymentMethod.Priority) - Static method in class com.easypost.model.Billing
+
+
Fund your wallet from a specific payment method.
+
+
fundWallet(String, PaymentMethod.Priority, String) - Static method in class com.easypost.model.Billing
+
+
Fund your wallet from a specific payment method.
+
+
+

G

+
+
GATEWAY_TIMEOUT_ERROR - Static variable in class com.easypost.exception.Constants.ErrorCode
+
 
+
GatewayTimeoutError - Exception in com.easypost.exception.API
+
 
+
GatewayTimeoutError(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.API.GatewayTimeoutError
+
+
GatewayTimeoutError constructor.
+
+
generateForm(String) - Method in class com.easypost.model.Shipment
+
+
Generate a form for this shipment.
+
+
generateForm(String, String) - Method in class com.easypost.model.Shipment
+
+
Generate a form for this shipment.
+
+
generateForm(String, Map<String, Object>) - Method in class com.easypost.model.Shipment
+
+
Generate a form for this shipment.
+
+
generateForm(String, Map<String, Object>, String) - Method in class com.easypost.model.Shipment
+
+
Generate a form for this shipment.
+
+
GET - Enum constant in enum com.easypost.http.Requestor.RequestMethod
+
 
+
getAd() - Method in class com.easypost.model.Brand
+
+
Get the ad of the Brand.
+
+
getAddress() - Method in class com.easypost.model.AddressVerifyResponse
+
+
Get the Address object.
+
+
getAddress() - Method in class com.easypost.model.Pickup
+
+
Get the address of this Pickup.
+
+
getAddressDetail() - Method in class com.easypost.model.AddressVerification
+
+
Get the address detail object.
+
+
getAddresses() - Method in class com.easypost.model.AddressCollection
+
+
Get a list of addresses.
+
+
getAdHref() - Method in class com.easypost.model.Brand
+
+
Get the ad href of the Brand.
+
+
getAlternateIdentifier() - Method in class com.easypost.model.CarrierDetail
+
+
Get alternate identifier.
+
+
getAmount() - Method in class com.easypost.model.Fee
+
+
Get Fee amount.
+
+
getAmount() - Method in class com.easypost.model.Insurance
+
+
Get the amount of this Insurance.
+
+
getApiKeys() - Method in class com.easypost.model.ReferralCustomer
+
+
Get the api keys of the Referral user.
+
+
getAppEngineTimeoutSeconds() - Static method in class com.easypost.http.Requestor
+
+
Get the timeout in milliseconds for App Engine API requests.
+
+
getBackgroundColor() - Method in class com.easypost.model.Brand
+
+
Get the background of the Brand.
+
+
getBalance() - Method in class com.easypost.model.BaseUser
+
+
Get the balance of the User.
+
+
getBankName() - Method in class com.easypost.model.PaymentMethodObject
+
+
Get the bank name of this PaymentMethodObject object.
+
+
getBatches() - Method in class com.easypost.model.BatchCollection
+
+
Get a list of batches.
+
+
getBatchId() - Method in class com.easypost.model.ScanForm
+
+
Get the batch ID of the ScanForm.
+
+
getBatchId() - Method in class com.easypost.model.Shipment
+
+
Get the batch ID of this Shipment.
+
+
getBatchMessage() - Method in class com.easypost.model.Shipment
+
+
Get the batch message of this Shipment.
+
+
getBatchStatus() - Method in class com.easypost.model.Batch
+
+
Get status of this batch.
+
+
getBatchStatus() - Method in class com.easypost.model.Shipment
+
+
Get the batch status of this Shipment.
+
+
getBillingType() - Method in class com.easypost.model.CarrierAccount
+
+
Get billing type of the carrier account.
+
+
getBillingType() - Method in class com.easypost.model.Rate
+
+
Get billing type of this rate.
+
+
getBrand() - Method in class com.easypost.model.BaseCreditCard
+
+
Deprecated.
+
Get the brand of this CreditCard object.
+
+
getBrand() - Method in class com.easypost.model.PaymentMethodObject
+
+
Get the brand of this PaymentMethodObject object.
+
+
getBuyerAddress() - Method in class com.easypost.model.Order
+
+
Get the buyer address of the Order.
+
+
getBuyerAddress() - Method in class com.easypost.model.Shipment
+
+
Get the buyer address of this Shipment.
+
+
getByKeyName(String) - Static method in enum com.easypost.model.SmartrateAccuracy
+
+
Get the enum value for a given internal key name.
+
+
getBySmartrateAccuracy(SmartrateAccuracy) - Method in class com.easypost.model.TimeInTransit
+
+
Get the delivery accuracy of a specific percentile of this TimeInTransit.
+
+
getCarbonOffset() - Method in class com.easypost.model.Rate
+
+
Get the carbon offset of this Rate.
+
+
getCarrier() - Method in class com.easypost.model.Rate
+
+
Get the carrier of this Rate.
+
+
getCarrier() - Method in class com.easypost.model.Refund
+
+
Get refund carrier.
+
+
getCarrier() - Method in class com.easypost.model.ShipmentMessage
+
+
Get the carrier associated with this message.
+
+
getCarrier() - Method in class com.easypost.model.Tracker
+
+
Get the carrier of the Tracker.
+
+
getCarrierAccountId() - Method in class com.easypost.model.Rate
+
+
Get the ID of the carrier account of this Rate.
+
+
getCarrierAccountId() - Method in class com.easypost.model.ShipmentMessage
+
+
Get the carrier account id associated with this message.
+
+
getCarrierAccounts() - Method in class com.easypost.model.Order
+
+
Get the list of carrier accounts of the Order.
+
+
getCarrierAccounts() - Method in class com.easypost.model.Pickup
+
+
Get the carrier accounts of this Pickup.
+
+
getCarrierAccounts() - Method in class com.easypost.model.Shipment
+
+
Get the carrier accounts of this shipment.
+
+
getCarrierDetail() - Method in class com.easypost.model.Tracker
+
+
Get details about the carrier associated with the Tracker.
+
+
getCarrierFacility() - Method in class com.easypost.model.Address
+
+
Get carrier facility for address.
+
+
getCcFeeRate() - Method in class com.easypost.model.BaseUser
+
+
Get the cc fee rate of the User.
+
+
getCharged() - Method in class com.easypost.model.Fee
+
+
Get whether the fee is charged.
+
+
getChildren() - Method in class com.easypost.model.ApiKeys
+
+
Get a list of API keys for a given parent key.
+
+
getChildren() - Method in class com.easypost.model.BaseUser
+
+
Get the children of the User.
+
+
getCity() - Method in class com.easypost.model.BaseAddress
+
+
Get city of address.
+
+
getCity() - Method in class com.easypost.model.TrackingLocation
+
+
Get the city of the tracking location.
+
+
getCode() - Method in exception com.easypost.exception.EasyPostException
+
+
Get code of the error object.
+
+
getCode() - Method in class com.easypost.model.CustomsItem
+
+
Get this CustomsItem's code.
+
+
getCode() - Method in class com.easypost.model.Error
+
+
Get the error code.
+
+
getColor() - Method in class com.easypost.model.Brand
+
+
Get the color of the Brand.
+
+
getCompany() - Method in class com.easypost.model.BaseAddress
+
+
Get company of Address.
+
+
getCompletedUrls() - Method in class com.easypost.model.Event
+
+
Get the completedUrls of this Event.
+
+
getConfirmation() - Method in class com.easypost.model.Pickup
+
+
Get the confirmation of this Pickup.
+
+
getConfirmation() - Method in class com.easypost.model.ScanForm
+
+
Get the confirmation of the ScanForm.
+
+
getConfirmationNumber() - Method in class com.easypost.model.Refund
+
+
Get refund confirmation number.
+
+
getConnectTimeoutMilliseconds() - Static method in class com.easypost.http.Requestor
+
+
Get the timeout in milliseconds for connecting to the API.
+
+
getContainerType() - Method in class com.easypost.model.CarrierDetail
+
+
Get carrier container type.
+
+
getContentsExplanation() - Method in class com.easypost.model.CustomsInfo
+
+
Get an explanation of this CustomsInfo's contents.
+
+
getContentsType() - Method in class com.easypost.model.CustomsInfo
+
+
Get this CustomsInfo's contents type.
+
+
getCountry() - Method in class com.easypost.model.BaseAddress
+
+
Get country of Address.
+
+
getCountry() - Method in class com.easypost.model.PaymentMethodObject
+
+
Get the country of this PaymentMethodObject object.
+
+
getCountry() - Method in class com.easypost.model.TrackingLocation
+
+
Get the country of the tracking location.
+
+
getCreated() - Method in class com.easypost.model.BatchStatus
+
+
Get the number of batches created.
+
+
getCreatedAt() - Method in class com.easypost.model.EasyPostResource
+
 
+
getCreationFailed() - Method in class com.easypost.model.BatchStatus
+
+
Get the number of batches that failed to be created.
+
+
getCredentials() - Method in class com.easypost.model.CarrierAccount
+
+
Get credentials of the carrier account.
+
+
getCredentials() - Method in class com.easypost.model.Fields
+
+
Get the credentials for this Fields object.
+
+
getCurrency() - Method in class com.easypost.model.CarbonOffset
+
+
Get the currency of the provided price.
+
+
getCurrency() - Method in class com.easypost.model.CustomsItem
+
+
Get this CustomsItem's currency.
+
+
getCurrency() - Method in class com.easypost.model.Rate
+
+
Get the currency of this Rate.
+
+
getCustomsCertify() - Method in class com.easypost.model.CustomsInfo
+
+
Get whether this CustomsInfo is certified by customs.
+
+
getCustomsInfo() - Method in class com.easypost.model.Order
+
+
Get the customs info of the Order.
+
+
getCustomsInfo() - Method in class com.easypost.model.Shipment
+
+
Get the customs info of this Shipment.
+
+
getCustomsItems() - Method in class com.easypost.model.CustomsInfo
+
+
Get this CustomsInfo's customs items.
+
+
getCustomsSigner() - Method in class com.easypost.model.CustomsInfo
+
+
Get this CustomsInfo's signer.
+
+
getDateAdvance() - Method in class com.easypost.model.PostageLabel
+
+
Get the date advance of this PostageLabel.
+
+
getDatetime() - Method in class com.easypost.model.TrackingDetail
+
+
Get the datetime of the tracking detail.
+
+
getDeclaration() - Method in class com.easypost.model.CustomsInfo
+
+
Get this CustomsInfo's declaration.
+
+
getDefaultInsuranceAmount() - Method in class com.easypost.model.BaseUser
+
+
Get the default insurance amount of the User.
+
+
getDelivery() - Method in class com.easypost.model.AddressVerifications
+
+
Get the delivery of the AddressVerifications.
+
+
getDeliveryDate() - Method in class com.easypost.model.Rate
+
+
Get the delivery date of this Rate.
+
+
getDeliveryDateGuaranteed() - Method in class com.easypost.model.Rate
+
+
Get whether the delivery date is guaranteed for this Rate.
+
+
getDeliveryDays() - Method in class com.easypost.model.Rate
+
+
Get the delivery days of this Rate.
+
+
getDescription() - Method in class com.easypost.model.CarrierAccount
+
+
Get description of the carrier account.
+
+
getDescription() - Method in class com.easypost.model.CustomsItem
+
+
Get this CustomsItem's description.
+
+
getDescription() - Method in class com.easypost.model.Event
+
+
Get the description of this Event.
+
+
getDestinationLocation() - Method in class com.easypost.model.CarrierDetail
+
+
Get destination location.
+
+
getDisabledAt() - Method in class com.easypost.model.PaymentMethodObject
+
+
Get when this PaymentMethodObject object was disabled.
+
+
getDisabledAt() - Method in class com.easypost.model.Webhook
+
+
Get the date and time when the webhook was disabled.
+
+
getEelPfc() - Method in class com.easypost.model.CustomsInfo
+
+
Get this CustomsInfo's EEL or PFC.
+
+
getEmail() - Method in class com.easypost.model.BaseAddress
+
+
Get email of Address.
+
+
getEmail() - Method in class com.easypost.model.BaseUser
+
+
Get the email of the User.
+
+
getEncodedURL(Map<String, String>, String) - Static method in class com.easypost.model.Utilities
+
+
Create Encoded URL from a Map.
+
+
getEndDate() - Method in class com.easypost.model.Report
+
+
Get the end date of this Report.
+
+
getEndShippers() - Method in class com.easypost.model.EndShipperCollection
+
+
Get a list of EndShippers.
+
+
getEntity() - Method in class com.easypost.model.TaxIdentifier
+
+
Get the entity associated with this TaxIdentifier.
+
+
getEpl2LabelType() - Method in class com.easypost.model.PostageLabel
+
+
Get the EPL2 type of this PostageLabel.
+
+
getErrors() - Method in exception com.easypost.exception.EasyPostException
+
+
Get errors array of the exception.
+
+
getErrors() - Method in class com.easypost.model.AddressVerification
+
+
Get the list of errors that occurred during the address verification.
+
+
getErrors() - Method in class com.easypost.model.Error
+
+
Get the errors from an Error object.
+
+
getEstDeliveryDate() - Method in class com.easypost.model.Tracker
+
+
Get the estimated delivery date of the Tracker.
+
+
getEstDeliveryDateLocal() - Method in class com.easypost.model.CarrierDetail
+
+
Get the estimated delivery date in local time.
+
+
getEstDeliveryDays() - Method in class com.easypost.model.Rate
+
+
Get the estimated delivery days for this Rate.
+
+
getEstDeliveryTimeLocal() - Method in class com.easypost.model.CarrierDetail
+
+
Get the estimated delivery time in local time.
+
+
getEvents() - Method in class com.easypost.model.EventCollection
+
+
Get a list of events.
+
+
getExpMonth() - Method in class com.easypost.model.BaseCreditCard
+
+
Deprecated.
+
Get the expMonth of this CreditCard object.
+
+
getExpMonth() - Method in class com.easypost.model.PaymentMethodObject
+
+
Get the expMonth of this PaymentMethodObject object.
+
+
getExpYear() - Method in class com.easypost.model.BaseCreditCard
+
+
Deprecated.
+
Get the expYear of this CreditCard object.
+
+
getExpYear() - Method in class com.easypost.model.PaymentMethodObject
+
+
Get the expYear of this PaymentMethodObject object.
+
+
getFederalTaxId() - Method in class com.easypost.model.Address
+
+
Get federal tax id of address.
+
+
getFees() - Method in class com.easypost.model.Shipment
+
 
+
getField() - Method in class com.easypost.model.Error
+
+
Get the field of the error.
+
+
getFields() - Method in class com.easypost.model.CarrierAccount
+
+
Get fields of the carrier account.
+
+
getFields() - Method in class com.easypost.model.CarrierType
+
+
Get the fields of the carrier.
+
+
getFormFileType() - Method in class com.easypost.model.ScanForm
+
+
Get the form file type of the ScanForm.
+
+
getForms() - Method in class com.easypost.model.Shipment
+
+
Get the forms of this Shipment.
+
+
getFormType() - Method in class com.easypost.model.Form
+
+
Get the form type of the Form.
+
+
getFormUrl() - Method in class com.easypost.model.Form
+
+
Get the form url of the Form.
+
+
getFormUrl() - Method in class com.easypost.model.ScanForm
+
+
Get the URL for the ScanForm.
+
+
getFromAddress() - Method in class com.easypost.model.Insurance
+
+
Get the from address of this Insurance.
+
+
getFromAddress() - Method in class com.easypost.model.Order
+
+
Get the from address of the Order.
+
+
getFromAddress() - Method in class com.easypost.model.ScanForm
+
+
Get the from address of the ScanForm.
+
+
getFromAddress() - Method in class com.easypost.model.Shipment
+
+
Get the from address of this Shipment.
+
+
getGrams() - Method in class com.easypost.model.CarbonOffset
+
+
Get the amount of carbon grams emitted by the shipment.
+
+
getGuaranteedDeliveryDate() - Method in class com.easypost.model.CarrierDetail
+
+
Get the guaranteed delivery date.
+
+
getHasBillingMethod() - Method in class com.easypost.model.BaseUser
+
+
Get the has billing method of the User.
+
+
getHasMore() - Method in class com.easypost.model.AddressCollection
+
+
Get whether there are more addresses to retrieve.
+
+
getHasMore() - Method in class com.easypost.model.BatchCollection
+
+
Get whether there are more batches to retrieve.
+
+
getHasMore() - Method in class com.easypost.model.EndShipperCollection
+
+
Get whether there are more EndShippers to retrieve.
+
+
getHasMore() - Method in class com.easypost.model.EventCollection
+
+
Get whether there are more events to retrieve.
+
+
getHasMore() - Method in class com.easypost.model.InsuranceCollection
+
+
Get whether there are more insurances.
+
+
getHasMore() - Method in class com.easypost.model.OrderCollection
+
+
Get whether there are more orders to retrieve.
+
+
getHasMore() - Method in class com.easypost.model.PickupCollection
+
+
Get whether there are more Pickup objects to retrieve.
+
+
getHasMore() - Method in class com.easypost.model.ReferralCustomerCollection
+
+
Get whether there are more ReferralCustomers to retrieve.
+
+
getHasMore() - Method in class com.easypost.model.RefundCollection
+
+
Get whether there are more Refund objects to retrieve.
+
+
getHasMore() - Method in class com.easypost.model.ReportCollection
+
+
Get whether there are more reports to retrieve.
+
+
getHasMore() - Method in class com.easypost.model.ScanFormCollection
+
+
Get whether there are more ScanForms to retrieve.
+
+
getHasMore() - Method in class com.easypost.model.ShipmentCollection
+
+
Get whether there are more Shipment objects to retrieve.
+
+
getHasMore() - Method in class com.easypost.model.TrackerCollection
+
+
Get whether there are more Trackers to retrieve.
+
+
getHeight() - Method in class com.easypost.model.Parcel
+
+
Get the height of this Parcel.
+
+
getHsTariffNumber() - Method in class com.easypost.model.CustomsItem
+
+
Get this CustomsItem's HS Tariff Number.
+
+
getId() - Method in class com.easypost.model.EasyPostResource
+
 
+
getId() - Method in class com.easypost.model.PaymentMethodObject
+
+
Get ID of this PaymentMethodObject object.
+
+
getIncludeChildren() - Method in class com.easypost.model.Report
+
+
Get whether this Report includes children.
+
+
getInitialDeliveryAttempt() - Method in class com.easypost.model.CarrierDetail
+
+
Get initial delivery attempt.
+
+
getInstructions() - Method in class com.easypost.model.Pickup
+
+
Get instructions for the pickup.
+
+
getInsurance() - Method in class com.easypost.model.Shipment
+
+
Get the insurance of this Shipment.
+
+
getInsuranceFeeMinimum() - Method in class com.easypost.model.BaseUser
+
+
Get the insurance fee minimum of the User.
+
+
getInsuranceFeeRate() - Method in class com.easypost.model.BaseUser
+
+
Get the insurance fee rate of the User.
+
+
getInsurances() - Method in class com.easypost.model.InsuranceCollection
+
+
Get the list of insurances.
+
+
getIntegratedForm() - Method in class com.easypost.model.PostageLabel
+
+
Get the integrated form of this PostageLabel.
+
+
getIsAccountAddress() - Method in class com.easypost.model.Pickup
+
+
Get whether the address is an account address.
+
+
getIsReturn() - Method in class com.easypost.model.Order
+
+
Get whether the order is a return.
+
+
getIsReturn() - Method in class com.easypost.model.Shipment
+
+
Get whether this Shipment is a return shipment.
+
+
getIssuingCountry() - Method in class com.easypost.model.TaxIdentifier
+
+
Get the issuing country associated with this TaxIdentifier.
+
+
getKey() - Method in class com.easypost.model.ApiKey
+
+
Get the API key.
+
+
getKey() - Method in class com.easypost.model.Field
+
+
Get the key of this field.
+
+
getKeyName() - Method in enum com.easypost.model.SmartrateAccuracy
+
+
Get the internal key name for this enum value.
+
+
getKeys() - Method in class com.easypost.model.ApiKeys
+
+
Get a list of API keys.
+
+
getLabel() - Method in class com.easypost.model.Field
+
+
Get the label of this field.
+
+
getLabelEpl2FileType() - Method in class com.easypost.model.PostageLabel
+
+
Get the EPL2 file type of this PostageLabel.
+
+
getLabelEpl2Size() - Method in class com.easypost.model.PostageLabel
+
+
Get the EPL2 size of this PostageLabel.
+
+
getLabelEpl2Url() - Method in class com.easypost.model.PostageLabel
+
+
Get the EPL2 URL of this PostageLabel.
+
+
getLabelFile() - Method in class com.easypost.model.PostageLabel
+
+
Get the file of this PostageLabel.
+
+
getLabelFileType() - Method in class com.easypost.model.PostageLabel
+
+
Get the file type of this PostageLabel.
+
+
getLabelFileType() - Method in class com.easypost.model.ScanForm
+
+
Get the label file type of the ScanForm.
+
+
getLabelPdfFileType() - Method in class com.easypost.model.PostageLabel
+
+
Get the PDF file type of this PostageLabel.
+
+
getLabelPdfSize() - Method in class com.easypost.model.PostageLabel
+
+
Get the PDF size of this PostageLabel.
+
+
getLabelPdfUrl() - Method in class com.easypost.model.PostageLabel
+
+
Get the PDF URL of this PostageLabel.
+
+
getLabelResolution() - Method in class com.easypost.model.PostageLabel
+
+
Get the resolution of this PostageLabel.
+
+
getLabelSize() - Method in class com.easypost.model.PostageLabel
+
+
Get the size of this PostageLabel.
+
+
getLabelType() - Method in class com.easypost.model.PostageLabel
+
+
Get the type of this PostageLabel.
+
+
getLabelUrl() - Method in class com.easypost.model.Batch
+
+
Get label URL of this batch.
+
+
getLabelUrl() - Method in class com.easypost.model.PostageLabel
+
+
Get the URL of this PostageLabel.
+
+
getLabelUrl() - Method in class com.easypost.model.ScanForm
+
+
Get the the label URL of the ScanForm.
+
+
getLabelZplFileType() - Method in class com.easypost.model.PostageLabel
+
+
Get the ZPL file type of this PostageLabel.
+
+
getLabelZplSize() - Method in class com.easypost.model.PostageLabel
+
+
Get the ZPL size of this PostageLabel.
+
+
getLabelZplUrl() - Method in class com.easypost.model.PostageLabel
+
+
Get the ZPL URL of this PostageLabel.
+
+
getLast4() - Method in class com.easypost.model.BaseCreditCard
+
+
Deprecated.
+
Get the last 4 digits of this CreditCard object.
+
+
getLast4() - Method in class com.easypost.model.PaymentMethodObject
+
+
Get the last 4 digits of this PaymentMethodObject object.
+
+
getLatitude() - Method in class com.easypost.model.AddressDetail
+
+
Get latitude of the address.
+
+
getLength() - Method in class com.easypost.model.Parcel
+
+
Get the length of this Parcel.
+
+
getListCurrency() - Method in class com.easypost.model.Rate
+
+
Get the list currency of this Rate.
+
+
getListRate() - Method in class com.easypost.model.Rate
+
+
Get the list rate of this Rate.
+
+
getLogo() - Method in class com.easypost.model.Brand
+
+
Get the logo of the Brand.
+
+
getLogo() - Method in class com.easypost.model.CarrierType
+
+
Get the logo of the carrier.
+
+
getLogoHref() - Method in class com.easypost.model.Brand
+
+
Get the logo href of the Brand.
+
+
getLongitude() - Method in class com.easypost.model.AddressDetail
+
+
Get longitude of the address.
+
+
getLowestObjectRate(List<Rate>, List<String>, List<String>) - Static method in class com.easypost.model.Utilities
+
+
Get the lowest rate from a list of rates.
+
+
getLowestSmartRate(List<Smartrate>, int, String) - Static method in class com.easypost.model.Shipment
+
+
Deprecated. +
Use Shipment.findLowestSmartrate(List, int, SmartrateAccuracy) instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
getMaxDatetime() - Method in class com.easypost.model.Pickup
+
+
Get the latest date of this Pickup.
+
+
getMessage() - Method in exception com.easypost.exception.EasyPostException
+
+
Get message of the error object.
+
+
getMessage() - Method in class com.easypost.model.Address
+
+
Get address message.
+
+
getMessage() - Method in class com.easypost.model.AddressVerifyResponse
+
+
Get the message.
+
+
getMessage() - Method in class com.easypost.model.Error
+
+
Get the error message.
+
+
getMessage() - Method in class com.easypost.model.ScanForm
+
+
Get the message of the ScanForm.
+
+
getMessage() - Method in class com.easypost.model.ShipmentMessage
+
+
Get the contents of this message.
+
+
getMessage() - Method in class com.easypost.model.TrackingDetail
+
+
Get the message of the tracking detail.
+
+
getMessages() - Method in class com.easypost.model.Insurance
+
+
Get the messages of this Insurance.
+
+
getMessages() - Method in class com.easypost.model.Order
+
+
Get the messages of the Order.
+
+
getMessages() - Method in class com.easypost.model.Pickup
+
+
Get the messages of this Pickup.
+
+
getMessages() - Method in class com.easypost.model.Shipment
+
+
Get the messages of this Shipment.
+
+
getMinDatetime() - Method in class com.easypost.model.Pickup
+
+
Get the earliest date of this Pickup.
+
+
getMode() - Method in class com.easypost.model.EasyPostResource
+
 
+
getName() - Method in class com.easypost.model.BaseAddress
+
+
Get name of Address.
+
+
getName() - Method in class com.easypost.model.BaseCreditCard
+
+
Deprecated.
+
Get the name of this CreditCard object.
+
+
getName() - Method in class com.easypost.model.BaseUser
+
+
Get the name of the User.
+
+
getName() - Method in class com.easypost.model.Brand
+
+
Get the name of the User.
+
+
getName() - Method in class com.easypost.model.PaymentMethodObject
+
+
Get the name of this PaymentMethodObject object.
+
+
getNonDeliveryOption() - Method in class com.easypost.model.CustomsInfo
+
+
Get the non-delivery option of this CustomsInfo.
+
+
getNumShipments() - Method in class com.easypost.model.Batch
+
+
Get number of shipments in this batch.
+
+
getObject() - Method in class com.easypost.model.BaseCreditCard
+
+
Deprecated.
+
Get the object of this CreditCard object.
+
+
getObject() - Method in class com.easypost.model.BaseUser
+
+
Get the object of the User.
+
+
getObject() - Method in class com.easypost.model.CarbonOffset
+
+
Get the type of this object.
+
+
getObject() - Method in class com.easypost.model.CarrierAccount
+
+
Get object type of the carrier account.
+
+
getObject() - Method in class com.easypost.model.EventData
+
+
Get the object of this EventData.
+
+
getObject() - Method in class com.easypost.model.PaymentMethod
+
+
Get the object of this PaymentMethod object.
+
+
getObject() - Method in class com.easypost.model.PaymentMethodObject
+
+
Get the object of this PaymentMethodObject object.
+
+
getOptions() - Method in class com.easypost.model.Order
+
+
Get the options of the Order.
+
+
getOptions() - Method in class com.easypost.model.Shipment
+
+
Get the options of this Shipment.
+
+
getOrderId() - Method in class com.easypost.model.Shipment
+
+
Get the ID of the order of this Shipment.
+
+
getOrders() - Method in class com.easypost.model.OrderCollection
+
+
Get a list of orders.
+
+
getOriginCountry() - Method in class com.easypost.model.CustomsItem
+
+
Get this CustomsItem's origin country.
+
+
getOriginLocation() - Method in class com.easypost.model.CarrierDetail
+
+
Get origin location.
+
+
getParcel() - Method in class com.easypost.model.Shipment
+
+
Get the parcel of this Shipment.
+
+
getParentId() - Method in class com.easypost.model.BaseUser
+
+
Get the parent ID of the User.
+
+
getPdfLabelType() - Method in class com.easypost.model.PostageLabel
+
+
Get the PDF type of this PostageLabel.
+
+
getPendingUrls() - Method in class com.easypost.model.Event
+
+
Get the pendingUrls of this Event.
+
+
getPercentile50() - Method in class com.easypost.model.TimeInTransit
+
+
Get the 50th percentile of this TimeInTransit.
+
+
getPercentile75() - Method in class com.easypost.model.TimeInTransit
+
+
Get the 75th percentile of this TimeInTransit.
+
+
getPercentile85() - Method in class com.easypost.model.TimeInTransit
+
+
Get the 85th percentile of this TimeInTransit.
+
+
getPercentile90() - Method in class com.easypost.model.TimeInTransit
+
+
Get the 90th percentile of this TimeInTransit.
+
+
getPercentile95() - Method in class com.easypost.model.TimeInTransit
+
+
Get the 95th percentile of this TimeInTransit.
+
+
getPercentile97() - Method in class com.easypost.model.TimeInTransit
+
+
Get the 97th percentile of this TimeInTransit.
+
+
getPercentile99() - Method in class com.easypost.model.TimeInTransit
+
+
Get the 99th percentile of this TimeInTransit.
+
+
getPhone() - Method in class com.easypost.model.BaseAddress
+
+
Get phone number of Address.
+
+
getPhoneNumber() - Method in class com.easypost.model.BaseUser
+
+
Get the phone number of the User.
+
+
getPickupID() - Method in class com.easypost.model.PickupRate
+
+
Get the ID of this Pickup.
+
+
getPickupRates() - Method in class com.easypost.model.Pickup
+
+
Get the pickup rates of this Pickup.
+
+
getPickups() - Method in class com.easypost.model.PickupCollection
+
+
Get this PickupCollection's Pickup objects.
+
+
getPostageLabel() - Method in class com.easypost.model.Shipment
+
+
Get the postage label of this Shipment.
+
+
getPostagePurchased() - Method in class com.easypost.model.BatchStatus
+
+
Get the number of postage purchases.
+
+
getPostagePurchaseFailed() - Method in class com.easypost.model.BatchStatus
+
+
Get the number of postage purchases that failed.
+
+
getPredefinedPackage() - Method in class com.easypost.model.Parcel
+
+
Get the predefined package of this Parcel.
+
+
getPreviousAttributes() - Method in class com.easypost.model.Event
+
+
Get the previous attributes of this Event.
+
+
getPreviousAttributes() - Method in class com.easypost.model.EventData
+
+
Get the previous attributes of this EventData.
+
+
getPrice() - Method in class com.easypost.model.CarbonOffset
+
+
Get the price to offset the number of carbon grams.
+
+
getPricePerShipment() - Method in class com.easypost.model.BaseUser
+
+
Get the price per shipment of the User.
+
+
getPrimaryPaymentMethod() - Method in class com.easypost.model.PaymentMethod
+
+
Deprecated. +
Use PaymentMethod.getPrimaryPaymentMethodObject() instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
getPrimaryPaymentMethodObject() - Method in class com.easypost.model.PaymentMethod
+
+
Get the primary payment method of this PaymentMethod object.
+
+
getProvider() - Method in class com.easypost.model.Insurance
+
+
Get the provider of this Insurance.
+
+
getProviderId() - Method in class com.easypost.model.Insurance
+
+
Get the provider ID of this Insurance.
+
+
getPublicUrl() - Method in class com.easypost.model.Tracker
+
+
Get the public URL of the Tracker.
+
+
getQuantity() - Method in class com.easypost.model.CustomsItem
+
+
Get this CustomsItem's quantity.
+
+
getRate() - Method in class com.easypost.model.Rate
+
+
Get the rate of this Rate.
+
+
getRates() - Method in class com.easypost.model.Order
+
+
Get the rates of the Order.
+
+
getRates() - Method in class com.easypost.model.Shipment
+
+
Get all rates of this Shipment.
+
+
getReadable() - Method in class com.easypost.model.CarrierAccount
+
+
Get readable name of the carrier account.
+
+
getReadable() - Method in class com.easypost.model.CarrierType
+
+
Get the readable name of the carrier.
+
+
getReadTimeoutMilliseconds() - Static method in class com.easypost.http.Requestor
+
+
Get the timeout in milliseconds for reading API responses.
+
+
getRechargeAmount() - Method in class com.easypost.model.BaseUser
+
+
Get the recharge amount of the User.
+
+
getRechargeThreshold() - Method in class com.easypost.model.BaseUser
+
+
Get the recharge threshold of the User.
+
+
getReference() - Method in class com.easypost.model.Batch
+
+
Get reference of this batch.
+
+
getReference() - Method in class com.easypost.model.CarrierAccount
+
+
Get reference of the carrier account.
+
+
getReference() - Method in class com.easypost.model.Insurance
+
+
Get the reference of this Insurance.
+
+
getReference() - Method in class com.easypost.model.Order
+
+
Get the reference of the Order.
+
+
getReference() - Method in class com.easypost.model.Pickup
+
+
Get the reference of this Pickup.
+
+
getReference() - Method in class com.easypost.model.Shipment
+
+
Get the reference of this Shipment.
+
+
getReferralCustomers() - Method in class com.easypost.model.ReferralCustomerCollection
+
+
Get a list of ReferralCustomers.
+
+
getRefunded() - Method in class com.easypost.model.Fee
+
+
Check if the fee is refunded.
+
+
getRefunds() - Method in class com.easypost.model.RefundCollection
+
+
Get this RefundCollection's Refund objects.
+
+
getRefundStatus() - Method in class com.easypost.model.Shipment
+
+
Get the refund status of this Shipment.
+
+
getReports() - Method in class com.easypost.model.ReportCollection
+
+
Get this ReportCollection's Report objects.
+
+
getResidential() - Method in class com.easypost.model.Address
+
+
Get whether address is residential.
+
+
getResponseBody() - Method in class com.easypost.http.EasyPostResponse
+
+
Get HTTP response body.
+
+
getResponseCode() - Method in class com.easypost.http.EasyPostResponse
+
+
Get HTTP response code.
+
+
getRestrictionComments() - Method in class com.easypost.model.CustomsInfo
+
+
Get this CustomsInfo's restriction comments.
+
+
getRestrictionType() - Method in class com.easypost.model.CustomsInfo
+
+
Get this CustomsInfo's restriction type.
+
+
getResult() - Method in class com.easypost.model.Event
+
+
Get the result of this Event.
+
+
getRetailCurrency() - Method in class com.easypost.model.Rate
+
+
Get the retail currency of this Rate.
+
+
getRetailRate() - Method in class com.easypost.model.Rate
+
+
Get the retail rate of this Rate.
+
+
getReturnAddress() - Method in class com.easypost.model.Order
+
+
Get the return address of the Order.
+
+
getReturnAddress() - Method in class com.easypost.model.Shipment
+
+
Get the return address of this Shipment.
+
+
getScanForm() - Method in class com.easypost.model.Batch
+
+
Get scan form of this batch.
+
+
getScanForm() - Method in class com.easypost.model.Shipment
+
+
Get the scan form of this Shipment.
+
+
getScanForms() - Method in class com.easypost.model.ScanFormCollection
+
+
Get this ScanFormCollection's ScanForm objects.
+
+
getSecondaryPaymentMethod() - Method in class com.easypost.model.PaymentMethod
+
+
Deprecated. +
Use PaymentMethod.getSecondaryPaymentMethodObject() instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
getSecondaryPaymentMethodObject() - Method in class com.easypost.model.PaymentMethod
+
+
Get the secondary payment method of this PaymentMethod object.
+
+
getSecondaryRechargeAmount() - Method in class com.easypost.model.BaseUser
+
+
Get the secondary recharge amount of the User.
+
+
getSelectedRate() - Method in class com.easypost.model.Shipment
+
+
Get the selected rate of this Shipment.
+
+
getService() - Method in class com.easypost.model.CarrierDetail
+
+
Get carrier service.
+
+
getService() - Method in class com.easypost.model.Order
+
+
Get the service of the Order.
+
+
getService() - Method in class com.easypost.model.Rate
+
+
Get the service of this Rate.
+
+
getService() - Method in class com.easypost.model.Shipment
+
+
Get the service used.
+
+
getShipmentId() - Method in class com.easypost.model.Insurance
+
+
Get the shipment ID of this Insurance.
+
+
getShipmentId() - Method in class com.easypost.model.Rate
+
+
Get the ID of the shipment of this Rate.
+
+
getShipmentId() - Method in class com.easypost.model.Refund
+
+
Get refund shipment ID.
+
+
getShipmentId() - Method in class com.easypost.model.Tracker
+
+
Get the ID of the shipment associated with this tracker.
+
+
getShipments() - Method in class com.easypost.model.Batch
+
+
Get shipments in this batch.
+
+
getShipments() - Method in class com.easypost.model.Order
+
+
Get the shipments of the Order.
+
+
getShipments() - Method in class com.easypost.model.ShipmentCollection
+
+
Get this ShipmentCollection's Shipment objects.
+
+
getSignedBy() - Method in class com.easypost.model.Tracker
+
+
Get who signed for the package associated Tracker.
+
+
getSmartpostHub() - Method in class com.easypost.model.ShipmentOptions
+
+
Get the SmartPost hub of the shipment.
+
+
getSmartpostManifest() - Method in class com.easypost.model.ShipmentOptions
+
+
Get the SmartPost manifest of the shipment.
+
+
getSmartRateAccuracy(String) - Method in class com.easypost.model.TimeInTransit
+
+
Deprecated. +
Use TimeInTransit.getBySmartrateAccuracy(SmartrateAccuracy) instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
getSmartrates() - Method in class com.easypost.model.Shipment
+
+
Deprecated. +
Use Shipment.smartrates() instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
getSmartrates() - Method in class com.easypost.model.SmartrateCollection
+
+
Get this SmartrateCollection's Smartrate objects.
+
+
getSmartrates(String) - Method in class com.easypost.model.Shipment
+
+
Deprecated. +
Use Shipment.smartrates(String) instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
getSmartrates(Map<String, Object>) - Method in class com.easypost.model.Shipment
+
+
Deprecated. +
Use Shipment.smartrates(Map) instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
getSmartrates(Map<String, Object>, String) - Method in class com.easypost.model.Shipment
+
+
Deprecated. +
Use Shipment.smartrates(Map, String) instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
getStartDate() - Method in class com.easypost.model.Report
+
+
Get the start date of this Report.
+
+
getState() - Method in class com.easypost.model.BaseAddress
+
+
Get state of Address.
+
+
getState() - Method in class com.easypost.model.Batch
+
+
Get state of this batch.
+
+
getState() - Method in class com.easypost.model.TrackingLocation
+
+
Get the state of the tracking location.
+
+
getStatus() - Method in class com.easypost.model.Insurance
+
+
Get the status of this Insurance.
+
+
getStatus() - Method in class com.easypost.model.Pickup
+
+
Get the status of this Pickup.
+
+
getStatus() - Method in class com.easypost.model.Refund
+
+
Get refund status.
+
+
getStatus() - Method in class com.easypost.model.Report
+
+
Get the status of this Report.
+
+
getStatus() - Method in class com.easypost.model.ScanForm
+
+
Get the status of the ScanForm.
+
+
getStatus() - Method in class com.easypost.model.Shipment
+
+
Get the status of this Shipment.
+
+
getStatus() - Method in class com.easypost.model.Tracker
+
+
Get the status of the Tracker.
+
+
getStatus() - Method in class com.easypost.model.TrackingDetail
+
+
Get the status of the tracking detail.
+
+
getStatusCode() - Method in exception com.easypost.exception.EasyPostException
+
+
Get status code of the error object.
+
+
getStatusDetail() - Method in class com.easypost.model.Tracker
+
+
Get the status of the Tracker.
+
+
getStatusDetail() - Method in class com.easypost.model.TrackingDetail
+
+
Get the status detail of the tracking detail.
+
+
getStreet1() - Method in class com.easypost.model.BaseAddress
+
+
Get first line of Address street.
+
+
getStreet2() - Method in class com.easypost.model.BaseAddress
+
+
Get second line of Address street.
+
+
getSubmittedElectronically() - Method in class com.easypost.model.Form
+
+
Get whether the Form is submitted electronically.
+
+
getSuccess() - Method in class com.easypost.model.AddressVerification
+
+
Get whether the address verification was successful.
+
+
getSuggestion() - Method in class com.easypost.model.Error
+
+
Get the suggestion of the error.
+
+
getTaxId() - Method in class com.easypost.model.TaxIdentifier
+
+
Get the tax ID associated with this TaxIdentifier.
+
+
getTaxIdentifiers() - Method in class com.easypost.model.Shipment
+
+
Get the tax identifiers of this Shipment.
+
+
getTaxIdType() - Method in class com.easypost.model.TaxIdentifier
+
+
Get the tax ID type associated with this TaxIdentifier.
+
+
getTestCredentials() - Method in class com.easypost.model.CarrierAccount
+
+
Get test credentials of the carrier account.
+
+
getTestCredentials() - Method in class com.easypost.model.Fields
+
+
Get the test credentials for this Fields object.
+
+
getTheme() - Method in class com.easypost.model.Brand
+
+
Get the theme of the Brand.
+
+
getTimeInTransit() - Method in class com.easypost.model.Smartrate
+
+
Get the time in transit for this rate.
+
+
getTimeZone() - Method in class com.easypost.model.AddressDetail
+
+
Get time zone of the address.
+
+
getToAddress() - Method in class com.easypost.model.Insurance
+
+
Get the to address of this Insurance.
+
+
getToAddress() - Method in class com.easypost.model.Order
+
+
Get the to address of the Order.
+
+
getToAddress() - Method in class com.easypost.model.Shipment
+
+
Get the to address of this Shipment.
+
+
getTracker() - Method in class com.easypost.model.Insurance
+
+
Get the tracker of this Insurance.
+
+
getTracker() - Method in class com.easypost.model.Shipment
+
+
Get the tracker of this Shipment.
+
+
getTrackers() - Method in class com.easypost.model.TrackerCollection
+
+
Get this TrackerCollection's Tracker objects.
+
+
getTrackingCode() - Method in class com.easypost.model.Insurance
+
+
Get the tracking code of this Insurance.
+
+
getTrackingCode() - Method in class com.easypost.model.Refund
+
+
Get refund tracking code.
+
+
getTrackingCode() - Method in class com.easypost.model.Shipment
+
+
Get the tracking code of this Shipment.
+
+
getTrackingCode() - Method in class com.easypost.model.Tracker
+
+
Get the tracking code of the Tracker.
+
+
getTrackingCodes() - Method in class com.easypost.model.ScanForm
+
+
Get the tracking codes of the ScanForm.
+
+
getTrackingDetails() - Method in class com.easypost.model.Tracker
+
+
Get the tracking details of the Tracker.
+
+
getTrackingLocation() - Method in class com.easypost.model.TrackingDetail
+
+
Get the tracking location of the tracking detail.
+
+
getType() - Method in class com.easypost.model.CarrierAccount
+
+
Get type of the carrier account.
+
+
getType() - Method in class com.easypost.model.CarrierType
+
+
Get the type of the carrier.
+
+
getType() - Method in class com.easypost.model.Fee
+
+
Get Fee type.
+
+
getType() - Method in class com.easypost.model.PaymentMethodObject
+
+
Get the type of this PaymentMethodObject object.
+
+
getType() - Method in class com.easypost.model.ShipmentMessage
+
+
Get the type of this message.
+
+
getUpdatedAt() - Method in class com.easypost.model.EasyPostResource
+
 
+
getUrl() - Method in class com.easypost.model.Report
+
+
Get the URL of this Report.
+
+
getUrl() - Method in class com.easypost.model.Webhook
+
+
Get the URL of the webhook.
+
+
getUrlExpiresAt() - Method in class com.easypost.model.Report
+
+
Get when the URL for this Report expires.
+
+
getUserID() - Method in class com.easypost.model.Brand
+
+
Get the user ID of the Brand.
+
+
getUspsZone() - Method in class com.easypost.model.Shipment
+
+
Get the USPS zone of this Shipment.
+
+
getValue() - Method in class com.easypost.model.CustomsItem
+
+
Get this CustomsItem's value.
+
+
getValue() - Method in class com.easypost.model.Field
+
+
Get the value of this field.
+
+
getVerifications() - Method in class com.easypost.model.Address
+
+
Get verifications for address.
+
+
getVerified() - Method in class com.easypost.model.BaseUser
+
+
Get the verified of the User.
+
+
getVisibility() - Method in class com.easypost.model.Field
+
+
Get the visibility of this field.
+
+
getWebhooks() - Method in class com.easypost.model.WebhookCollection
+
+
Get this WebhookCollection's Webhook objects.
+
+
getWeight() - Method in class com.easypost.model.CustomsItem
+
+
Get this CustomsItem's weight.
+
+
getWeight() - Method in class com.easypost.model.Parcel
+
+
Get the weight of this Parcel.
+
+
getWeight() - Method in class com.easypost.model.Tracker
+
+
Get the weight of the Tracker.
+
+
getWidth() - Method in class com.easypost.model.Parcel
+
+
Get the width of this Parcel.
+
+
getZip() - Method in class com.easypost.model.BaseAddress
+
+
Get zip code of Address.
+
+
getZip() - Method in class com.easypost.model.TrackingLocation
+
+
Get the zip code of the tracking location.
+
+
getZip4() - Method in class com.easypost.model.AddressVerifications
+
+
Get the zip4 of the AddressVerification.
+
+
getZplLabelType() - Method in class com.easypost.model.PostageLabel
+
+
Get the ZPL type of this PostageLabel.
+
+
GLOBAL_FIELD_ACCESSORS - Static variable in class com.easypost.http.Constant
+
 
+
GSON - Static variable in class com.easypost.http.Constant
+
 
+
+

H

+
+
handleAPIError(String, int) - Static method in class com.easypost.http.Requestor
+
+
Handles API error based on the error status code.
+
+
hashCode() - Method in class com.easypost.model.EasyPostResource
+
+
Override the hashCode method because it is needed when overriding equals().
+
+
HashMapSerializer - Class in com.easypost.http
+
 
+
HashMapSerializer() - Constructor for class com.easypost.http.HashMapSerializer
+
 
+
hexEncode(byte[]) - Static method in class com.easypost.utils.Cryptography
+
+
Hex-encode a byte array to a char array.
+
+
hexEncodeToString(byte[]) - Static method in class com.easypost.utils.Cryptography
+
+
Hex-encode a byte array to a string.
+
+
+

I

+
+
instanceURL(Class<?>, String) - Static method in class com.easypost.model.EasyPostResource
+
 
+
Insurance - Class in com.easypost.model
+
 
+
Insurance() - Constructor for class com.easypost.model.Insurance
+
 
+
InsuranceCollection - Class in com.easypost.model
+
 
+
InsuranceCollection() - Constructor for class com.easypost.model.InsuranceCollection
+
 
+
insure() - Method in class com.easypost.model.Shipment
+
+
Insure this Shipment.
+
+
insure(String) - Method in class com.easypost.model.Shipment
+
+
Insure this Shipment.
+
+
insure(Map<String, Object>) - Method in class com.easypost.model.Shipment
+
+
Insure this Shipment.
+
+
insure(Map<String, Object>, String) - Method in class com.easypost.model.Shipment
+
+
Insure this Shipment.
+
+
INTERNAL_SERVER_ERROR - Static variable in class com.easypost.exception.Constants.ErrorCode
+
 
+
InternalServerError - Exception in com.easypost.exception.API
+
 
+
InternalServerError(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.API.InternalServerError
+
+
InternalServerError constructor.
+
+
INVALID_API_KEY_TYPE - Static variable in class com.easypost.exception.Constants
+
 
+
INVALID_PARAMETER - Static variable in class com.easypost.exception.Constants
+
 
+
INVALID_PAYMENT - Static variable in class com.easypost.exception.Constants
+
 
+
INVALID_REQUEST_ERROR - Static variable in class com.easypost.exception.Constants.ErrorCode
+
 
+
INVALID_WEBHOOK_SIGNATURE - Static variable in class com.easypost.exception.Constants
+
 
+
InvalidObjectError - Exception in com.easypost.exception.General
+
 
+
InvalidObjectError(String) - Constructor for exception com.easypost.exception.General.InvalidObjectError
+
+
InvalidObjectError constructor.
+
+
InvalidParameterError - Exception in com.easypost.exception.General
+
 
+
InvalidParameterError(String) - Constructor for exception com.easypost.exception.General.InvalidParameterError
+
+
InvalidParameterError constructor.
+
+
InvalidParameterError(String, Throwable) - Constructor for exception com.easypost.exception.General.InvalidParameterError
+
+
constructor.
+
+
InvalidRequestError - Exception in com.easypost.exception.API
+
 
+
InvalidRequestError(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.API.InvalidRequestError
+
+
InvalidRequestError constructor.
+
+
isAutoLink() - Method in class com.easypost.model.Fields
+
+
Get whether this Fields object is auto-linked.
+
+
isClone() - Method in class com.easypost.model.CarrierAccount
+
+
Get whether the carrier account is a clone.
+
+
isCustomWorkflow() - Method in class com.easypost.model.Fields
+
+
Get whether this Fields object is a custom workflow.
+
+
isVerified() - Method in class com.easypost.model.PaymentMethodObject
+
+
Get whether this PaymentMethodObject object is verified.
+
+
+

L

+
+
label() - Method in class com.easypost.model.Batch
+
+
Label this Batch object.
+
+
label() - Method in class com.easypost.model.Shipment
+
+
Label this Shipment.
+
+
label(String) - Method in class com.easypost.model.Shipment
+
+
Label this Shipment.
+
+
label(Map<String, Object>) - Method in class com.easypost.model.Batch
+
+
Label this Batch object.
+
+
label(Map<String, Object>) - Method in class com.easypost.model.Shipment
+
+
Label this Shipment.
+
+
label(Map<String, Object>, String) - Method in class com.easypost.model.Batch
+
+
Label this Batch object.
+
+
label(Map<String, Object>, String) - Method in class com.easypost.model.Shipment
+
+
Label this Shipment.
+
+
lowestRate() - Method in class com.easypost.model.Order
+
+
Get the lowest rate for this Order.
+
+
lowestRate() - Method in class com.easypost.model.Pickup
+
+
Get the lowest rate for this Pickup.
+
+
lowestRate() - Method in class com.easypost.model.Shipment
+
+
Get the lowest rate for this Shipment.
+
+
lowestRate(List<String>) - Method in class com.easypost.model.Order
+
+
Get the lowest rate for this order.
+
+
lowestRate(List<String>) - Method in class com.easypost.model.Pickup
+
+
Get the lowest rate for this pickup.
+
+
lowestRate(List<String>) - Method in class com.easypost.model.Shipment
+
+
Get the lowest rate for this shipment.
+
+
lowestRate(List<String>, List<String>) - Method in class com.easypost.model.Order
+
+
Get the lowest rate for this Order.
+
+
lowestRate(List<String>, List<String>) - Method in class com.easypost.model.Pickup
+
+
Get the lowest rate for this Pickup.
+
+
lowestRate(List<String>, List<String>) - Method in class com.easypost.model.Shipment
+
+
Get the lowest rate for this Shipment.
+
+
lowestSmartRate(int, SmartrateAccuracy) - Method in class com.easypost.model.Shipment
+
+
Get the lowest smartrate for this Shipment.
+
+
lowestSmartRate(int, String) - Method in class com.easypost.model.Shipment
+
+
Deprecated. +
use Shipment.lowestSmartRate(int, SmartrateAccuracy) instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
+

M

+
+
MD5 - Enum constant in enum com.easypost.utils.Cryptography.HmacAlgorithm
+
 
+
merge(EasyPostResource, EasyPostResource) - Method in class com.easypost.model.EasyPostResource
+
+
Merge two EasyPostResource objects.
+
+
METHOD_NOT_ALLOWED_ERROR - Static variable in class com.easypost.exception.Constants.ErrorCode
+
 
+
MethodNotAllowedError - Exception in com.easypost.exception.API
+
 
+
MethodNotAllowedError(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.API.MethodNotAllowedError
+
+
MethodNotAllowedError constructor.
+
+
MISSING_REQUIRED_PARAMETER - Static variable in class com.easypost.exception.Constants
+
 
+
MissingParameterError - Exception in com.easypost.exception.General
+
 
+
MissingParameterError(String) - Constructor for exception com.easypost.exception.General.MissingParameterError
+
+
MissingParameterError constructor.
+
+
+

N

+
+
newRates() - Method in class com.easypost.model.Order
+
+
Get new rates for this Order.
+
+
newRates() - Method in class com.easypost.model.Shipment
+
+
Get new rates for this Shipment.
+
+
newRates(boolean) - Method in class com.easypost.model.Shipment
+
+
Get new rates for this Shipment.
+
+
newRates(boolean, String) - Method in class com.easypost.model.Shipment
+
+
Get new rates for this Shipment.
+
+
newRates(String) - Method in class com.easypost.model.Order
+
+
Get new rates for this Order.
+
+
newRates(String) - Method in class com.easypost.model.Shipment
+
+
Get new rates for this Shipment.
+
+
newRates(Map<String, Object>) - Method in class com.easypost.model.Order
+
+
Get new rates for this Order.
+
+
newRates(Map<String, Object>) - Method in class com.easypost.model.Shipment
+
+
Get new rates for this Shipment.
+
+
newRates(Map<String, Object>, boolean) - Method in class com.easypost.model.Shipment
+
+
Get new rates for this Shipment.
+
+
newRates(Map<String, Object>, boolean, String) - Method in class com.easypost.model.Shipment
+
+
Get new rates for this Shipment.
+
+
newRates(Map<String, Object>, String) - Method in class com.easypost.model.Order
+
+
Get new rates for this Order.
+
+
newRates(Map<String, Object>, String) - Method in class com.easypost.model.Shipment
+
+
Get new rates for this Shipment.
+
+
NO_OBJECT_FOUND - Static variable in class com.easypost.exception.Constants
+
 
+
NO_PAYMENT_METHODS - Static variable in class com.easypost.exception.Constants
+
 
+
NOT_FOUND_ERROR - Static variable in class com.easypost.exception.Constants.ErrorCode
+
 
+
NotFoundError - Exception in com.easypost.exception.API
+
 
+
NotFoundError(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.API.NotFoundError
+
+
NotFoundError constructor.
+
+
+

O

+
+
Order - Class in com.easypost.model
+
 
+
Order() - Constructor for class com.easypost.model.Order
+
 
+
OrderCollection - Class in com.easypost.model
+
 
+
OrderCollection() - Constructor for class com.easypost.model.OrderCollection
+
 
+
+

P

+
+
Parcel - Class in com.easypost.model
+
 
+
Parcel() - Constructor for class com.easypost.model.Parcel
+
 
+
PAYMENT_ERROR - Static variable in class com.easypost.exception.Constants.ErrorCode
+
 
+
PaymentError - Exception in com.easypost.exception.API
+
 
+
PaymentError(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.API.PaymentError
+
+
PaymentError constructor.
+
+
PaymentMethod - Class in com.easypost.model
+
 
+
PaymentMethod() - Constructor for class com.easypost.model.PaymentMethod
+
 
+
PaymentMethod.Priority - Enum in com.easypost.model
+
 
+
PaymentMethodObject - Class in com.easypost.model
+
 
+
PaymentMethodObject() - Constructor for class com.easypost.model.PaymentMethodObject
+
 
+
PaymentMethodObject.PaymentMethodType - Enum in com.easypost.model
+
 
+
Percentile50 - Enum constant in enum com.easypost.model.SmartrateAccuracy
+
 
+
Percentile75 - Enum constant in enum com.easypost.model.SmartrateAccuracy
+
 
+
Percentile85 - Enum constant in enum com.easypost.model.SmartrateAccuracy
+
 
+
Percentile90 - Enum constant in enum com.easypost.model.SmartrateAccuracy
+
 
+
Percentile95 - Enum constant in enum com.easypost.model.SmartrateAccuracy
+
 
+
Percentile97 - Enum constant in enum com.easypost.model.SmartrateAccuracy
+
 
+
Percentile99 - Enum constant in enum com.easypost.model.SmartrateAccuracy
+
 
+
Pickup - Class in com.easypost.model
+
 
+
Pickup() - Constructor for class com.easypost.model.Pickup
+
 
+
PickupCollection - Class in com.easypost.model
+
 
+
PickupCollection() - Constructor for class com.easypost.model.PickupCollection
+
 
+
PickupRate - Class in com.easypost.model
+
 
+
PickupRate() - Constructor for class com.easypost.model.PickupRate
+
 
+
POST - Enum constant in enum com.easypost.http.Requestor.RequestMethod
+
 
+
PostageLabel - Class in com.easypost.model
+
 
+
PostageLabel() - Constructor for class com.easypost.model.PostageLabel
+
 
+
PRETTY_PRINT_GSON - Static variable in class com.easypost.http.Constant
+
 
+
prettyPrint() - Method in class com.easypost.model.EasyPostResource
+
+
Pretty print the JSON representation of the object.
+
+
PRIMARY - Enum constant in enum com.easypost.model.CreditCardPriority
+
+
Deprecated.
+
PRIMARY - Enum constant in enum com.easypost.model.PaymentMethod.Priority
+
 
+
PrimaryPaymentMethod - Class in com.easypost.model
+
+
Deprecated. +
Use PaymentMethodObject instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
PrimaryPaymentMethod() - Constructor for class com.easypost.model.PrimaryPaymentMethod
+
+
Deprecated.
+
PUT - Enum constant in enum com.easypost.http.Requestor.RequestMethod
+
 
+
+

R

+
+
Rate - Class in com.easypost.model
+
 
+
Rate() - Constructor for class com.easypost.model.Rate
+
 
+
RATE_LIMIT_ERROR - Static variable in class com.easypost.exception.Constants.ErrorCode
+
 
+
RateLimitError - Exception in com.easypost.exception.API
+
 
+
RateLimitError(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.API.RateLimitError
+
+
RateLimitError constructor.
+
+
readTimeout - Static variable in class com.easypost.EasyPost
+
 
+
REDIRECT_CODE_BEGIN - Static variable in class com.easypost.exception.Constants.ErrorCode
+
 
+
REDIRECT_CODE_END - Static variable in class com.easypost.exception.Constants.ErrorCode
+
 
+
RedirectError - Exception in com.easypost.exception.API
+
 
+
RedirectError(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.API.RedirectError
+
+
RedirectError constructor.
+
+
ReferralCustomer - Class in com.easypost.model
+
 
+
ReferralCustomer() - Constructor for class com.easypost.model.ReferralCustomer
+
 
+
ReferralCustomerCollection - Class in com.easypost.model
+
 
+
ReferralCustomerCollection() - Constructor for class com.easypost.model.ReferralCustomerCollection
+
 
+
refresh() - Method in class com.easypost.model.Batch
+
+
Refresh this Batch object.
+
+
refresh() - Method in class com.easypost.model.Insurance
+
+
Refresh this Insurance.
+
+
refresh() - Method in class com.easypost.model.Order
+
+
Refresh this Order object.
+
+
refresh() - Method in class com.easypost.model.Pickup
+
+
Refresh this Pickup.
+
+
refresh() - Method in class com.easypost.model.Shipment
+
+
Refresh this Shipment.
+
+
refresh(String) - Method in class com.easypost.model.Batch
+
+
Refresh this Batch object.
+
+
refresh(String) - Method in class com.easypost.model.Insurance
+
+
Refresh this Insurance.
+
+
refresh(String) - Method in class com.easypost.model.Order
+
+
Refresh this Order object.
+
+
refresh(String) - Method in class com.easypost.model.Pickup
+
+
Refresh this Pickup.
+
+
refresh(String) - Method in class com.easypost.model.Shipment
+
+
Refresh this Shipment.
+
+
refresh(Map<String, Object>) - Method in class com.easypost.model.Batch
+
+
Refresh this Batch object.
+
+
refresh(Map<String, Object>) - Method in class com.easypost.model.Insurance
+
+
Refresh this Insurance.
+
+
refresh(Map<String, Object>) - Method in class com.easypost.model.Order
+
+
Refresh this Order object.
+
+
refresh(Map<String, Object>) - Method in class com.easypost.model.Pickup
+
+
Refresh this Pickup.
+
+
refresh(Map<String, Object>) - Method in class com.easypost.model.Shipment
+
+
Refresh this Shipment.
+
+
refresh(Map<String, Object>, String) - Method in class com.easypost.model.Batch
+
+
Refresh this Batch object.
+
+
refresh(Map<String, Object>, String) - Method in class com.easypost.model.Insurance
+
+
Refresh this Insurance.
+
+
refresh(Map<String, Object>, String) - Method in class com.easypost.model.Order
+
+
Refresh this Order object.
+
+
refresh(Map<String, Object>, String) - Method in class com.easypost.model.Pickup
+
+
Refresh this Pickup.
+
+
refresh(Map<String, Object>, String) - Method in class com.easypost.model.Shipment
+
+
Refresh this Shipment.
+
+
refund() - Method in class com.easypost.model.Shipment
+
+
Refund this Shipment.
+
+
refund(String) - Method in class com.easypost.model.Shipment
+
+
Refund this Shipment.
+
+
refund(Map<String, Object>) - Method in class com.easypost.model.Shipment
+
+
Refund this Shipment.
+
+
refund(Map<String, Object>, String) - Method in class com.easypost.model.Shipment
+
+
Refund this Shipment.
+
+
Refund - Class in com.easypost.model
+
 
+
Refund() - Constructor for class com.easypost.model.Refund
+
 
+
RefundCollection - Class in com.easypost.model
+
 
+
RefundCollection() - Constructor for class com.easypost.model.RefundCollection
+
 
+
removeShipments(List<Shipment>) - Method in class com.easypost.model.Batch
+
+
Remove shipments from this Batch object.
+
+
removeShipments(List<Shipment>, String) - Method in class com.easypost.model.Batch
+
+
Remove shipments from this Batch object.
+
+
removeShipments(Map<String, Object>) - Method in class com.easypost.model.Batch
+
+
Remove shipments from this Batch object.
+
+
removeShipments(Map<String, Object>, String) - Method in class com.easypost.model.Batch
+
+
Remove shipments from this Batch object.
+
+
Report - Class in com.easypost.model
+
 
+
Report() - Constructor for class com.easypost.model.Report
+
 
+
ReportCollection - Class in com.easypost.model
+
 
+
ReportCollection() - Constructor for class com.easypost.model.ReportCollection
+
 
+
reportURL(String) - Static method in class com.easypost.model.Report
+
+
Generate a report URL.
+
+
request(Requestor.RequestMethod, String, Map<String, Object>, Class<T>, String) - Static method in class com.easypost.http.Requestor
+
+
Send an HTTP request to EasyPost.
+
+
request(Requestor.RequestMethod, String, Map<String, Object>, Class<T>, String, boolean) - Static method in class com.easypost.http.Requestor
+
+
Send an HTTP request to EasyPost.
+
+
Requestor - Class in com.easypost.http
+
 
+
Requestor() - Constructor for class com.easypost.http.Requestor
+
 
+
Requestor.RequestMethod - Enum in com.easypost.http
+
 
+
retrieve(String) - Static method in class com.easypost.model.Address
+
+
Retrieve Address object from API.
+
+
retrieve(String) - Static method in class com.easypost.model.Batch
+
+
Retrieve a Batch object from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.CarrierAccount
+
+
Retrieve a carrier account from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.CustomsInfo
+
+
Retrieve a CustomsInfo from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.CustomsItem
+
+
Retrieve a CustomsItem from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.EndShipper
+
+
Retrieve EndShipper object from API.
+
+
retrieve(String) - Static method in class com.easypost.model.Event
+
+
Retrieve a Event from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.Insurance
+
+
Retrieve an Insurance from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.Order
+
+
Retrieve an Order object from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.Parcel
+
+
Retrieve a Parcel from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.Pickup
+
+
Retrieve a Pickup from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.Rate
+
+
Retrieve a Rate from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.Refund
+
+
Retrieve a Refund object from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.Report
+
+
Retrieve a Report from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.ScanForm
+
+
Retrieve a ScanForm from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.Shipment
+
+
Retrieve a Shipment from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.Tracker
+
+
Retrieve a Tracker object from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.User
+
+
Retrieve a User from the API.
+
+
retrieve(String) - Static method in class com.easypost.model.Webhook
+
+
Retrieve a Webhook object from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.Address
+
+
Retrieve Address object from API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.Batch
+
+
Retrieve a Batch object from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.CarrierAccount
+
+
Retrieve a carrier account from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.CustomsInfo
+
+
Retrieve a CustomsInfo from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.CustomsItem
+
+
Retrieve a CustomsItem from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.EndShipper
+
+
Retrieve EndShipper object from API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.Event
+
+
Retrieve a Event from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.Insurance
+
+
Retrieve an Insurance from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.Order
+
+
Retrieve an Order object from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.Parcel
+
+
Retrieve a Parcel from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.Pickup
+
+
Retrieve a Pickup from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.Rate
+
+
Retrieve a Rate from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.Refund
+
+
Retrieve a Refund object from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.Report
+
+
Retrieve a Report from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.ScanForm
+
+
Retrieve a ScanForm from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.Shipment
+
+
Retrieve a Shipment from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.Tracker
+
+
Retrieve a Tracker object from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.User
+
+
Retrieve a User from the API.
+
+
retrieve(String, String) - Static method in class com.easypost.model.Webhook
+
+
Retrieve a Webhook object from the API.
+
+
retrieveMe() - Static method in class com.easypost.model.User
+
+
Retrieve your User from the API.
+
+
retrieveMe(String) - Static method in class com.easypost.model.User
+
+
Retrieve your User from the API.
+
+
retrievePaymentMethods() - Static method in class com.easypost.model.Billing
+
+
List all payment methods for this account.
+
+
retrievePaymentMethods(String) - Static method in class com.easypost.model.Billing
+
+
List all payment methods for this account.
+
+
+

S

+
+
ScanForm - Class in com.easypost.model
+
 
+
ScanForm() - Constructor for class com.easypost.model.ScanForm
+
 
+
ScanFormCollection - Class in com.easypost.model
+
 
+
ScanFormCollection() - Constructor for class com.easypost.model.ScanFormCollection
+
 
+
SECONDARY - Enum constant in enum com.easypost.model.CreditCardPriority
+
+
Deprecated.
+
SECONDARY - Enum constant in enum com.easypost.model.PaymentMethod.Priority
+
 
+
SecondaryPaymentMethod - Class in com.easypost.model
+
+
Deprecated. +
Use PaymentMethodObject instead. + Deprecated: v5.5.0 - v7.0.0
+
+
+
SecondaryPaymentMethod() - Constructor for class com.easypost.model.SecondaryPaymentMethod
+
+
Deprecated.
+
serialize(HashMap<String, Object>, Type, JsonSerializationContext) - Method in class com.easypost.http.HashMapSerializer
+
 
+
SERVICE_UNAVAILABLE_ERROR - Static variable in class com.easypost.exception.Constants.ErrorCode
+
 
+
ServiceUnavailablError - Exception in com.easypost.exception.API
+
 
+
ServiceUnavailablError(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.API.ServiceUnavailablError
+
+
ServiceUnavailablError constructor.
+
+
setAd(String) - Method in class com.easypost.model.Brand
+
+
Set the ad of the Brand.
+
+
setAddress(Address) - Method in class com.easypost.model.AddressVerifyResponse
+
+
Set the Address object.
+
+
setAddress(Address) - Method in class com.easypost.model.Pickup
+
+
Set the address of this Pickup.
+
+
setAddressDetail(AddressDetail) - Method in class com.easypost.model.AddressVerification
+
+
Set the address detail object.
+
+
setAddresses(List<Address>) - Method in class com.easypost.model.AddressCollection
+
+
Set a list of addresses.
+
+
setAdHref(String) - Method in class com.easypost.model.Brand
+
+
Set the ad href of the Brand.
+
+
setAlternateIdentifier(String) - Method in class com.easypost.model.CarrierDetail
+
+
Set alternate identifier.
+
+
setAmount(float) - Method in class com.easypost.model.Fee
+
+
Set Fee amount.
+
+
setAmount(String) - Method in class com.easypost.model.Insurance
+
+
Set the amount of this Insurance.
+
+
setApiKeys(List<ApiKey>) - Method in class com.easypost.model.ReferralCustomer
+
+
Set the api keys of the Referral user.
+
+
setAppEngineTimeoutSeconds(double) - Static method in class com.easypost.http.Requestor
+
+
Set the timeout in seconds for App Engine API requests.
+
+
setAutoLink(boolean) - Method in class com.easypost.model.Fields
+
+
Set whether this Fields object is auto-linked.
+
+
setBackgroundColor(String) - Method in class com.easypost.model.Brand
+
+
Set the background of the Brand.
+
+
setBalance(String) - Method in class com.easypost.model.BaseUser
+
+
Set the balance of the User.
+
+
setBatches(List<Batch>) - Method in class com.easypost.model.BatchCollection
+
+
Set a list of batches.
+
+
setBatchId(String) - Method in class com.easypost.model.ScanForm
+
+
Set the batch ID of the ScanForm.
+
+
setBatchId(String) - Method in class com.easypost.model.Shipment
+
+
Set the batch ID of this Shipment.
+
+
setBatchMessage(String) - Method in class com.easypost.model.Shipment
+
+
Set the batch message of this Shipment.
+
+
setBatchStatus(BatchStatus) - Method in class com.easypost.model.Batch
+
+
Set status of this batch.
+
+
setBatchStatus(String) - Method in class com.easypost.model.Shipment
+
+
Set the batch status of this Shipment.
+
+
setBillingType(String) - Method in class com.easypost.model.CarrierAccount
+
+
Set billing type of the carrier account.
+
+
setBillingType(String) - Method in class com.easypost.model.Rate
+
+
Set billing type of this rate.
+
+
setBrand(String) - Method in class com.easypost.model.BaseCreditCard
+
+
Deprecated.
+
Set the brand of this CreditCard object.
+
+
setBuyerAddress(Address) - Method in class com.easypost.model.Order
+
+
Set the buyer address of the Order.
+
+
setBuyerAddress(Address) - Method in class com.easypost.model.Shipment
+
+
Set the buyer address of this Shipment.
+
+
setCarbonOffset(CarbonOffset) - Method in class com.easypost.model.Rate
+
+
Set the carbon offset of this Rate.
+
+
setCarrier(String) - Method in class com.easypost.model.Rate
+
+
Set the carrier of this Rate.
+
+
setCarrier(String) - Method in class com.easypost.model.Refund
+
+
Set refund carrier.
+
+
setCarrier(String) - Method in class com.easypost.model.ShipmentMessage
+
+
Set the carrier associated with this message.
+
+
setCarrier(String) - Method in class com.easypost.model.Tracker
+
+
Set the carrier of the Tracker.
+
+
setCarrierAccountId(String) - Method in class com.easypost.model.Rate
+
+
Set the ID of the carrier account of this Rate.
+
+
setCarrierAccountId(String) - Method in class com.easypost.model.ShipmentMessage
+
+
Set the carrier account id associated with this message.
+
+
setCarrierAccounts(List<CarrierAccount>) - Method in class com.easypost.model.Order
+
+
Set the carrier accounts of the Order.
+
+
setCarrierAccounts(List<CarrierAccount>) - Method in class com.easypost.model.Pickup
+
+
Set the carrier accounts of this Pickup.
+
+
setCarrierAccounts(List<CarrierAccount>) - Method in class com.easypost.model.Shipment
+
+
Set the carrier accounts list.
+
+
setCarrierDetail(CarrierDetail) - Method in class com.easypost.model.Tracker
+
+
Set details about the carrier associated with the Tracker.
+
+
setCarrierFacility(String) - Method in class com.easypost.model.Address
+
+
Set carrier facility for address.
+
+
setCcFeeRate(String) - Method in class com.easypost.model.BaseUser
+
+
Set the cc fee rate of the User.
+
+
setCharged(Boolean) - Method in class com.easypost.model.Fee
+
+
Set whether the fee is charged.
+
+
setChildren(List<ApiKeys>) - Method in class com.easypost.model.ApiKeys
+
+
Set a list of API keys for a given parent key.
+
+
setChildren(List<User>) - Method in class com.easypost.model.BaseUser
+
+
Set the children of the User.
+
+
setCity(String) - Method in class com.easypost.model.BaseAddress
+
+
Set city of address.
+
+
setCity(String) - Method in class com.easypost.model.TrackingLocation
+
+
Set the city of the tracking location.
+
+
setClone(boolean) - Method in class com.easypost.model.CarrierAccount
+
+
Set whether the carrier account is a clone.
+
+
setCode(String) - Method in class com.easypost.model.AddressDetail
+
+
Set time zone of the address.
+
+
setCode(String) - Method in class com.easypost.model.CustomsItem
+
+
Set this CustomsItem's code.
+
+
setCode(String) - Method in class com.easypost.model.Error
+
+
Set the error code.
+
+
setColor(String) - Method in class com.easypost.model.Brand
+
+
Set the color of the Brand.
+
+
setCompany(String) - Method in class com.easypost.model.BaseAddress
+
+
Set company of Address.
+
+
setCompletedUrls(List<String>) - Method in class com.easypost.model.Event
+
 
+
setConfirmation(String) - Method in class com.easypost.model.Pickup
+
+
Set the confirmation of this Pickup.
+
+
setConfirmation(String) - Method in class com.easypost.model.ScanForm
+
+
Set the confirmation of the ScanForm.
+
+
setConfirmationNumber(String) - Method in class com.easypost.model.Refund
+
+
Set refund confirmation number.
+
+
setConnectTimeoutMilliseconds(int) - Static method in class com.easypost.http.Requestor
+
+
Set the timeout in milliseconds for connecting to the API.
+
+
setContainerType(String) - Method in class com.easypost.model.CarrierDetail
+
+
Set carrier container type.
+
+
setContentsExplanation(String) - Method in class com.easypost.model.CustomsInfo
+
+
Set an explanation of this CustomsInfo's contents.
+
+
setContentsType(String) - Method in class com.easypost.model.CustomsInfo
+
+
Set this CustomsInfo's contents type.
+
+
setCountry(String) - Method in class com.easypost.model.BaseAddress
+
+
Set country of Address.
+
+
setCountry(String) - Method in class com.easypost.model.TrackingLocation
+
+
Set the country of the tracking location.
+
+
setCreated(int) - Method in class com.easypost.model.BatchStatus
+
+
Set the number of batches created.
+
+
setCreatedAt(Date) - Method in class com.easypost.model.EasyPostResource
+
+
Set the Date this object was created.
+
+
setCreationFailed(int) - Method in class com.easypost.model.BatchStatus
+
+
Set the number of batches that failed to be created.
+
+
setCredentials(Field) - Method in class com.easypost.model.Fields
+
+
Set the credentials for this Fields object.
+
+
setCredentials(Map<String, Object>) - Method in class com.easypost.model.CarrierAccount
+
+
Set credentials of the carrier account.
+
+
setCurrency(String) - Method in class com.easypost.model.CustomsItem
+
+
Set this CustomsItem's currency.
+
+
setCurrency(String) - Method in class com.easypost.model.Rate
+
+
Set the currency of this Rate.
+
+
setCustomsCertify(boolean) - Method in class com.easypost.model.CustomsInfo
+
+
Set whether this CustomsInfo is certified by customs.
+
+
setCustomsInfo(CustomsInfo) - Method in class com.easypost.model.Order
+
+
Set the customs info of the Order.
+
+
setCustomsInfo(CustomsInfo) - Method in class com.easypost.model.Shipment
+
+
Set the customs info of this Shipment.
+
+
setCustomsItems(List<CustomsItem>) - Method in class com.easypost.model.CustomsInfo
+
+
Set this CustomsInfo's customs items.
+
+
setCustomsSigner(String) - Method in class com.easypost.model.CustomsInfo
+
+
Set this CustomsInfo's signer.
+
+
setCustomWorkflow(boolean) - Method in class com.easypost.model.Fields
+
+
Set whether this Fields object is a custom workflow.
+
+
setDateAdvance(int) - Method in class com.easypost.model.PostageLabel
+
+
Set the date advance of this PostageLabel.
+
+
setDatetime(Date) - Method in class com.easypost.model.TrackingDetail
+
+
Set the datetime of the tracking detail.
+
+
setDeclaration(String) - Method in class com.easypost.model.CustomsInfo
+
+
Set this CustomsInfo's declaration.
+
+
setDefaultInsuranceAmount(String) - Method in class com.easypost.model.BaseUser
+
+
Set the default insurance amount of the User.
+
+
setDelivery(AddressVerification) - Method in class com.easypost.model.AddressVerifications
+
+
Set the delivery of the AddressVerification.
+
+
setDeliveryDate(String) - Method in class com.easypost.model.Rate
+
+
Set the delivery date of this Rate.
+
+
setDeliveryDateGuaranteed(Boolean) - Method in class com.easypost.model.Rate
+
+
Set whether the delivery date is guaranteed for this Rate.
+
+
setDeliveryDays(Number) - Method in class com.easypost.model.Rate
+
+
Set the delivery days of this Rate.
+
+
setDescription(String) - Method in class com.easypost.model.CarrierAccount
+
+
Set description of the carrier account.
+
+
setDescription(String) - Method in class com.easypost.model.CustomsItem
+
+
Set this CustomsItem's description.
+
+
setDescription(String) - Method in class com.easypost.model.Event
+
+
Set the description of this Event.
+
+
setDestinationLocation(String) - Method in class com.easypost.model.CarrierDetail
+
+
Set destination location.
+
+
setDisabledAt(Date) - Method in class com.easypost.model.Webhook
+
+
Set the date and time when the webhook was disabled.
+
+
setEelPfc(String) - Method in class com.easypost.model.CustomsInfo
+
+
Set this CustomsInfo's EEL or PFC.
+
+
setEmail(String) - Method in class com.easypost.model.BaseAddress
+
+
Set email of Address.
+
+
setEmail(String) - Method in class com.easypost.model.BaseUser
+
+
Set the email of the User.
+
+
setEndDate(Date) - Method in class com.easypost.model.Report
+
+
Set the end date of this Report.
+
+
setEndShippers(List<EndShipper>) - Method in class com.easypost.model.EndShipperCollection
+
+
Set a list of EndShippers.
+
+
setEntity(String) - Method in class com.easypost.model.TaxIdentifier
+
+
Set the entity associated with this TaxIdentifier.
+
+
setErrors(List<Error>) - Method in class com.easypost.model.AddressVerification
+
+
Set the list of errors that occurred during the address verification.
+
+
setErrors(List<Error>) - Method in class com.easypost.model.Error
+
+
Set the errors for an Error object.
+
+
setEstDeliveryDate(Date) - Method in class com.easypost.model.Tracker
+
+
Set the estimated delivery date of the Tracker.
+
+
setEstDeliveryDateLocal(String) - Method in class com.easypost.model.CarrierDetail
+
+
Set the estimated delivery date in local time.
+
+
setEstDeliveryDays(Number) - Method in class com.easypost.model.Rate
+
+
Set the estimated delivery days for this Rate.
+
+
setEstDeliveryTimeLocal(String) - Method in class com.easypost.model.CarrierDetail
+
+
Set the estimated delivery time in local time.
+
+
setEvents(List<Event>) - Method in class com.easypost.model.EventCollection
+
+
Set a list of events.
+
+
setExpMonth(String) - Method in class com.easypost.model.BaseCreditCard
+
+
Deprecated.
+
Set the expMonth of this CreditCard object.
+
+
setExpYear(String) - Method in class com.easypost.model.BaseCreditCard
+
+
Deprecated.
+
Set the expYear of this CreditCard object.
+
+
setFederalTaxId(String) - Method in class com.easypost.model.Address
+
+
Set federal tax id of address.
+
+
setFees(List<Fee>) - Method in class com.easypost.model.Shipment
+
+
Set the Fees associated with this object.
+
+
setField(String) - Method in class com.easypost.model.Error
+
+
Set the field of the error.
+
+
setFields(Fields) - Method in class com.easypost.model.CarrierAccount
+
+
Set fields of the carrier account.
+
+
setFields(Map<String, Object>) - Method in class com.easypost.model.CarrierType
+
+
Set the fields of carrier.
+
+
setFormFileType(String) - Method in class com.easypost.model.ScanForm
+
+
Get the form file type of the ScanForm.
+
+
setForms(List<Form>) - Method in class com.easypost.model.Shipment
+
+
Set the forms of this Shipment.
+
+
setFormType(String) - Method in class com.easypost.model.Form
+
+
Set the form type of the Form.
+
+
setFormUrl(String) - Method in class com.easypost.model.Form
+
+
Set the form url of the Form.
+
+
setFormUrl(String) - Method in class com.easypost.model.ScanForm
+
+
Set the URL for the ScanForm.
+
+
setFromAddress(Address) - Method in class com.easypost.model.Insurance
+
+
Set the from address of this Insurance.
+
+
setFromAddress(Address) - Method in class com.easypost.model.Order
+
+
Set the from address of the Order.
+
+
setFromAddress(Address) - Method in class com.easypost.model.ScanForm
+
+
Set the from address of the ScanForm.
+
+
setFromAddress(Address) - Method in class com.easypost.model.Shipment
+
+
Set the from address of this Shipment.
+
+
setGuaranteedDeliveryDate(String) - Method in class com.easypost.model.CarrierDetail
+
+
Set the guaranteed delivery date.
+
+
setHasBillingMethod(boolean) - Method in class com.easypost.model.BaseUser
+
+
Set the has billing method of the User.
+
+
setHasMore(boolean) - Method in class com.easypost.model.ReferralCustomerCollection
+
+
Set whether there are more ReferralCustomers to retrieve.
+
+
setHasMore(Boolean) - Method in class com.easypost.model.AddressCollection
+
+
Set whether there are more addresses to retrieve.
+
+
setHasMore(Boolean) - Method in class com.easypost.model.BatchCollection
+
+
Set whether there are more batches to retrieve.
+
+
setHasMore(Boolean) - Method in class com.easypost.model.EndShipperCollection
+
+
Set whether there are more EndShippers to retrieve.
+
+
setHasMore(Boolean) - Method in class com.easypost.model.EventCollection
+
+
Set whether there are more events to retrieve.
+
+
setHasMore(Boolean) - Method in class com.easypost.model.InsuranceCollection
+
+
Set whether there are more insurances.
+
+
setHasMore(Boolean) - Method in class com.easypost.model.OrderCollection
+
+
Set whether there are more orders to retrieve.
+
+
setHasMore(Boolean) - Method in class com.easypost.model.PickupCollection
+
+
Set whether there are more Pickup objects to retrieve.
+
+
setHasMore(Boolean) - Method in class com.easypost.model.RefundCollection
+
+
Set whether there are more Refund objects to retrieve.
+
+
setHasMore(Boolean) - Method in class com.easypost.model.ReportCollection
+
+
Set whether there are more reports to retrieve.
+
+
setHasMore(Boolean) - Method in class com.easypost.model.ScanFormCollection
+
+
Set whether there are more ScanForms to retrieve.
+
+
setHasMore(Boolean) - Method in class com.easypost.model.ShipmentCollection
+
+
Set whether there are more Shipment objects to retrieve.
+
+
setHasMore(Boolean) - Method in class com.easypost.model.TrackerCollection
+
+
Set whether there are more Trackers to retrieve.
+
+
setHeight(Float) - Method in class com.easypost.model.Parcel
+
+
Set the height of this Parcel.
+
+
setHsTariffNumber(String) - Method in class com.easypost.model.CustomsItem
+
+
Set this CustomsItem's HS Tariff Number.
+
+
setId(String) - Method in class com.easypost.model.EasyPostResource
+
+
Set the ID of this object.
+
+
setIncludeChildren(Boolean) - Method in class com.easypost.model.Report
+
+
Set whether this Report includes children.
+
+
setInitialDeliveryAttempt(String) - Method in class com.easypost.model.CarrierDetail
+
+
Set initial delivery attempt.
+
+
setInstructions(String) - Method in class com.easypost.model.Pickup
+
+
Set instructions for the pickup.
+
+
setInsurance(String) - Method in class com.easypost.model.Shipment
+
+
Set the insurance of this Shipment.
+
+
setInsuranceFeeMinimum(String) - Method in class com.easypost.model.BaseUser
+
+
Set the insurance fee minimum of the User.
+
+
setInsuranceFeeRate(String) - Method in class com.easypost.model.BaseUser
+
+
Set the insurance fee rate of the User.
+
+
setInsurances(List<Insurance>) - Method in class com.easypost.model.InsuranceCollection
+
+
Set the list of insurances.
+
+
setIntegratedForm(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the integrated form of this PostageLabel.
+
+
setIsAccountAddress(Boolean) - Method in class com.easypost.model.Pickup
+
+
Set whether the address is an account address.
+
+
setIsReturn(Boolean) - Method in class com.easypost.model.Order
+
+
Set whether the order is a return.
+
+
setIsReturn(Boolean) - Method in class com.easypost.model.Shipment
+
+
Set whether this Shipment is a return shipment.
+
+
setIssuingCountry(String) - Method in class com.easypost.model.TaxIdentifier
+
+
Set the issuing country associated with this TaxIdentifier.
+
+
setKey(String) - Method in class com.easypost.model.ApiKey
+
+
Set the API key.
+
+
setKey(String) - Method in class com.easypost.model.Field
+
+
Set the key of this field.
+
+
setKeys(List<ApiKey>) - Method in class com.easypost.model.ApiKeys
+
+
Set list of API keys.
+
+
setLabel(String) - Method in class com.easypost.model.Field
+
+
Set the label of this field.
+
+
setLabelEpl2FileType(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the EPL2 file type of this PostageLabel.
+
+
setLabelEpl2Size(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the EPL2 size of this PostageLabel.
+
+
setLabelEpl2Type(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the EPL2 type of this PostageLabel.
+
+
setLabelEpl2Url(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the EPL2 URL of this PostageLabel.
+
+
setLabelFile(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the file of this PostageLabel.
+
+
setLabelFileType(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the file type of this PostageLabel.
+
+
setLabelPdfFileType(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the PDF file type of this PostageLabel.
+
+
setLabelPdfSize(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the PDF size of this PostageLabel.
+
+
setLabelPdfType(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the PDF type of this PostageLabel.
+
+
setLabelPdfUrl(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the PDF URL of this PostageLabel.
+
+
setLabelResolution(int) - Method in class com.easypost.model.PostageLabel
+
+
Set the resolution of this PostageLabel.
+
+
setLabelSize(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the size of this PostageLabel.
+
+
setLabelType(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the type of this PostageLabel.
+
+
setLabelUrl(String) - Method in class com.easypost.model.Batch
+
+
Set label url of this batch.
+
+
setLabelUrl(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the URL of this PostageLabel.
+
+
setLabelZplFileType(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the ZPL file type of this PostageLabel.
+
+
setLabelZplSize(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the ZPL size of this PostageLabel.
+
+
setLabelZplType(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the ZPL type of this PostageLabel.
+
+
setLabelZplUrl(String) - Method in class com.easypost.model.PostageLabel
+
+
Set the ZPL URL of this PostageLabel.
+
+
setLast4(String) - Method in class com.easypost.model.BaseCreditCard
+
+
Deprecated.
+
Set the last 4 digits of this CreditCard object.
+
+
setLatitude(Float) - Method in class com.easypost.model.AddressDetail
+
+
Set latitude of the address.
+
+
setLength(Float) - Method in class com.easypost.model.Parcel
+
+
Set the length of this Parcel.
+
+
setListCurrency(String) - Method in class com.easypost.model.Rate
+
+
Set the list currency of this Rate.
+
+
setListRate(Float) - Method in class com.easypost.model.Rate
+
+
Set the list rate of this Rate.
+
+
setLogo(String) - Method in class com.easypost.model.Brand
+
+
Set the logo of the Brand.
+
+
setLogo(String) - Method in class com.easypost.model.CarrierType
+
+
Set the logo of carrier.
+
+
setLogoHref(String) - Method in class com.easypost.model.Brand
+
+
Set the logo href of the Brand.
+
+
setLongitude(Float) - Method in class com.easypost.model.AddressDetail
+
+
Set longitude of the address.
+
+
setMaxDatetime(Date) - Method in class com.easypost.model.Pickup
+
+
Set the latest date of this Pickup.
+
+
setMessage(Object) - Method in class com.easypost.model.ShipmentMessage
+
+
Set the contents of this message.
+
+
setMessage(String) - Method in class com.easypost.model.Address
+
+
Set address message.
+
+
setMessage(String) - Method in class com.easypost.model.AddressVerifyResponse
+
+
Set the message.
+
+
setMessage(String) - Method in class com.easypost.model.Error
+
+
Set the error message.
+
+
setMessage(String) - Method in class com.easypost.model.ScanForm
+
+
Set the message of the ScanForm.
+
+
setMessage(String) - Method in class com.easypost.model.TrackingDetail
+
+
Set the message of the tracking detail.
+
+
setMessages(List<ShipmentMessage>) - Method in class com.easypost.model.Order
+
+
Set the messages of the Order.
+
+
setMessages(List<ShipmentMessage>) - Method in class com.easypost.model.Pickup
+
+
Set the messages of this Pickup.
+
+
setMessages(List<ShipmentMessage>) - Method in class com.easypost.model.Shipment
+
+
Set the messages of this Shipment.
+
+
setMessages(List<String>) - Method in class com.easypost.model.Insurance
+
+
Set the messages of this Insurance.
+
+
setMinDatetime(Date) - Method in class com.easypost.model.Pickup
+
+
Set the earliest date of this Pickup.
+
+
setMode(String) - Method in class com.easypost.model.EasyPostResource
+
+
Set the API mode used to create this object.
+
+
setName(String) - Method in class com.easypost.model.BaseAddress
+
+
Set name of Address.
+
+
setName(String) - Method in class com.easypost.model.BaseCreditCard
+
+
Deprecated.
+
Set the name of this CreditCard object.
+
+
setName(String) - Method in class com.easypost.model.BaseUser
+
+
Set the name of the User.
+
+
setName(String) - Method in class com.easypost.model.Brand
+
+
Set the name of the User.
+
+
setNonDeliveryOption(String) - Method in class com.easypost.model.CustomsInfo
+
+
Set this CustomsInfo's non-delivery option.
+
+
setNumShipments(Number) - Method in class com.easypost.model.Batch
+
+
Set number of shipments in this batch.
+
+
setObject(EasyPostResource) - Method in class com.easypost.model.EventData
+
+
Set the object of this EventData.
+
+
setObject(String) - Method in class com.easypost.model.BaseCreditCard
+
+
Deprecated.
+
Set the object of this CreditCard object.
+
+
setObject(String) - Method in class com.easypost.model.BaseUser
+
+
Set the object of the User.
+
+
setObject(String) - Method in class com.easypost.model.CarrierAccount
+
+
Set object type of the carrier account.
+
+
setOptions(Map<String, Object>) - Method in class com.easypost.model.Order
+
+
Set the options of the Order.
+
+
setOptions(Map<String, Object>) - Method in class com.easypost.model.Shipment
+
+
Set the options of this Shipment.
+
+
setOrderId(String) - Method in class com.easypost.model.Shipment
+
+
Set the ID of the order of this Shipment.
+
+
setOrders(List<Order>) - Method in class com.easypost.model.OrderCollection
+
+
Set a list of orders.
+
+
setOriginCountry(String) - Method in class com.easypost.model.CustomsItem
+
+
Set this CustomsItem's origin country.
+
+
setOriginLocation(String) - Method in class com.easypost.model.CarrierDetail
+
+
Set origin location.
+
+
setParcel(Parcel) - Method in class com.easypost.model.Shipment
+
+
Set the parcel of this Shipment.
+
+
setParentId(String) - Method in class com.easypost.model.BaseUser
+
+
Set the parent ID of the User.
+
+
setPendingUrls(List<String>) - Method in class com.easypost.model.Event
+
 
+
setPercentile50(Integer) - Method in class com.easypost.model.TimeInTransit
+
+
Set the 50th percentile of this TimeInTransit.
+
+
setPercentile75(Integer) - Method in class com.easypost.model.TimeInTransit
+
+
Get the 75th percentile of this TimeInTransit.
+
+
setPercentile85(Integer) - Method in class com.easypost.model.TimeInTransit
+
+
Get the 85th percentile of this TimeInTransit.
+
+
setPercentile90(Integer) - Method in class com.easypost.model.TimeInTransit
+
+
Set the 90th percentile of this TimeInTransit.
+
+
setPercentile95(Integer) - Method in class com.easypost.model.TimeInTransit
+
+
Set the 95th percentile of this TimeInTransit.
+
+
setPercentile97(Integer) - Method in class com.easypost.model.TimeInTransit
+
+
Set the 97th percentile of this TimeInTransit.
+
+
setPercentile99(Integer) - Method in class com.easypost.model.TimeInTransit
+
+
Set the 99th percentile of this TimeInTransit.
+
+
setPhone(String) - Method in class com.easypost.model.BaseAddress
+
+
Set phone number of Address.
+
+
setPhoneNumber(String) - Method in class com.easypost.model.BaseUser
+
+
Set the phone number of the User.
+
+
setPickupID(String) - Method in class com.easypost.model.PickupRate
+
+
Set the ID of this Pickup.
+
+
setPickupRates(List<PickupRate>) - Method in class com.easypost.model.Pickup
+
+
Set the pickup rates of this Pickup.
+
+
setPickups(List<Pickup>) - Method in class com.easypost.model.PickupCollection
+
+
Set this PickupCollection's Pickup objects.
+
+
setPostageLabel(PostageLabel) - Method in class com.easypost.model.Shipment
+
+
Set the postage label of this Shipment.
+
+
setPostagePurchased(int) - Method in class com.easypost.model.BatchStatus
+
+
Set the number of postage purchases.
+
+
setPostagePurchaseFailed(int) - Method in class com.easypost.model.BatchStatus
+
+
Set the number of postage purchases that failed.
+
+
setPredefinedPackage(String) - Method in class com.easypost.model.Parcel
+
+
Set the predefined package of this Parcel.
+
+
setPreviousAttributes(Map<String, Object>) - Method in class com.easypost.model.Event
+
+
Set the previous attributes of this Event.
+
+
setPreviousAttributes(Map<String, Object>) - Method in class com.easypost.model.EventData
+
+
Set the previous attributes of this EventData.
+
+
setPricePerShipment(String) - Method in class com.easypost.model.BaseUser
+
+
Set the price per shipment of the User.
+
+
setProvider(String) - Method in class com.easypost.model.Insurance
+
+
Set the provider of this Insurance.
+
+
setProviderId(String) - Method in class com.easypost.model.Insurance
+
+
Set the provider ID of this Insurance.
+
+
setPublicUrl(String) - Method in class com.easypost.model.Tracker
+
+
Set the public URL of the Tracker.
+
+
setQuantity(int) - Method in class com.easypost.model.CustomsItem
+
+
Set this CustomsItem's quantity.
+
+
setRate(Float) - Method in class com.easypost.model.Rate
+
+
Set the rate of this Rate.
+
+
setRates(List<Rate>) - Method in class com.easypost.model.Order
+
+
Set the rates of the Order.
+
+
setRates(List<Rate>) - Method in class com.easypost.model.Shipment
+
+
Set all rates of this Shipment.
+
+
setReadable(String) - Method in class com.easypost.model.CarrierAccount
+
+
Set readable name of the carrier account.
+
+
setReadable(String) - Method in class com.easypost.model.CarrierType
+
+
Set the readable name of the carrier.
+
+
setReadTimeoutMilliseconds(int) - Static method in class com.easypost.http.Requestor
+
+
Set the timeout in milliseconds for reading API responses.
+
+
setRechargeAmount(String) - Method in class com.easypost.model.BaseUser
+
+
Set the recharge amount of the User.
+
+
setRechargeThreshold(String) - Method in class com.easypost.model.BaseUser
+
+
Set the recharge threshold of the User.
+
+
setReference(String) - Method in class com.easypost.model.Batch
+
+
Set reference of this batch.
+
+
setReference(String) - Method in class com.easypost.model.CarrierAccount
+
+
Set reference of the carrier account.
+
+
setReference(String) - Method in class com.easypost.model.Insurance
+
+
Set the reference of this Insurance.
+
+
setReference(String) - Method in class com.easypost.model.Order
+
+
Set the reference of the Order.
+
+
setReference(String) - Method in class com.easypost.model.Pickup
+
+
Set the reference of this Pickup.
+
+
setReference(String) - Method in class com.easypost.model.Shipment
+
+
Set the reference of this Shipment.
+
+
setReferralCustomers(List<ReferralCustomer>) - Method in class com.easypost.model.ReferralCustomerCollection
+
+
Set a list of ReferralCustomers.
+
+
setRefunded(Boolean) - Method in class com.easypost.model.Fee
+
+
Set whether the fee is refunded.
+
+
setRefunds(List<Refund>) - Method in class com.easypost.model.RefundCollection
+
+
Set this RefundCollection's Refund objects.
+
+
setRefundStatus(String) - Method in class com.easypost.model.Shipment
+
+
Set the refund status of this Shipment.
+
+
setReports(List<Report>) - Method in class com.easypost.model.ReportCollection
+
+
Set this ReportCollection's Report objects.
+
+
setResidential(Boolean) - Method in class com.easypost.model.Address
+
+
Set whether address is residential.
+
+
setResponseBody(String) - Method in class com.easypost.http.EasyPostResponse
+
+
Set HTTP response body.
+
+
setResponseCode(int) - Method in class com.easypost.http.EasyPostResponse
+
+
Set HTTP response code.
+
+
setRestrictionComments(String) - Method in class com.easypost.model.CustomsInfo
+
+
Set this CustomsInfo's restriction comments.
+
+
setRestrictionType(String) - Method in class com.easypost.model.CustomsInfo
+
+
Set this CustomsInfo's restriction type.
+
+
setResult(Map<String, Object>) - Method in class com.easypost.model.Event
+
+
Set the result of this Event.
+
+
setRetailCurrency(String) - Method in class com.easypost.model.Rate
+
+
Set the retail currency of this Rate.
+
+
setRetailRate(Float) - Method in class com.easypost.model.Rate
+
+
Set the retail rate of this Rate.
+
+
setReturnAddress(Address) - Method in class com.easypost.model.Order
+
+
Set the return address of the Order.
+
+
setReturnAddress(Address) - Method in class com.easypost.model.Shipment
+
+
Set the return address of this Shipment.
+
+
setScanForm(ScanForm) - Method in class com.easypost.model.Batch
+
+
Set scan form of this batch.
+
+
setScanForm(ScanForm) - Method in class com.easypost.model.Shipment
+
+
Set the scan form of this Shipment.
+
+
setScanForms(List<ScanForm>) - Method in class com.easypost.model.ScanFormCollection
+
+
Set this ScanFormCollection's ScanForm objects.
+
+
setSecondaryRechargeAmount(String) - Method in class com.easypost.model.BaseUser
+
+
Set the secondary recharge amount of the User.
+
+
setSelectedRate(Rate) - Method in class com.easypost.model.Shipment
+
+
Set the selected rate of this Shipment.
+
+
setService(String) - Method in class com.easypost.model.CarrierDetail
+
+
Set carrier service.
+
+
setService(String) - Method in class com.easypost.model.Order
+
+
Set the service of the Order.
+
+
setService(String) - Method in class com.easypost.model.Rate
+
+
Set the service of this Rate.
+
+
setService(String) - Method in class com.easypost.model.Shipment
+
+
Set the service used.
+
+
setShipmentId(String) - Method in class com.easypost.model.Insurance
+
+
Set the shipment ID of this Insurance.
+
+
setShipmentId(String) - Method in class com.easypost.model.Rate
+
+
Set the ID of the shipment of this Rate.
+
+
setShipmentId(String) - Method in class com.easypost.model.Refund
+
+
Set refund shipment ID.
+
+
setShipmentId(String) - Method in class com.easypost.model.Tracker
+
+
Set the ID of the shipment associated with this tracker.
+
+
setShipments(List<Shipment>) - Method in class com.easypost.model.Batch
+
+
Set shipments in this batch.
+
+
setShipments(List<Shipment>) - Method in class com.easypost.model.Order
+
+
Set the shipments of the Order.
+
+
setShipments(List<Shipment>) - Method in class com.easypost.model.ShipmentCollection
+
+
Set this ShipmentCollection's Shipment objects.
+
+
setSignedBy(String) - Method in class com.easypost.model.Tracker
+
+
Set who signed for the package associated Tracker.
+
+
setSmartpostHub(String) - Method in class com.easypost.model.ShipmentOptions
+
+
Set the SmartPost hub of the shipment.
+
+
setSmartpostManifest(String) - Method in class com.easypost.model.ShipmentOptions
+
+
Set the SmartPost manifest of the shipment.
+
+
setSmartrates(List<Smartrate>) - Method in class com.easypost.model.SmartrateCollection
+
+
Set this SmartrateCollection's Smartrate objects.
+
+
setStartDate(Date) - Method in class com.easypost.model.Report
+
+
Set the start date of this Report.
+
+
setState(String) - Method in class com.easypost.model.BaseAddress
+
+
Set state of Address.
+
+
setState(String) - Method in class com.easypost.model.Batch
+
+
Set state of this batch.
+
+
setState(String) - Method in class com.easypost.model.TrackingLocation
+
+
Set the state of the tracking location.
+
+
setStatus(String) - Method in class com.easypost.model.Insurance
+
+
Set the status of this Insurance.
+
+
setStatus(String) - Method in class com.easypost.model.Pickup
+
+
Set the status of this Pickup.
+
+
setStatus(String) - Method in class com.easypost.model.Refund
+
+
Set refund status.
+
+
setStatus(String) - Method in class com.easypost.model.Report
+
+
Set the status of this Report.
+
+
setStatus(String) - Method in class com.easypost.model.ScanForm
+
+
Set the status of the ScanForm.
+
+
setStatus(String) - Method in class com.easypost.model.Shipment
+
+
Set the status of this Shipment.
+
+
setStatus(String) - Method in class com.easypost.model.Tracker
+
+
Set the status of the Tracker.
+
+
setStatus(String) - Method in class com.easypost.model.TrackingDetail
+
+
Set the status of the tracking detail.
+
+
setStatusDetail(String) - Method in class com.easypost.model.Tracker
+
+
Set the status of the Tracker.
+
+
setStatusDetail(String) - Method in class com.easypost.model.TrackingDetail
+
+
Set the status detail of the tracking detail.
+
+
setStreet1(String) - Method in class com.easypost.model.BaseAddress
+
+
Set first line of Address street.
+
+
setStreet2(String) - Method in class com.easypost.model.BaseAddress
+
+
Set second line of Address street.
+
+
setSubmittedElectronically(Boolean) - Method in class com.easypost.model.Form
+
+
Set whether the Form is submitted electronically.
+
+
setSuccess(Boolean) - Method in class com.easypost.model.AddressVerification
+
+
Set whether the address verification was successful.
+
+
setSuggestion(String) - Method in class com.easypost.model.Error
+
+
Set the suggestion of the error.
+
+
setTaxId(String) - Method in class com.easypost.model.TaxIdentifier
+
+
Set the tax ID associated with this TaxIdentifier.
+
+
setTaxIdentifiers(List<TaxIdentifier>) - Method in class com.easypost.model.Shipment
+
+
Set the tax identifiers of this Shipment.
+
+
setTaxIdType(String) - Method in class com.easypost.model.TaxIdentifier
+
+
Set the tax ID type associated with this TaxIdentifier.
+
+
setTestCredentials(Field) - Method in class com.easypost.model.Fields
+
+
Set the test credentials for this Fields object.
+
+
setTestCredentials(Map<String, Object>) - Method in class com.easypost.model.CarrierAccount
+
+
Set test credentials of the carrier account.
+
+
setTheme(String) - Method in class com.easypost.model.Brand
+
+
Set the theme of the Brand.
+
+
setToAddress(Address) - Method in class com.easypost.model.Insurance
+
+
Set the to address of this Insurance.
+
+
setToAddress(Address) - Method in class com.easypost.model.Order
+
+
Set the to address of the Order.
+
+
setToAddress(Address) - Method in class com.easypost.model.Shipment
+
+
Set the to address of this Shipment.
+
+
setTracker(Tracker) - Method in class com.easypost.model.Insurance
+
+
Set the tracker of this Insurance.
+
+
setTracker(Tracker) - Method in class com.easypost.model.Shipment
+
+
Set the tracker of this Shipment.
+
+
setTrackers(List<Tracker>) - Method in class com.easypost.model.TrackerCollection
+
+
Set this TrackerCollection's Tracker objects.
+
+
setTrackingCode(String) - Method in class com.easypost.model.Insurance
+
+
Set the tracking code of this Insurance.
+
+
setTrackingCode(String) - Method in class com.easypost.model.Refund
+
+
Set refund tracking code.
+
+
setTrackingCode(String) - Method in class com.easypost.model.Shipment
+
+
Set the tracking code of this Shipment.
+
+
setTrackingCode(String) - Method in class com.easypost.model.Tracker
+
+
Set the tracking code of the Tracker.
+
+
setTrackingCodes(List<String>) - Method in class com.easypost.model.ScanForm
+
+
Set the tracking codes of the ScanForm.
+
+
setTrackingDetails(List<TrackingDetail>) - Method in class com.easypost.model.Tracker
+
+
Set the tracking details of the Tracker.
+
+
setTrackingLocation(TrackingLocation) - Method in class com.easypost.model.TrackingDetail
+
+
Set the tracking location of the tracking detail.
+
+
setType(String) - Method in class com.easypost.model.CarrierAccount
+
+
Set type of the carrier account.
+
+
setType(String) - Method in class com.easypost.model.CarrierType
+
+
Set the type of carrier.
+
+
setType(String) - Method in class com.easypost.model.Fee
+
+
Set Fee type.
+
+
setType(String) - Method in class com.easypost.model.ShipmentMessage
+
+
Set the type of this message.
+
+
setUpdatedAt(Date) - Method in class com.easypost.model.EasyPostResource
+
+
Set the Date this object was last updated.
+
+
setUrl(String) - Method in class com.easypost.model.Report
+
+
Set the URL of this Report.
+
+
setUrl(String) - Method in class com.easypost.model.Webhook
+
+
Set the URL of the webhook.
+
+
setUrlExpiresAt(Date) - Method in class com.easypost.model.Report
+
+
Set when the URL for this Report expires.
+
+
setUserID(String) - Method in class com.easypost.model.Brand
+
+
Set the user ID of the Brand.
+
+
setUspsZone(String) - Method in class com.easypost.model.Shipment
+
+
Set the USPS zone of this Shipment.
+
+
setValue(Float) - Method in class com.easypost.model.CustomsItem
+
+
Set this CustomsItem's value.
+
+
setValue(String) - Method in class com.easypost.model.Field
+
+
Set the value of this field.
+
+
setVerifications(AddressVerifications) - Method in class com.easypost.model.Address
+
+
Set verifications for address.
+
+
setVerified(boolean) - Method in class com.easypost.model.BaseUser
+
+
Set the verified of the User.
+
+
setVisibility(String) - Method in class com.easypost.model.Field
+
+
Set the visibility of this field.
+
+
setWebhooks(List<Webhook>) - Method in class com.easypost.model.WebhookCollection
+
+
Set this WebhookCollection's Webhook objects.
+
+
setWeight(float) - Method in class com.easypost.model.Tracker
+
+
Set the weight of the Tracker.
+
+
setWeight(Float) - Method in class com.easypost.model.CustomsItem
+
+
Set this CustomsItem's weight.
+
+
setWeight(Float) - Method in class com.easypost.model.Parcel
+
+
Set the weight of this Parcel.
+
+
setWidth(Float) - Method in class com.easypost.model.Parcel
+
+
Set the width of this Parcel.
+
+
setZip(String) - Method in class com.easypost.model.BaseAddress
+
+
Set zip code of Address.
+
+
setZip(String) - Method in class com.easypost.model.TrackingLocation
+
+
Set the zip code of the tracking location.
+
+
setZip4(AddressVerification) - Method in class com.easypost.model.AddressVerifications
+
+
Set the zip4 of the AddressVerification.
+
+
SHA1 - Enum constant in enum com.easypost.utils.Cryptography.HmacAlgorithm
+
 
+
SHA256 - Enum constant in enum com.easypost.utils.Cryptography.HmacAlgorithm
+
 
+
SHA512 - Enum constant in enum com.easypost.utils.Cryptography.HmacAlgorithm
+
 
+
Shipment - Class in com.easypost.model
+
 
+
Shipment() - Constructor for class com.easypost.model.Shipment
+
 
+
ShipmentCollection - Class in com.easypost.model
+
 
+
ShipmentCollection() - Constructor for class com.easypost.model.ShipmentCollection
+
 
+
ShipmentMessage - Class in com.easypost.model
+
 
+
ShipmentMessage() - Constructor for class com.easypost.model.ShipmentMessage
+
 
+
ShipmentOptions - Class in com.easypost.model
+
 
+
ShipmentOptions() - Constructor for class com.easypost.model.ShipmentOptions
+
 
+
signaturesMatch(byte[], byte[]) - Static method in class com.easypost.utils.Cryptography
+
+
Check whether two signatures match.
+
+
signaturesMatch(String, String) - Static method in class com.easypost.utils.Cryptography
+
+
Check whether two signatures match.
+
+
SignatureVerificationError - Exception in com.easypost.exception.General
+
 
+
SignatureVerificationError(String) - Constructor for exception com.easypost.exception.General.SignatureVerificationError
+
+
SignatureVerificationError constructor.
+
+
singleClassURL(Class<?>) - Static method in class com.easypost.model.EasyPostResource
+
 
+
Smartrate - Class in com.easypost.model
+
 
+
Smartrate() - Constructor for class com.easypost.model.Smartrate
+
 
+
SmartrateAccuracy - Enum in com.easypost.model
+
 
+
SmartrateCollection - Class in com.easypost.model
+
 
+
SmartrateCollection() - Constructor for class com.easypost.model.SmartrateCollection
+
+
Constructor.
+
+
SmartrateCollection(List<Smartrate>) - Constructor for class com.easypost.model.SmartrateCollection
+
+
Create a SmartrateCollection from a list of rates.
+
+
SmartrateCollectionDeserializer - Class in com.easypost.model
+
 
+
SmartrateCollectionDeserializer() - Constructor for class com.easypost.model.SmartrateCollectionDeserializer
+
 
+
smartrates() - Method in class com.easypost.model.Shipment
+
+
Get Smartrates for this Shipment.
+
+
smartrates(String) - Method in class com.easypost.model.Shipment
+
+
Get Smartrates for this Shipment.
+
+
smartrates(Map<String, Object>) - Method in class com.easypost.model.Shipment
+
+
Get Smartrates for this Shipment.
+
+
smartrates(Map<String, Object>, String) - Method in class com.easypost.model.Shipment
+
+
Get Smartrates for this Shipment.
+
+
+

T

+
+
TaxIdentifier - Class in com.easypost.model
+
 
+
TaxIdentifier() - Constructor for class com.easypost.model.TaxIdentifier
+
 
+
TimeInTransit - Class in com.easypost.model
+
 
+
TimeInTransit() - Constructor for class com.easypost.model.TimeInTransit
+
 
+
TIMEOUT_ERROR - Static variable in class com.easypost.exception.Constants.ErrorCode
+
 
+
TimeoutError - Exception in com.easypost.exception.API
+
 
+
TimeoutError(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.API.TimeoutError
+
+
TimeoutError constructor.
+
+
toHMACSHA256HexDigest(byte[], String, Normalizer.Form) - Static method in class com.easypost.utils.Cryptography
+
+
Calculate the HMAC-SHA256 hex digest of a string.
+
+
toHMACSHA256HexDigest(String, String, Normalizer.Form) - Static method in class com.easypost.utils.Cryptography
+
+
Calculate the HMAC-SHA256 hex digest of a string.
+
+
toString() - Method in class com.easypost.model.EasyPostResource
+
+
Returns a string representation of the object.
+
+
Tracker - Class in com.easypost.model
+
 
+
Tracker() - Constructor for class com.easypost.model.Tracker
+
 
+
TrackerCollection - Class in com.easypost.model
+
 
+
TrackerCollection() - Constructor for class com.easypost.model.TrackerCollection
+
 
+
TrackingDetail - Class in com.easypost.model
+
 
+
TrackingDetail() - Constructor for class com.easypost.model.TrackingDetail
+
 
+
TrackingLocation - Class in com.easypost.model
+
 
+
TrackingLocation() - Constructor for class com.easypost.model.TrackingLocation
+
 
+
+

U

+
+
UNAUTHORIZED_ERROR - Static variable in class com.easypost.exception.Constants.ErrorCode
+
 
+
UnauthorizedError - Exception in com.easypost.exception.API
+
 
+
UnauthorizedError(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.API.UnauthorizedError
+
+
UnauthorizedError constructor.
+
+
UnknownApiError - Exception in com.easypost.exception.API
+
 
+
UnknownApiError(String, String, int, List<Error>) - Constructor for exception com.easypost.exception.API.UnknownApiError
+
+
UnknownApiError constructor.
+
+
update() - Method in class com.easypost.model.Webhook
+
+
Update this webhook.
+
+
update(Map<String, Object>) - Method in class com.easypost.model.CarrierAccount
+
+
Update this carrier account.
+
+
update(Map<String, Object>) - Method in class com.easypost.model.EndShipper
+
+
Update an EndShipper object.
+
+
update(Map<String, Object>) - Method in class com.easypost.model.User
+
+
Update this User.
+
+
update(Map<String, Object>) - Method in class com.easypost.model.Webhook
+
+
Update this webhook.
+
+
update(Map<String, Object>, String) - Method in class com.easypost.model.CarrierAccount
+
+
Update this carrier account.
+
+
update(Map<String, Object>, String) - Method in class com.easypost.model.EndShipper
+
+
Update an EndShipper object.
+
+
update(Map<String, Object>, String) - Method in class com.easypost.model.User
+
+
Update this User.
+
+
update(Map<String, Object>, String) - Method in class com.easypost.model.Webhook
+
+
Update this webhook.
+
+
updateBrand(Map<String, Object>) - Method in class com.easypost.model.User
+
+
Update the user brand.
+
+
updateBrand(Map<String, Object>, String) - Method in class com.easypost.model.User
+
+
Update the user brand.
+
+
updateEmail(String, String) - Static method in class com.easypost.model.ReferralCustomer
+
+
Update a Referral object email.
+
+
updateEmail(String, String, String) - Static method in class com.easypost.model.ReferralCustomer
+
+
Update a Referral object email.
+
+
User - Class in com.easypost.model
+
 
+
User() - Constructor for class com.easypost.model.User
+
 
+
Utilities - Class in com.easypost.model
+
 
+
+

V

+
+
validateWebhook(byte[], Map<String, Object>, String) - Static method in class com.easypost.model.Webhook
+
+
Validate a webhook by comparing the HMAC signature header sent from EasyPost to your shared secret.
+
+
valueOf(String) - Static method in enum com.easypost.http.Requestor.RequestMethod
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum com.easypost.model.CreditCardPriority
+
+
Deprecated.
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum com.easypost.model.PaymentMethod.Priority
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum com.easypost.model.PaymentMethodObject.PaymentMethodType
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum com.easypost.model.SmartrateAccuracy
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum com.easypost.utils.Cryptography.HmacAlgorithm
+
+
Returns the enum constant of this type with the specified name.
+
+
values() - Static method in enum com.easypost.http.Requestor.RequestMethod
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum com.easypost.model.CreditCardPriority
+
+
Deprecated.
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum com.easypost.model.PaymentMethod.Priority
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum com.easypost.model.PaymentMethodObject.PaymentMethodType
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum com.easypost.model.SmartrateAccuracy
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum com.easypost.utils.Cryptography.HmacAlgorithm
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
verify() - Method in class com.easypost.model.Address
+
+
Verify this Address object.
+
+
verify(String) - Method in class com.easypost.model.Address
+
+
Verify this Address object.
+
+
VERSION - Static variable in class com.easypost.EasyPost
+
 
+
+

W

+
+
Webhook - Class in com.easypost.model
+
 
+
Webhook() - Constructor for class com.easypost.model.Webhook
+
 
+
WEBHOOK_DOES_NOT_MATCH - Static variable in class com.easypost.exception.Constants
+
 
+
WebhookCollection - Class in com.easypost.model
+
 
+
WebhookCollection() - Constructor for class com.easypost.model.WebhookCollection
+
 
+
+

_

+
+
_request(Requestor.RequestMethod, String, Map<String, Object>, Class<T>, String, boolean) - Static method in class com.easypost.http.Requestor
+
 
+
_vcr - Static variable in class com.easypost.EasyPost
+
+
Set a VCR to be used for all HTTP requests.
+
+
+A B C D E F G H I L M N O P R S T U V W _ 
All Classes|All Packages|Constant Field Values|Deprecated API|Serialized Form
+
+
+ +
+
+
+ + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 000000000..a41491420 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,101 @@ + + + + + +Overview (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+
+

com.easypost:easypost-api-client 5.10.0 API

+
+
+
Packages
+
+
Package
+
Description
+ +
+
Interact with the EasyPost API in Java.
+
+ +
+
Custom exception classes for the EasyPost API.
+
+ +
+
Custom API exception classes for the EasyPost API.
+
+ +
+
Custom general exception classes for the EasyPost API.
+
+ +
+
Classes for handling requests and responses to the EasyPost API.
+
+ +
+
Classes for the EasyPost API.
+
+ +
+
Utility classes for the EasyPost API Java client library.
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/jquery-ui.overrides.css b/docs/jquery-ui.overrides.css new file mode 100644 index 000000000..f89acb632 --- /dev/null +++ b/docs/jquery-ui.overrides.css @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; +} diff --git a/docs/member-search-index.js b/docs/member-search-index.js new file mode 100644 index 000000000..fb2e5130a --- /dev/null +++ b/docs/member-search-index.js @@ -0,0 +1 @@ +memberSearchIndex = [{"p":"com.easypost.http","c":"Requestor","l":"_request(Requestor.RequestMethod, String, Map, Class, String, boolean)","u":"_request(com.easypost.http.Requestor.RequestMethod,java.lang.String,java.util.Map,java.lang.Class,java.lang.String,boolean)"},{"p":"com.easypost","c":"EasyPost","l":"_vcr"},{"p":"com.easypost.model","c":"ReferralCustomer","l":"addCreditCardToUser(String, String, int, int, String)","u":"addCreditCardToUser(java.lang.String,java.lang.String,int,int,java.lang.String)"},{"p":"com.easypost.model","c":"ReferralCustomer","l":"addCreditCardToUser(String, String, int, int, String, PaymentMethod.Priority)","u":"addCreditCardToUser(java.lang.String,java.lang.String,int,int,java.lang.String,com.easypost.model.PaymentMethod.Priority)"},{"p":"com.easypost.model","c":"SmartrateCollection","l":"addRate(Smartrate)","u":"addRate(com.easypost.model.Smartrate)"},{"p":"com.easypost.model","c":"Address","l":"Address()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"AddressCollection","l":"AddressCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"AddressDetail","l":"AddressDetail()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"AddressVerification","l":"AddressVerification()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"AddressVerifications","l":"AddressVerifications()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"AddressVerifyResponse","l":"AddressVerifyResponse()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Batch","l":"addShipments(List)","u":"addShipments(java.util.List)"},{"p":"com.easypost.model","c":"Batch","l":"addShipments(List, String)","u":"addShipments(java.util.List,java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"addShipments(Map)","u":"addShipments(java.util.Map)"},{"p":"com.easypost.model","c":"Batch","l":"addShipments(Map, String)","u":"addShipments(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"ApiKeys","l":"all()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"all()"},{"p":"com.easypost.model","c":"CarrierType","l":"all()"},{"p":"com.easypost.model","c":"PaymentMethod","l":"all()"},{"p":"com.easypost.model","c":"Webhook","l":"all()"},{"p":"com.easypost.model","c":"Address","l":"all(Map)","u":"all(java.util.Map)"},{"p":"com.easypost.model","c":"Batch","l":"all(Map)","u":"all(java.util.Map)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"all(Map)","u":"all(java.util.Map)"},{"p":"com.easypost.model","c":"EndShipper","l":"all(Map)","u":"all(java.util.Map)"},{"p":"com.easypost.model","c":"Event","l":"all(Map)","u":"all(java.util.Map)"},{"p":"com.easypost.model","c":"Insurance","l":"all(Map)","u":"all(java.util.Map)"},{"p":"com.easypost.model","c":"ReferralCustomer","l":"all(Map)","u":"all(java.util.Map)"},{"p":"com.easypost.model","c":"Refund","l":"all(Map)","u":"all(java.util.Map)"},{"p":"com.easypost.model","c":"Report","l":"all(Map)","u":"all(java.util.Map)"},{"p":"com.easypost.model","c":"ScanForm","l":"all(Map)","u":"all(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"all(Map)","u":"all(java.util.Map)"},{"p":"com.easypost.model","c":"Tracker","l":"all(Map)","u":"all(java.util.Map)"},{"p":"com.easypost.model","c":"Webhook","l":"all(Map)","u":"all(java.util.Map)"},{"p":"com.easypost.model","c":"Address","l":"all(Map, String)","u":"all(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"all(Map, String)","u":"all(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"all(Map, String)","u":"all(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"EndShipper","l":"all(Map, String)","u":"all(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Event","l":"all(Map, String)","u":"all(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"all(Map, String)","u":"all(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"ReferralCustomer","l":"all(Map, String)","u":"all(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Refund","l":"all(Map, String)","u":"all(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Report","l":"all(Map, String)","u":"all(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"ScanForm","l":"all(Map, String)","u":"all(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"all(Map, String)","u":"all(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Tracker","l":"all(Map, String)","u":"all(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Webhook","l":"all(Map, String)","u":"all(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"ApiKeys","l":"all(String)","u":"all(java.lang.String)"},{"p":"com.easypost.model","c":"CarrierType","l":"all(String)","u":"all(java.lang.String)"},{"p":"com.easypost.model","c":"PaymentMethod","l":"all(String)","u":"all(java.lang.String)"},{"p":"com.easypost","c":"EasyPost","l":"API_BASE"},{"p":"com.easypost.exception","c":"Constants","l":"API_DID_NOT_RETURN_ERROR_DETAILS"},{"p":"com.easypost","c":"EasyPost","l":"apiKey"},{"p":"com.easypost.model","c":"ApiKey","l":"ApiKey()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"User","l":"apiKeys()"},{"p":"com.easypost.model","c":"ApiKeys","l":"ApiKeys()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"PaymentMethodObject.PaymentMethodType","l":"BANK_ACCOUNT"},{"p":"com.easypost.model","c":"BaseAddress","l":"BaseAddress()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"BaseCreditCard","l":"BaseCreditCard()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"BaseUser","l":"BaseUser()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Batch","l":"Batch()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"BatchCollection","l":"BatchCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"BatchStatus","l":"BatchStatus()","u":"%3Cinit%3E()"},{"p":"com.easypost","c":"EasyPost","l":"BETA_API_BASE"},{"p":"com.easypost.model","c":"Billing","l":"Billing()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Brand","l":"Brand()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Batch","l":"buy()"},{"p":"com.easypost.model","c":"Pickup","l":"buy()"},{"p":"com.easypost.model","c":"Batch","l":"buy(Map)","u":"buy(java.util.Map)"},{"p":"com.easypost.model","c":"Order","l":"buy(Map)","u":"buy(java.util.Map)"},{"p":"com.easypost.model","c":"Pickup","l":"buy(Map)","u":"buy(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"buy(Map)","u":"buy(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"buy(Map, boolean)","u":"buy(java.util.Map,boolean)"},{"p":"com.easypost.model","c":"Shipment","l":"buy(Map, boolean, String)","u":"buy(java.util.Map,boolean,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"buy(Map, boolean, String, String)","u":"buy(java.util.Map,boolean,java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"buy(Map, String)","u":"buy(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"buy(Map, String)","u":"buy(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"buy(Map, String)","u":"buy(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"buy(Map, String)","u":"buy(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"buy(Map, String, String)","u":"buy(java.util.Map,java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"buy(PickupRate)","u":"buy(com.easypost.model.PickupRate)"},{"p":"com.easypost.model","c":"Order","l":"buy(Rate)","u":"buy(com.easypost.model.Rate)"},{"p":"com.easypost.model","c":"Shipment","l":"buy(Rate)","u":"buy(com.easypost.model.Rate)"},{"p":"com.easypost.model","c":"Shipment","l":"buy(Rate, boolean)","u":"buy(com.easypost.model.Rate,boolean)"},{"p":"com.easypost.model","c":"Shipment","l":"buy(Rate, boolean, String, String)","u":"buy(com.easypost.model.Rate,boolean,java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"buy(Rate, String)","u":"buy(com.easypost.model.Rate,java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"buy(String)","u":"buy(java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"cancel()"},{"p":"com.easypost.model","c":"Pickup","l":"cancel(Map)","u":"cancel(java.util.Map)"},{"p":"com.easypost.model","c":"Pickup","l":"cancel(Map, String)","u":"cancel(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"cancel(String)","u":"cancel(java.lang.String)"},{"p":"com.easypost.model","c":"CarbonOffset","l":"CarbonOffset()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"CarrierAccount()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"CarrierDetail","l":"CarrierDetail()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"CarrierType","l":"CarrierType()","u":"%3Cinit%3E()"},{"p":"com.easypost.http","c":"Constant","l":"CHARSET"},{"p":"com.easypost.model","c":"EasyPostResource","l":"classURL(Class)","u":"classURL(java.lang.Class)"},{"p":"com.easypost.http","c":"Constant","l":"Constant()","u":"%3Cinit%3E()"},{"p":"com.easypost.exception","c":"Constants","l":"Constants()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Batch","l":"create()"},{"p":"com.easypost.model","c":"User","l":"create()"},{"p":"com.easypost.model","c":"Address","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"Batch","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"CustomsItem","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"EndShipper","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"Insurance","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"Order","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"Parcel","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"Pickup","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"ReferralCustomer","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"Refund","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"Report","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"ScanForm","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"Tracker","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"User","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"Webhook","l":"create(Map)","u":"create(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"create(Map, boolean)","u":"create(java.util.Map,boolean)"},{"p":"com.easypost.model","c":"Shipment","l":"create(Map, boolean, String)","u":"create(java.util.Map,boolean,java.lang.String)"},{"p":"com.easypost.model","c":"Address","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"CustomsItem","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"EndShipper","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Parcel","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"ReferralCustomer","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Refund","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Report","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"ScanForm","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Tracker","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"User","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Webhook","l":"create(Map, String)","u":"create(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"createAndBuy(Map)","u":"createAndBuy(java.util.Map)"},{"p":"com.easypost.model","c":"Batch","l":"createAndBuy(Map, String)","u":"createAndBuy(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Address","l":"createAndVerify(Map)","u":"createAndVerify(java.util.Map)"},{"p":"com.easypost.model","c":"Address","l":"createAndVerify(Map, String)","u":"createAndVerify(java.util.Map,java.lang.String)"},{"p":"com.easypost.utils","c":"Cryptography","l":"createHMAC(byte[], String, Cryptography.HmacAlgorithm)","u":"createHMAC(byte[],java.lang.String,com.easypost.utils.Cryptography.HmacAlgorithm)"},{"p":"com.easypost.model","c":"Tracker","l":"createList(Map)","u":"createList(java.util.Map)"},{"p":"com.easypost.model","c":"Tracker","l":"createList(Map, String)","u":"createList(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"createScanForm()"},{"p":"com.easypost.model","c":"Batch","l":"createScanForm(Map)","u":"createScanForm(java.util.Map)"},{"p":"com.easypost.model","c":"Batch","l":"createScanForm(Map, String)","u":"createScanForm(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"PaymentMethodObject.PaymentMethodType","l":"CREDIT_CARD"},{"p":"com.easypost.model","c":"CreditCard","l":"CreditCard()","u":"%3Cinit%3E()"},{"p":"com.easypost.utils","c":"Cryptography","l":"Cryptography()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"CustomsInfo","l":"CustomsInfo()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"CustomsItem","l":"CustomsItem()","u":"%3Cinit%3E()"},{"p":"com.easypost.http","c":"Constant","l":"DEFAULT_APP_ENGINE_TIMEOUT_SECONDS"},{"p":"com.easypost.http","c":"Constant","l":"DEFAULT_CONNECT_TIMEOUT_MILLISECONDS"},{"p":"com.easypost.http","c":"Constant","l":"DEFAULT_READ_TIMEOUT_MILLISECONDS"},{"p":"com.easypost.http","c":"Requestor.RequestMethod","l":"DELETE"},{"p":"com.easypost.model","c":"CarrierAccount","l":"delete()"},{"p":"com.easypost.model","c":"User","l":"delete()"},{"p":"com.easypost.model","c":"Webhook","l":"delete()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"delete(String)","u":"delete(java.lang.String)"},{"p":"com.easypost.model","c":"CreditCard","l":"delete(String)","u":"delete(java.lang.String)"},{"p":"com.easypost.model","c":"User","l":"delete(String)","u":"delete(java.lang.String)"},{"p":"com.easypost.model","c":"Webhook","l":"delete(String)","u":"delete(java.lang.String)"},{"p":"com.easypost.model","c":"CreditCard","l":"delete(String, String)","u":"delete(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Billing","l":"deletePaymentMethod(PaymentMethod.Priority)","u":"deletePaymentMethod(com.easypost.model.PaymentMethod.Priority)"},{"p":"com.easypost.model","c":"Billing","l":"deletePaymentMethod(PaymentMethod.Priority, String)","u":"deletePaymentMethod(com.easypost.model.PaymentMethod.Priority,java.lang.String)"},{"p":"com.easypost.model","c":"ErrorDeserializer","l":"deserialize(JsonElement, Type, JsonDeserializationContext)","u":"deserialize(com.google.gson.JsonElement,java.lang.reflect.Type,com.google.gson.JsonDeserializationContext)"},{"p":"com.easypost.model","c":"SmartrateCollectionDeserializer","l":"deserialize(JsonElement, Type, JsonDeserializationContext)","u":"deserialize(com.google.gson.JsonElement,java.lang.reflect.Type,com.google.gson.JsonDeserializationContext)"},{"p":"com.easypost.http","c":"Constant","l":"EASYPOST_SUPPORT_EMAIL"},{"p":"com.easypost","c":"EasyPost","l":"EasyPost()","u":"%3Cinit%3E()"},{"p":"com.easypost.exception","c":"EasyPostException","l":"EasyPostException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.easypost.exception","c":"EasyPostException","l":"EasyPostException(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost.exception","c":"EasyPostException","l":"EasyPostException(String, String, Integer, List, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.String,java.lang.Integer,java.util.List,java.lang.Throwable)"},{"p":"com.easypost.exception","c":"EasyPostException","l":"EasyPostException(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"com.easypost.model","c":"EasyPostResource","l":"EasyPostResource()","u":"%3Cinit%3E()"},{"p":"com.easypost.http","c":"EasyPostResponse","l":"EasyPostResponse(int, String)","u":"%3Cinit%3E(int,java.lang.String)"},{"p":"com.easypost.exception","c":"Constants","l":"ENCODED_ERROR"},{"p":"com.easypost.model","c":"EndShipper","l":"EndShipper()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"EndShipperCollection","l":"EndShipperCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"EasyPostResource","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"com.easypost.model","c":"Error","l":"Error()","u":"%3Cinit%3E()"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"ErrorCode()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"ErrorDeserializer","l":"ErrorDeserializer()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Event","l":"Event()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"EventCollection","l":"EventCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"EventData","l":"EventData()","u":"%3Cinit%3E()"},{"p":"com.easypost.exception","c":"Constants","l":"EXTERNAL_API_CALL_FAILED"},{"p":"com.easypost.exception.General","c":"ExternalApiError","l":"ExternalApiError(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.easypost.model","c":"Fee","l":"Fee()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Field","l":"Field()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Fields","l":"Fields()","u":"%3Cinit%3E()"},{"p":"com.easypost.exception.General","c":"FilteringError","l":"FilteringError(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"findLowestSmartrate(List, int, SmartrateAccuracy)","u":"findLowestSmartrate(java.util.List,int,com.easypost.model.SmartrateAccuracy)"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"FORBIDDEN_ERROR"},{"p":"com.easypost.exception.API","c":"ForbiddenError","l":"ForbiddenError(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost.model","c":"Form","l":"Form()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"CreditCard","l":"fund(String, CreditCardPriority)","u":"fund(java.lang.String,com.easypost.model.CreditCardPriority)"},{"p":"com.easypost.model","c":"CreditCard","l":"fund(String, CreditCardPriority, String)","u":"fund(java.lang.String,com.easypost.model.CreditCardPriority,java.lang.String)"},{"p":"com.easypost.model","c":"Billing","l":"fundWallet(String)","u":"fundWallet(java.lang.String)"},{"p":"com.easypost.model","c":"Billing","l":"fundWallet(String, PaymentMethod.Priority)","u":"fundWallet(java.lang.String,com.easypost.model.PaymentMethod.Priority)"},{"p":"com.easypost.model","c":"Billing","l":"fundWallet(String, PaymentMethod.Priority, String)","u":"fundWallet(java.lang.String,com.easypost.model.PaymentMethod.Priority,java.lang.String)"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"GATEWAY_TIMEOUT_ERROR"},{"p":"com.easypost.exception.API","c":"GatewayTimeoutError","l":"GatewayTimeoutError(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost.model","c":"Shipment","l":"generateForm(String)","u":"generateForm(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"generateForm(String, Map)","u":"generateForm(java.lang.String,java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"generateForm(String, Map, String)","u":"generateForm(java.lang.String,java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"generateForm(String, String)","u":"generateForm(java.lang.String,java.lang.String)"},{"p":"com.easypost.http","c":"Requestor.RequestMethod","l":"GET"},{"p":"com.easypost.model","c":"Brand","l":"getAd()"},{"p":"com.easypost.model","c":"AddressVerifyResponse","l":"getAddress()"},{"p":"com.easypost.model","c":"Pickup","l":"getAddress()"},{"p":"com.easypost.model","c":"AddressVerification","l":"getAddressDetail()"},{"p":"com.easypost.model","c":"AddressCollection","l":"getAddresses()"},{"p":"com.easypost.model","c":"Brand","l":"getAdHref()"},{"p":"com.easypost.model","c":"CarrierDetail","l":"getAlternateIdentifier()"},{"p":"com.easypost.model","c":"Fee","l":"getAmount()"},{"p":"com.easypost.model","c":"Insurance","l":"getAmount()"},{"p":"com.easypost.model","c":"ReferralCustomer","l":"getApiKeys()"},{"p":"com.easypost.http","c":"Requestor","l":"getAppEngineTimeoutSeconds()"},{"p":"com.easypost.model","c":"Brand","l":"getBackgroundColor()"},{"p":"com.easypost.model","c":"BaseUser","l":"getBalance()"},{"p":"com.easypost.model","c":"PaymentMethodObject","l":"getBankName()"},{"p":"com.easypost.model","c":"BatchCollection","l":"getBatches()"},{"p":"com.easypost.model","c":"ScanForm","l":"getBatchId()"},{"p":"com.easypost.model","c":"Shipment","l":"getBatchId()"},{"p":"com.easypost.model","c":"Shipment","l":"getBatchMessage()"},{"p":"com.easypost.model","c":"Batch","l":"getBatchStatus()"},{"p":"com.easypost.model","c":"Shipment","l":"getBatchStatus()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"getBillingType()"},{"p":"com.easypost.model","c":"Rate","l":"getBillingType()"},{"p":"com.easypost.model","c":"BaseCreditCard","l":"getBrand()"},{"p":"com.easypost.model","c":"PaymentMethodObject","l":"getBrand()"},{"p":"com.easypost.model","c":"Order","l":"getBuyerAddress()"},{"p":"com.easypost.model","c":"Shipment","l":"getBuyerAddress()"},{"p":"com.easypost.model","c":"SmartrateAccuracy","l":"getByKeyName(String)","u":"getByKeyName(java.lang.String)"},{"p":"com.easypost.model","c":"TimeInTransit","l":"getBySmartrateAccuracy(SmartrateAccuracy)","u":"getBySmartrateAccuracy(com.easypost.model.SmartrateAccuracy)"},{"p":"com.easypost.model","c":"Rate","l":"getCarbonOffset()"},{"p":"com.easypost.model","c":"Rate","l":"getCarrier()"},{"p":"com.easypost.model","c":"Refund","l":"getCarrier()"},{"p":"com.easypost.model","c":"ShipmentMessage","l":"getCarrier()"},{"p":"com.easypost.model","c":"Tracker","l":"getCarrier()"},{"p":"com.easypost.model","c":"Rate","l":"getCarrierAccountId()"},{"p":"com.easypost.model","c":"ShipmentMessage","l":"getCarrierAccountId()"},{"p":"com.easypost.model","c":"Order","l":"getCarrierAccounts()"},{"p":"com.easypost.model","c":"Pickup","l":"getCarrierAccounts()"},{"p":"com.easypost.model","c":"Shipment","l":"getCarrierAccounts()"},{"p":"com.easypost.model","c":"Tracker","l":"getCarrierDetail()"},{"p":"com.easypost.model","c":"Address","l":"getCarrierFacility()"},{"p":"com.easypost.model","c":"BaseUser","l":"getCcFeeRate()"},{"p":"com.easypost.model","c":"Fee","l":"getCharged()"},{"p":"com.easypost.model","c":"ApiKeys","l":"getChildren()"},{"p":"com.easypost.model","c":"BaseUser","l":"getChildren()"},{"p":"com.easypost.model","c":"BaseAddress","l":"getCity()"},{"p":"com.easypost.model","c":"TrackingLocation","l":"getCity()"},{"p":"com.easypost.exception","c":"EasyPostException","l":"getCode()"},{"p":"com.easypost.model","c":"CustomsItem","l":"getCode()"},{"p":"com.easypost.model","c":"Error","l":"getCode()"},{"p":"com.easypost.model","c":"Brand","l":"getColor()"},{"p":"com.easypost.model","c":"BaseAddress","l":"getCompany()"},{"p":"com.easypost.model","c":"Event","l":"getCompletedUrls()"},{"p":"com.easypost.model","c":"Pickup","l":"getConfirmation()"},{"p":"com.easypost.model","c":"ScanForm","l":"getConfirmation()"},{"p":"com.easypost.model","c":"Refund","l":"getConfirmationNumber()"},{"p":"com.easypost.http","c":"Requestor","l":"getConnectTimeoutMilliseconds()"},{"p":"com.easypost.model","c":"CarrierDetail","l":"getContainerType()"},{"p":"com.easypost.model","c":"CustomsInfo","l":"getContentsExplanation()"},{"p":"com.easypost.model","c":"CustomsInfo","l":"getContentsType()"},{"p":"com.easypost.model","c":"BaseAddress","l":"getCountry()"},{"p":"com.easypost.model","c":"PaymentMethodObject","l":"getCountry()"},{"p":"com.easypost.model","c":"TrackingLocation","l":"getCountry()"},{"p":"com.easypost.model","c":"BatchStatus","l":"getCreated()"},{"p":"com.easypost.model","c":"EasyPostResource","l":"getCreatedAt()"},{"p":"com.easypost.model","c":"BatchStatus","l":"getCreationFailed()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"getCredentials()"},{"p":"com.easypost.model","c":"Fields","l":"getCredentials()"},{"p":"com.easypost.model","c":"CarbonOffset","l":"getCurrency()"},{"p":"com.easypost.model","c":"CustomsItem","l":"getCurrency()"},{"p":"com.easypost.model","c":"Rate","l":"getCurrency()"},{"p":"com.easypost.model","c":"CustomsInfo","l":"getCustomsCertify()"},{"p":"com.easypost.model","c":"Order","l":"getCustomsInfo()"},{"p":"com.easypost.model","c":"Shipment","l":"getCustomsInfo()"},{"p":"com.easypost.model","c":"CustomsInfo","l":"getCustomsItems()"},{"p":"com.easypost.model","c":"CustomsInfo","l":"getCustomsSigner()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getDateAdvance()"},{"p":"com.easypost.model","c":"TrackingDetail","l":"getDatetime()"},{"p":"com.easypost.model","c":"CustomsInfo","l":"getDeclaration()"},{"p":"com.easypost.model","c":"BaseUser","l":"getDefaultInsuranceAmount()"},{"p":"com.easypost.model","c":"AddressVerifications","l":"getDelivery()"},{"p":"com.easypost.model","c":"Rate","l":"getDeliveryDate()"},{"p":"com.easypost.model","c":"Rate","l":"getDeliveryDateGuaranteed()"},{"p":"com.easypost.model","c":"Rate","l":"getDeliveryDays()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"getDescription()"},{"p":"com.easypost.model","c":"CustomsItem","l":"getDescription()"},{"p":"com.easypost.model","c":"Event","l":"getDescription()"},{"p":"com.easypost.model","c":"CarrierDetail","l":"getDestinationLocation()"},{"p":"com.easypost.model","c":"PaymentMethodObject","l":"getDisabledAt()"},{"p":"com.easypost.model","c":"Webhook","l":"getDisabledAt()"},{"p":"com.easypost.model","c":"CustomsInfo","l":"getEelPfc()"},{"p":"com.easypost.model","c":"BaseAddress","l":"getEmail()"},{"p":"com.easypost.model","c":"BaseUser","l":"getEmail()"},{"p":"com.easypost.model","c":"Utilities","l":"getEncodedURL(Map, String)","u":"getEncodedURL(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Report","l":"getEndDate()"},{"p":"com.easypost.model","c":"EndShipperCollection","l":"getEndShippers()"},{"p":"com.easypost.model","c":"TaxIdentifier","l":"getEntity()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getEpl2LabelType()"},{"p":"com.easypost.exception","c":"EasyPostException","l":"getErrors()"},{"p":"com.easypost.model","c":"AddressVerification","l":"getErrors()"},{"p":"com.easypost.model","c":"Error","l":"getErrors()"},{"p":"com.easypost.model","c":"Tracker","l":"getEstDeliveryDate()"},{"p":"com.easypost.model","c":"CarrierDetail","l":"getEstDeliveryDateLocal()"},{"p":"com.easypost.model","c":"Rate","l":"getEstDeliveryDays()"},{"p":"com.easypost.model","c":"CarrierDetail","l":"getEstDeliveryTimeLocal()"},{"p":"com.easypost.model","c":"EventCollection","l":"getEvents()"},{"p":"com.easypost.model","c":"BaseCreditCard","l":"getExpMonth()"},{"p":"com.easypost.model","c":"PaymentMethodObject","l":"getExpMonth()"},{"p":"com.easypost.model","c":"BaseCreditCard","l":"getExpYear()"},{"p":"com.easypost.model","c":"PaymentMethodObject","l":"getExpYear()"},{"p":"com.easypost.model","c":"Address","l":"getFederalTaxId()"},{"p":"com.easypost.model","c":"Shipment","l":"getFees()"},{"p":"com.easypost.model","c":"Error","l":"getField()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"getFields()"},{"p":"com.easypost.model","c":"CarrierType","l":"getFields()"},{"p":"com.easypost.model","c":"ScanForm","l":"getFormFileType()"},{"p":"com.easypost.model","c":"Shipment","l":"getForms()"},{"p":"com.easypost.model","c":"Form","l":"getFormType()"},{"p":"com.easypost.model","c":"Form","l":"getFormUrl()"},{"p":"com.easypost.model","c":"ScanForm","l":"getFormUrl()"},{"p":"com.easypost.model","c":"Insurance","l":"getFromAddress()"},{"p":"com.easypost.model","c":"Order","l":"getFromAddress()"},{"p":"com.easypost.model","c":"ScanForm","l":"getFromAddress()"},{"p":"com.easypost.model","c":"Shipment","l":"getFromAddress()"},{"p":"com.easypost.model","c":"CarbonOffset","l":"getGrams()"},{"p":"com.easypost.model","c":"CarrierDetail","l":"getGuaranteedDeliveryDate()"},{"p":"com.easypost.model","c":"BaseUser","l":"getHasBillingMethod()"},{"p":"com.easypost.model","c":"AddressCollection","l":"getHasMore()"},{"p":"com.easypost.model","c":"BatchCollection","l":"getHasMore()"},{"p":"com.easypost.model","c":"EndShipperCollection","l":"getHasMore()"},{"p":"com.easypost.model","c":"EventCollection","l":"getHasMore()"},{"p":"com.easypost.model","c":"InsuranceCollection","l":"getHasMore()"},{"p":"com.easypost.model","c":"OrderCollection","l":"getHasMore()"},{"p":"com.easypost.model","c":"PickupCollection","l":"getHasMore()"},{"p":"com.easypost.model","c":"ReferralCustomerCollection","l":"getHasMore()"},{"p":"com.easypost.model","c":"RefundCollection","l":"getHasMore()"},{"p":"com.easypost.model","c":"ReportCollection","l":"getHasMore()"},{"p":"com.easypost.model","c":"ScanFormCollection","l":"getHasMore()"},{"p":"com.easypost.model","c":"ShipmentCollection","l":"getHasMore()"},{"p":"com.easypost.model","c":"TrackerCollection","l":"getHasMore()"},{"p":"com.easypost.model","c":"Parcel","l":"getHeight()"},{"p":"com.easypost.model","c":"CustomsItem","l":"getHsTariffNumber()"},{"p":"com.easypost.model","c":"EasyPostResource","l":"getId()"},{"p":"com.easypost.model","c":"PaymentMethodObject","l":"getId()"},{"p":"com.easypost.model","c":"Report","l":"getIncludeChildren()"},{"p":"com.easypost.model","c":"CarrierDetail","l":"getInitialDeliveryAttempt()"},{"p":"com.easypost.model","c":"Pickup","l":"getInstructions()"},{"p":"com.easypost.model","c":"Shipment","l":"getInsurance()"},{"p":"com.easypost.model","c":"BaseUser","l":"getInsuranceFeeMinimum()"},{"p":"com.easypost.model","c":"BaseUser","l":"getInsuranceFeeRate()"},{"p":"com.easypost.model","c":"InsuranceCollection","l":"getInsurances()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getIntegratedForm()"},{"p":"com.easypost.model","c":"Pickup","l":"getIsAccountAddress()"},{"p":"com.easypost.model","c":"Order","l":"getIsReturn()"},{"p":"com.easypost.model","c":"Shipment","l":"getIsReturn()"},{"p":"com.easypost.model","c":"TaxIdentifier","l":"getIssuingCountry()"},{"p":"com.easypost.model","c":"ApiKey","l":"getKey()"},{"p":"com.easypost.model","c":"Field","l":"getKey()"},{"p":"com.easypost.model","c":"SmartrateAccuracy","l":"getKeyName()"},{"p":"com.easypost.model","c":"ApiKeys","l":"getKeys()"},{"p":"com.easypost.model","c":"Field","l":"getLabel()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelEpl2FileType()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelEpl2Size()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelEpl2Url()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelFile()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelFileType()"},{"p":"com.easypost.model","c":"ScanForm","l":"getLabelFileType()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelPdfFileType()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelPdfSize()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelPdfUrl()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelResolution()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelSize()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelType()"},{"p":"com.easypost.model","c":"Batch","l":"getLabelUrl()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelUrl()"},{"p":"com.easypost.model","c":"ScanForm","l":"getLabelUrl()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelZplFileType()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelZplSize()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getLabelZplUrl()"},{"p":"com.easypost.model","c":"BaseCreditCard","l":"getLast4()"},{"p":"com.easypost.model","c":"PaymentMethodObject","l":"getLast4()"},{"p":"com.easypost.model","c":"AddressDetail","l":"getLatitude()"},{"p":"com.easypost.model","c":"Parcel","l":"getLength()"},{"p":"com.easypost.model","c":"Rate","l":"getListCurrency()"},{"p":"com.easypost.model","c":"Rate","l":"getListRate()"},{"p":"com.easypost.model","c":"Brand","l":"getLogo()"},{"p":"com.easypost.model","c":"CarrierType","l":"getLogo()"},{"p":"com.easypost.model","c":"Brand","l":"getLogoHref()"},{"p":"com.easypost.model","c":"AddressDetail","l":"getLongitude()"},{"p":"com.easypost.model","c":"Utilities","l":"getLowestObjectRate(List, List, List)","u":"getLowestObjectRate(java.util.List,java.util.List,java.util.List)"},{"p":"com.easypost.model","c":"Shipment","l":"getLowestSmartRate(List, int, String)","u":"getLowestSmartRate(java.util.List,int,java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"getMaxDatetime()"},{"p":"com.easypost.exception","c":"EasyPostException","l":"getMessage()"},{"p":"com.easypost.model","c":"Address","l":"getMessage()"},{"p":"com.easypost.model","c":"AddressVerifyResponse","l":"getMessage()"},{"p":"com.easypost.model","c":"Error","l":"getMessage()"},{"p":"com.easypost.model","c":"ScanForm","l":"getMessage()"},{"p":"com.easypost.model","c":"ShipmentMessage","l":"getMessage()"},{"p":"com.easypost.model","c":"TrackingDetail","l":"getMessage()"},{"p":"com.easypost.model","c":"Insurance","l":"getMessages()"},{"p":"com.easypost.model","c":"Order","l":"getMessages()"},{"p":"com.easypost.model","c":"Pickup","l":"getMessages()"},{"p":"com.easypost.model","c":"Shipment","l":"getMessages()"},{"p":"com.easypost.model","c":"Pickup","l":"getMinDatetime()"},{"p":"com.easypost.model","c":"EasyPostResource","l":"getMode()"},{"p":"com.easypost.model","c":"BaseAddress","l":"getName()"},{"p":"com.easypost.model","c":"BaseCreditCard","l":"getName()"},{"p":"com.easypost.model","c":"BaseUser","l":"getName()"},{"p":"com.easypost.model","c":"Brand","l":"getName()"},{"p":"com.easypost.model","c":"PaymentMethodObject","l":"getName()"},{"p":"com.easypost.model","c":"CustomsInfo","l":"getNonDeliveryOption()"},{"p":"com.easypost.model","c":"Batch","l":"getNumShipments()"},{"p":"com.easypost.model","c":"BaseCreditCard","l":"getObject()"},{"p":"com.easypost.model","c":"BaseUser","l":"getObject()"},{"p":"com.easypost.model","c":"CarbonOffset","l":"getObject()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"getObject()"},{"p":"com.easypost.model","c":"EventData","l":"getObject()"},{"p":"com.easypost.model","c":"PaymentMethod","l":"getObject()"},{"p":"com.easypost.model","c":"PaymentMethodObject","l":"getObject()"},{"p":"com.easypost.model","c":"Order","l":"getOptions()"},{"p":"com.easypost.model","c":"Shipment","l":"getOptions()"},{"p":"com.easypost.model","c":"Shipment","l":"getOrderId()"},{"p":"com.easypost.model","c":"OrderCollection","l":"getOrders()"},{"p":"com.easypost.model","c":"CustomsItem","l":"getOriginCountry()"},{"p":"com.easypost.model","c":"CarrierDetail","l":"getOriginLocation()"},{"p":"com.easypost.model","c":"Shipment","l":"getParcel()"},{"p":"com.easypost.model","c":"BaseUser","l":"getParentId()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getPdfLabelType()"},{"p":"com.easypost.model","c":"Event","l":"getPendingUrls()"},{"p":"com.easypost.model","c":"TimeInTransit","l":"getPercentile50()"},{"p":"com.easypost.model","c":"TimeInTransit","l":"getPercentile75()"},{"p":"com.easypost.model","c":"TimeInTransit","l":"getPercentile85()"},{"p":"com.easypost.model","c":"TimeInTransit","l":"getPercentile90()"},{"p":"com.easypost.model","c":"TimeInTransit","l":"getPercentile95()"},{"p":"com.easypost.model","c":"TimeInTransit","l":"getPercentile97()"},{"p":"com.easypost.model","c":"TimeInTransit","l":"getPercentile99()"},{"p":"com.easypost.model","c":"BaseAddress","l":"getPhone()"},{"p":"com.easypost.model","c":"BaseUser","l":"getPhoneNumber()"},{"p":"com.easypost.model","c":"PickupRate","l":"getPickupID()"},{"p":"com.easypost.model","c":"Pickup","l":"getPickupRates()"},{"p":"com.easypost.model","c":"PickupCollection","l":"getPickups()"},{"p":"com.easypost.model","c":"Shipment","l":"getPostageLabel()"},{"p":"com.easypost.model","c":"BatchStatus","l":"getPostagePurchased()"},{"p":"com.easypost.model","c":"BatchStatus","l":"getPostagePurchaseFailed()"},{"p":"com.easypost.model","c":"Parcel","l":"getPredefinedPackage()"},{"p":"com.easypost.model","c":"Event","l":"getPreviousAttributes()"},{"p":"com.easypost.model","c":"EventData","l":"getPreviousAttributes()"},{"p":"com.easypost.model","c":"CarbonOffset","l":"getPrice()"},{"p":"com.easypost.model","c":"BaseUser","l":"getPricePerShipment()"},{"p":"com.easypost.model","c":"PaymentMethod","l":"getPrimaryPaymentMethod()"},{"p":"com.easypost.model","c":"PaymentMethod","l":"getPrimaryPaymentMethodObject()"},{"p":"com.easypost.model","c":"Insurance","l":"getProvider()"},{"p":"com.easypost.model","c":"Insurance","l":"getProviderId()"},{"p":"com.easypost.model","c":"Tracker","l":"getPublicUrl()"},{"p":"com.easypost.model","c":"CustomsItem","l":"getQuantity()"},{"p":"com.easypost.model","c":"Rate","l":"getRate()"},{"p":"com.easypost.model","c":"Order","l":"getRates()"},{"p":"com.easypost.model","c":"Shipment","l":"getRates()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"getReadable()"},{"p":"com.easypost.model","c":"CarrierType","l":"getReadable()"},{"p":"com.easypost.http","c":"Requestor","l":"getReadTimeoutMilliseconds()"},{"p":"com.easypost.model","c":"BaseUser","l":"getRechargeAmount()"},{"p":"com.easypost.model","c":"BaseUser","l":"getRechargeThreshold()"},{"p":"com.easypost.model","c":"Batch","l":"getReference()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"getReference()"},{"p":"com.easypost.model","c":"Insurance","l":"getReference()"},{"p":"com.easypost.model","c":"Order","l":"getReference()"},{"p":"com.easypost.model","c":"Pickup","l":"getReference()"},{"p":"com.easypost.model","c":"Shipment","l":"getReference()"},{"p":"com.easypost.model","c":"ReferralCustomerCollection","l":"getReferralCustomers()"},{"p":"com.easypost.model","c":"Fee","l":"getRefunded()"},{"p":"com.easypost.model","c":"RefundCollection","l":"getRefunds()"},{"p":"com.easypost.model","c":"Shipment","l":"getRefundStatus()"},{"p":"com.easypost.model","c":"ReportCollection","l":"getReports()"},{"p":"com.easypost.model","c":"Address","l":"getResidential()"},{"p":"com.easypost.http","c":"EasyPostResponse","l":"getResponseBody()"},{"p":"com.easypost.http","c":"EasyPostResponse","l":"getResponseCode()"},{"p":"com.easypost.model","c":"CustomsInfo","l":"getRestrictionComments()"},{"p":"com.easypost.model","c":"CustomsInfo","l":"getRestrictionType()"},{"p":"com.easypost.model","c":"Event","l":"getResult()"},{"p":"com.easypost.model","c":"Rate","l":"getRetailCurrency()"},{"p":"com.easypost.model","c":"Rate","l":"getRetailRate()"},{"p":"com.easypost.model","c":"Order","l":"getReturnAddress()"},{"p":"com.easypost.model","c":"Shipment","l":"getReturnAddress()"},{"p":"com.easypost.model","c":"Batch","l":"getScanForm()"},{"p":"com.easypost.model","c":"Shipment","l":"getScanForm()"},{"p":"com.easypost.model","c":"ScanFormCollection","l":"getScanForms()"},{"p":"com.easypost.model","c":"PaymentMethod","l":"getSecondaryPaymentMethod()"},{"p":"com.easypost.model","c":"PaymentMethod","l":"getSecondaryPaymentMethodObject()"},{"p":"com.easypost.model","c":"BaseUser","l":"getSecondaryRechargeAmount()"},{"p":"com.easypost.model","c":"Shipment","l":"getSelectedRate()"},{"p":"com.easypost.model","c":"CarrierDetail","l":"getService()"},{"p":"com.easypost.model","c":"Order","l":"getService()"},{"p":"com.easypost.model","c":"Rate","l":"getService()"},{"p":"com.easypost.model","c":"Shipment","l":"getService()"},{"p":"com.easypost.model","c":"Insurance","l":"getShipmentId()"},{"p":"com.easypost.model","c":"Rate","l":"getShipmentId()"},{"p":"com.easypost.model","c":"Refund","l":"getShipmentId()"},{"p":"com.easypost.model","c":"Tracker","l":"getShipmentId()"},{"p":"com.easypost.model","c":"Batch","l":"getShipments()"},{"p":"com.easypost.model","c":"Order","l":"getShipments()"},{"p":"com.easypost.model","c":"ShipmentCollection","l":"getShipments()"},{"p":"com.easypost.model","c":"Tracker","l":"getSignedBy()"},{"p":"com.easypost.model","c":"ShipmentOptions","l":"getSmartpostHub()"},{"p":"com.easypost.model","c":"ShipmentOptions","l":"getSmartpostManifest()"},{"p":"com.easypost.model","c":"TimeInTransit","l":"getSmartRateAccuracy(String)","u":"getSmartRateAccuracy(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"getSmartrates()"},{"p":"com.easypost.model","c":"SmartrateCollection","l":"getSmartrates()"},{"p":"com.easypost.model","c":"Shipment","l":"getSmartrates(Map)","u":"getSmartrates(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"getSmartrates(Map, String)","u":"getSmartrates(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"getSmartrates(String)","u":"getSmartrates(java.lang.String)"},{"p":"com.easypost.model","c":"Report","l":"getStartDate()"},{"p":"com.easypost.model","c":"BaseAddress","l":"getState()"},{"p":"com.easypost.model","c":"Batch","l":"getState()"},{"p":"com.easypost.model","c":"TrackingLocation","l":"getState()"},{"p":"com.easypost.model","c":"Insurance","l":"getStatus()"},{"p":"com.easypost.model","c":"Pickup","l":"getStatus()"},{"p":"com.easypost.model","c":"Refund","l":"getStatus()"},{"p":"com.easypost.model","c":"Report","l":"getStatus()"},{"p":"com.easypost.model","c":"ScanForm","l":"getStatus()"},{"p":"com.easypost.model","c":"Shipment","l":"getStatus()"},{"p":"com.easypost.model","c":"Tracker","l":"getStatus()"},{"p":"com.easypost.model","c":"TrackingDetail","l":"getStatus()"},{"p":"com.easypost.exception","c":"EasyPostException","l":"getStatusCode()"},{"p":"com.easypost.model","c":"Tracker","l":"getStatusDetail()"},{"p":"com.easypost.model","c":"TrackingDetail","l":"getStatusDetail()"},{"p":"com.easypost.model","c":"BaseAddress","l":"getStreet1()"},{"p":"com.easypost.model","c":"BaseAddress","l":"getStreet2()"},{"p":"com.easypost.model","c":"Form","l":"getSubmittedElectronically()"},{"p":"com.easypost.model","c":"AddressVerification","l":"getSuccess()"},{"p":"com.easypost.model","c":"Error","l":"getSuggestion()"},{"p":"com.easypost.model","c":"TaxIdentifier","l":"getTaxId()"},{"p":"com.easypost.model","c":"Shipment","l":"getTaxIdentifiers()"},{"p":"com.easypost.model","c":"TaxIdentifier","l":"getTaxIdType()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"getTestCredentials()"},{"p":"com.easypost.model","c":"Fields","l":"getTestCredentials()"},{"p":"com.easypost.model","c":"Brand","l":"getTheme()"},{"p":"com.easypost.model","c":"Smartrate","l":"getTimeInTransit()"},{"p":"com.easypost.model","c":"AddressDetail","l":"getTimeZone()"},{"p":"com.easypost.model","c":"Insurance","l":"getToAddress()"},{"p":"com.easypost.model","c":"Order","l":"getToAddress()"},{"p":"com.easypost.model","c":"Shipment","l":"getToAddress()"},{"p":"com.easypost.model","c":"Insurance","l":"getTracker()"},{"p":"com.easypost.model","c":"Shipment","l":"getTracker()"},{"p":"com.easypost.model","c":"TrackerCollection","l":"getTrackers()"},{"p":"com.easypost.model","c":"Insurance","l":"getTrackingCode()"},{"p":"com.easypost.model","c":"Refund","l":"getTrackingCode()"},{"p":"com.easypost.model","c":"Shipment","l":"getTrackingCode()"},{"p":"com.easypost.model","c":"Tracker","l":"getTrackingCode()"},{"p":"com.easypost.model","c":"ScanForm","l":"getTrackingCodes()"},{"p":"com.easypost.model","c":"Tracker","l":"getTrackingDetails()"},{"p":"com.easypost.model","c":"TrackingDetail","l":"getTrackingLocation()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"getType()"},{"p":"com.easypost.model","c":"CarrierType","l":"getType()"},{"p":"com.easypost.model","c":"Fee","l":"getType()"},{"p":"com.easypost.model","c":"PaymentMethodObject","l":"getType()"},{"p":"com.easypost.model","c":"ShipmentMessage","l":"getType()"},{"p":"com.easypost.model","c":"EasyPostResource","l":"getUpdatedAt()"},{"p":"com.easypost.model","c":"Report","l":"getUrl()"},{"p":"com.easypost.model","c":"Webhook","l":"getUrl()"},{"p":"com.easypost.model","c":"Report","l":"getUrlExpiresAt()"},{"p":"com.easypost.model","c":"Brand","l":"getUserID()"},{"p":"com.easypost.model","c":"Shipment","l":"getUspsZone()"},{"p":"com.easypost.model","c":"CustomsItem","l":"getValue()"},{"p":"com.easypost.model","c":"Field","l":"getValue()"},{"p":"com.easypost.model","c":"Address","l":"getVerifications()"},{"p":"com.easypost.model","c":"BaseUser","l":"getVerified()"},{"p":"com.easypost.model","c":"Field","l":"getVisibility()"},{"p":"com.easypost.model","c":"WebhookCollection","l":"getWebhooks()"},{"p":"com.easypost.model","c":"CustomsItem","l":"getWeight()"},{"p":"com.easypost.model","c":"Parcel","l":"getWeight()"},{"p":"com.easypost.model","c":"Tracker","l":"getWeight()"},{"p":"com.easypost.model","c":"Parcel","l":"getWidth()"},{"p":"com.easypost.model","c":"BaseAddress","l":"getZip()"},{"p":"com.easypost.model","c":"TrackingLocation","l":"getZip()"},{"p":"com.easypost.model","c":"AddressVerifications","l":"getZip4()"},{"p":"com.easypost.model","c":"PostageLabel","l":"getZplLabelType()"},{"p":"com.easypost.http","c":"Constant","l":"GLOBAL_FIELD_ACCESSORS"},{"p":"com.easypost.http","c":"Constant","l":"GSON"},{"p":"com.easypost.http","c":"Requestor","l":"handleAPIError(String, int)","u":"handleAPIError(java.lang.String,int)"},{"p":"com.easypost.model","c":"EasyPostResource","l":"hashCode()"},{"p":"com.easypost.http","c":"HashMapSerializer","l":"HashMapSerializer()","u":"%3Cinit%3E()"},{"p":"com.easypost.utils","c":"Cryptography","l":"hexEncode(byte[])"},{"p":"com.easypost.utils","c":"Cryptography","l":"hexEncodeToString(byte[])"},{"p":"com.easypost.model","c":"EasyPostResource","l":"instanceURL(Class, String)","u":"instanceURL(java.lang.Class,java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"Insurance()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"InsuranceCollection","l":"InsuranceCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Shipment","l":"insure()"},{"p":"com.easypost.model","c":"Shipment","l":"insure(Map)","u":"insure(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"insure(Map, String)","u":"insure(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"insure(String)","u":"insure(java.lang.String)"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"INTERNAL_SERVER_ERROR"},{"p":"com.easypost.exception.API","c":"InternalServerError","l":"InternalServerError(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost.exception","c":"Constants","l":"INVALID_API_KEY_TYPE"},{"p":"com.easypost.exception","c":"Constants","l":"INVALID_PARAMETER"},{"p":"com.easypost.exception","c":"Constants","l":"INVALID_PAYMENT"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"INVALID_REQUEST_ERROR"},{"p":"com.easypost.exception","c":"Constants","l":"INVALID_WEBHOOK_SIGNATURE"},{"p":"com.easypost.exception.General","c":"InvalidObjectError","l":"InvalidObjectError(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.easypost.exception.General","c":"InvalidParameterError","l":"InvalidParameterError(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.easypost.exception.General","c":"InvalidParameterError","l":"InvalidParameterError(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"com.easypost.exception.API","c":"InvalidRequestError","l":"InvalidRequestError(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost.model","c":"Fields","l":"isAutoLink()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"isClone()"},{"p":"com.easypost.model","c":"Fields","l":"isCustomWorkflow()"},{"p":"com.easypost.model","c":"PaymentMethodObject","l":"isVerified()"},{"p":"com.easypost.model","c":"Batch","l":"label()"},{"p":"com.easypost.model","c":"Shipment","l":"label()"},{"p":"com.easypost.model","c":"Batch","l":"label(Map)","u":"label(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"label(Map)","u":"label(java.util.Map)"},{"p":"com.easypost.model","c":"Batch","l":"label(Map, String)","u":"label(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"label(Map, String)","u":"label(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"label(String)","u":"label(java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"lowestRate()"},{"p":"com.easypost.model","c":"Pickup","l":"lowestRate()"},{"p":"com.easypost.model","c":"Shipment","l":"lowestRate()"},{"p":"com.easypost.model","c":"Order","l":"lowestRate(List)","u":"lowestRate(java.util.List)"},{"p":"com.easypost.model","c":"Pickup","l":"lowestRate(List)","u":"lowestRate(java.util.List)"},{"p":"com.easypost.model","c":"Shipment","l":"lowestRate(List)","u":"lowestRate(java.util.List)"},{"p":"com.easypost.model","c":"Order","l":"lowestRate(List, List)","u":"lowestRate(java.util.List,java.util.List)"},{"p":"com.easypost.model","c":"Pickup","l":"lowestRate(List, List)","u":"lowestRate(java.util.List,java.util.List)"},{"p":"com.easypost.model","c":"Shipment","l":"lowestRate(List, List)","u":"lowestRate(java.util.List,java.util.List)"},{"p":"com.easypost.model","c":"Shipment","l":"lowestSmartRate(int, SmartrateAccuracy)","u":"lowestSmartRate(int,com.easypost.model.SmartrateAccuracy)"},{"p":"com.easypost.model","c":"Shipment","l":"lowestSmartRate(int, String)","u":"lowestSmartRate(int,java.lang.String)"},{"p":"com.easypost.utils","c":"Cryptography.HmacAlgorithm","l":"MD5"},{"p":"com.easypost.model","c":"EasyPostResource","l":"merge(EasyPostResource, EasyPostResource)","u":"merge(com.easypost.model.EasyPostResource,com.easypost.model.EasyPostResource)"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"METHOD_NOT_ALLOWED_ERROR"},{"p":"com.easypost.exception.API","c":"MethodNotAllowedError","l":"MethodNotAllowedError(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost.exception","c":"Constants","l":"MISSING_REQUIRED_PARAMETER"},{"p":"com.easypost.exception.General","c":"MissingParameterError","l":"MissingParameterError(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"newRates()"},{"p":"com.easypost.model","c":"Shipment","l":"newRates()"},{"p":"com.easypost.model","c":"Shipment","l":"newRates(boolean)"},{"p":"com.easypost.model","c":"Shipment","l":"newRates(boolean, String)","u":"newRates(boolean,java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"newRates(Map)","u":"newRates(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"newRates(Map)","u":"newRates(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"newRates(Map, boolean)","u":"newRates(java.util.Map,boolean)"},{"p":"com.easypost.model","c":"Shipment","l":"newRates(Map, boolean, String)","u":"newRates(java.util.Map,boolean,java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"newRates(Map, String)","u":"newRates(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"newRates(Map, String)","u":"newRates(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"newRates(String)","u":"newRates(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"newRates(String)","u":"newRates(java.lang.String)"},{"p":"com.easypost.exception","c":"Constants","l":"NO_OBJECT_FOUND"},{"p":"com.easypost.exception","c":"Constants","l":"NO_PAYMENT_METHODS"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"NOT_FOUND_ERROR"},{"p":"com.easypost.exception.API","c":"NotFoundError","l":"NotFoundError(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost.model","c":"Order","l":"Order()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"OrderCollection","l":"OrderCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Parcel","l":"Parcel()","u":"%3Cinit%3E()"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"PAYMENT_ERROR"},{"p":"com.easypost.exception.API","c":"PaymentError","l":"PaymentError(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost.model","c":"PaymentMethod","l":"PaymentMethod()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"PaymentMethodObject","l":"PaymentMethodObject()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"SmartrateAccuracy","l":"Percentile50"},{"p":"com.easypost.model","c":"SmartrateAccuracy","l":"Percentile75"},{"p":"com.easypost.model","c":"SmartrateAccuracy","l":"Percentile85"},{"p":"com.easypost.model","c":"SmartrateAccuracy","l":"Percentile90"},{"p":"com.easypost.model","c":"SmartrateAccuracy","l":"Percentile95"},{"p":"com.easypost.model","c":"SmartrateAccuracy","l":"Percentile97"},{"p":"com.easypost.model","c":"SmartrateAccuracy","l":"Percentile99"},{"p":"com.easypost.model","c":"Pickup","l":"Pickup()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"PickupCollection","l":"PickupCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"PickupRate","l":"PickupRate()","u":"%3Cinit%3E()"},{"p":"com.easypost.http","c":"Requestor.RequestMethod","l":"POST"},{"p":"com.easypost.model","c":"PostageLabel","l":"PostageLabel()","u":"%3Cinit%3E()"},{"p":"com.easypost.http","c":"Constant","l":"PRETTY_PRINT_GSON"},{"p":"com.easypost.model","c":"EasyPostResource","l":"prettyPrint()"},{"p":"com.easypost.model","c":"CreditCardPriority","l":"PRIMARY"},{"p":"com.easypost.model","c":"PaymentMethod.Priority","l":"PRIMARY"},{"p":"com.easypost.model","c":"PrimaryPaymentMethod","l":"PrimaryPaymentMethod()","u":"%3Cinit%3E()"},{"p":"com.easypost.http","c":"Requestor.RequestMethod","l":"PUT"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"RATE_LIMIT_ERROR"},{"p":"com.easypost.model","c":"Rate","l":"Rate()","u":"%3Cinit%3E()"},{"p":"com.easypost.exception.API","c":"RateLimitError","l":"RateLimitError(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost","c":"EasyPost","l":"readTimeout"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"REDIRECT_CODE_BEGIN"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"REDIRECT_CODE_END"},{"p":"com.easypost.exception.API","c":"RedirectError","l":"RedirectError(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost.model","c":"ReferralCustomer","l":"ReferralCustomer()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"ReferralCustomerCollection","l":"ReferralCustomerCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Batch","l":"refresh()"},{"p":"com.easypost.model","c":"Insurance","l":"refresh()"},{"p":"com.easypost.model","c":"Order","l":"refresh()"},{"p":"com.easypost.model","c":"Pickup","l":"refresh()"},{"p":"com.easypost.model","c":"Shipment","l":"refresh()"},{"p":"com.easypost.model","c":"Batch","l":"refresh(Map)","u":"refresh(java.util.Map)"},{"p":"com.easypost.model","c":"Insurance","l":"refresh(Map)","u":"refresh(java.util.Map)"},{"p":"com.easypost.model","c":"Order","l":"refresh(Map)","u":"refresh(java.util.Map)"},{"p":"com.easypost.model","c":"Pickup","l":"refresh(Map)","u":"refresh(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"refresh(Map)","u":"refresh(java.util.Map)"},{"p":"com.easypost.model","c":"Batch","l":"refresh(Map, String)","u":"refresh(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"refresh(Map, String)","u":"refresh(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"refresh(Map, String)","u":"refresh(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"refresh(Map, String)","u":"refresh(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"refresh(Map, String)","u":"refresh(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"refresh(String)","u":"refresh(java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"refresh(String)","u":"refresh(java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"refresh(String)","u":"refresh(java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"refresh(String)","u":"refresh(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"refresh(String)","u":"refresh(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"refund()"},{"p":"com.easypost.model","c":"Refund","l":"Refund()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Shipment","l":"refund(Map)","u":"refund(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"refund(Map, String)","u":"refund(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"refund(String)","u":"refund(java.lang.String)"},{"p":"com.easypost.model","c":"RefundCollection","l":"RefundCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Batch","l":"removeShipments(List)","u":"removeShipments(java.util.List)"},{"p":"com.easypost.model","c":"Batch","l":"removeShipments(List, String)","u":"removeShipments(java.util.List,java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"removeShipments(Map)","u":"removeShipments(java.util.Map)"},{"p":"com.easypost.model","c":"Batch","l":"removeShipments(Map, String)","u":"removeShipments(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Report","l":"Report()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"ReportCollection","l":"ReportCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Report","l":"reportURL(String)","u":"reportURL(java.lang.String)"},{"p":"com.easypost.http","c":"Requestor","l":"request(Requestor.RequestMethod, String, Map, Class, String)","u":"request(com.easypost.http.Requestor.RequestMethod,java.lang.String,java.util.Map,java.lang.Class,java.lang.String)"},{"p":"com.easypost.http","c":"Requestor","l":"request(Requestor.RequestMethod, String, Map, Class, String, boolean)","u":"request(com.easypost.http.Requestor.RequestMethod,java.lang.String,java.util.Map,java.lang.Class,java.lang.String,boolean)"},{"p":"com.easypost.http","c":"Requestor","l":"Requestor()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Address","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"CustomsItem","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"EndShipper","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"Event","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"Parcel","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"Rate","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"Refund","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"Report","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"ScanForm","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"Tracker","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"User","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"Webhook","l":"retrieve(String)","u":"retrieve(java.lang.String)"},{"p":"com.easypost.model","c":"Address","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"CustomsItem","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"EndShipper","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Event","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Parcel","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Rate","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Refund","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Report","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"ScanForm","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Tracker","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"User","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"Webhook","l":"retrieve(String, String)","u":"retrieve(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"User","l":"retrieveMe()"},{"p":"com.easypost.model","c":"User","l":"retrieveMe(String)","u":"retrieveMe(java.lang.String)"},{"p":"com.easypost.model","c":"Billing","l":"retrievePaymentMethods()"},{"p":"com.easypost.model","c":"Billing","l":"retrievePaymentMethods(String)","u":"retrievePaymentMethods(java.lang.String)"},{"p":"com.easypost.model","c":"ScanForm","l":"ScanForm()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"ScanFormCollection","l":"ScanFormCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"CreditCardPriority","l":"SECONDARY"},{"p":"com.easypost.model","c":"PaymentMethod.Priority","l":"SECONDARY"},{"p":"com.easypost.model","c":"SecondaryPaymentMethod","l":"SecondaryPaymentMethod()","u":"%3Cinit%3E()"},{"p":"com.easypost.http","c":"HashMapSerializer","l":"serialize(HashMap, Type, JsonSerializationContext)","u":"serialize(java.util.HashMap,java.lang.reflect.Type,com.google.gson.JsonSerializationContext)"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"SERVICE_UNAVAILABLE_ERROR"},{"p":"com.easypost.exception.API","c":"ServiceUnavailablError","l":"ServiceUnavailablError(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost.model","c":"Brand","l":"setAd(String)","u":"setAd(java.lang.String)"},{"p":"com.easypost.model","c":"AddressVerifyResponse","l":"setAddress(Address)","u":"setAddress(com.easypost.model.Address)"},{"p":"com.easypost.model","c":"Pickup","l":"setAddress(Address)","u":"setAddress(com.easypost.model.Address)"},{"p":"com.easypost.model","c":"AddressVerification","l":"setAddressDetail(AddressDetail)","u":"setAddressDetail(com.easypost.model.AddressDetail)"},{"p":"com.easypost.model","c":"AddressCollection","l":"setAddresses(List
)","u":"setAddresses(java.util.List)"},{"p":"com.easypost.model","c":"Brand","l":"setAdHref(String)","u":"setAdHref(java.lang.String)"},{"p":"com.easypost.model","c":"CarrierDetail","l":"setAlternateIdentifier(String)","u":"setAlternateIdentifier(java.lang.String)"},{"p":"com.easypost.model","c":"Fee","l":"setAmount(float)"},{"p":"com.easypost.model","c":"Insurance","l":"setAmount(String)","u":"setAmount(java.lang.String)"},{"p":"com.easypost.model","c":"ReferralCustomer","l":"setApiKeys(List)","u":"setApiKeys(java.util.List)"},{"p":"com.easypost.http","c":"Requestor","l":"setAppEngineTimeoutSeconds(double)"},{"p":"com.easypost.model","c":"Fields","l":"setAutoLink(boolean)"},{"p":"com.easypost.model","c":"Brand","l":"setBackgroundColor(String)","u":"setBackgroundColor(java.lang.String)"},{"p":"com.easypost.model","c":"BaseUser","l":"setBalance(String)","u":"setBalance(java.lang.String)"},{"p":"com.easypost.model","c":"BatchCollection","l":"setBatches(List)","u":"setBatches(java.util.List)"},{"p":"com.easypost.model","c":"ScanForm","l":"setBatchId(String)","u":"setBatchId(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"setBatchId(String)","u":"setBatchId(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"setBatchMessage(String)","u":"setBatchMessage(java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"setBatchStatus(BatchStatus)","u":"setBatchStatus(com.easypost.model.BatchStatus)"},{"p":"com.easypost.model","c":"Shipment","l":"setBatchStatus(String)","u":"setBatchStatus(java.lang.String)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"setBillingType(String)","u":"setBillingType(java.lang.String)"},{"p":"com.easypost.model","c":"Rate","l":"setBillingType(String)","u":"setBillingType(java.lang.String)"},{"p":"com.easypost.model","c":"BaseCreditCard","l":"setBrand(String)","u":"setBrand(java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"setBuyerAddress(Address)","u":"setBuyerAddress(com.easypost.model.Address)"},{"p":"com.easypost.model","c":"Shipment","l":"setBuyerAddress(Address)","u":"setBuyerAddress(com.easypost.model.Address)"},{"p":"com.easypost.model","c":"Rate","l":"setCarbonOffset(CarbonOffset)","u":"setCarbonOffset(com.easypost.model.CarbonOffset)"},{"p":"com.easypost.model","c":"Rate","l":"setCarrier(String)","u":"setCarrier(java.lang.String)"},{"p":"com.easypost.model","c":"Refund","l":"setCarrier(String)","u":"setCarrier(java.lang.String)"},{"p":"com.easypost.model","c":"ShipmentMessage","l":"setCarrier(String)","u":"setCarrier(java.lang.String)"},{"p":"com.easypost.model","c":"Tracker","l":"setCarrier(String)","u":"setCarrier(java.lang.String)"},{"p":"com.easypost.model","c":"Rate","l":"setCarrierAccountId(String)","u":"setCarrierAccountId(java.lang.String)"},{"p":"com.easypost.model","c":"ShipmentMessage","l":"setCarrierAccountId(String)","u":"setCarrierAccountId(java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"setCarrierAccounts(List)","u":"setCarrierAccounts(java.util.List)"},{"p":"com.easypost.model","c":"Pickup","l":"setCarrierAccounts(List)","u":"setCarrierAccounts(java.util.List)"},{"p":"com.easypost.model","c":"Shipment","l":"setCarrierAccounts(List)","u":"setCarrierAccounts(java.util.List)"},{"p":"com.easypost.model","c":"Tracker","l":"setCarrierDetail(CarrierDetail)","u":"setCarrierDetail(com.easypost.model.CarrierDetail)"},{"p":"com.easypost.model","c":"Address","l":"setCarrierFacility(String)","u":"setCarrierFacility(java.lang.String)"},{"p":"com.easypost.model","c":"BaseUser","l":"setCcFeeRate(String)","u":"setCcFeeRate(java.lang.String)"},{"p":"com.easypost.model","c":"Fee","l":"setCharged(Boolean)","u":"setCharged(java.lang.Boolean)"},{"p":"com.easypost.model","c":"ApiKeys","l":"setChildren(List)","u":"setChildren(java.util.List)"},{"p":"com.easypost.model","c":"BaseUser","l":"setChildren(List)","u":"setChildren(java.util.List)"},{"p":"com.easypost.model","c":"BaseAddress","l":"setCity(String)","u":"setCity(java.lang.String)"},{"p":"com.easypost.model","c":"TrackingLocation","l":"setCity(String)","u":"setCity(java.lang.String)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"setClone(boolean)"},{"p":"com.easypost.model","c":"AddressDetail","l":"setCode(String)","u":"setCode(java.lang.String)"},{"p":"com.easypost.model","c":"CustomsItem","l":"setCode(String)","u":"setCode(java.lang.String)"},{"p":"com.easypost.model","c":"Error","l":"setCode(String)","u":"setCode(java.lang.String)"},{"p":"com.easypost.model","c":"Brand","l":"setColor(String)","u":"setColor(java.lang.String)"},{"p":"com.easypost.model","c":"BaseAddress","l":"setCompany(String)","u":"setCompany(java.lang.String)"},{"p":"com.easypost.model","c":"Event","l":"setCompletedUrls(List)","u":"setCompletedUrls(java.util.List)"},{"p":"com.easypost.model","c":"Pickup","l":"setConfirmation(String)","u":"setConfirmation(java.lang.String)"},{"p":"com.easypost.model","c":"ScanForm","l":"setConfirmation(String)","u":"setConfirmation(java.lang.String)"},{"p":"com.easypost.model","c":"Refund","l":"setConfirmationNumber(String)","u":"setConfirmationNumber(java.lang.String)"},{"p":"com.easypost.http","c":"Requestor","l":"setConnectTimeoutMilliseconds(int)"},{"p":"com.easypost.model","c":"CarrierDetail","l":"setContainerType(String)","u":"setContainerType(java.lang.String)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"setContentsExplanation(String)","u":"setContentsExplanation(java.lang.String)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"setContentsType(String)","u":"setContentsType(java.lang.String)"},{"p":"com.easypost.model","c":"BaseAddress","l":"setCountry(String)","u":"setCountry(java.lang.String)"},{"p":"com.easypost.model","c":"TrackingLocation","l":"setCountry(String)","u":"setCountry(java.lang.String)"},{"p":"com.easypost.model","c":"BatchStatus","l":"setCreated(int)"},{"p":"com.easypost.model","c":"EasyPostResource","l":"setCreatedAt(Date)","u":"setCreatedAt(java.util.Date)"},{"p":"com.easypost.model","c":"BatchStatus","l":"setCreationFailed(int)"},{"p":"com.easypost.model","c":"Fields","l":"setCredentials(Field)","u":"setCredentials(com.easypost.model.Field)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"setCredentials(Map)","u":"setCredentials(java.util.Map)"},{"p":"com.easypost.model","c":"CustomsItem","l":"setCurrency(String)","u":"setCurrency(java.lang.String)"},{"p":"com.easypost.model","c":"Rate","l":"setCurrency(String)","u":"setCurrency(java.lang.String)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"setCustomsCertify(boolean)"},{"p":"com.easypost.model","c":"Order","l":"setCustomsInfo(CustomsInfo)","u":"setCustomsInfo(com.easypost.model.CustomsInfo)"},{"p":"com.easypost.model","c":"Shipment","l":"setCustomsInfo(CustomsInfo)","u":"setCustomsInfo(com.easypost.model.CustomsInfo)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"setCustomsItems(List)","u":"setCustomsItems(java.util.List)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"setCustomsSigner(String)","u":"setCustomsSigner(java.lang.String)"},{"p":"com.easypost.model","c":"Fields","l":"setCustomWorkflow(boolean)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setDateAdvance(int)"},{"p":"com.easypost.model","c":"TrackingDetail","l":"setDatetime(Date)","u":"setDatetime(java.util.Date)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"setDeclaration(String)","u":"setDeclaration(java.lang.String)"},{"p":"com.easypost.model","c":"BaseUser","l":"setDefaultInsuranceAmount(String)","u":"setDefaultInsuranceAmount(java.lang.String)"},{"p":"com.easypost.model","c":"AddressVerifications","l":"setDelivery(AddressVerification)","u":"setDelivery(com.easypost.model.AddressVerification)"},{"p":"com.easypost.model","c":"Rate","l":"setDeliveryDate(String)","u":"setDeliveryDate(java.lang.String)"},{"p":"com.easypost.model","c":"Rate","l":"setDeliveryDateGuaranteed(Boolean)","u":"setDeliveryDateGuaranteed(java.lang.Boolean)"},{"p":"com.easypost.model","c":"Rate","l":"setDeliveryDays(Number)","u":"setDeliveryDays(java.lang.Number)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"setDescription(String)","u":"setDescription(java.lang.String)"},{"p":"com.easypost.model","c":"CustomsItem","l":"setDescription(String)","u":"setDescription(java.lang.String)"},{"p":"com.easypost.model","c":"Event","l":"setDescription(String)","u":"setDescription(java.lang.String)"},{"p":"com.easypost.model","c":"CarrierDetail","l":"setDestinationLocation(String)","u":"setDestinationLocation(java.lang.String)"},{"p":"com.easypost.model","c":"Webhook","l":"setDisabledAt(Date)","u":"setDisabledAt(java.util.Date)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"setEelPfc(String)","u":"setEelPfc(java.lang.String)"},{"p":"com.easypost.model","c":"BaseAddress","l":"setEmail(String)","u":"setEmail(java.lang.String)"},{"p":"com.easypost.model","c":"BaseUser","l":"setEmail(String)","u":"setEmail(java.lang.String)"},{"p":"com.easypost.model","c":"Report","l":"setEndDate(Date)","u":"setEndDate(java.util.Date)"},{"p":"com.easypost.model","c":"EndShipperCollection","l":"setEndShippers(List)","u":"setEndShippers(java.util.List)"},{"p":"com.easypost.model","c":"TaxIdentifier","l":"setEntity(String)","u":"setEntity(java.lang.String)"},{"p":"com.easypost.model","c":"AddressVerification","l":"setErrors(List)","u":"setErrors(java.util.List)"},{"p":"com.easypost.model","c":"Error","l":"setErrors(List)","u":"setErrors(java.util.List)"},{"p":"com.easypost.model","c":"Tracker","l":"setEstDeliveryDate(Date)","u":"setEstDeliveryDate(java.util.Date)"},{"p":"com.easypost.model","c":"CarrierDetail","l":"setEstDeliveryDateLocal(String)","u":"setEstDeliveryDateLocal(java.lang.String)"},{"p":"com.easypost.model","c":"Rate","l":"setEstDeliveryDays(Number)","u":"setEstDeliveryDays(java.lang.Number)"},{"p":"com.easypost.model","c":"CarrierDetail","l":"setEstDeliveryTimeLocal(String)","u":"setEstDeliveryTimeLocal(java.lang.String)"},{"p":"com.easypost.model","c":"EventCollection","l":"setEvents(List)","u":"setEvents(java.util.List)"},{"p":"com.easypost.model","c":"BaseCreditCard","l":"setExpMonth(String)","u":"setExpMonth(java.lang.String)"},{"p":"com.easypost.model","c":"BaseCreditCard","l":"setExpYear(String)","u":"setExpYear(java.lang.String)"},{"p":"com.easypost.model","c":"Address","l":"setFederalTaxId(String)","u":"setFederalTaxId(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"setFees(List)","u":"setFees(java.util.List)"},{"p":"com.easypost.model","c":"Error","l":"setField(String)","u":"setField(java.lang.String)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"setFields(Fields)","u":"setFields(com.easypost.model.Fields)"},{"p":"com.easypost.model","c":"CarrierType","l":"setFields(Map)","u":"setFields(java.util.Map)"},{"p":"com.easypost.model","c":"ScanForm","l":"setFormFileType(String)","u":"setFormFileType(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"setForms(List
)","u":"setForms(java.util.List)"},{"p":"com.easypost.model","c":"Form","l":"setFormType(String)","u":"setFormType(java.lang.String)"},{"p":"com.easypost.model","c":"Form","l":"setFormUrl(String)","u":"setFormUrl(java.lang.String)"},{"p":"com.easypost.model","c":"ScanForm","l":"setFormUrl(String)","u":"setFormUrl(java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"setFromAddress(Address)","u":"setFromAddress(com.easypost.model.Address)"},{"p":"com.easypost.model","c":"Order","l":"setFromAddress(Address)","u":"setFromAddress(com.easypost.model.Address)"},{"p":"com.easypost.model","c":"ScanForm","l":"setFromAddress(Address)","u":"setFromAddress(com.easypost.model.Address)"},{"p":"com.easypost.model","c":"Shipment","l":"setFromAddress(Address)","u":"setFromAddress(com.easypost.model.Address)"},{"p":"com.easypost.model","c":"CarrierDetail","l":"setGuaranteedDeliveryDate(String)","u":"setGuaranteedDeliveryDate(java.lang.String)"},{"p":"com.easypost.model","c":"BaseUser","l":"setHasBillingMethod(boolean)"},{"p":"com.easypost.model","c":"ReferralCustomerCollection","l":"setHasMore(boolean)"},{"p":"com.easypost.model","c":"AddressCollection","l":"setHasMore(Boolean)","u":"setHasMore(java.lang.Boolean)"},{"p":"com.easypost.model","c":"BatchCollection","l":"setHasMore(Boolean)","u":"setHasMore(java.lang.Boolean)"},{"p":"com.easypost.model","c":"EndShipperCollection","l":"setHasMore(Boolean)","u":"setHasMore(java.lang.Boolean)"},{"p":"com.easypost.model","c":"EventCollection","l":"setHasMore(Boolean)","u":"setHasMore(java.lang.Boolean)"},{"p":"com.easypost.model","c":"InsuranceCollection","l":"setHasMore(Boolean)","u":"setHasMore(java.lang.Boolean)"},{"p":"com.easypost.model","c":"OrderCollection","l":"setHasMore(Boolean)","u":"setHasMore(java.lang.Boolean)"},{"p":"com.easypost.model","c":"PickupCollection","l":"setHasMore(Boolean)","u":"setHasMore(java.lang.Boolean)"},{"p":"com.easypost.model","c":"RefundCollection","l":"setHasMore(Boolean)","u":"setHasMore(java.lang.Boolean)"},{"p":"com.easypost.model","c":"ReportCollection","l":"setHasMore(Boolean)","u":"setHasMore(java.lang.Boolean)"},{"p":"com.easypost.model","c":"ScanFormCollection","l":"setHasMore(Boolean)","u":"setHasMore(java.lang.Boolean)"},{"p":"com.easypost.model","c":"ShipmentCollection","l":"setHasMore(Boolean)","u":"setHasMore(java.lang.Boolean)"},{"p":"com.easypost.model","c":"TrackerCollection","l":"setHasMore(Boolean)","u":"setHasMore(java.lang.Boolean)"},{"p":"com.easypost.model","c":"Parcel","l":"setHeight(Float)","u":"setHeight(java.lang.Float)"},{"p":"com.easypost.model","c":"CustomsItem","l":"setHsTariffNumber(String)","u":"setHsTariffNumber(java.lang.String)"},{"p":"com.easypost.model","c":"EasyPostResource","l":"setId(String)","u":"setId(java.lang.String)"},{"p":"com.easypost.model","c":"Report","l":"setIncludeChildren(Boolean)","u":"setIncludeChildren(java.lang.Boolean)"},{"p":"com.easypost.model","c":"CarrierDetail","l":"setInitialDeliveryAttempt(String)","u":"setInitialDeliveryAttempt(java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"setInstructions(String)","u":"setInstructions(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"setInsurance(String)","u":"setInsurance(java.lang.String)"},{"p":"com.easypost.model","c":"BaseUser","l":"setInsuranceFeeMinimum(String)","u":"setInsuranceFeeMinimum(java.lang.String)"},{"p":"com.easypost.model","c":"BaseUser","l":"setInsuranceFeeRate(String)","u":"setInsuranceFeeRate(java.lang.String)"},{"p":"com.easypost.model","c":"InsuranceCollection","l":"setInsurances(List)","u":"setInsurances(java.util.List)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setIntegratedForm(String)","u":"setIntegratedForm(java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"setIsAccountAddress(Boolean)","u":"setIsAccountAddress(java.lang.Boolean)"},{"p":"com.easypost.model","c":"Order","l":"setIsReturn(Boolean)","u":"setIsReturn(java.lang.Boolean)"},{"p":"com.easypost.model","c":"Shipment","l":"setIsReturn(Boolean)","u":"setIsReturn(java.lang.Boolean)"},{"p":"com.easypost.model","c":"TaxIdentifier","l":"setIssuingCountry(String)","u":"setIssuingCountry(java.lang.String)"},{"p":"com.easypost.model","c":"ApiKey","l":"setKey(String)","u":"setKey(java.lang.String)"},{"p":"com.easypost.model","c":"Field","l":"setKey(String)","u":"setKey(java.lang.String)"},{"p":"com.easypost.model","c":"ApiKeys","l":"setKeys(List)","u":"setKeys(java.util.List)"},{"p":"com.easypost.model","c":"Field","l":"setLabel(String)","u":"setLabel(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelEpl2FileType(String)","u":"setLabelEpl2FileType(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelEpl2Size(String)","u":"setLabelEpl2Size(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelEpl2Type(String)","u":"setLabelEpl2Type(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelEpl2Url(String)","u":"setLabelEpl2Url(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelFile(String)","u":"setLabelFile(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelFileType(String)","u":"setLabelFileType(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelPdfFileType(String)","u":"setLabelPdfFileType(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelPdfSize(String)","u":"setLabelPdfSize(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelPdfType(String)","u":"setLabelPdfType(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelPdfUrl(String)","u":"setLabelPdfUrl(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelResolution(int)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelSize(String)","u":"setLabelSize(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelType(String)","u":"setLabelType(java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"setLabelUrl(String)","u":"setLabelUrl(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelUrl(String)","u":"setLabelUrl(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelZplFileType(String)","u":"setLabelZplFileType(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelZplSize(String)","u":"setLabelZplSize(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelZplType(String)","u":"setLabelZplType(java.lang.String)"},{"p":"com.easypost.model","c":"PostageLabel","l":"setLabelZplUrl(String)","u":"setLabelZplUrl(java.lang.String)"},{"p":"com.easypost.model","c":"BaseCreditCard","l":"setLast4(String)","u":"setLast4(java.lang.String)"},{"p":"com.easypost.model","c":"AddressDetail","l":"setLatitude(Float)","u":"setLatitude(java.lang.Float)"},{"p":"com.easypost.model","c":"Parcel","l":"setLength(Float)","u":"setLength(java.lang.Float)"},{"p":"com.easypost.model","c":"Rate","l":"setListCurrency(String)","u":"setListCurrency(java.lang.String)"},{"p":"com.easypost.model","c":"Rate","l":"setListRate(Float)","u":"setListRate(java.lang.Float)"},{"p":"com.easypost.model","c":"Brand","l":"setLogo(String)","u":"setLogo(java.lang.String)"},{"p":"com.easypost.model","c":"CarrierType","l":"setLogo(String)","u":"setLogo(java.lang.String)"},{"p":"com.easypost.model","c":"Brand","l":"setLogoHref(String)","u":"setLogoHref(java.lang.String)"},{"p":"com.easypost.model","c":"AddressDetail","l":"setLongitude(Float)","u":"setLongitude(java.lang.Float)"},{"p":"com.easypost.model","c":"Pickup","l":"setMaxDatetime(Date)","u":"setMaxDatetime(java.util.Date)"},{"p":"com.easypost.model","c":"ShipmentMessage","l":"setMessage(Object)","u":"setMessage(java.lang.Object)"},{"p":"com.easypost.model","c":"Address","l":"setMessage(String)","u":"setMessage(java.lang.String)"},{"p":"com.easypost.model","c":"AddressVerifyResponse","l":"setMessage(String)","u":"setMessage(java.lang.String)"},{"p":"com.easypost.model","c":"Error","l":"setMessage(String)","u":"setMessage(java.lang.String)"},{"p":"com.easypost.model","c":"ScanForm","l":"setMessage(String)","u":"setMessage(java.lang.String)"},{"p":"com.easypost.model","c":"TrackingDetail","l":"setMessage(String)","u":"setMessage(java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"setMessages(List)","u":"setMessages(java.util.List)"},{"p":"com.easypost.model","c":"Pickup","l":"setMessages(List)","u":"setMessages(java.util.List)"},{"p":"com.easypost.model","c":"Shipment","l":"setMessages(List)","u":"setMessages(java.util.List)"},{"p":"com.easypost.model","c":"Insurance","l":"setMessages(List)","u":"setMessages(java.util.List)"},{"p":"com.easypost.model","c":"Pickup","l":"setMinDatetime(Date)","u":"setMinDatetime(java.util.Date)"},{"p":"com.easypost.model","c":"EasyPostResource","l":"setMode(String)","u":"setMode(java.lang.String)"},{"p":"com.easypost.model","c":"BaseAddress","l":"setName(String)","u":"setName(java.lang.String)"},{"p":"com.easypost.model","c":"BaseCreditCard","l":"setName(String)","u":"setName(java.lang.String)"},{"p":"com.easypost.model","c":"BaseUser","l":"setName(String)","u":"setName(java.lang.String)"},{"p":"com.easypost.model","c":"Brand","l":"setName(String)","u":"setName(java.lang.String)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"setNonDeliveryOption(String)","u":"setNonDeliveryOption(java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"setNumShipments(Number)","u":"setNumShipments(java.lang.Number)"},{"p":"com.easypost.model","c":"EventData","l":"setObject(EasyPostResource)","u":"setObject(com.easypost.model.EasyPostResource)"},{"p":"com.easypost.model","c":"BaseCreditCard","l":"setObject(String)","u":"setObject(java.lang.String)"},{"p":"com.easypost.model","c":"BaseUser","l":"setObject(String)","u":"setObject(java.lang.String)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"setObject(String)","u":"setObject(java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"setOptions(Map)","u":"setOptions(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"setOptions(Map)","u":"setOptions(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"setOrderId(String)","u":"setOrderId(java.lang.String)"},{"p":"com.easypost.model","c":"OrderCollection","l":"setOrders(List)","u":"setOrders(java.util.List)"},{"p":"com.easypost.model","c":"CustomsItem","l":"setOriginCountry(String)","u":"setOriginCountry(java.lang.String)"},{"p":"com.easypost.model","c":"CarrierDetail","l":"setOriginLocation(String)","u":"setOriginLocation(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"setParcel(Parcel)","u":"setParcel(com.easypost.model.Parcel)"},{"p":"com.easypost.model","c":"BaseUser","l":"setParentId(String)","u":"setParentId(java.lang.String)"},{"p":"com.easypost.model","c":"Event","l":"setPendingUrls(List)","u":"setPendingUrls(java.util.List)"},{"p":"com.easypost.model","c":"TimeInTransit","l":"setPercentile50(Integer)","u":"setPercentile50(java.lang.Integer)"},{"p":"com.easypost.model","c":"TimeInTransit","l":"setPercentile75(Integer)","u":"setPercentile75(java.lang.Integer)"},{"p":"com.easypost.model","c":"TimeInTransit","l":"setPercentile85(Integer)","u":"setPercentile85(java.lang.Integer)"},{"p":"com.easypost.model","c":"TimeInTransit","l":"setPercentile90(Integer)","u":"setPercentile90(java.lang.Integer)"},{"p":"com.easypost.model","c":"TimeInTransit","l":"setPercentile95(Integer)","u":"setPercentile95(java.lang.Integer)"},{"p":"com.easypost.model","c":"TimeInTransit","l":"setPercentile97(Integer)","u":"setPercentile97(java.lang.Integer)"},{"p":"com.easypost.model","c":"TimeInTransit","l":"setPercentile99(Integer)","u":"setPercentile99(java.lang.Integer)"},{"p":"com.easypost.model","c":"BaseAddress","l":"setPhone(String)","u":"setPhone(java.lang.String)"},{"p":"com.easypost.model","c":"BaseUser","l":"setPhoneNumber(String)","u":"setPhoneNumber(java.lang.String)"},{"p":"com.easypost.model","c":"PickupRate","l":"setPickupID(String)","u":"setPickupID(java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"setPickupRates(List)","u":"setPickupRates(java.util.List)"},{"p":"com.easypost.model","c":"PickupCollection","l":"setPickups(List)","u":"setPickups(java.util.List)"},{"p":"com.easypost.model","c":"Shipment","l":"setPostageLabel(PostageLabel)","u":"setPostageLabel(com.easypost.model.PostageLabel)"},{"p":"com.easypost.model","c":"BatchStatus","l":"setPostagePurchased(int)"},{"p":"com.easypost.model","c":"BatchStatus","l":"setPostagePurchaseFailed(int)"},{"p":"com.easypost.model","c":"Parcel","l":"setPredefinedPackage(String)","u":"setPredefinedPackage(java.lang.String)"},{"p":"com.easypost.model","c":"Event","l":"setPreviousAttributes(Map)","u":"setPreviousAttributes(java.util.Map)"},{"p":"com.easypost.model","c":"EventData","l":"setPreviousAttributes(Map)","u":"setPreviousAttributes(java.util.Map)"},{"p":"com.easypost.model","c":"BaseUser","l":"setPricePerShipment(String)","u":"setPricePerShipment(java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"setProvider(String)","u":"setProvider(java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"setProviderId(String)","u":"setProviderId(java.lang.String)"},{"p":"com.easypost.model","c":"Tracker","l":"setPublicUrl(String)","u":"setPublicUrl(java.lang.String)"},{"p":"com.easypost.model","c":"CustomsItem","l":"setQuantity(int)"},{"p":"com.easypost.model","c":"Rate","l":"setRate(Float)","u":"setRate(java.lang.Float)"},{"p":"com.easypost.model","c":"Order","l":"setRates(List)","u":"setRates(java.util.List)"},{"p":"com.easypost.model","c":"Shipment","l":"setRates(List)","u":"setRates(java.util.List)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"setReadable(String)","u":"setReadable(java.lang.String)"},{"p":"com.easypost.model","c":"CarrierType","l":"setReadable(String)","u":"setReadable(java.lang.String)"},{"p":"com.easypost.http","c":"Requestor","l":"setReadTimeoutMilliseconds(int)"},{"p":"com.easypost.model","c":"BaseUser","l":"setRechargeAmount(String)","u":"setRechargeAmount(java.lang.String)"},{"p":"com.easypost.model","c":"BaseUser","l":"setRechargeThreshold(String)","u":"setRechargeThreshold(java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"setReference(String)","u":"setReference(java.lang.String)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"setReference(String)","u":"setReference(java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"setReference(String)","u":"setReference(java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"setReference(String)","u":"setReference(java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"setReference(String)","u":"setReference(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"setReference(String)","u":"setReference(java.lang.String)"},{"p":"com.easypost.model","c":"ReferralCustomerCollection","l":"setReferralCustomers(List)","u":"setReferralCustomers(java.util.List)"},{"p":"com.easypost.model","c":"Fee","l":"setRefunded(Boolean)","u":"setRefunded(java.lang.Boolean)"},{"p":"com.easypost.model","c":"RefundCollection","l":"setRefunds(List)","u":"setRefunds(java.util.List)"},{"p":"com.easypost.model","c":"Shipment","l":"setRefundStatus(String)","u":"setRefundStatus(java.lang.String)"},{"p":"com.easypost.model","c":"ReportCollection","l":"setReports(List)","u":"setReports(java.util.List)"},{"p":"com.easypost.model","c":"Address","l":"setResidential(Boolean)","u":"setResidential(java.lang.Boolean)"},{"p":"com.easypost.http","c":"EasyPostResponse","l":"setResponseBody(String)","u":"setResponseBody(java.lang.String)"},{"p":"com.easypost.http","c":"EasyPostResponse","l":"setResponseCode(int)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"setRestrictionComments(String)","u":"setRestrictionComments(java.lang.String)"},{"p":"com.easypost.model","c":"CustomsInfo","l":"setRestrictionType(String)","u":"setRestrictionType(java.lang.String)"},{"p":"com.easypost.model","c":"Event","l":"setResult(Map)","u":"setResult(java.util.Map)"},{"p":"com.easypost.model","c":"Rate","l":"setRetailCurrency(String)","u":"setRetailCurrency(java.lang.String)"},{"p":"com.easypost.model","c":"Rate","l":"setRetailRate(Float)","u":"setRetailRate(java.lang.Float)"},{"p":"com.easypost.model","c":"Order","l":"setReturnAddress(Address)","u":"setReturnAddress(com.easypost.model.Address)"},{"p":"com.easypost.model","c":"Shipment","l":"setReturnAddress(Address)","u":"setReturnAddress(com.easypost.model.Address)"},{"p":"com.easypost.model","c":"Batch","l":"setScanForm(ScanForm)","u":"setScanForm(com.easypost.model.ScanForm)"},{"p":"com.easypost.model","c":"Shipment","l":"setScanForm(ScanForm)","u":"setScanForm(com.easypost.model.ScanForm)"},{"p":"com.easypost.model","c":"ScanFormCollection","l":"setScanForms(List)","u":"setScanForms(java.util.List)"},{"p":"com.easypost.model","c":"BaseUser","l":"setSecondaryRechargeAmount(String)","u":"setSecondaryRechargeAmount(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"setSelectedRate(Rate)","u":"setSelectedRate(com.easypost.model.Rate)"},{"p":"com.easypost.model","c":"CarrierDetail","l":"setService(String)","u":"setService(java.lang.String)"},{"p":"com.easypost.model","c":"Order","l":"setService(String)","u":"setService(java.lang.String)"},{"p":"com.easypost.model","c":"Rate","l":"setService(String)","u":"setService(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"setService(String)","u":"setService(java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"setShipmentId(String)","u":"setShipmentId(java.lang.String)"},{"p":"com.easypost.model","c":"Rate","l":"setShipmentId(String)","u":"setShipmentId(java.lang.String)"},{"p":"com.easypost.model","c":"Refund","l":"setShipmentId(String)","u":"setShipmentId(java.lang.String)"},{"p":"com.easypost.model","c":"Tracker","l":"setShipmentId(String)","u":"setShipmentId(java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"setShipments(List)","u":"setShipments(java.util.List)"},{"p":"com.easypost.model","c":"Order","l":"setShipments(List)","u":"setShipments(java.util.List)"},{"p":"com.easypost.model","c":"ShipmentCollection","l":"setShipments(List)","u":"setShipments(java.util.List)"},{"p":"com.easypost.model","c":"Tracker","l":"setSignedBy(String)","u":"setSignedBy(java.lang.String)"},{"p":"com.easypost.model","c":"ShipmentOptions","l":"setSmartpostHub(String)","u":"setSmartpostHub(java.lang.String)"},{"p":"com.easypost.model","c":"ShipmentOptions","l":"setSmartpostManifest(String)","u":"setSmartpostManifest(java.lang.String)"},{"p":"com.easypost.model","c":"SmartrateCollection","l":"setSmartrates(List)","u":"setSmartrates(java.util.List)"},{"p":"com.easypost.model","c":"Report","l":"setStartDate(Date)","u":"setStartDate(java.util.Date)"},{"p":"com.easypost.model","c":"BaseAddress","l":"setState(String)","u":"setState(java.lang.String)"},{"p":"com.easypost.model","c":"Batch","l":"setState(String)","u":"setState(java.lang.String)"},{"p":"com.easypost.model","c":"TrackingLocation","l":"setState(String)","u":"setState(java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"setStatus(String)","u":"setStatus(java.lang.String)"},{"p":"com.easypost.model","c":"Pickup","l":"setStatus(String)","u":"setStatus(java.lang.String)"},{"p":"com.easypost.model","c":"Refund","l":"setStatus(String)","u":"setStatus(java.lang.String)"},{"p":"com.easypost.model","c":"Report","l":"setStatus(String)","u":"setStatus(java.lang.String)"},{"p":"com.easypost.model","c":"ScanForm","l":"setStatus(String)","u":"setStatus(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"setStatus(String)","u":"setStatus(java.lang.String)"},{"p":"com.easypost.model","c":"Tracker","l":"setStatus(String)","u":"setStatus(java.lang.String)"},{"p":"com.easypost.model","c":"TrackingDetail","l":"setStatus(String)","u":"setStatus(java.lang.String)"},{"p":"com.easypost.model","c":"Tracker","l":"setStatusDetail(String)","u":"setStatusDetail(java.lang.String)"},{"p":"com.easypost.model","c":"TrackingDetail","l":"setStatusDetail(String)","u":"setStatusDetail(java.lang.String)"},{"p":"com.easypost.model","c":"BaseAddress","l":"setStreet1(String)","u":"setStreet1(java.lang.String)"},{"p":"com.easypost.model","c":"BaseAddress","l":"setStreet2(String)","u":"setStreet2(java.lang.String)"},{"p":"com.easypost.model","c":"Form","l":"setSubmittedElectronically(Boolean)","u":"setSubmittedElectronically(java.lang.Boolean)"},{"p":"com.easypost.model","c":"AddressVerification","l":"setSuccess(Boolean)","u":"setSuccess(java.lang.Boolean)"},{"p":"com.easypost.model","c":"Error","l":"setSuggestion(String)","u":"setSuggestion(java.lang.String)"},{"p":"com.easypost.model","c":"TaxIdentifier","l":"setTaxId(String)","u":"setTaxId(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"setTaxIdentifiers(List)","u":"setTaxIdentifiers(java.util.List)"},{"p":"com.easypost.model","c":"TaxIdentifier","l":"setTaxIdType(String)","u":"setTaxIdType(java.lang.String)"},{"p":"com.easypost.model","c":"Fields","l":"setTestCredentials(Field)","u":"setTestCredentials(com.easypost.model.Field)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"setTestCredentials(Map)","u":"setTestCredentials(java.util.Map)"},{"p":"com.easypost.model","c":"Brand","l":"setTheme(String)","u":"setTheme(java.lang.String)"},{"p":"com.easypost.model","c":"Insurance","l":"setToAddress(Address)","u":"setToAddress(com.easypost.model.Address)"},{"p":"com.easypost.model","c":"Order","l":"setToAddress(Address)","u":"setToAddress(com.easypost.model.Address)"},{"p":"com.easypost.model","c":"Shipment","l":"setToAddress(Address)","u":"setToAddress(com.easypost.model.Address)"},{"p":"com.easypost.model","c":"Insurance","l":"setTracker(Tracker)","u":"setTracker(com.easypost.model.Tracker)"},{"p":"com.easypost.model","c":"Shipment","l":"setTracker(Tracker)","u":"setTracker(com.easypost.model.Tracker)"},{"p":"com.easypost.model","c":"TrackerCollection","l":"setTrackers(List)","u":"setTrackers(java.util.List)"},{"p":"com.easypost.model","c":"Insurance","l":"setTrackingCode(String)","u":"setTrackingCode(java.lang.String)"},{"p":"com.easypost.model","c":"Refund","l":"setTrackingCode(String)","u":"setTrackingCode(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"setTrackingCode(String)","u":"setTrackingCode(java.lang.String)"},{"p":"com.easypost.model","c":"Tracker","l":"setTrackingCode(String)","u":"setTrackingCode(java.lang.String)"},{"p":"com.easypost.model","c":"ScanForm","l":"setTrackingCodes(List)","u":"setTrackingCodes(java.util.List)"},{"p":"com.easypost.model","c":"Tracker","l":"setTrackingDetails(List)","u":"setTrackingDetails(java.util.List)"},{"p":"com.easypost.model","c":"TrackingDetail","l":"setTrackingLocation(TrackingLocation)","u":"setTrackingLocation(com.easypost.model.TrackingLocation)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"setType(String)","u":"setType(java.lang.String)"},{"p":"com.easypost.model","c":"CarrierType","l":"setType(String)","u":"setType(java.lang.String)"},{"p":"com.easypost.model","c":"Fee","l":"setType(String)","u":"setType(java.lang.String)"},{"p":"com.easypost.model","c":"ShipmentMessage","l":"setType(String)","u":"setType(java.lang.String)"},{"p":"com.easypost.model","c":"EasyPostResource","l":"setUpdatedAt(Date)","u":"setUpdatedAt(java.util.Date)"},{"p":"com.easypost.model","c":"Report","l":"setUrl(String)","u":"setUrl(java.lang.String)"},{"p":"com.easypost.model","c":"Webhook","l":"setUrl(String)","u":"setUrl(java.lang.String)"},{"p":"com.easypost.model","c":"Report","l":"setUrlExpiresAt(Date)","u":"setUrlExpiresAt(java.util.Date)"},{"p":"com.easypost.model","c":"Brand","l":"setUserID(String)","u":"setUserID(java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"setUspsZone(String)","u":"setUspsZone(java.lang.String)"},{"p":"com.easypost.model","c":"CustomsItem","l":"setValue(Float)","u":"setValue(java.lang.Float)"},{"p":"com.easypost.model","c":"Field","l":"setValue(String)","u":"setValue(java.lang.String)"},{"p":"com.easypost.model","c":"Address","l":"setVerifications(AddressVerifications)","u":"setVerifications(com.easypost.model.AddressVerifications)"},{"p":"com.easypost.model","c":"BaseUser","l":"setVerified(boolean)"},{"p":"com.easypost.model","c":"Field","l":"setVisibility(String)","u":"setVisibility(java.lang.String)"},{"p":"com.easypost.model","c":"WebhookCollection","l":"setWebhooks(List)","u":"setWebhooks(java.util.List)"},{"p":"com.easypost.model","c":"Tracker","l":"setWeight(float)"},{"p":"com.easypost.model","c":"CustomsItem","l":"setWeight(Float)","u":"setWeight(java.lang.Float)"},{"p":"com.easypost.model","c":"Parcel","l":"setWeight(Float)","u":"setWeight(java.lang.Float)"},{"p":"com.easypost.model","c":"Parcel","l":"setWidth(Float)","u":"setWidth(java.lang.Float)"},{"p":"com.easypost.model","c":"BaseAddress","l":"setZip(String)","u":"setZip(java.lang.String)"},{"p":"com.easypost.model","c":"TrackingLocation","l":"setZip(String)","u":"setZip(java.lang.String)"},{"p":"com.easypost.model","c":"AddressVerifications","l":"setZip4(AddressVerification)","u":"setZip4(com.easypost.model.AddressVerification)"},{"p":"com.easypost.utils","c":"Cryptography.HmacAlgorithm","l":"SHA1"},{"p":"com.easypost.utils","c":"Cryptography.HmacAlgorithm","l":"SHA256"},{"p":"com.easypost.utils","c":"Cryptography.HmacAlgorithm","l":"SHA512"},{"p":"com.easypost.model","c":"Shipment","l":"Shipment()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"ShipmentCollection","l":"ShipmentCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"ShipmentMessage","l":"ShipmentMessage()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"ShipmentOptions","l":"ShipmentOptions()","u":"%3Cinit%3E()"},{"p":"com.easypost.utils","c":"Cryptography","l":"signaturesMatch(byte[], byte[])","u":"signaturesMatch(byte[],byte[])"},{"p":"com.easypost.utils","c":"Cryptography","l":"signaturesMatch(String, String)","u":"signaturesMatch(java.lang.String,java.lang.String)"},{"p":"com.easypost.exception.General","c":"SignatureVerificationError","l":"SignatureVerificationError(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"com.easypost.model","c":"EasyPostResource","l":"singleClassURL(Class)","u":"singleClassURL(java.lang.Class)"},{"p":"com.easypost.model","c":"Smartrate","l":"Smartrate()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"SmartrateCollection","l":"SmartrateCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"SmartrateCollection","l":"SmartrateCollection(List)","u":"%3Cinit%3E(java.util.List)"},{"p":"com.easypost.model","c":"SmartrateCollectionDeserializer","l":"SmartrateCollectionDeserializer()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Shipment","l":"smartrates()"},{"p":"com.easypost.model","c":"Shipment","l":"smartrates(Map)","u":"smartrates(java.util.Map)"},{"p":"com.easypost.model","c":"Shipment","l":"smartrates(Map, String)","u":"smartrates(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Shipment","l":"smartrates(String)","u":"smartrates(java.lang.String)"},{"p":"com.easypost.model","c":"TaxIdentifier","l":"TaxIdentifier()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"TimeInTransit","l":"TimeInTransit()","u":"%3Cinit%3E()"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"TIMEOUT_ERROR"},{"p":"com.easypost.exception.API","c":"TimeoutError","l":"TimeoutError(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost.utils","c":"Cryptography","l":"toHMACSHA256HexDigest(byte[], String, Normalizer.Form)","u":"toHMACSHA256HexDigest(byte[],java.lang.String,java.text.Normalizer.Form)"},{"p":"com.easypost.utils","c":"Cryptography","l":"toHMACSHA256HexDigest(String, String, Normalizer.Form)","u":"toHMACSHA256HexDigest(java.lang.String,java.lang.String,java.text.Normalizer.Form)"},{"p":"com.easypost.model","c":"EasyPostResource","l":"toString()"},{"p":"com.easypost.model","c":"Tracker","l":"Tracker()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"TrackerCollection","l":"TrackerCollection()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"TrackingDetail","l":"TrackingDetail()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"TrackingLocation","l":"TrackingLocation()","u":"%3Cinit%3E()"},{"p":"com.easypost.exception","c":"Constants.ErrorCode","l":"UNAUTHORIZED_ERROR"},{"p":"com.easypost.exception.API","c":"UnauthorizedError","l":"UnauthorizedError(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost.exception.API","c":"UnknownApiError","l":"UnknownApiError(String, String, int, List)","u":"%3Cinit%3E(java.lang.String,java.lang.String,int,java.util.List)"},{"p":"com.easypost.model","c":"Webhook","l":"update()"},{"p":"com.easypost.model","c":"CarrierAccount","l":"update(Map)","u":"update(java.util.Map)"},{"p":"com.easypost.model","c":"EndShipper","l":"update(Map)","u":"update(java.util.Map)"},{"p":"com.easypost.model","c":"User","l":"update(Map)","u":"update(java.util.Map)"},{"p":"com.easypost.model","c":"Webhook","l":"update(Map)","u":"update(java.util.Map)"},{"p":"com.easypost.model","c":"CarrierAccount","l":"update(Map, String)","u":"update(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"EndShipper","l":"update(Map, String)","u":"update(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"User","l":"update(Map, String)","u":"update(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"Webhook","l":"update(Map, String)","u":"update(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"User","l":"updateBrand(Map)","u":"updateBrand(java.util.Map)"},{"p":"com.easypost.model","c":"User","l":"updateBrand(Map, String)","u":"updateBrand(java.util.Map,java.lang.String)"},{"p":"com.easypost.model","c":"ReferralCustomer","l":"updateEmail(String, String)","u":"updateEmail(java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"ReferralCustomer","l":"updateEmail(String, String, String)","u":"updateEmail(java.lang.String,java.lang.String,java.lang.String)"},{"p":"com.easypost.model","c":"User","l":"User()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"Webhook","l":"validateWebhook(byte[], Map, String)","u":"validateWebhook(byte[],java.util.Map,java.lang.String)"},{"p":"com.easypost.http","c":"Requestor.RequestMethod","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"com.easypost.model","c":"CreditCardPriority","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"com.easypost.model","c":"PaymentMethod.Priority","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"com.easypost.model","c":"PaymentMethodObject.PaymentMethodType","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"com.easypost.model","c":"SmartrateAccuracy","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"com.easypost.utils","c":"Cryptography.HmacAlgorithm","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"com.easypost.http","c":"Requestor.RequestMethod","l":"values()"},{"p":"com.easypost.model","c":"CreditCardPriority","l":"values()"},{"p":"com.easypost.model","c":"PaymentMethod.Priority","l":"values()"},{"p":"com.easypost.model","c":"PaymentMethodObject.PaymentMethodType","l":"values()"},{"p":"com.easypost.model","c":"SmartrateAccuracy","l":"values()"},{"p":"com.easypost.utils","c":"Cryptography.HmacAlgorithm","l":"values()"},{"p":"com.easypost.model","c":"Address","l":"verify()"},{"p":"com.easypost.model","c":"Address","l":"verify(String)","u":"verify(java.lang.String)"},{"p":"com.easypost","c":"EasyPost","l":"VERSION"},{"p":"com.easypost.exception","c":"Constants","l":"WEBHOOK_DOES_NOT_MATCH"},{"p":"com.easypost.model","c":"Webhook","l":"Webhook()","u":"%3Cinit%3E()"},{"p":"com.easypost.model","c":"WebhookCollection","l":"WebhookCollection()","u":"%3Cinit%3E()"}];updateSearchResults(); \ No newline at end of file diff --git a/docs/module-search-index.js b/docs/module-search-index.js new file mode 100644 index 000000000..0d59754fc --- /dev/null +++ b/docs/module-search-index.js @@ -0,0 +1 @@ +moduleSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/docs/overview-summary.html b/docs/overview-summary.html new file mode 100644 index 000000000..207b7cf52 --- /dev/null +++ b/docs/overview-summary.html @@ -0,0 +1,27 @@ + + + + + +com.easypost:easypost-api-client 5.10.0 API + + + + + + + + + + + +
+ +

index.html

+
+ + diff --git a/docs/overview-tree.html b/docs/overview-tree.html new file mode 100644 index 000000000..7f913831c --- /dev/null +++ b/docs/overview-tree.html @@ -0,0 +1,232 @@ + + + + + +Class Hierarchy (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Hierarchy

+ +
+
+

Enum Hierarchy

+ +
+
+
+
+ +
+
+
+ + diff --git a/docs/package-search-index.js b/docs/package-search-index.js new file mode 100644 index 000000000..fdda0c6cb --- /dev/null +++ b/docs/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"com.easypost"},{"l":"com.easypost.exception"},{"l":"com.easypost.exception.API"},{"l":"com.easypost.exception.General"},{"l":"com.easypost.http"},{"l":"com.easypost.model"},{"l":"com.easypost.utils"}];updateSearchResults(); \ No newline at end of file diff --git a/docs/resources/glass.png b/docs/resources/glass.png new file mode 100644 index 0000000000000000000000000000000000000000..a7f591f467a1c0c949bbc510156a0c1afb860a6e GIT binary patch literal 499 zcmVJoRsvExf%rEN>jUL}qZ_~k#FbE+Q;{`;0FZwVNX2n-^JoI; zP;4#$8DIy*Yk-P>VN(DUKmPse7mx+ExD4O|;?E5D0Z5($mjO3`*anwQU^s{ZDK#Lz zj>~{qyaIx5K!t%=G&2IJNzg!ChRpyLkO7}Ry!QaotAHAMpbB3AF(}|_f!G-oI|uK6 z`id_dumai5K%C3Y$;tKS_iqMPHg<*|-@e`liWLAggVM!zAP#@l;=c>S03;{#04Z~5 zN_+ss=Yg6*hTr59mzMwZ@+l~q!+?ft!fF66AXT#wWavHt30bZWFCK%!BNk}LN?0Hg z1VF_nfs`Lm^DjYZ1(1uD0u4CSIr)XAaqW6IT{!St5~1{i=i}zAy76p%_|w8rh@@c0Axr!ns=D-X+|*sY6!@wacG9%)Qn*O zl0sa739kT-&_?#oVxXF6tOnqTD)cZ}2vi$`ZU8RLAlo8=_z#*P3xI~i!lEh+Pdu-L zx{d*wgjtXbnGX_Yf@Tc7Q3YhLhPvc8noGJs2DA~1DySiA&6V{5JzFt ojAY1KXm~va;tU{v7C?Xj0BHw!K;2aXV*mgE07*qoM6N<$f;4TDA^-pY literal 0 HcmV?d00001 diff --git a/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png b/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..34abd18f32d3a55a297fdcf93409bd033ae573e7 GIT binary patch literal 335 zcmeAS@N?(olHy`uVBq!ia0vp^j6gI&fCnc6a#?2AmP!?*K(O3p^r= zfwTu0yPeFo12TF&T^vI^j=w#x$i?I+((tf;UXnmgbH|3oY>pC!)f}(GR!16S-u+#{ ze6YEqRkW=8vGl=5qArKM<9}TC-}iEvB{zdaTcX5$wyRTK&ALRXUCGx5b?-VBQkUm|IuXOmYJrBRJgj{Vx zMbNnqUkncy+qa2-mWYc>swkcIuvGK#>(0d)B7)5f`@$Ei28nH~0h*~=;u=wsl30>z zm0Xkxq!^403@vmGjdTsnLJUl-Obo4zO|=aStPBhe<(7X!(U6;;l9^VCTf=69^L{`L N44$rjF6*2UngDu&PXPb` literal 0 HcmV?d00001 diff --git a/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png b/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..a90afb8bf8028404d206114965669b023dcb85ea GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^j6gI&0LWmFTHNUZq?nSt-Ch3w7g=q17Rci)@Q5r1 z(jH*!b~4)z#PD=+46!(!TrvH)L6@80)r*_cdCvDr%)6ghVL16=s@mbz7H!uRdGeDa z?kzLg)16i!f8fKx84s0>4hES%`s&m5HI1v5B^Uft7(lid2moiiX_$l+3hB+!{pPkNg5^ OVDNPHb6Mw<&;$T*0!_~V literal 0 HcmV?d00001 diff --git a/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png b/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..dbe091f6dc036fc1dc11b005738e951e27a43f7a GIT binary patch literal 332 zcmeAS@N?(olHy`uVBq!ia0vp^j6gI&fCnc6a#?2AmP!?*K(O3p^r= zfwTu0yPeFo12VciT^vI^j=w#>k(V)1qW$CZ|6)SVV-&*#dav<$DMuV&n0Dbpw@aE%W-S*bfB&J`pw9sa4-R?IGW?p~6`>jMSP&M+u3 zY@9al)zrvpHlQu4C9V-ADTyViR>?)FK#IZ0z|cb1&`8(7EX2UX%EZvh*hJgFz{Ot{4q9c^pg%OaK6Yqo^RG1puHty#h|2KYM!0=6Ogw z8K9N2ybORL_{i$}QxC&U!O-)`D*V04jXJ#n04P`#Wh8ZcmyUA%?QMqxhsEu>DC;^~ z{8O8G!7ta)D{l)9O_iD5-A{FwUpb*$IVfjou`0AAQAiyPXs{~wzE|2cZ&-acSF5PE zECGBcRRVEnRHOae;6NyU=IDOFj1wfusG0S<3Q6l>z)~KZvoIliF0!*y?O)1|ko7+n z>+zd%4dS;8>iMJUMwP(40V}{-=QZ#}vlkKtjgT?gI8R3`s`{eg^A0iB|9C;N3jtvV z-Ng~;#kXO^6$qh)N`faRB-+@-bRYixX&v+7cZ47thp08jNs?kcf|lu#~em zp9vU17gB)u1qJ$;?70533PMsKum#Eq1WJ#2?+bZ7pACeTd>j>;rVp1okB*+jU>j7I z%j60+UbCER>?m`t-k_0UMwtLk6PNMY=f5dhQ8l$!D_vWBr7CGPcDXr`NYC0uXipIi(5RZ4R25t$~o-$U3fdSZ+t8-MmF==ihWU zps_B2WTuZJSqfEd1jJTJmIrBIIwGFP-`8)$-Iqppx}nZ^1vgyQ|l#q!hDI^2df&H%uZ~e0(cO7rqdczX@s)(9Eo-vb-MZ9T{=?X2emAalsxjR} zDp-RS7ef2fYsNm|W!_~xs+U7sTjX>);xAM$zqqaVh4|Euxo{YB$Ue0yH`R1%LS$R3 z_E+lO@6`C-O(hNK66x`)5glEd?{N3v6k%2iXu|DB7JlD_tIlHzQyL8|YqSl}2YGDC zVO=PpVE0uei+57#cSm-&mw%S6mdRjiXxq5W{LsvhSJ)azPC6$j8(XY|f^_Z&*1)W@ zy3m>x-39!zm0@c~zOZVs=NV_}R#gjtmK1&jPTBe7AFZ@zbRGz_6UwWLFcH!wR&|Kh zZORU;Y=?b=mQgrwQ7Jg5s`cWOAy<{^y4=~BY|8kNP41J6stuM$_oKMaSoT+r{gE=%vLbm}y-G-s!n*{3q^tC?7saRyDEHx#C%bDVlF- zT{dLhAcKm7_JHGWuM**1_IMVdiq^ z7D85%apck0)*q}ipK9LUem#)m&v^B|Widn`=US)y=oK{$PHqJfvPxXB01zn#HFdLP zQ&f?0$}kSU6DYm1#Q#-wfTbj=yH!1g2x|0WP2z>tuyO>41bFp+m<`<8K(}e{bVRRc z;_)`s&>3Igl%b}j4U`xH6cyED;w`@e*RvZRe2WjElbi=jJ?KR2PO|E4(J3bsCK3K3 zO01O90g8f8lG@TKjOF|Rq%J+HV&UYOoY19`zLkp~FG{YsK8Ir~X$|7*;yB&_zla!o zjYA=|t$atYh-F)y4Yz_vl#Mfhr7?c5+w!f^NDNI!Z?A?TFj8jfkyqH$zWRai4c9qe^hVZXz8Ua{_Qt*H|88x@P1f|(u2`*pny^DSvt z0cPlYpbVeN$&S_0igz=*jS?B}QmUqqvPHqKaAx2G>fO4YRa{E>XB6Xs(Qzm?KF6{) zH*UG(7f?FngNv=%+Zmde2NyXUJG!M`!A5Mki?MT(W9PZmXv@ zmep!=;N_2(YH&j9mbmVOT4-HZILhZTNTy1NuR|!sWu45-D4y_D0QqJt{zs;jlrvoW zMFI`6#{NR91Oga_$sPvQT2>*W zRIBmn5wo&P6T=9La7LKS#PfEKzLL;iMp+{1Q`z*5zFAs*0Ls&H`$&3{Kj4$V_i@Y3 zQ5#cDOZZXP4LiO`exN`(4@q9eQ8uV|2&zu8c<`IAi}X>xjQ2rZjo9+7c~B?p(#|;v zer1U!kvAG8TJgQf$Vb%&$$*?mTT^8q!mb=&j!S9)P#ih$wSndg2IQ$5(%D4r5YvN6 zSlmi#A+9~6hT+SJhfNn)&@?dH$60LL#zBHZW2#jikLi?i+d6FT_TdaEj!3q>= zs3B{;qsuhOi~=T+n7bcnD>mKC9SPia&sf-S6=bWBZ&k_0DVVff(=-5WLMn9=GM7-h zI0uf;xB8kYZb^lJ0n~JvuvK$V>}r19I>e+O66f|wPr+;wZh})Gw^&qqYZA}x4c57y`^h7)C>5Z1%3*cW z)cL6g#o{A8TI2pxi@_j)Q_eBD)Y1zWnK6FCJ*Vusx`G!m)?EOSA0act>OlBcw2kno znt+5a_hNxdJ!=)?x{qU|#3A*G_rm|KnYzPYV{szQS;o+Vc_nTJny7jnL?4}g| zq}9Rn^^$O}pD>4Wzz073HN<|S{OaO`3SdI%H!gr$kE|3cZg#S#ZmtN6jU!-W@kLCX2^KjZN_cvo3qAj2yCB?L16iZiG(a`(MHoh@NuA?dUdwAZsu^p~Uhti2ZH!rb9pRfx3K8kW z_?}^DSUvk!SkI1_Ny((_yDi!;g+*N#ElFI*hGVTo^~6evaow^^-a3wu+^vYErC)MU zEPyLe@#)2))oWu=PU`!)g^X7j-n;da0;cWGPIx}|{5}0&Gqw&mh_FTI_8yp+ZyIs# zi~~~V0>b733>{kC2`xluGp9ko+Syq=cLVEdK6dYbAnqPQpJ0yP1^$LT-{4Y$I*shl-3{@hbXlEaQ{OVJr6@vM$U7%VXui z69mW&G~@=wLkd6GC5LthA@FO8P^{E$HP}ph8}5s#;Fxy2?&9$ADS==?cc9DBgZ^BP z_DJ*8;w>hq(8u#n@8pPzhy{cF{4*+k-5}N1fZ&QXpqw@-WKbl7G-h<-fqQ5cUWgtZ ziPTTk*ivA(LV;7lZd*s>eSsM}+`^Lx#d$*#KPXr1pVrK0_^RM)uk}!!5L8>TO42Ru)kIb>l@A`(fi(etM0m#G<>kwwV~O zw(xaW6da4~#^(Y}PMxbp(iU(Th3CZf}3l^;h0r| z=MBo3m?-`p-VaQZT{78zLHSWNm32oJxoy&ks72t34^d!Gj8=dH+swRGn`d&6|j&n&PXLhwd zY?@dYT9b2uRt2;Fk>XXgPObcg`WLnv)u0L7*LN9TQ!dI4(B!mp9~}26atgA|Vl-1g zG1Mt)k?;6P4~*b9-+9z*fz4Xirg8k=gdS5xM_x#bV2|fmb8UMyiN$jH6WDG-k&!?G z7St9U#R|{RkKRcgSQnjdIK`zJd)?yFvD(DPh5-hpASH|!dA=)}N`Sxzdd7x9cr;&x z0?>+V`+=QN8F#cdo=5>iLeFsFc?ywL+hR9-dzt%0?%k)DK`Q zQ)!Pt6Auj>-6d23k2rTJpgSt=6SoV46u@%xuQKC8?cPl+>*s=DEZVpN7$>q1boY5* zW0O0~;UO$-=GT`m&GNYD-B<_TuV1~NR7&M0g7vw8=6o*KiL1c-3(y&pYSCOg_bjc`cG%->f>UT`;z zd<`+z@DhiS8g3Ej`NeU079;}kV+@JEqw=S1M4S)vpZ>f#e9Sb7)?;J*jPQ$o%jcL( z9$^>WxCE2zM$4Kh%Eo-KYvU}3BuuOxw#eC!({l2D6&`xunIoF$i2=Gg0oOH^x|Al; ziE$^IzopsMH;7d|WB#*{?LS*KYZR`8vFpVXe0x7M7(cI?fu)Yy9Qf zJg5w2#h`;t_ksT~YSk0fp6bXA&oHh|`M_xKx|irpxo|F)x82hH58PF|R4t27)9cKqaDz~7a@Ub32?mq5-4r4x9%Iem7Lr&xv>xdzdT4a%LsTjG12W?qN^+ z@!iZ3G`0DLzjcvM4RBD?gd5nN<_J(I18CxC>BNi_)y31reLH!#llOMD_Bg16eH%Z+ zI@5tf6YFG76bE+OR-tMscC-@k{FJTg^1cx>`h^6`{VI4q?#JA4s=KcG>oiD^L_xi+ zB9fNx(}VD&&!0Vp)p;!Sq@biL&x|Y2nRO@szL>_T7f_d^t2f=H1rP6$*dNk9oAK?! zN8kT+^=Y)gvMi3OX~M4qet%`%xvxqm{V^J4{^~Hs3Q6-Ozj$q&l*nDAhHS?*SuBJT z>1JWh2gQ14CnBI6K5U@JQIZuh#0MSj4qreM_!q_$+5dMzf-WI`F#D0l6JQxO0w~nN zN+2rI*O$V^wBuB(e=TPm5fA@tIVG9)#Aa$#3gm`FIbATR^{iB-qf&ubqlbcZ1yjl| zD-G(`AB!|X{kCx~J&%J(tINbfI_uV-SBuuHe1`iI;+Fc-{}H>dI0Y8;hq-TLYGv#= zhtQaY6vT2bzz+NAc&43SvdjlIGFF&@ybK!Fw*HDu_i7fBlm1z0*!SY)u7<9ZY$O+TBqN|FN9Is93lc2hfxq9nTU-D+<)*)73G?0Tbyq-0-Cy$ptt z(t0Hr5qmTCUdNWnmw-k*AjEr&Our;Q8=j1&G=lNvQt&r`N(Za9h0Hi?xKemGQofjwQ6 zEfOUxr~hNrrOY=DeNV)MHAz2xVyBip17X`9g*GZTExdiraYcBBk4MP1N-uBUATzwL z(z076^l1D(WzqG?hXB;P+t~YZT{6!yRk<1RRh#?lrI~d^{5EioHD^r!QsGeT9$#Nb z=cJt4L(J8!Yu(LMHCXyUUA*XMAeb%To(5CqTah||6kx@DMr!X_#1p!dW0fQv&nulS zOv9Nvw>;;%zuZ&z>2W@Ns^9w*v8;KpQHLsLeN%B9pufo^@$Abp1*uxTLE-IYWFj2A zo?eRJCYJFH-lL(A0b6A2icAbemDxEoRkbBCSVS_#pQZc^@503DOu6mquJ*#i`7CSU zMLUE>+8QgcPYL34g1*$KkR6=qQRmqHEk5A1LG#i4S-PJ+D|g(Jh=NHlAfcI&rk`Bg_ySed@e8Hq&)UIEwY_S;&-MbLul^u<^-*}B?;p5!e6 z5#0kXU8Yj~oxOH^gOg$mH;Nk3ap)|~){hGPm0MolJMP^O6W{JFcGSzvT?l;Xk)@<@x=`k3Q*F8qv z;&cbNL}{uYIMz@oRd|#JJSZ&(jm~LzN~q&j#$eMOEX1PL&m{W^W+%XLYMki&Z$kJW z3%K>=u5Y0?M}#F))ibW!sD-!weE{?W7W#FTzQ-*BBc@RDU+x!dFQ4_as9bt?>+JL;8sTYo&@eAiY~+@<*P0<1~jO0P2;5hMtQ<13y0#*{n`AT zj!xOv50?u8TDy6x1^-ynNWte0LY)Htw>Vyb?a?C|D6~gIOy>lWpLKmbHtoGfBOUdN zNTcrHea*|K-6wfOB>G~L9QHlr^�_j6WK+Gj+xJRxVvl#lh7y-4uY);t)n47k4ot z9YsU`HVk7fg4;r{;)FHk7ZHyZJ+W|$aKwj=g&_$VCVFn5%XzSA`|z}+4ItZ|`hB}R z>h-6Be`d>nmv8;kQHJg!HMr^cCGG=T5;3HhZ_JRq0_4a3TsY7Pz{V+}z>;!R^U4*c zJ>wRI59B-)92Vi?b&EWvH(`<(G5A?W)z>EuDMG@VENAb7aHa`I#tKw{0uUc3(#J8& z*_S%A_ZxCIY385{%qN-b1K)TWmCjUA4nWKx_ZnKLSvEf0($&_0@DS~ zN8JOXJXXcaFm^OCYrz(R7N5DQkXKGnnt}yzfw^8s%=A?7hxza;ylJ;XQ&XtC`pM%b z6$5Ff0{(ALcSlTKvIbr@mR`0Z)*iM`2EfO|E5OMk$jQsE!^mat*drqV literal 0 HcmV?d00001 diff --git a/docs/script-dir/images/ui-icons_2e83ff_256x240.png b/docs/script-dir/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..1f5f49756ca64bd20a1048bd7a3a584457d4bf00 GIT binary patch literal 4549 zcmeHK2U8PFw@yL`geFZ|P@*V;w1D&)N-z*QNarO;QRz)l2oR(yU5bE$@JbZ~M4A){ zMUW<7Xc|gHkY1#>kc)mZ-`x8j?lU`k&hG3pXZP8eGv_=pHoVEqz{dap0GM^r+NJ;i z@XQ5l($k#H6S{hbXB#ZW`sOH!2L%N^&k_wk58Uw#*BX~{9Oe{(!2H)ZKd9X_X#oyfU5m#1Q82_f^tw6O11(<7c zWrG0%qDlJqcA8#ZrRU7cn@;N9VJUYHk^lTY3j(~2xv33^rM-YYTR?r#*8XSqkBCLbg&Z9G zp-dC_BuoqAkc7;MJ$9jCDbZN_FFIp=mvYI8l)OlkJ2GcKGFRh03>eyeeRF`W3VO-< zC@;;5k3f&*z5C#XoxT-q8o(%^R8K&f=k{8C{Y0uqmWi%PaU6jYo(5);yFd`Pn(!El z9h1vEhwlH1Q*|5X!lGvH`BD!7(^?OdAd$XP8=x~O{-Q}sy<2@T8`8IN;o*)L;K1*C zz~`x^5S%i=-8fHXQ{cyPiZj`|pV*e}T1g-QFmGBzZJ}z9t&~LL?-9yqp3x_EMw?h% zR0P^RfsG7yxX`l^uHgxl8V3PJTxM-b@>%bt-xEPCC)WNC4L*~?BL_6;e`XLVLVOkZ zaY1crUf;C9r#r|ebAHIp$KdM#$G60s#+4?*)mH)^4Rrn^&ZPOyOvZQO09veRcnbCX zWQc5fEAPmQd7=aqrZPBYAy;!Ph{cmfC@z-hpTuotqr$Mt? zY7woww1bOdZZNt7uHxGKm9$w8ozW}U!S8~V?{0A^bi{^$t00v7M zy;S7sm>vMCBz+=8TH~>zJ3!E9INJ1E6=!x^{;q9Biu$){2DGEIbB=oh!`QMCEx$ds$)Rc&7P*}`pd3{PqA}tIjp&y&{w{YrsPqhxaO4qerTDpM`WTlW5 zu*{F5ID98N%XU%ltVphxZ4Tra!)bpNih&)&Xx+d#q1{G`5icBuvTfv^7X{W}JXD*B z5!u=L*x{^0TXODlF@ziPt+=ars9OiJOv1hU4sSKFa z=)|j@+%OFH1Oa3f>ffz{O6~wHhDJrN4=)Y|I6DD)9CPw@Ytx6M2-O;{GQTQG&gg?A zr_VPJ&6+f^hXn|7pvwa+o;bXAc{n)lTn{~TF;3#>=AS1_iaGZheU=*xbHD8CUNUCj z^3&DKA#op+3tPQa@eK1RUg%D!n%5J4ICni7xELQIvd$Qz&+%!EZ!S{js)F!S5x>3O zLCB>-TbYHXS1?}__Xfm{r>(wAU3INPvHaWIIYbsxO^Oe0h0xglZWFakn6z+$6`V(< zSimFunLw;GdHMnWx=-GqPeuvo)l|sHaFJ~`DxMN)4Y7U!J8D=^MqeQn$`lS|1%mdN zK^morEND%3ee@_Yb<>IVIW2*6NZ^*QDg@w`H$3}uYsbleFidycDox+uzraGexRKEV z)Wd(JYU$(enZkGJ3{9REQOJppi6EBrWrXU;Ho*EGRUG&RC-ceTd@*C1J$c=Jk~Ty0 zAJE}+ZgP611Nw}-*K%$Od}R)=^6W|sl);faH`l2OA>=zFmy@8vVK$&%4OTWEhnx^< zs6V-c51bUMvJ@`4zcieGu?{L+ z6(ZMYhQND%M5s7uB)($Pv`1e&xPRDwWGD>e&;;;sA;yn_>F>rJH-M!+=wbl1_|+h6ttu(NB3r*FCdU;|1QOB?AGaVz-O zFMj-^FpfDR$apG zp!5Ji|53`FLrz-d>YnYEv6T0wDN8?-+$@_Nk-6nai){TtA=w&Qa=^woXbB~azV{PSFnB7zJF-k|zJbp8E$W1!v#tcX8%TiKFo-n7uCut-v(fLn$6ypSnrZ z$*S34s_(`S1jtESyVuI|{3uW2BhK-{jQp05>-^UGi}#K$%3bE8bM>i8<~MKu=Z4e! zh0A#tX_IOB39o+SdnJzu7<`KoCri$9{I*mr4A2uJr&$q1-r=Lzfussme7r{sQYl;m0a`a^hI)69ux681k(h4* zN9|Ywb^i7xF=uPVr*az7RYlVWPxhKmOE)Fgo>mlB<7pYaz6VsBW7J04%DxENck4rx zgM6#>hT78o;>S1Jt8MqV+4Jng1ERmSoX9dGIW`CC2VaF9CwL8-Bi|83mD2!Dee`Lm zCU-luuD>aLYJU7ZD?3R8tYYSVzoEVM_7n=hEcv1FN{h`Dk*ik1Q)z?ie^&}a1;86B!(s%}s%T_y4o&Ilh~d4DHn(86bo>p-*Ct4!-v)W$h1{J?4IrLKT@^?`26FF*@(2A4^@6og<7ngtWmIBVp>g{gwCG=1WX4srm*>E(6gC>!E~o-<{=AHg;~h zr)4{j`glAMBt_n{+%n8))~tNAyYCizc)D8wlZ8(Mn(svkWSi{A*vq>kCT}fIzl|Cn zy>PR|9cIRx;PBE5*-4+O?~_|$F<}5ur(2S|FAw=N&4pNnTk#=xhxAK3L=6a{X{DRocw%r8utUc^U?}*_ zr(y*T#U}{tCh=GT-ig;Dn~K`ilK*9stV#@EBAC9TOf4ugkA;~Nt2ej0?du%%-=F_m zz_LA$2jOO2Xk0r}zAZwZs7;VwA4S}3#)0t0SXSerLIo`;%;<|0ji~+vl}hOk9i+zx zUuZGWeo-DskUoPx=uJ)C!2Ep5@-PzwsF1^fj6kXJV!gU9L;{+5Gue#|!$uOssQo@K zR+uvJS*YTwuIPpVsz4PRkj93f17`97b|eBhl?7-Z9~n0f6EDor>foo2fPb$h4?A7> zT%r7x%5bpcUlV8+ByvZ7G1za^zhKiWJonD$xaS#k!hAE4p;QgaM*&tH)GI*HnxRE` zKM&1Lk7kAdR0w0M^qbP-LBil+NXKi;ihqCio{6=#|O(C$v0m`Z##4NXD+__-g z(_-U=I?+`IvcD6z77?Nw;fys4D9CFwg)Aldh6fQ?7N5`ui7^y6CC!+Es(Gr9qTHPK z-0ma)tFN+?V$ZP1e1t=yi(Zs8_S&zkh{hmaoulswfZ1Dqa1RNYC-25^Rm!I<>GW3k zjUOHLY78yVOfQ4@4mA&>xohn_3&n{JwbI7c3dEV^o%%0Fv=51+iH6T4?jF;IPPfqw zokxnwN5uxo9?XI&Sz@-f12P;WQ%GNbFK1CCdDhs}sVDCdBr~;?W)WZ)U0iw42JJnB z7i*tnrsnBMBpw^Ay}gobnSM$V#D;&2_@aql^X86vylX4gc?Y;m(y8v2NuB;;wJQoV^z3UpIO6adgOK|rh`I83cQ92vN z*nDrN5bxLa^N8pN&PPh7e;t?O#;^ACf0T)hr9bD^{p0K0aKs6fP=#ZL0@Q)?jH1G4 zmGhC&x$cBzQD~bW$K$+5{ylRuGYJ=lL0%_3KE(evW+WZI`zqmN3H0Yi?*N0(R64#J z>}+>eAmE{uko29IXjycIN3NS#IqY;9$u>caW?(bvKw+_ zgG{F`FVBpFDwJwR~R;O-V!9D+Lphp>2% zCAeJPdrp0I&;9O?nVzZYuAY9Td#2`@Ff|ofJRC|K004j|F9+2C0DzA}z%e%ZV=t5G zEb%Bnri!vqfK1uzM9#CcN_%;z#n=8gA#PS3;tcI;~uofXisxsK~{&;VR#1 z!o>>A2X%jk6mmfdq0-jyMN=cu0=VG)#_Jf_>&KuMX8ti@lH{h`>lhL}=z0k4IB519 z2z+_ZC;46kNd^v6LH`zyWz zc=pCDRd~N_<2su2s8&{(HU!aVC@&H;3-}=D4 zmn4&Xqtz|N;fr4ZX*`x)O>~I#fDAFWbF}%9b@c^V1-YMxSf6U)DQRkB+43Xqb9MFy zjo;f7Zl(+0@U{ZOZ-5LtI^A(gphls-(I>bAO%b)X0%Rr}JgWGZvD+JlsTxN^% zxJBLbH-$q!0L=#%jxX5Vq_FKJ<2w!*===-Y@qzQ*_ z&ov@B+(5Xb?{lf2ViA!OfgI3o#$9BtFq%%7KSq&MDxi7pySJYoi*Mo(W6r!DLSMQT z5R^D?yx*g7)k}}4ziwHEoWI5K%3hPst6voipJkIw?!%9N$K$TWC4VuQM9)7yVq;a$ z=Z;n#4~)-1561t|Pxey=Qu^0P2#JYboJR5co5Ktl*iAC2?$BN>JINDo_+7dptH4MZ z=#a=xrMtj%`CVN()`GKp3RFADpy$xF7~O&&p0-yeG=xW8uhj9Af`YV6uf@~_v;;D#h=*T)D!O`_6(IwY zIw^B!$W|O05eRI*b>Pe%GGlOW`<(mkpbS$G@7HEko`s{=g~2c4kqO2D{R_c$HXzr|(vU9~bVZ9Zw90;2AsK2ig}XTGY6fY#HgGpEaxY zO`D_Z@O8%f#^@5G;myQ5fA(JXK{rgcieDr!{s`~{nU%CRe=1;4og^%^Ts{A8>Sq8@ z7MLFuiJ9lh@TXEbSXQb0;l#nbg^u{Ky;vCuCLR537HT%5FxM^fs5pS1gq3J(Tf!*6 zAc~!aiCB8(;cEmBeX<`V&xqvsk92&%dsXd*G@M$W7!TVsoD%c%!p~lGHEz(ckd{tR z##JAyc1)YR0b@JW|HWX=EIHNMaui<>jUPal5F|-#l#?ar-oHSbCyZG*EuqOC?V5Iz zROd8mBy{ukJ_DuzLTBsPdF^WZ7NW}CWcww?Uwp))_brh+D#JdL%%G}bh zEbmg}yJc_xX1_|6iSomOV4IgTV&UNVe-P4B!*v}&@hLXe=h7%`bcW^Eta_BE?bf*&82)UKj^6nE@ zA$RoKncM;1&!nmY^=yjr6=wgBr%e9BXAxKh^0A1=&iQhn5mfUB$_1N5DJ-DZ4!pLCChW*MHin>-!AX+Twe_SsV%)n#? z9m<01Z}*b;{SU$Rd-`axfZ;y8#-Dau@wD~tukEo#I1b5JhkDp%r;hf2&TH29Y`$=G zCT=}&CU#_(G5)E0y~*>piG@IHnT&WP>Bef5eoMnuRP?tb7aFH_AYy@I!S34oD{g9j zt&5vt`pheqh=GvgZDzlqDuidT)11qC;R35@PC4Z4(p=SICoeHq+3uEqgbmq)}q|_NRzcOHv0J`WLpt+1=j?0A{<5%OLxd!f~^V zfofe-Y;s4+yganmBlRs9L-MCkb@HkcIGzakx6p52sHx;MA}LA_@xo(MP} zDc);OVH(SgwrVlgqy!Vb7cIqe8X$!ECB5e#-)15warssOnkR%x%-o>1T_T=}^z83m z>?c?Vcl|}zH)Gve#!UTymO66c$B^I*%B*@2y23hf5=?aCeBzz7EJe|b9Sex0(wO>7 zRb>P4peOZ<5iwK?l!Imu++&w7Syj6VQ7HaGhAd%tr!?^1W9BpDb9K6w6&K*5X?Mg{ zJ-9!QlR>z>DK+)226mPe<+h_rzFAHI!mzVV#GU?Fzw~_RoaIT4yg6y4BAsT`&lzDE zN8&hg3mPdVnZE*z(B&{cUCbdEZcwCc!M07oJQWk{gQd-> zr9dqLy@o0}77srWq=#f}hD*4;Wr{`XhNy3(QRG7u=})1~*VvvJg7)}?r}&$RlQwv$ zXdGV%bswf)=onk3jFfL;P++Q%v8Zx@HLpgdXD??Rgfd0J7%TheMo&G8Ri zY%xQ58GYjiumJ@R#%;;*4f6=Jqyt;B^WLz4)&y*MwAuEm);Ad)VfKQ8Sr0CY@t@~> zUQjgZ#QB*y&{~9gc(!{BsVt<##<@4;&)IsJD6YtQmo_p%?&3O=8)wZazJdioWa<4X zlrD5`HRzYUVx9XSHNrRMeJbsZXE$L%`CjK>#AvI+17q)*ws2o~m+2h|RXRpuvZ;D* zQY%WR`fzBy@JjoZU*XW8`Fqv?ZRVOCeS4``J028Q{72zS6OggtuOq;?NrF=gLU{T1 z2Ey5bAX2R!_@I`V<&n7vuSD$!&t^oE$C16?6i^2+oXgJEQ^GRtyq7y|3J zjS5W(iH2Od&+O~1mD#qt_V(U2`D~yWIe}Wmh)Pz z`3B*tPj%Q1@@njj!dC^nL67Y3HjBux!~dkMt88TTtEyZ&gy!?kq=hW3X+P_Vrv0a= zk$G`d4jR#UC3q&uVr_NfxeAI|1?9Qb7nKH>x*7HzWEl1J7=Vy~_xZtg^d+=;~q6HX~P<3!HF61g_w>7y^ge1>z>0>CJBlwhy*m zu^e%|FDE`Pg>^K2tw_~`;#;lt;kHE=dWx%}d@{Ep`+}fUYEkRY@7R4z^Gi3a z%p3!^U0{T-%L?kl_g;>HbVbT_)6tT-&YtzE=5CeyU1!c&e8r`X(rWY(&&Hn$;!z<3 z@ZD^M|7w69ux8!!$a=u3Jm9vMnxk@c@;-#Vi;?20XYrZU4{Zg*wkL!!)33(XXlz1R zYdSCxbAF4VGcc|P>jR^>ye$Fvd;}`W;VnrnsgUp09az2h?}6$Hh^S}<)Tc=<&3>*uCLEyR_hY_tr{or zrLSkS#T^|h1|_TSdo$fLueegLlN{0i)^=e2EtbySBh*?saAY}fWW_pZPj89qIdGQG zuxq;}FZf}T8*ZUnyil7Q8o@Dmf8dp6l_IDkJXm0=&ivCe1tvmX*|Y9)KZx>*u)cj!gV3~eOWE0KE$Vd(C$NowTz3Z#GR58MoW7U>(7WibQR7zU zr(M+U)R3#cCD?IbC3MmtR7?nlyi9(d)Z8dBwm5Yv#gE zH~5Y@zD>tVcGN_vSwLt5=jvf;p2JDnXQDL55iWH_(o7-&$C@w1ezEAGF`loMo{^9s z+qL-4cT!g|bS7(^aDM{#4CP=QsdpQhA-B3WQ@8x}1Z~5_L6>yv41-IOKT3S%nn6e5 zjJw+eepy<9mtX+LaCH|?5I*+c*Y9Mnr%8@i5vn4Hu@i=9XtWGol{AM#ixz~m!Q15N zdc*o)e1I~VccQpl$M!|<;DHX$F%un;kJwM!;3X{(+24sQz;UoP+D;pG5OrK;NSpRJ zAoo7h4z`5^2%$YZK@il;j!YY-k-Zk}e^u&AqL*9qyz-Oxo3!(5hwER%GJ1>eeJHnI(0ne%RzAyI5mDgG%|(-4~b=*CY8r|1uLy`6pa z`a`AqLvAMzmPMnOi;v!%;Z#k2RPeMo!UaOYtBz2^Z@;8%ZuCM|L0q-P*6`3fqiw^L zL3`*T0~C5-#Fy`zV$lw~_4mI6WLZS@zu$b)@(M16E0J%hHBZ=3P0gJyo*6+fXZ0|) zB~_}943 z?Lc#&-_51qs+HcN0==Y{;S2E*(c#J}TF1dOq>+oBq7^BO)gtN36`@RskHQ1S3iYcE zdr^>R{%$WSvX(kRE8=0x3WtG3iW!hA)a`Qss{lN*6S62fAT80qpF>~U0K*^ef>uYa zroXwa>=4bE(Me{aSAcQ#S=$1-=uQTg;;=5KvvH5q>2fiJX)f+RsBB9uXVi%6<=o_J z;Fb|nE-|%J+QxjX*FPtOMZ0yTw$HWu++eB$65&pLY_$8rd6A`F5DZM&a@ox>EyZF; zI35+4PUyZ(Fq1PdiWWylndF0L`Bi&mEFQ4%ig#h6sXl- zY}`wuiiW&n92*N#!?nXU?R|&(llg1N@n!AqFF{IZ&>!ujl|0-wU5gGY2E08{lSjF4 zt|sNhwGNVmJc`EVWEc7S%r0=*uWj19qAzg@1=s-H)o&Wz<Lli7-+}2Ha{kq=!XZ~pZc&+Q=0Cr|?#_d2wy>XJyrz^0!NJym zO7^0TjMo8~-}C35db!jXTrFn2nwOg2p{IJ)TMKtnrmOTK9*AKe0{j(&<)*eqt8N!v zpq|U58&sl=USB36p%G@>`5=>n9`TBDZ+p}y$w2uADdGxvcz^~D|-g+X6KZ?b`a6w%sL2=P|o1#BP})wq9P6^I;EBnI=7-f6T*2aKAh(r zXjh?;*}}bE?&sMes#m4`20olUS!0kmkhy2DS0V9I zOVfN+i{L@-)F3v$JA2t)D}TAUs6WZNKJ{$kx`%Omgx%I7Je24zhTUZh(V%L!aHijs zeCcMA`}iNqfj%Fu?+*QOj<}bl1LV*Ss@{fNU5=lL+RyR}X`nw|5$c(I=~X%=VUF8A zjt6XyO6Eiq%OTZ+GJkTSuKVD2LWrlV!?~tMbg?upc?2iFnnE_oJ8?xt5w%`pFE$TSofbGY9Nn%^00N{i~> z!<-d}5xbK}N##I0*iFO8_PIgdMSVO=^HewXRYhMjzGFhagblsyGGu2-wW7GZZ{ zQoU1S*zc%l7-^UdxP0GxT<1fpCrTSsH9D$z?_|R6 z_Vg7Qh~N<#KqCEj{{Z9*u}7$G?~LK>=6PI~v3uf)l@UJV^0t@wG+ak)aZ`yOwUxZ0 ziHYw>>qDBv?tyTN>lry=XZ*IuTz=$P-6wpGW>1{a66PVs?H#@p6~=_6dhZ zQ_C6oC7I*oSKm7UI^y|S@_%pNF_jc0z9XL9|03`HyXxpE1D3c|=~P-|F$QK4)n|(p zysic<{o^^p=+kD)6#_wCVnRh3{vm;FfO(3hp^DhdCadwzK8XzOBXkoPy^at}Pap*v zBU(QN-y|aejaOi@kWw<2H}EDHC;A&JKG2L*Bi1ZUvuMuO9`swC=#*((@P6()>?sWt zSXDf0QV4qoH^Tn-f32+A7sI%V8~ZP)1~6@8g`2`)UUIaRX&f=wzC8&T0D+%B;88ZL z&{X@v#(SwT20&G$4|rq^D~AiK(oG-XF=1UsB7s4^AE5^`5hh(e;#fOR%+1EhfO@H| z^%1^X;6oC2lZX7+_QP$!5C2yH7CdlD4a*frVc;CDYPb|XeSReoPs*JS;SMlZ9?j#N z08l}h{pNsNINt0bkR@G~?a{{%xO{8T{LwZ*OrlaiqT}-+i-P#Wt~zlIz^>o7J46EY zIKG)9Tbm%h6~Cx4ESc-WZhQQJVs@2z?`m%1Y5_5Gws;f(UNDa!Cs>G+hwmK^7{bc~ z5fI@3gCSrr6)-H~KMd?0&220_|EB?11i~u_5#axq0cs?h@X_G;KOQt4EnVGBoGk#7 j=8mQoFXZh_tSmGvOw2u<1}#J%l>qWGD$oikWB>mG5~xOM literal 0 HcmV?d00001 diff --git a/docs/script-dir/images/ui-icons_888888_256x240.png b/docs/script-dir/images/ui-icons_888888_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..ee5e33f27235d1b5cf0259f63f3894a6be33c679 GIT binary patch literal 6999 zcmZvBWmsH6vi9I^!4hPU5L^Zs2n2T@2=4Cg4nwd3lHdeFfC<5aTkx4cu%N-+2@Dnp z?w8&DzUSG!cYmByefref{ZyTr&!bfS=cPE{A_)M{_^Qau=myRos0#;zfZ>Q;mcGYRie@({fXRC!lf?(~P}uA5O=^WkN6w$E?Bk(QZ@d56yF zvzCin``<%De?$=3f{5%D%>3Rj1G6Iggn@+A<^UREK7ar#ZuV1uR{tmF0D1KqJXc{A z%xfM%w}%vYbcT&PdfJXWqe{@F-Trf1G!PdObSLjZ_+aq%)c>XFRvZg-spg=oj_&;fOm^QKjzig4q;#%o~svm01A0n%NG{&+6qNHCHpjv5-Fjdm&ppQW@gOQc^ZHpV-IqO+^k-I=s7UxRF z-R`7Yak0kmg&9$h1hga2of%GS5j?9PZP3G8 zY0qVzY1dmU>_646Aaqp@=~(-1S>H3%0EF{C8r?%6R{leTHmW}L4@byn3zD(w<~E9O z=Fn0y) zY}2L1AsRK!Z$gx%=12t}dqV5_&hRH<7OR=c;+t`wxrz(}MSDEjxp{*oahH%kyf6V` zAo0S<{8~I3yH)g{!uPj5<8J|IT@-Tc^VzIyi?Tzb@L}&FlF5%e%5=Qa7^9eVC$*`A z82?nDIx;)K2d}6&TMusbX4q*~w<0H@sgZGE!VEh_&x+dXmDx|3XGE*TVtenrF_d@& zOU1DjvGy|ES4oRGhn5;zFm!vDs_}%x318u~U0qSGUuPr#>uUIi_kw&J*SY-yYi=+Y zSWKOfJiwcNofx>;_vN4L2ROpKgvHuiY9Bx)xB^t%?MF zP?PQuootUA?J1D>+&m*iHdeItn?^Q2;v3DFgbnkz4*vq({R&KBB3%!cV5_LAc2V8- z%u0X{E5>%S@Xqv9^EGx&wLfk}FC%4`U@@CmaTcu!eHJ*GV~aaFP>(5pa6C#n46Fa{ zL)oQX4`ZT>4YUe>7xww~^l$y45w{tA^R6X5E9FWBI~%}{6KQ_uk5|hIXc^T%=0M0<<#BJ0RRd_O;3 zsb-D8O$U4S5BOLl_;#4cj;)2Hw;;O_e`}b{FVzp-3IL54{lXt|va~$t(hFS=qc!L) z-3e~P6-a%iT5Ri_Lr?B+gKG~s+?*f;UVI_B^JO>bs$O@!q-4u7(Ml7m|0^KP0oU)W zKGt(FB7jKjw2q%eJLKSlr6|R_MXbz$Lo%+mpGFNp){u);^4_8Q@dp# z(C`~#{#iw$hiaH|e>D#7J1QrG#1@WlsC!qB+e+0yo@4d=SpTXkr--hWpbISfyP>Mc zYi2kQBa1khy84P)({Me9RIes%E`2#p2KKd*kKN1Q%(M|Y>o1(dB7l}m6tl%M{_Fc- zlLA37rfpNZGi_--$j?kmH>Ao0CMGF~4OIuoyBJeGYckr{@11Tf=O-0{8O!w>=)vwA ztf$Cr5BLRwW%tqR@{BrIoS1n(hReKhl7J@GP8|Zf-XdoS7Rn{}qED97tGi<4k7H9*9qX~33TOxusi*f(HP z&viDOR1te?v8OHDy4Pj1M2(q+$ELZQcTaHtGdXfknhJ2j-5AvL%4v$HRh0~PBL4N+ za)Hyn-KMJqXLDdZLy3~% zQze#I%SMB6QK>s`t`$If5J3%(O9R7zZ9!7WBrhq&sWhXw*%Vp!4Eey}bMe=Y??HU! zb)us6SBE=Ax*ulxk;mrf0T*OMQ8$rfO}qtCpd_?icx1?f8OWKKSv<}E=@$orqgn0$ zf1W(L`+WxsKnJDXJt;lDGWz|}V={IGOp1qeHTB{e($_>WB^Is3CQpnzN7ku-vgWz# zEPgAYrzU=WLN!xAEIf0P`5LphqD6{EC&@YQbIF2r7miQFZ?-~Hd`Wt}`#V!iV{U@T zdV{*T(|fvYAr*(4T`JMaY;~#>68=#ibONi$`qx`kTV0TP^EbTPS{ZF$+S%_Ud)3DO zM466a+aQJA%vb%~h)VOdU8#yO3NRcJo-%(8GI=&pb|Rn3hh9^j9b=-8+s`SuQ&T#C zG`x0elQvoRIyHRm%}r*NmJCMWxu~l#gL1zt92X?FvBzCq(!TY=%}T(M`2fk%*IK;L zBXT~eU|)AqjR&~?Fz|X7o3)jQBygoIaU$uRnV2WVA*`hie6NFj{fSYR$tSf6-H=*d zdg}V*#wU?b6zPJx_?i*)^2ZdWsa5|LJ@!W|k<1z1=y^2{->z_u{ii?p@!+*1 z{h8i=ictpi5|yFmiDrcW;%N!e{dA-3vMkJ6wh__#hsHxo;NDM7S9sqrR*Ea%B8bay z%X~oeF6AiMIIttj{)0rXEtx0%X!)!~g*1q(y!4>GqHs<~ni<`37IN#`5Y=we;sV48 z0^j>rz6pk@HOv9#P1osT_@$Rqji)f6X1^9>Z_zAx7ZYa@{Y<|wF-ZqzZ;N3*tvyWUlgZae9C@OZ_LDT2H`F?q&u z!k&TYj{q-6?lkD3=IGZNqwuV3sEQZglk180ch%^iZfE(@dqorO^(^oR2@#VUjpZ92 z*us5g!F35st14zVf55PT_N3~({Bvd_NP8L)=`w+^BdtEgl=jgASgv%&x1HhxA5DJI zz6c)lWhxJ6F7wU9r|m)ug)F^-AVN@O;4qgQPN2i#$La#d(AxaQE-p)9WvV}$aZXJ# zz)-VGidtmqQHL?Egt@AMsbz!!2?#$6J>2Z_?vp(u*f1Jy86l;U1fr|I&^Aw>lTt-r z<)_$xVFFdc`nS+{OiM!u^4E2?nETPkyl1m2;|2$E+_PRAPnKYr_#g8`WNKaK4F7^` z?Ubvq{W1>s1^7Y{HItAy&8^_JgrpO%s=DZp4tZCbahEi+1%pC0#fCYEu7hL3$tZ50 zXuFu6Yp-chB5r{mj(GFKp_Ly^d~x}|agLYR8*{vMq*5frzoTSB4MIX`VXWcT5J(p$ zvb|v$4c?8v;T!4IdUfGv>>H^7+@>gzX^B|paL3B~Eke}ziUGpPQ}dIn03g4gRNJh8wrgjZppN344yAl%PT>?dXQfM#P!sRwL z;KMIu(ce?sUkiv?!Vy1m=vGTp^K>83Yjo?d$#<=t-KkL}_==YbTSL3tgWR6)-Ro8r zg>cv=%3Rb9yeFBfD78$8J*?6gjy>9c`q1R8Qn(CxX}XM8Mj^JBOyR>=?rRKQXO9*gvJyjfbJrs0U~2168KVOU;jdTE zc^Mh^)?{DY*$cO1{5f&&9Bm`e-;2K6o#q?)^0k*DB`UkBhVcdDfrep|D->3J#MJp+ zXY1nE?S}HFz60zQiVNOD@25Sa*0SK_@r3 zC(tKK+*fXb0BXgdWEt29pxJlcGHzY zJkOun3<4jbr>1T_TTE+(G2fT~#EBMFE0%pmldkXeM2*ccV3jW|Q1%;GkEKr2f0jK$5CC(%my!&suy}Ege*D+mwSTsfwKm{=38iPdckt95#-u`Gvf%NB z;Jh9Y$q!*z#v9yQDy~nPEHhs8Qkw?&{9op;3~$xMQ7^lQ+Vhi5nq!hLeB_uq=fV`i z!E)geaw+Zv{3e01>Ja?YPHdnFy?gNc=tt*_9!=`7Pxa?6vDx7m z-0>Iz7kq>(phWuFYjg~71xPKq{iPwgaFzo`h735{1u|PL&;op4?W}XU z*Zy62q5Zpw>NWW%j9#6bduP-Wx-U7vc>pnX^^HJeuMF)nYzFL z%R|OuztH2Mvi-7KmK*i^jJvfjk^KvfFB=8yB`>Tf2m;=skPWJI`bo3orf~30518bt<-Gc+ep2#?If-gL z;_V5G4bEA`J=zvwI~Q@$Og=!W8uwTmkeO|h{T!d3G}TRwN4S(@6%mj>r>tEd-;I6xK}CyHNR z`W}vjd36p~^P67IHm7n0WplM~-h0G4d(^lQdh*;f$GS9QH}m7A_@SjdB<{Q@lSpks z#9Z>MGSepD!)70Z0=($IJ>f|tC992?O1@XfyaXPp;h$rKrsx6fGn7zu0DK-m%11pb zGs9l*hMI>!-euGLyZpfz$09N2tK7I|b;S-_#kFUjE5M#v)sglMJH-hP9PYzL!(X=C z&l?pTPZ)^!L+CzJldxTEnRX$U#7DonI=OJLC|?k4#%1GNfv4AB1Wnw!xI3XLtci;D z>-ZQ7cE%tm1TrT|p*;#G65?!pEWW|rV?DJVanShnI9f(F!n8!3pJz=ASgeotHM#nQlcCth-Uv8eYLIFq|3 z$8;wJtnCMzOA2y}?03AoxqP{&<<^LHq+AC=(zuu(*k+;i3vxtnzWwUcSRvqT@9p9U z6B$%<@gcw_XUet5{BmU@iP+3ij=x_$z4QHD)k`HvNGXwccALGY(cnw0iuw^T!X3kM zCPp%7p}~l8b7j81O$PF3Yj&4)EbM@*agLVppE|pzn$sS(tEqN45aMSbu8N?*|P}v74M2!K~C@*$2i}SB=KKK-lw5%5K-;( zx7f;>L=##Ydm&d@RA~naR#0%3 z%Jt(5o)V(kBwAXNS$kQ*X>zg{Hz$*p)jQ~CPvPAOXWSlU?UV&`;kEB#yUYYnQYm~( zM{Wz^qIPF1>EY9Qm zs(bJSW9*o|Vh+{F4kmXlq<#GjIhTPKk38K-n5^lF$9s-<)ehAI3h7s(%ZAM}PxI~BVn6$b^R>=qIM4`F$ zHJIDKBpfOts&!OC?+vc@YFza+(}>X6gGd#)^)Y1hg_B@0JN)W{o&aj8uTC07^&Ms0 z+%4m=-h-4rU;#PK3cr=COqN7gJd2o&8|~IR-aaTjI5t4v;163AT%imiB9*B`OHKYd z7NM%=d}-LtFW0pp5c*3wNhme>^b+O=nYY9$&%s0Sj+J~*BL>Kh_`#Nl)sIOAZg z@t&kUUg#t5=ox78pG2wvT1_sF)`xJ~q{34riYgi$4F=znBeG~miClofeMJwEaUBJtDa?9tQBUX0F$_zoU8SmzfCfb$uMED{p)utjDJe)DYI z|CEyh*7Tn9ST3$vSa2?msDZYHy%xc@6F?0j`BW54t!2@(cVeLa`6Iqa(Vt=&R~pre z+kdK%&@j?q&W~Vtepw;nuBC_|N39bWl{VjCMLK`6Dg076ctt`Gz>vl+96WWc@{?M> zSc-4f6T=QQ^XGcPBDe*8N z6p)h91fy@X^D`W}r!QrGa69d*j; z0IVCMHC8T5WH;YpbB8+~JA^kzJs&&r?!uzKV&i7BhyG;ZzAYoGHQ!UkNW2O?$))({W;@58;aMHIOGn@%AJsy8Vz3^2q^tH9}wG*@PwtEx+0T9114@iWE zUr?7HBqqQw1{UQ4fy6){TD17Y{{Xmo*gDw<{W}08DkdN-1{V4k;A9w1`UrUTj~R44 r?0o~QyzKxowjS1Yj4Ezc4tB5YtZak42JFNil>jOVn(|e$mT&$CkHH7} literal 0 HcmV?d00001 diff --git a/docs/script-dir/images/ui-icons_cd0a0a_256x240.png b/docs/script-dir/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..7e8ebc180a2d2a74739059799407b8b7b57a9092 GIT binary patch literal 4549 zcmeHK2U8PFw@yL`geFb85=9ZD1*F$df}vOGyaXvKy$K2df>fnT5l|3bse%xZCPhLK zq(s2bG?a)Sy-1T5a?x+*n|uGmeP(CR*`0mn>^?hl=A6f-#y6Q6_!s~H0J9!S#~c6v zp1FW6dYZF&QcwTzY=gzr&=N^tVEF&>Uj<|d!K-Hi*#?;#TL5@jZ-D7d+aKjhUB2ay za7XiT$P6-HQsvS@8Ne>u30;%65Ra9O$98#q8tPF*3bZzTz*N?kB)u+wBUmd+0T!5D z*<^r#Xj1>ZovB|~<30Q0ri+GeWcuAh#6Q2zf&gzD+|&Ui&|W~DEuelV+rTsX$43El z`#jYFfOD>TI+~UbzO6elx{w;!AbqIU%Q;US-y3k0y&ZS`{PXJ9%GKuT? zA=YB~_}-7h}grk~UMM~1{IJu5z36&nH&VPs=tlLlQ$TWf}@j0@_1Mr{7PN}kZ@ zU@9N%V%HL9eSE z*BdLzdW%d9Pf1SA5`lAsx?6C@pGL*pIra&^83Gx%WYG^8aT%R?OG4Ou=0P3R5)KZ5 z2&PGFszDp$u%zsXBYLrEImJ}xFS--_mkY=#l)@OKCnEoMOo8S*eqcoB^(_J&4tmM< zs4&xp4^NNgy&HVP!O(^_6JQclp)V-Ib9=q9aWcaz*Gx~fED_HM%LFsYU%*S)OnQwc zjLYYoLk)hxsCi6qp^!9HRp8G%b|f68yfB?n<^DBz9!E*WgJ2gV*g5_E7alHp*g2_wbc8Pw7*-B9ToxV53c2rO-Vs4Px{7M!NqIXUcMSHv1cqfD&&RnMQs) z8771gCX+j09M{&*+~vB&SSU^b{}8I6?+$$T9I*OL*{LYxAHX;*iW?dX43jc> zp~TZQLjbC#e#FPvV$ou|K+q=`%KR&iGq0m)&%Qcc{(18s?cH)B<=dn&oKq#&CVm$KVlo#Io;OGBX$ckfqw0sl%9n2giktQ~NFXr`I; z@h650el?%I!6y~!d;+G2vdswoOkzni?&A=OT9T`SipWyQFEyIunl_G*e?HE^ zx7hkb*WF(Q-{^pB`|k8FH76TXH6UL4I}2h>bLnbqDDskSJx^zYBqL{y$Sn($8Qire zMAVY2aEEb~T~WwSd>Zm#SF3TtfRem42m@SaPkNC3#AX)UgT%TW=5u7S=dxp|3h~tk+8yZee}?!M9HI@f1WTU?%HqiNq#8O^RmBZ`M8nW z4|fZvl;5BN{Lb=BYDGdiZ)y8 zAJE}UL0VRg6Y7k--*#>qd}SW1`t(XXl);%iKi{ne!56tAR#KrNk#?YdO;$EPr~Ghg zL?F4G51g8yyaYA|gz0Frg48>AICegIAO6!sUwFPVn!UV}NVFIh?iYutyf9vPz5yy( z6DHSbg~R&3N2@w%ro3d+aztG`xPRDrWGn*Y&;syq!6%Nw=lpy*v1>S; zz{fdE9!dF+My~C&wlU5dQQi|liohaCEU{7=clSmk*wsDU+doSXunDD0ppEf~z7_WK zr+{Ip?==2A3sWeggPH~cD#9z$y`Scm$bJE%)>E|H9P>`Q=3WWq&5Gckv?(2+idix- z=}@U*Mw5z1u`6g?w5skq?WtvLzqBse`dg0I`$C5Hc0=;s zkPHED_%Qv>At$X$ZQoAYc=|i@^yMF^9@eeSh=MAFRi5FHuyr-LC*Z!C9W%qiV99!$ z+O4V2zvRN1wsMwg1WGvGv~LqgOA2pQZi~E#pY5Lj`j`sW1jcRidq&GPu(oq7&iz*W zKqyJ$uZ1uC=#zeW>zJF-nx-gt-}Ak+qN{)H+eFKjl(8fvzoS10rN}hbM=2ZHn7&EW z&8^#HYV0+@3zAc}_pVhH22dU+MW5s4HwjodZU|T(EZaZ2D1Vuc&fO1}CSck5&kdJ% zi5gTPGKuKSk8XiGTl>tjIdMWO%>rJ^?&*|Ie1H+ zQLN{pqOrow2FVb%V>X_jBIhzH6s6~oS_oYp;iE>C%Z8w|lf!Ev?jfhYkP?FOAJ=__ zr3Ndn*>IP;iK|Ccxw##$W6H7snuYuHC7o)bP}ir&X4B|!Zd3cDm`a244dW*}1CN%5 zXbw16r3xZMsYF85zpYIaVr} z?@&!YCHZY9Dhmzcwq`}f17^3P{$})GtY|@wRkgs2TGgSwUV|As8%gAY&4}SLTG6V7 zW4_tEA;9}Q!A@(ZaEcrzDlf2bSL%{R)ka6gH9z06;tUEGAxQhi>~Q}sg1^506i46bzM;PHOzX~mY*`jhIiS}ZN2&$pmjO9S=Mj>^wMj=hEu zl~8}2{%}WDK+?okXRZA{H+!LjL{Qw9wi7vK1jiPkap+~_ak9^lCE_h!OeGWGGC-f1 zVRpAm`}*sOCzi+Ga`RF(!KxOX_nSKFZ%-ou%u?^0ue8}s6S?Xo-QGlc{EYuH{+mQ} z>M!OEuy)pxcgz<<{Cz|GC0u}FhbpDfLsov{TnAe9J`HN1 za$1aaKcULuO}iD`>6xOm$wW+_K_~{}#cJyGb!F&r_u_WE*8>}sUhJ6ueSj+chaBTO z_5$EOo-Ic;$S9Ktg;7Yrv0}eqi8w*$7sq2td!fj=Cb#w8?(xBoqj;W#K&Bk`$}tA3 z9AGH_)V?G6ZC=jUdQlN6RDFWODgd0RQQ;0q(jfFwegfKM0~6S+>;@7olQV~&k49?f4c6ReTPQa($S^cob|b_kZ$#iX{C8Kz*x0%0 zo>cBW9N_VWlazSRa?1##MXSou-fxeD!_&QLemU3-p!Hs?V4m6Uct-_K_|&bHnK!W$ zV;63=dGgzIvcKFCOuQk~(75AeyWPI#G+g@N6{x%iJmUeHX;4Zap?8EBjG*?Rg>>ai z2KP;zLI>J)rrvOVNW5NFP3LK%e~$B;2#8-H>%?dKvqQey7_%N$0BA{1=_#M`>JpGj zx^=X=@Ue4rw&8wAx+E@QbDpFk)D;j9<|OP%PJua#2WVcDDKfA63c=(IOQ-ItOLyLj z#xi9OEcg{vTTL1PH0YM4?khk(&TzrkU^aY+ypr5 z{jp4uL+LRby+u5hgmq)J$>w4X_2hrqq;M%gOnCFRl<7qk=J7~NV(r#;uVaI=;k)yH z3s|;iNg&Le8;yH+`qw4sWA#bWtE1?ftr!s26wPW{TB4{eZ7}vcT{CttS+z#yeHZD` z!Dm{7xPVwM1jvxV5cImPfv~WUzB0lD0V?KmAfl1#yl9`E3o(FJ-W+yQ`0C&D)y6G7Fqei&raMZE$9ts7fa z4f4?J_L;XiwLe#tFZPq{Hi=d2HL_a#J6156HfF@TAh; z*?Y}c7mP70lKYjiy#yEAjAE=?L_%I!DCR2DHw8zdS^Oe`Q{pKe%3AToxCN@8lKi~y z{NBUBt1t6X6V9;2e1t)uN}rcE_dBkxip3*do}=#z;&-%u?-?GxK;Dbzs!>Q^*6ptj zm^eD>*BoA?nOOnx9cmrMao0O|mq-wu>SauA6^XMeyN#cZXde*AQjDKU-aV#`nCYM! zK93Mnh)oEUJD3C2u*7fg1Z6u(rIWt=TFIqI@vO6HP*2{$Nfzqqt)jply2Pr`P1<{K zAJze>9Iexn7%VzWXJ<9dI_s1qgpT?U{aFjU?#mtfXwP1}`wno0q-!-Ch4te$o&7NO zv0K{_tOX8j$%GwNi1XUiA4V4r(b+)i-C0MYc`g)V`!_Vllu=)fmSLWy3MWmjV{~>( z2}Qmx;l8gN7vOQhu1Ct|e;v2u<}Z#5f0Ri`pg-r)`~A!ONc0I6kHauS0UE#sMlq4I z%K6CTTyOG<7_>u(<5A(mz`ps}+2ji&AfFQ+KjMEIGm>t=ebp$kBvqJzq Mq_Ix57W&cu0AIB!=l}o! literal 0 HcmV?d00001 diff --git a/docs/script-dir/jquery-3.5.1.min.js b/docs/script-dir/jquery-3.5.1.min.js new file mode 100644 index 000000000..b0614034a --- /dev/null +++ b/docs/script-dir/jquery-3.5.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"
    ",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("
      ").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("
      ").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("
      ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(t("
      ").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
      ").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete}); \ No newline at end of file diff --git a/docs/script-dir/jquery-ui.structure.min.css b/docs/script-dir/jquery-ui.structure.min.css new file mode 100644 index 000000000..e8808927f --- /dev/null +++ b/docs/script-dir/jquery-ui.structure.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.12.1 - 2018-12-06 +* http://jqueryui.com +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} \ No newline at end of file diff --git a/docs/script.js b/docs/script.js new file mode 100644 index 000000000..864989cf4 --- /dev/null +++ b/docs/script.js @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; +function loadScripts(doc, tag) { + createElem(doc, tag, 'search.js'); + + createElem(doc, tag, 'module-search-index.js'); + createElem(doc, tag, 'package-search-index.js'); + createElem(doc, tag, 'type-search-index.js'); + createElem(doc, tag, 'member-search-index.js'); + createElem(doc, tag, 'tag-search-index.js'); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +function show(tableId, selected, columns) { + if (tableId !== selected) { + document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') + .forEach(function(elem) { + elem.style.display = 'none'; + }); + } + document.querySelectorAll('div.' + selected) + .forEach(function(elem, index) { + elem.style.display = ''; + var isEvenRow = index % (columns * 2) < columns; + elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); + elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); + }); + updateTabs(tableId, selected); +} + +function updateTabs(tableId, selected) { + document.querySelector('div#' + tableId +' .summary-table') + .setAttribute('aria-labelledby', selected); + document.querySelectorAll('button[id^="' + tableId + '"]') + .forEach(function(tab, index) { + if (selected === tab.id || (tableId === selected && index === 0)) { + tab.className = activeTableTab; + tab.setAttribute('aria-selected', true); + tab.setAttribute('tabindex',0); + } else { + tab.className = tableTab; + tab.setAttribute('aria-selected', false); + tab.setAttribute('tabindex',-1); + } + }); +} + +function switchTab(e) { + var selected = document.querySelector('[aria-selected=true]'); + if (selected) { + if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { + // left or up arrow key pressed: move focus to previous tab + selected.previousSibling.click(); + selected.previousSibling.focus(); + e.preventDefault(); + } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { + // right or down arrow key pressed: move focus to next tab + selected.nextSibling.click(); + selected.nextSibling.focus(); + e.preventDefault(); + } + } +} + +var updateSearchResults = function() {}; + +function indexFilesLoaded() { + return moduleSearchIndex + && packageSearchIndex + && typeSearchIndex + && memberSearchIndex + && tagSearchIndex; +} + +// Workaround for scroll position not being included in browser history (8249133) +document.addEventListener("DOMContentLoaded", function(e) { + var contentDiv = document.querySelector("div.flex-content"); + window.addEventListener("popstate", function(e) { + if (e.state !== null) { + contentDiv.scrollTop = e.state; + } + }); + window.addEventListener("hashchange", function(e) { + history.replaceState(contentDiv.scrollTop, document.title); + }); + contentDiv.addEventListener("scroll", function(e) { + var timeoutID; + if (!timeoutID) { + timeoutID = setTimeout(function() { + history.replaceState(contentDiv.scrollTop, document.title); + timeoutID = null; + }, 100); + } + }); + if (!location.hash) { + history.replaceState(contentDiv.scrollTop, document.title); + } +}); diff --git a/docs/search.js b/docs/search.js new file mode 100644 index 000000000..c58651872 --- /dev/null +++ b/docs/search.js @@ -0,0 +1,354 @@ +/* + * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var noResult = {l: "No results found"}; +var loading = {l: "Loading search index..."}; +var catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Types"; +var catMembers = "Members"; +var catSearchTags = "Search Tags"; +var highlight = "$&"; +var searchPattern = ""; +var fallbackPattern = ""; +var RANKING_THRESHOLD = 2; +var NO_MATCH = 0xffff; +var MIN_RESULTS = 3; +var MAX_RESULTS = 500; +var UNNAMED = ""; +function escapeHtml(str) { + return str.replace(//g, ">"); +} +function getHighlightedText(item, matcher, fallbackMatcher) { + var escapedItem = escapeHtml(item); + var highlighted = escapedItem.replace(matcher, highlight); + if (highlighted === escapedItem) { + highlighted = escapedItem.replace(fallbackMatcher, highlight) + } + return highlighted; +} +function getURLPrefix(ui) { + var urlPrefix=""; + var slash = "/"; + if (ui.item.category === catModules) { + return ui.item.l + slash; + } else if (ui.item.category === catPackages && ui.item.m) { + return ui.item.m + slash; + } else if (ui.item.category === catTypes || ui.item.category === catMembers) { + if (ui.item.m) { + urlPrefix = ui.item.m + slash; + } else { + $.each(packageSearchIndex, function(index, item) { + if (item.m && ui.item.p === item.l) { + urlPrefix = item.m + slash; + } + }); + } + } + return urlPrefix; +} +function createSearchPattern(term) { + var pattern = ""; + var isWordToken = false; + term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { + if (index > 0) { + // whitespace between identifiers is significant + pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; + } + var tokens = w.split(/(?=[A-Z,.()<>[\/])/); + for (var i = 0; i < tokens.length; i++) { + var s = tokens[i]; + if (s === "") { + continue; + } + pattern += $.ui.autocomplete.escapeRegex(s); + isWordToken = /\w$/.test(s); + if (isWordToken) { + pattern += "([a-z0-9_$<>\\[\\]]*?)"; + } + } + }); + return pattern; +} +function createMatcher(pattern, flags) { + var isCamelCase = /[A-Z]/.test(pattern); + return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); +} +var watermark = 'Search'; +$(function() { + var search = $("#search"); + var reset = $("#reset"); + search.val(''); + search.prop("disabled", false); + reset.prop("disabled", false); + search.val(watermark).addClass('watermark'); + search.blur(function() { + if ($(this).val().length === 0) { + $(this).val(watermark).addClass('watermark'); + } + }); + search.on('click keydown paste', function() { + if ($(this).val() === watermark) { + $(this).val('').removeClass('watermark'); + } + }); + reset.click(function() { + search.val('').focus(); + }); + search.focus()[0].setSelectionRange(0, 0); +}); +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); + }, + _renderMenu: function(ul, items) { + var rMenu = this; + var currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.category && item.category !== currentCategory) { + ul.append("
    • " + item.category + "
    • "); + currentCategory = item.category; + } + li = rMenu._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", item.category + " : " + item.l); + li.attr("class", "result-item"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "result-item"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + var matcher = createMatcher(escapeHtml(searchPattern), "g"); + var fallbackMatcher = new RegExp(fallbackPattern, "gi") + if (item.category === catModules) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catPackages) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catTypes) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catMembers) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else { + label = item.l; + } + var li = $("
    • ").appendTo(ul); + var div = $("
      ").appendTo(li); + if (item.category === catSearchTags && item.h) { + if (item.d) { + div.html(label + " (" + item.h + ")
      " + + item.d + "
      "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + if (item.m) { + div.html(item.m + "/" + label); + } else { + div.html(label); + } + } + return li; + } +}); +function rankMatch(match, category) { + if (!match) { + return NO_MATCH; + } + var index = match.index; + var input = match.input; + var leftBoundaryMatch = 2; + var periferalMatch = 0; + // make sure match is anchored on a left word boundary + if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { + leftBoundaryMatch = 0; + } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { + leftBoundaryMatch = 1; + } + var matchEnd = index + match[0].length; + var leftParen = input.indexOf("("); + var endOfName = leftParen > -1 ? leftParen : input.length; + // exclude peripheral matches + if (category !== catModules && category !== catSearchTags) { + var delim = category === catPackages ? "/" : "."; + if (leftParen > -1 && leftParen < index) { + periferalMatch += 2; + } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { + periferalMatch += 2; + } + } + var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match + for (var i = 1; i < match.length; i++) { + // lower ranking if parts of the name are missing + if (match[i]) + delta += match[i].length; + } + if (category === catTypes) { + // lower ranking if a type name contains unmatched camel-case parts + if (/[A-Z]/.test(input.substring(matchEnd))) + delta += 5; + if (/[A-Z]/.test(input.substring(0, index))) + delta += 5; + } + return leftBoundaryMatch + periferalMatch + (delta / 200); + +} +function doSearch(request, response) { + var result = []; + searchPattern = createSearchPattern(request.term); + fallbackPattern = createSearchPattern(request.term.toLowerCase()); + if (searchPattern === "") { + return this.close(); + } + var camelCaseMatcher = createMatcher(searchPattern, ""); + var fallbackMatcher = new RegExp(fallbackPattern, "i"); + + function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { + if (indexArray) { + var newResults = []; + $.each(indexArray, function (i, item) { + item.category = category; + var ranking = rankMatch(matcher.exec(nameFunc(item)), category); + if (ranking < RANKING_THRESHOLD) { + newResults.push({ranking: ranking, item: item}); + } + return newResults.length <= MAX_RESULTS; + }); + return newResults.sort(function(e1, e2) { + return e1.ranking - e2.ranking; + }).map(function(e) { + return e.item; + }); + } + return []; + } + function searchIndex(indexArray, category, nameFunc) { + var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); + result = result.concat(primaryResults); + if (primaryResults.length <= MIN_RESULTS && camelCaseMatcher.flags.indexOf("i") === -1) { + var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); + result = result.concat(secondaryResults.filter(function (item) { + return primaryResults.indexOf(item) === -1; + })); + } + } + + searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); + searchIndex(packageSearchIndex, catPackages, function(item) { + return (item.m && request.term.indexOf("/") > -1) + ? (item.m + "/" + item.l) : item.l; + }); + searchIndex(typeSearchIndex, catTypes, function(item) { + return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; + }); + searchIndex(memberSearchIndex, catMembers, function(item) { + return request.term.indexOf(".") > -1 + ? item.p + "." + item.c + "." + item.l : item.l; + }); + searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); + + if (!indexFilesLoaded()) { + updateSearchResults = function() { + doSearch(request, response); + } + result.unshift(loading); + } else { + updateSearchResults = function() {}; + } + response(result); +} +$(function() { + $("#search").catcomplete({ + minLength: 1, + delay: 300, + source: doSearch, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search").empty(); + } + }, + autoFocus: true, + focus: function(event, ui) { + return false; + }, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.category) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + url += "module-summary.html"; + } else if (ui.item.category === catPackages) { + if (ui.item.u) { + url = ui.item.u; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.u) { + url = ui.item.u; + } else if (ui.item.p === UNNAMED) { + url += ui.item.l + ".html"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; + } + } else if (ui.item.category === catMembers) { + if (ui.item.p === UNNAMED) { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.u) { + url += ui.item.u; + } else { + url += ui.item.l; + } + } else if (ui.item.category === catSearchTags) { + url += ui.item.u; + } + if (top !== window) { + parent.classFrame.location = pathtoroot + url; + } else { + window.location.href = pathtoroot + url; + } + $("#search").focus(); + } + } + }); +}); diff --git a/docs/serialized-form.html b/docs/serialized-form.html new file mode 100644 index 000000000..fe025bb6f --- /dev/null +++ b/docs/serialized-form.html @@ -0,0 +1,218 @@ + + + + + +Serialized Form (com.easypost:easypost-api-client 5.10.0 API) + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Serialized Form

      +
      + +
      +
      +
      + +
      +
      +
      + + diff --git a/docs/stylesheet.css b/docs/stylesheet.css new file mode 100644 index 000000000..932e56cde --- /dev/null +++ b/docs/stylesheet.css @@ -0,0 +1,827 @@ +/* + * Javadoc style sheet + */ + +@import url('resources/fonts/dejavu.css'); + +/* + * Styles for individual HTML elements. + * + * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular + * HTML element throughout the page. + */ + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a[href]:hover, a[href]:focus { + text-decoration:none; + color:#bb7a2a; +} +a[name] { + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +.summary-table dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +button { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size: 14px; +} +/* + * Styles for HTML generated by javadoc. + * + * These are style classes that are used by the standard doclet to generate HTML documentation. + */ + +/* + * Styles for document title and copyright. + */ +.clear { + clear:both; + height:0; + overflow:hidden; +} +.about-language { + float:right; + padding:0 21px 8px 8px; + font-size:11px; + margin-top:-9px; + height:2.9em; +} +.legal-copy { + margin-left:.5em; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* + * Styles for navigation bar. + */ +@media screen { + .flex-box { + position:fixed; + display:flex; + flex-direction:column; + height: 100%; + width: 100%; + } + .flex-header { + flex: 0 0 auto; + } + .flex-content { + flex: 1 1 auto; + overflow-y: auto; + } +} +.top-nav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + min-height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.sub-nav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.sub-nav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list { + padding-top:5px; +} +ul.nav-list { + display:block; + margin:0 25px 0 0; + padding:0; +} +ul.sub-nav-list { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.nav-list li { + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list-search { + float:right; + margin:0 0 0 0; + padding:5px 6px; + clear:none; +} +.nav-list-search label { + position:relative; + right:-16px; +} +ul.sub-nav-list li { + list-style:none; + float:left; + padding-top:10px; +} +.top-nav a:link, .top-nav a:active, .top-nav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.top-nav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.nav-bar-cell1-rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skip-nav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Hide navigation links and search box in print layout + */ +@media print { + ul.nav-list, div.sub-nav { + display:none; + } +} +/* + * Styles for page header and footer. + */ +.title { + color:#2c4557; + margin:10px 0; +} +.sub-title { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* + * Styles for headings. + */ +body.class-declaration-page .summary h2, +body.class-declaration-page .details h2, +body.class-use-page h2, +body.module-declaration-page .block-list h2 { + font-style: italic; + padding:0; + margin:15px 0; +} +body.class-declaration-page .summary h3, +body.class-declaration-page .details h3, +body.class-declaration-page .summary .inherited-list h2 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +/* + * Styles for page layout containers. + */ +main { + clear:both; + padding:10px 20px; + position:relative; +} +dl.notes > dt { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +dl.notes > dd { + margin:5px 0 10px 0; + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +dl.name-value > dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +dl.name-value > dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* + * Styles for lists. + */ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +div.inheritance { + margin:0; + padding:0; +} +div.inheritance div.inheritance { + margin-left:2em; +} +ul.block-list, +ul.details-list, +ul.member-list, +ul.summary-list { + margin:10px 0 10px 0; + padding:0; +} +ul.block-list > li, +ul.details-list > li, +ul.member-list > li, +ul.summary-list > li { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +.summary-table dl, .summary-table dl dt, .summary-table dl dd { + margin-top:0; + margin-bottom:1px; +} +/* + * Styles for tables. + */ +.summary-table { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.summary-table { + padding:0; +} +.caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.caption a:link, .caption a:visited { + color:#1f389c; +} +.caption a:hover, +.caption a:active { + color:#FFFFFF; +} +.caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} + +div.table-tabs > button { + border: none; + cursor: pointer; + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 3px; +} +div.table-tabs > button.active-table-tab { + background: #F8981D; + color: #253441; +} +div.table-tabs > button.table-tab { + background: #4D7A97; + color: #FFFFFF; +} +.two-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); +} +.three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto); +} +.four-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto); +} +@media screen and (max-width: 600px) { + .two-column-summary { + display: grid; + grid-template-columns: 1fr; + } +} +@media screen and (max-width: 800px) { + .three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(25%, auto); + } + .three-column-summary .col-last { + grid-column-end: span 2; + } +} +@media screen and (max-width: 1000px) { + .four-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); + } +} +.summary-table > div { + text-align:left; + padding: 8px 3px 3px 7px; +} +.col-first, .col-second, .col-last, .col-constructor-name, .col-deprecated-item-name { + vertical-align:top; + padding-right:0; + padding-top:8px; + padding-bottom:3px; +} +.table-header { + background:#dee3e9; + font-weight: bold; +} +.col-first, .col-first { + font-size:13px; +} +.col-second, .col-second, .col-last, .col-constructor-name, .col-deprecated-item-name, .col-last { + font-size:13px; +} +.col-first, .col-second, .col-constructor-name { + vertical-align:top; + overflow: auto; +} +.col-last { + white-space:normal; +} +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-constructor-name a:link, .col-constructor-name a:visited, +.col-deprecated-item-name a:link, .col-deprecated-item-name a:visited, +.constant-values-container a:link, .constant-values-container a:visited, +.all-classes-container a:link, .all-classes-container a:visited, +.all-packages-container a:link, .all-packages-container a:visited { + font-weight:bold; +} +.table-sub-heading-color { + background-color:#EEEEFF; +} +.even-row-color, .even-row-color .table-header { + background-color:#FFFFFF; +} +.odd-row-color, .odd-row-color .table-header { + background-color:#EEEEEF; +} +/* + * Styles for contents. + */ +.deprecated-content { + margin:0; + padding:10px 0; +} +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +.col-last div { + padding-top:0; +} +.col-last a { + padding-bottom:3px; +} +.module-signature, +.package-signature, +.type-signature, +.member-signature { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + margin:14px 0; + white-space: pre-wrap; +} +.module-signature, +.package-signature, +.type-signature { + margin-top: 0; +} +.member-signature .type-parameters-long, +.member-signature .parameters, +.member-signature .exceptions { + display: inline-block; + vertical-align: top; + white-space: pre; +} +.member-signature .type-parameters { + white-space: normal; +} +/* + * Styles for formatting effect. + */ +.source-line-no { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:0 10px 5px 0; + color:#474747; +} +.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link, +.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type, +.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link { + font-weight:bold; +} +.deprecation-comment, .help-footnote, .interface-name { + font-style:italic; +} +.deprecation-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +div.block div.deprecation-comment, div.block div.block span.emphasized-phrase, +div.block div.block span.interface-name { + font-style:normal; +} +/* + * Styles specific to HTML5 elements. + */ +main, nav, header, footer, section { + display:block; +} +/* + * Styles for javadoc search. + */ +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:#4D7A97; + color:#FFFFFF; +} +.result-item { + font-size:13px; +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:scroll; + overflow-x:scroll; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:999999; +} +ul.ui-autocomplete li { + float:left; + clear:both; + width:100%; +} +.result-highlight { + font-weight:bold; +} +#search { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + position:relative; + right:-18px; + width:400px; +} +#reset { + background-color: rgb(255,255,255); + background-image:url('resources/x.png'); + background-position:center; + background-repeat:no-repeat; + background-size:12px; + border:0 none; + width:16px; + height:16px; + position:relative; + left:-4px; + top:-4px; + font-size:0px; +} +.watermark { + color:#545454; +} +.search-tag-desc-result { + font-style:italic; + font-size:11px; +} +.search-tag-holder-result { + font-style:italic; + font-size:12px; +} +.search-tag-result:target { + background-color:yellow; +} +.module-graph span { + display:none; + position:absolute; +} +.module-graph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.inherited-list { + margin: 10px 0 10px 0; +} +section.description { + line-height: 1.4; +} +.summary section[class$="-summary"], .details section[class$="-details"], +.class-uses .detail, .serialized-class-details { + padding: 0px 20px 5px 10px; + border: 1px solid #ededed; + background-color: #f8f8f8; +} +.inherited-list, section[class$="-details"] .detail { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +.vertical-separator { + padding: 0 5px; +} +ul.help-section-list { + margin: 0; +} +/* + * Indicator icon for external links. + */ +main a[href*="://"]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + background-size:100% 100%; + width:7px; + height:7px; + margin-left:2px; + margin-bottom:4px; +} +main a[href*="://"]:hover::after, +main a[href*="://"]:focus::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} + +/* + * Styles for user-provided tables. + * + * borderless: + * No borders, vertical margins, styled caption. + * This style is provided for use with existing doc comments. + * In general, borderless tables should not be used for layout purposes. + * + * plain: + * Plain borders around table and cells, vertical margins, styled caption. + * Best for small tables or for complex tables for tables with cells that span + * rows and columns, when the "striped" style does not work well. + * + * striped: + * Borders around the table and vertical borders between cells, striped rows, + * vertical margins, styled caption. + * Best for tables that have a header row, and a body containing a series of simple rows. + */ + +table.borderless, +table.plain, +table.striped { + margin-top: 10px; + margin-bottom: 10px; +} +table.borderless > caption, +table.plain > caption, +table.striped > caption { + font-weight: bold; + font-size: smaller; +} +table.borderless th, table.borderless td, +table.plain th, table.plain td, +table.striped th, table.striped td { + padding: 2px 5px; +} +table.borderless, +table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, +table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { + border: none; +} +table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { + background-color: transparent; +} +table.plain { + border-collapse: collapse; + border: 1px solid black; +} +table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { + background-color: transparent; +} +table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, +table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { + border: 1px solid black; +} +table.striped { + border-collapse: collapse; + border: 1px solid black; +} +table.striped > thead { + background-color: #E3E3E3; +} +table.striped > thead > tr > th, table.striped > thead > tr > td { + border: 1px solid black; +} +table.striped > tbody > tr:nth-child(even) { + background-color: #EEE +} +table.striped > tbody > tr:nth-child(odd) { + background-color: #FFF +} +table.striped > tbody > tr > th, table.striped > tbody > tr > td { + border-left: 1px solid black; + border-right: 1px solid black; +} +table.striped > tbody > tr > th { + font-weight: normal; +} +/** + * Tweak font sizes and paddings for small screens. + */ +@media screen and (max-width: 1050px) { + #search { + width: 300px; + } +} +@media screen and (max-width: 800px) { + #search { + width: 200px; + } + .top-nav, + .bottom-nav { + font-size: 11px; + padding-top: 6px; + } + .sub-nav { + font-size: 11px; + } + .about-language { + padding-right: 16px; + } + ul.nav-list li, + .sub-nav .nav-list-search { + padding: 6px; + } + ul.sub-nav-list li { + padding-top: 5px; + } + main { + padding: 10px; + } + .summary section[class$="-summary"], .details section[class$="-details"], + .class-uses .detail, .serialized-class-details { + padding: 0 8px 5px 8px; + } + body { + -webkit-text-size-adjust: none; + } +} +@media screen and (max-width: 500px) { + #search { + width: 150px; + } + .top-nav, + .bottom-nav { + font-size: 10px; + } + .sub-nav { + font-size: 10px; + } + .about-language { + font-size: 10px; + padding-right: 12px; + } +} diff --git a/docs/tag-search-index.js b/docs/tag-search-index.js new file mode 100644 index 000000000..b9fd26503 --- /dev/null +++ b/docs/tag-search-index.js @@ -0,0 +1 @@ +tagSearchIndex = [{"l":"Constant Field Values","h":"","u":"constant-values.html"},{"l":"Deprecated API","h":"","u":"deprecated-list.html"},{"l":"Serialized Form","h":"","u":"serialized-form.html"}];updateSearchResults(); \ No newline at end of file diff --git a/docs/type-search-index.js b/docs/type-search-index.js new file mode 100644 index 000000000..2523ed5d7 --- /dev/null +++ b/docs/type-search-index.js @@ -0,0 +1 @@ +typeSearchIndex = [{"p":"com.easypost.model","l":"Address"},{"p":"com.easypost.model","l":"AddressCollection"},{"p":"com.easypost.model","l":"AddressDetail"},{"p":"com.easypost.model","l":"AddressVerification"},{"p":"com.easypost.model","l":"AddressVerifications"},{"p":"com.easypost.model","l":"AddressVerifyResponse"},{"l":"All Classes","u":"allclasses-index.html"},{"p":"com.easypost.model","l":"ApiKey"},{"p":"com.easypost.model","l":"ApiKeys"},{"p":"com.easypost.model","l":"BaseAddress"},{"p":"com.easypost.model","l":"BaseCreditCard"},{"p":"com.easypost.model","l":"BaseUser"},{"p":"com.easypost.model","l":"Batch"},{"p":"com.easypost.model","l":"BatchCollection"},{"p":"com.easypost.model","l":"BatchStatus"},{"p":"com.easypost.model","l":"Billing"},{"p":"com.easypost.model","l":"Brand"},{"p":"com.easypost.model","l":"CarbonOffset"},{"p":"com.easypost.model","l":"CarrierAccount"},{"p":"com.easypost.model","l":"CarrierDetail"},{"p":"com.easypost.model","l":"CarrierType"},{"p":"com.easypost.http","l":"Constant"},{"p":"com.easypost.exception","l":"Constants"},{"p":"com.easypost.model","l":"CreditCard"},{"p":"com.easypost.model","l":"CreditCardPriority"},{"p":"com.easypost.utils","l":"Cryptography"},{"p":"com.easypost.model","l":"CustomsInfo"},{"p":"com.easypost.model","l":"CustomsItem"},{"p":"com.easypost","l":"EasyPost"},{"p":"com.easypost.exception","l":"EasyPostException"},{"p":"com.easypost.model","l":"EasyPostResource"},{"p":"com.easypost.http","l":"EasyPostResponse"},{"p":"com.easypost.model","l":"EndShipper"},{"p":"com.easypost.model","l":"EndShipperCollection"},{"p":"com.easypost.model","l":"Error"},{"p":"com.easypost.exception","l":"Constants.ErrorCode"},{"p":"com.easypost.model","l":"ErrorDeserializer"},{"p":"com.easypost.model","l":"Event"},{"p":"com.easypost.model","l":"EventCollection"},{"p":"com.easypost.model","l":"EventData"},{"p":"com.easypost.exception.General","l":"ExternalApiError"},{"p":"com.easypost.model","l":"Fee"},{"p":"com.easypost.model","l":"Field"},{"p":"com.easypost.model","l":"Fields"},{"p":"com.easypost.exception.General","l":"FilteringError"},{"p":"com.easypost.exception.API","l":"ForbiddenError"},{"p":"com.easypost.model","l":"Form"},{"p":"com.easypost.exception.API","l":"GatewayTimeoutError"},{"p":"com.easypost.http","l":"HashMapSerializer"},{"p":"com.easypost.utils","l":"Cryptography.HmacAlgorithm"},{"p":"com.easypost.model","l":"Insurance"},{"p":"com.easypost.model","l":"InsuranceCollection"},{"p":"com.easypost.exception.API","l":"InternalServerError"},{"p":"com.easypost.exception.General","l":"InvalidObjectError"},{"p":"com.easypost.exception.General","l":"InvalidParameterError"},{"p":"com.easypost.exception.API","l":"InvalidRequestError"},{"p":"com.easypost.exception.API","l":"MethodNotAllowedError"},{"p":"com.easypost.exception.General","l":"MissingParameterError"},{"p":"com.easypost.exception.API","l":"NotFoundError"},{"p":"com.easypost.model","l":"Order"},{"p":"com.easypost.model","l":"OrderCollection"},{"p":"com.easypost.model","l":"Parcel"},{"p":"com.easypost.exception.API","l":"PaymentError"},{"p":"com.easypost.model","l":"PaymentMethod"},{"p":"com.easypost.model","l":"PaymentMethodObject"},{"p":"com.easypost.model","l":"PaymentMethodObject.PaymentMethodType"},{"p":"com.easypost.model","l":"Pickup"},{"p":"com.easypost.model","l":"PickupCollection"},{"p":"com.easypost.model","l":"PickupRate"},{"p":"com.easypost.model","l":"PostageLabel"},{"p":"com.easypost.model","l":"PrimaryPaymentMethod"},{"p":"com.easypost.model","l":"PaymentMethod.Priority"},{"p":"com.easypost.model","l":"Rate"},{"p":"com.easypost.exception.API","l":"RateLimitError"},{"p":"com.easypost.exception.API","l":"RedirectError"},{"p":"com.easypost.model","l":"ReferralCustomer"},{"p":"com.easypost.model","l":"ReferralCustomerCollection"},{"p":"com.easypost.model","l":"Refund"},{"p":"com.easypost.model","l":"RefundCollection"},{"p":"com.easypost.model","l":"Report"},{"p":"com.easypost.model","l":"ReportCollection"},{"p":"com.easypost.http","l":"Requestor.RequestMethod"},{"p":"com.easypost.http","l":"Requestor"},{"p":"com.easypost.model","l":"ScanForm"},{"p":"com.easypost.model","l":"ScanFormCollection"},{"p":"com.easypost.model","l":"SecondaryPaymentMethod"},{"p":"com.easypost.exception.API","l":"ServiceUnavailablError"},{"p":"com.easypost.model","l":"Shipment"},{"p":"com.easypost.model","l":"ShipmentCollection"},{"p":"com.easypost.model","l":"ShipmentMessage"},{"p":"com.easypost.model","l":"ShipmentOptions"},{"p":"com.easypost.exception.General","l":"SignatureVerificationError"},{"p":"com.easypost.model","l":"Smartrate"},{"p":"com.easypost.model","l":"SmartrateAccuracy"},{"p":"com.easypost.model","l":"SmartrateCollection"},{"p":"com.easypost.model","l":"SmartrateCollectionDeserializer"},{"p":"com.easypost.model","l":"TaxIdentifier"},{"p":"com.easypost.model","l":"TimeInTransit"},{"p":"com.easypost.exception.API","l":"TimeoutError"},{"p":"com.easypost.model","l":"Tracker"},{"p":"com.easypost.model","l":"TrackerCollection"},{"p":"com.easypost.model","l":"TrackingDetail"},{"p":"com.easypost.model","l":"TrackingLocation"},{"p":"com.easypost.exception.API","l":"UnauthorizedError"},{"p":"com.easypost.exception.API","l":"UnknownApiError"},{"p":"com.easypost.model","l":"User"},{"p":"com.easypost.model","l":"Utilities"},{"p":"com.easypost.model","l":"Webhook"},{"p":"com.easypost.model","l":"WebhookCollection"}];updateSearchResults(); \ No newline at end of file diff --git a/pom.xml b/pom.xml index 9986188b1..a1f482404 100644 --- a/pom.xml +++ b/pom.xml @@ -151,7 +151,7 @@ -html true - 3.3.1 + 3.4.1 attach-javadocs From 6c0a9d5c0fb3ef762af29d0e25ad8532dd42cf43 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 3 Nov 2022 15:08:05 -0600 Subject: [PATCH 017/208] feat: adds coveralls to CI --- .github/workflows/ci.yml | 14 ++++++++++++-- .gitignore | 1 + Makefile | 10 +++++----- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7aa95d626..57459e43c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - javaversion: [ "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18" ] + javaversion: [ "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19" ] steps: - uses: actions/checkout@v3 - name: Load Maven dependencies cache @@ -29,7 +29,17 @@ jobs: distribution: "zulu" java-version: ${{ matrix.javaversion }} - name: Build and test with Maven - run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make test + run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make coverage + - name: Install grcov + run: cargo install grcov + - name: Convert coverage report + run: grcov target/site/jacoco/jacoco.xml --output-type lcov > coverage.lcov + - name: Coveralls + if: github.ref == 'refs/heads/master' + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: "./coverage.lcov" lint: runs-on: ubuntu-latest steps: diff --git a/.gitignore b/.gitignore index b2492ce97..6b2ca7e11 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ *.class *.iml *.jar +*.lcov Icon settings.xml src/scratch diff --git a/Makefile b/Makefile index 2f6b41c17..57317cdd5 100644 --- a/Makefile +++ b/Makefile @@ -10,15 +10,15 @@ build: clean: mvn clean +## coverage - Test the project and generate a coverage report +coverage: + mvn --batch-mode install -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true jacoco:report + ## docs - Generates library documentation docs: mvn install -DskipTests=true -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true cp -R target/apidocs docs -## coverage - Test the project and generate a coverage report -coverage: - mvn --batch-mode install -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true jacoco:report - ## install-checkstyle - Install CheckStyle install-checkstyle: curl -LJs https://github.com/checkstyle/checkstyle/releases/download/checkstyle-10.3.1/checkstyle-10.3.1-all.jar -o checkstyle.jar @@ -57,4 +57,4 @@ scan: test: mvn --batch-mode install -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true -.PHONY: help build clean docs install-checkstyle install lint publish publish-dry release scan scan-strict test +.PHONY: help build clean coverage docs install-checkstyle install lint publish publish-dry release scan scan-strict test From 6d28e7fd643dee09bba3882e355b62b1c2f0928f Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Thu, 3 Nov 2022 15:18:49 -0600 Subject: [PATCH 018/208] fix: cache rust/cargo and only run on master branch --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57459e43c..23d518cb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,9 +30,14 @@ jobs: java-version: ${{ matrix.javaversion }} - name: Build and test with Maven run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make coverage + - name: Load Rust cache + if: github.ref == 'refs/heads/master' + uses: Swatinem/rust-cache@v2 - name: Install grcov + if: github.ref == 'refs/heads/master' run: cargo install grcov - name: Convert coverage report + if: github.ref == 'refs/heads/master' run: grcov target/site/jacoco/jacoco.xml --output-type lcov > coverage.lcov - name: Coveralls if: github.ref == 'refs/heads/master' From 574e1082c3a46677c1a03db2f3267d7c09887305 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 4 Nov 2022 11:10:26 -0600 Subject: [PATCH 019/208] fix: coverage generation for coveralls --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23d518cb1..6e67b71ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: run: cargo install grcov - name: Convert coverage report if: github.ref == 'refs/heads/master' - run: grcov target/site/jacoco/jacoco.xml --output-type lcov > coverage.lcov + run: grcov target/site/jacoco/jacoco.xml --source-dir ./ --ignore "target/*" > coverage.lcov - name: Coveralls if: github.ref == 'refs/heads/master' uses: coverallsapp/github-action@master From be739a045bbfec7045d6dfdf645fc4cbc5ba8830 Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Tue, 8 Nov 2022 13:21:37 -0700 Subject: [PATCH 020/208] - Switch refund to HTTP POST (#205) - Re-record cassette --- .../java/com/easypost/model/Shipment.java | 2 +- src/test/cassettes/shipment/refund.json | 54 +++++++++---------- 2 files changed, 26 insertions(+), 30 deletions(-) diff --git a/src/main/java/com/easypost/model/Shipment.java b/src/main/java/com/easypost/model/Shipment.java index 54f8967fb..fe0bc027f 100644 --- a/src/main/java/com/easypost/model/Shipment.java +++ b/src/main/java/com/easypost/model/Shipment.java @@ -1061,7 +1061,7 @@ public Shipment refund() throws EasyPostException { * @throws EasyPostException when the request fails. */ public Shipment refund(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, String.format("%s/refund", + return Requestor.request(RequestMethod.POST, String.format("%s/refund", instanceURL(Shipment.class, this.getId())), params, Shipment.class, apiKey); } diff --git a/src/test/cassettes/shipment/refund.json b/src/test/cassettes/shipment/refund.json index 52d0be262..69bdde053 100644 --- a/src/test/cassettes/shipment/refund.json +++ b/src/test/cassettes/shipment/refund.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456976, + "recordedAt": 1667938047, "request": { "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:36Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ee59f7ae334a45be8b5116bccfc76bda\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:49:36Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"tracking_code\": \"9400100109361135004728\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzhkY2NiYTc5MmMyYjRkYzZiNzdiYTk2YzhjMjQxM2U1\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:49:36Z\",\n \"signed_by\": null,\n \"id\": \"trk_8dccba792c2b4dc6b77ba96c8c2413e5\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0bcc39a824af11edb6f1ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0bcc39a824af11edb6f1ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/243effc786ea44b188c43d512eda20d5.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:49:36Z\",\n \"id\": \"pl_f95c5c71430e4b58a43848a01a89eb5f\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:49:35Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_3cb387464a7f422eabf62836fbfe9919\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:35+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0bca653224af11eda61eac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_029b1e693a984f3ab692066a825398be\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d40b882147d545f280410af73eb3b7f0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ee59f7ae334a45be8b5116bccfc76bda\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_1835ebac97a4406aaa8ba0643a540cff\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:35+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0bca653224af11eda61eac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004728\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-08T20:07:27Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e6ae2601a7d64b0693ca2d3255485c8a\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-08T20:07:27Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"tracking_code\": \"9400100106068148390079\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzRiZDlmMTBiYTcyZTQzY2ZiOWMzMjE1YThmNjlkODAz\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-08T20:07:27Z\",\n \"signed_by\": null,\n \"id\": \"trk_4bd9f10ba72e43cfb9c3215a8f69d803\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f7232bea5fa011ed8706ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f7232bea5fa011ed8706ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221108/2d4781f5b1cc45889b7b0eb749fcfb5b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-08T20:07:27Z\",\n \"id\": \"pl_82d4a61fb8ed4525b4a19b7d82a968b5\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-08T20:07:26Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_d7179288b1094ab7b38aa141d6e03731\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f72182155fa011ed96c5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_08f67cb78dcb440dadf3b56f4cec19f6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_45cdfaf7fa1342378428b334228f8cd7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_25a46539c69643faa0f7d58fd27174fc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e6ae2601a7d64b0693ca2d3255485c8a\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f72182155fa011ed96c5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068148390079\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,9 +51,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -61,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92306307d24fe689f6a20009387a" + "11514b15636ab6feeca0a0e6000a0a82" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.001078" + "1.047028" ], "etag": [ - "W/\"3ec7a32cee2ee421a538c09db3330c78\"" + "W/\"3de3b7d0f21206d21d54d0768d22dfa6\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_1bee4886dcdd4d008cdbe92a382d4a57" + "/api/v2/shipments/shp_2c48e2fe4b5d4fcaa44ddb4470102e9c" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211081855-6fd945aaa8-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,16 +91,15 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1138 + "duration": 1552 }, { - "recordedAt": 1661456976, + "recordedAt": 1667938047, "request": { "body": "", - "method": "GET", + "method": "POST", "headers": { "Accept-Charset": [ "UTF-8" @@ -111,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_1bee4886dcdd4d008cdbe92a382d4a57/refund" + "uri": "https://api.easypost.com/v2/shipments/shp_2c48e2fe4b5d4fcaa44ddb4470102e9c/refund" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:36Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ee59f7ae334a45be8b5116bccfc76bda\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:49:36Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:49:36Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:26:36Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"tracking_code\": \"9400100109361135004728\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzhkY2NiYTc5MmMyYjRkYzZiNzdiYTk2YzhjMjQxM2U1\",\n \"est_delivery_date\": \"2022-08-25T19:49:36Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:49:36Z\",\n \"signed_by\": null,\n \"id\": \"trk_8dccba792c2b4dc6b77ba96c8c2413e5\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0bcc39a824af11edb6f1ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0bcc39a824af11edb6f1ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/243effc786ea44b188c43d512eda20d5.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:49:36Z\",\n \"id\": \"pl_f95c5c71430e4b58a43848a01a89eb5f\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:49:35Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_3cb387464a7f422eabf62836fbfe9919\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": \"submitted\",\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:35+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0bca653224af11eda61eac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_029b1e693a984f3ab692066a825398be\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d40b882147d545f280410af73eb3b7f0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ee59f7ae334a45be8b5116bccfc76bda\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1bee4886dcdd4d008cdbe92a382d4a57\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_1835ebac97a4406aaa8ba0643a540cff\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:35+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0bca653224af11eda61eac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004728\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-08T20:07:27Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e6ae2601a7d64b0693ca2d3255485c8a\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-08T20:07:27Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-08T20:07:27Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-09T08:44:27Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"tracking_code\": \"9400100106068148390079\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzRiZDlmMTBiYTcyZTQzY2ZiOWMzMjE1YThmNjlkODAz\",\n \"est_delivery_date\": \"2022-11-08T20:07:27Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-08T20:07:27Z\",\n \"signed_by\": null,\n \"id\": \"trk_4bd9f10ba72e43cfb9c3215a8f69d803\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f7232bea5fa011ed8706ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f7232bea5fa011ed8706ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221108/2d4781f5b1cc45889b7b0eb749fcfb5b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-08T20:07:27Z\",\n \"id\": \"pl_82d4a61fb8ed4525b4a19b7d82a968b5\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-08T20:07:26Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_d7179288b1094ab7b38aa141d6e03731\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": \"submitted\",\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f72182155fa011ed96c5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_08f67cb78dcb440dadf3b56f4cec19f6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_45cdfaf7fa1342378428b334228f8cd7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_25a46539c69643faa0f7d58fd27174fc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e6ae2601a7d64b0693ca2d3255485c8a\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f72182155fa011ed96c5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068148390079\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +124,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,26 +151,26 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92366307d250f7db5e4c000938fa" + "cd054f39636ab6ffec7b56bc000a61c8" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb2nuq 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.222849" + "0.169179" ], "etag": [ - "W/\"267fcc15ea053d80c406c2a0dfd9bd3c\"" + "W/\"8d1ad433097b39f0199ab6f9acc67ce7\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211081855-6fd945aaa8-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,9 +180,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_1bee4886dcdd4d008cdbe92a382d4a57/refund" + "uri": "https://api.easypost.com/v2/shipments/shp_2c48e2fe4b5d4fcaa44ddb4470102e9c/refund" }, - "duration": 357 + "duration": 352 } ] \ No newline at end of file From 38847c349e4657d132bd318044dbc97c991eaabf Mon Sep 17 00:00:00 2001 From: jchen293 Date: Tue, 15 Nov 2022 15:48:09 -0500 Subject: [PATCH 021/208] Add thread-safe to the library (#204) --- CHANGELOG.md | 16 +- README.md | 9 +- .../java-templates/com/easypost/EasyPost.java | 4 - src/main/java/com/easypost/http/Constant.java | 8 +- .../java/com/easypost/http/Requestor.java | 285 ++++--- src/main/java/com/easypost/model/Address.java | 146 ---- src/main/java/com/easypost/model/ApiKeys.java | 25 - src/main/java/com/easypost/model/Batch.java | 382 +-------- src/main/java/com/easypost/model/Billing.java | 136 --- .../com/easypost/model/CarrierAccount.java | 149 +--- .../java/com/easypost/model/CarrierType.java | 29 - .../java/com/easypost/model/CreditCard.java | 104 --- .../easypost/model/CreditCardPriority.java | 13 - .../java/com/easypost/model/CustomsInfo.java | 57 -- .../java/com/easypost/model/CustomsItem.java | 58 -- .../com/easypost/model/EasyPostResource.java | 140 +--- .../java/com/easypost/model/EndShipper.java | 116 --- src/main/java/com/easypost/model/Event.java | 50 -- .../java/com/easypost/model/Insurance.java | 125 --- src/main/java/com/easypost/model/Order.java | 222 ----- src/main/java/com/easypost/model/Parcel.java | 56 -- .../com/easypost/model/PaymentMethod.java | 42 - .../easypost/model/PaymentMethodObject.java | 13 +- src/main/java/com/easypost/model/Pickup.java | 257 +----- src/main/java/com/easypost/model/Rate.java | 30 - .../com/easypost/model/ReferralCustomer.java | 234 ------ src/main/java/com/easypost/model/Refund.java | 84 -- src/main/java/com/easypost/model/Report.java | 104 --- .../java/com/easypost/model/ScanForm.java | 75 -- .../java/com/easypost/model/Shipment.java | 790 +----------------- src/main/java/com/easypost/model/Tracker.java | 105 --- src/main/java/com/easypost/model/User.java | 187 ----- src/main/java/com/easypost/model/Webhook.java | 195 ----- .../com/easypost/service/AddressService.java | 108 +++ .../com/easypost/service/ApiKeyService.java | 32 + .../com/easypost/service/BatchService.java | 247 ++++++ .../com/easypost/service/BillingService.java | 118 +++ .../service/CarrierAccountService.java | 106 +++ .../easypost/service/CarrierTypeService.java | 35 + .../easypost/service/CustomsInfoService.java | 50 ++ .../easypost/service/CustomsItemService.java | 50 ++ .../com/easypost/service/EasyPostClient.java | 185 ++++ .../easypost/service/EndShipperService.java | 85 ++ .../com/easypost/service/EventService.java | 46 + .../easypost/service/InsuranceService.java | 89 ++ .../com/easypost/service/OrderService.java | 166 ++++ .../com/easypost/service/ParcelService.java | 50 ++ .../service/PaymentMethodService.java | 42 + .../com/easypost/service/PickupService.java | 188 +++++ .../com/easypost/service/RateService.java | 35 + .../service/ReferralCustomerService.java | 233 ++++++ .../com/easypost/service/RefundService.java | 67 ++ .../com/easypost/service/ReportService.java | 86 ++ .../com/easypost/service/ScanformService.java | 60 ++ .../com/easypost/service/ShipmentService.java | 537 ++++++++++++ .../com/easypost/service/TrackerService.java | 79 ++ .../com/easypost/service/UserService.java | 131 +++ .../com/easypost/service/WebhookService.java | 161 ++++ .../com/easypost/service/package-info.java | 9 + .../easypost/{model => utils}/Utilities.java | 59 +- src/test/cassettes/address/all.json | 22 +- src/test/cassettes/address/create.json | 24 +- .../cassettes/address/create_and_verify.json | 24 +- src/test/cassettes/address/create_verify.json | 27 +- .../address/create_verify_array.json | 24 +- .../address/create_verify_strict.json | 24 +- .../address/error_address_creation.json | 15 +- src/test/cassettes/address/retrieve.json | 53 +- src/test/cassettes/address/verify.json | 52 +- .../cassettes/batch/add_remove_shipment.json | 87 +- src/test/cassettes/batch/all.json | 24 +- src/test/cassettes/batch/buy.json | 48 +- src/test/cassettes/batch/create.json | 20 +- src/test/cassettes/batch/create_and_buy.json | 22 +- src/test/cassettes/batch/create_scanform.json | 77 +- src/test/cassettes/batch/label.json | 74 +- src/test/cassettes/batch/retrieve.json | 48 +- src/test/cassettes/carrier_account/all.json | 21 +- .../cassettes/carrier_account/create.json | 70 +- .../cassettes/carrier_account/delete.json | 68 +- .../cassettes/carrier_account/retrieve.json | 66 +- src/test/cassettes/carrier_account/types.json | 24 +- .../cassettes/carrier_account/update.json | 96 +-- src/test/cassettes/customs_info/create.json | 24 +- src/test/cassettes/customs_info/retrieve.json | 50 +- src/test/cassettes/customs_item/create.json | 24 +- src/test/cassettes/customs_item/retrieve.json | 50 +- src/test/cassettes/end_shipper/all.json | 22 +- src/test/cassettes/end_shipper/create.json | 19 +- src/test/cassettes/end_shipper/retrieve.json | 43 +- src/test/cassettes/end_shipper/update.json | 44 +- src/test/cassettes/error/error.json | 17 +- src/test/cassettes/event/all.json | 20 +- src/test/cassettes/event/retrieve.json | 52 +- src/test/cassettes/insurance/all.json | 25 +- src/test/cassettes/insurance/create.json | 55 +- src/test/cassettes/insurance/retrieve.json | 78 +- src/test/cassettes/order/buy.json | 53 +- src/test/cassettes/order/create.json | 22 +- src/test/cassettes/order/get_rates.json | 24 +- src/test/cassettes/order/lowest_rate.json | 22 +- src/test/cassettes/order/retrieve.json | 50 +- src/test/cassettes/parcel/create.json | 24 +- src/test/cassettes/parcel/retrieve.json | 46 +- src/test/cassettes/pickup/buy.json | 72 +- src/test/cassettes/pickup/cancel.json | 88 +- src/test/cassettes/pickup/create.json | 44 +- src/test/cassettes/pickup/lowest_rate.json | 47 +- src/test/cassettes/pickup/retrieve.json | 64 +- src/test/cassettes/rate/retrieve.json | 54 +- src/test/cassettes/refund/all.json | 24 +- src/test/cassettes/refund/create.json | 76 +- src/test/cassettes/refund/retrieve.json | 105 ++- src/test/cassettes/report/all_reports.json | 22 +- .../cassettes/report/all_reports_no_type.json | 20 +- src/test/cassettes/report/create_report.json | 22 +- .../report/create_report_no_type.json | 20 +- ...create_report_with_additional_columns.json | 22 +- .../report/create_report_with_columns.json | 25 +- .../cassettes/report/retrieve_report.json | 53 +- src/test/cassettes/scan_form/all.json | 20 +- src/test/cassettes/scan_form/create.json | 50 +- src/test/cassettes/scan_form/retrieve.json | 76 +- src/test/cassettes/shipment/all.json | 27 +- src/test/cassettes/shipment/buy.json | 46 +- .../buy_shipment_with_carbon_offset.json | 40 +- .../buy_shipment_with_end_shipper_id.json | 66 +- .../cassettes/shipment/convert_label.json | 52 +- src/test/cassettes/shipment/create.json | 26 +- .../shipment/create_empty_objects.json | 26 +- .../create_shipment_with_carbon_offset.json | 24 +- .../shipment/create_tax_identifiers.json | 26 +- .../cassettes/shipment/generate_form.json | 57 +- src/test/cassettes/shipment/insure.json | 52 +- src/test/cassettes/shipment/lowest_rate.json | 26 +- .../cassettes/shipment/lowest_smartrate.json | 54 +- .../shipment/lowest_smartrate_list.json | 54 +- ..._call_buy_shipment_with_carbon_offset.json | 24 +- src/test/cassettes/shipment/refund.json | 50 +- .../cassettes/shipment/regenerate_rates.json | 52 +- .../regenerate_rates_with_carbon_offset.json | 53 +- src/test/cassettes/shipment/retrieve.json | 52 +- src/test/cassettes/shipment/smart_rate.json | 57 +- .../thread/thread_order_creation.json | 24 +- src/test/cassettes/tracker/all.json | 22 +- src/test/cassettes/tracker/create.json | 27 +- src/test/cassettes/tracker/create_list.json | 18 +- src/test/cassettes/tracker/retrieve.json | 48 +- src/test/cassettes/user/all_api_keys.json | 18 +- src/test/cassettes/user/api_keys.json | 99 ++- src/test/cassettes/user/create.json | 77 +- src/test/cassettes/user/delete.json | 68 +- src/test/cassettes/user/retrieve.json | 48 +- src/test/cassettes/user/retrieve_me.json | 22 +- src/test/cassettes/user/update.json | 102 +-- src/test/cassettes/user/update_brand.json | 105 ++- src/test/cassettes/webhook/all.json | 25 +- src/test/cassettes/webhook/create.json | 68 +- src/test/cassettes/webhook/delete.json | 68 +- src/test/cassettes/webhook/retrieve.json | 70 +- src/test/cassettes/webhook/update.json | 97 ++- src/test/java/com/easypost/AddressTest.java | 21 +- src/test/java/com/easypost/BatchTest.java | 28 +- src/test/java/com/easypost/BillingTest.java | 7 +- .../java/com/easypost/CarrierAccountTest.java | 16 +- .../java/com/easypost/CustomsInfoTest.java | 20 +- .../java/com/easypost/CustomsItemTest.java | 20 +- src/test/java/com/easypost/EasyPostTest.java | 54 +- .../java/com/easypost/EndShipperTest.java | 24 +- src/test/java/com/easypost/ErrorTest.java | 7 +- src/test/java/com/easypost/EventTest.java | 4 +- src/test/java/com/easypost/Fixtures.java | 2 +- src/test/java/com/easypost/InsuranceTest.java | 32 +- src/test/java/com/easypost/OrderTest.java | 36 +- src/test/java/com/easypost/ParcelTest.java | 4 +- src/test/java/com/easypost/PickupTest.java | 44 +- src/test/java/com/easypost/RateTest.java | 4 +- src/test/java/com/easypost/ReferralTest.java | 16 +- src/test/java/com/easypost/RefundTest.java | 10 +- src/test/java/com/easypost/ReportTest.java | 78 +- src/test/java/com/easypost/ScanFormTest.java | 8 +- src/test/java/com/easypost/ShipmentTest.java | 96 +-- src/test/java/com/easypost/TestUtils.java | 64 +- src/test/java/com/easypost/ThreadTest.java | 28 +- src/test/java/com/easypost/TrackerTest.java | 8 +- src/test/java/com/easypost/UserTest.java | 22 +- src/test/java/com/easypost/WebhookTest.java | 22 +- style_suppressions.xml | 38 +- 188 files changed, 5915 insertions(+), 6646 deletions(-) delete mode 100644 src/main/java/com/easypost/model/CreditCard.java delete mode 100644 src/main/java/com/easypost/model/CreditCardPriority.java create mode 100644 src/main/java/com/easypost/service/AddressService.java create mode 100644 src/main/java/com/easypost/service/ApiKeyService.java create mode 100644 src/main/java/com/easypost/service/BatchService.java create mode 100644 src/main/java/com/easypost/service/BillingService.java create mode 100644 src/main/java/com/easypost/service/CarrierAccountService.java create mode 100644 src/main/java/com/easypost/service/CarrierTypeService.java create mode 100644 src/main/java/com/easypost/service/CustomsInfoService.java create mode 100644 src/main/java/com/easypost/service/CustomsItemService.java create mode 100644 src/main/java/com/easypost/service/EasyPostClient.java create mode 100644 src/main/java/com/easypost/service/EndShipperService.java create mode 100644 src/main/java/com/easypost/service/EventService.java create mode 100644 src/main/java/com/easypost/service/InsuranceService.java create mode 100644 src/main/java/com/easypost/service/OrderService.java create mode 100644 src/main/java/com/easypost/service/ParcelService.java create mode 100644 src/main/java/com/easypost/service/PaymentMethodService.java create mode 100644 src/main/java/com/easypost/service/PickupService.java create mode 100644 src/main/java/com/easypost/service/RateService.java create mode 100644 src/main/java/com/easypost/service/ReferralCustomerService.java create mode 100644 src/main/java/com/easypost/service/RefundService.java create mode 100644 src/main/java/com/easypost/service/ReportService.java create mode 100644 src/main/java/com/easypost/service/ScanformService.java create mode 100644 src/main/java/com/easypost/service/ShipmentService.java create mode 100644 src/main/java/com/easypost/service/TrackerService.java create mode 100644 src/main/java/com/easypost/service/UserService.java create mode 100644 src/main/java/com/easypost/service/WebhookService.java create mode 100644 src/main/java/com/easypost/service/package-info.java rename src/main/java/com/easypost/{model => utils}/Utilities.java (60%) diff --git a/CHANGELOG.md b/CHANGELOG.md index a191e17c8..4b503e5c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ ## V6 (Next release) +- Library is now thread-safe + - Initialize a `EasyPostClient` object with an API key, connection and readtime milliseconds are optional, otherwise it will be set to default. + - All methods (i.e. `create`, `retrieve`, retrieve `all` of a resource) exist in services, accessed via property of the client + - E.g. Static method -> `Shipment shipment = client.address.create(params)` + - E.g. Instance method -> `Shipment boughtShipment = client.shipment.buy(lowestRate, shipmentID)` + - All functions are now taking object ID instead of an object, which means the functions are returning the response value directly instead of updating the current object + - E.g. `Shipment boughtShipment = client.shipment.buy(lowestRate, shipmentID)` +- Improves error exception handling + - Specific error types for each category of error + - API error message may be an array rather than a string. Arrays will be concatenated (by comma) and returned as a string. - Removes `createAndVerifyWithCarrier` function - Removes `verifyWithCarrier` function - Changes the type of Insurance `Amount` from Float to String @@ -14,9 +24,9 @@ - `updateEmail()` in ReferralCustomer class - Adds two missing attributes in the Event class: `pendingUrls` and `completedUrls` - Changes the type `result` of Event from `EasyPostResource` to `Map` -- Improves error exception handling - - Specific error types for each category of error - - API error message may be an array rather than a string. Arrays will be concatenated (by comma) and returned as a string. +- AppEngine default timeout is now the same as connection timeout +- Removes invalid function `User.create()` since creating a child-user requires a name +- Removes deprecated class `CreditCard`, please use alternative `Billing` class ## v5.10.0 (2022-09-21) diff --git a/README.md b/README.md index f43382f09..d9b1ea4e8 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ package shipments; import com.easypost.EasyPost; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; +import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -46,7 +47,7 @@ import java.util.Map; public class CreateShipment { public static void main(String[] args) { - EasyPost.apiKey = System.getenv("EASYPOST_API_KEY"); + EasyPostClient client = new EasyPostClient(System.getenv("EASYPOST_API_KEY")); Map fromAddressMap = new HashMap(); fromAddressMap.put("company", "EasyPost"); @@ -78,11 +79,11 @@ public class CreateShipment { shipmentMap.put("to_address", toAddressMap); shipmentMap.put("parcel", parcelMap); - Shipment shipment = Shipment.create(shipmentMap); + Shipment shipment = client.shipment.create(shipmentMap); - shipment.buy(shipment.lowestRate()); + Shipment boughtShipment = client.shipment.buy(shipment.lowestRate(), shipment.getId()); - System.out.println(shipment.prettyPrint()); + System.out.println(boughtShipment.prettyPrint()); } } ``` diff --git a/src/main/java-templates/com/easypost/EasyPost.java b/src/main/java-templates/com/easypost/EasyPost.java index 925ad5d80..936645953 100644 --- a/src/main/java-templates/com/easypost/EasyPost.java +++ b/src/main/java-templates/com/easypost/EasyPost.java @@ -31,10 +31,6 @@ public abstract class EasyPost { public static final String VERSION = "${project.version}"; - public static final String API_BASE = "https://api.easypost.com/v2"; - public static final String BETA_API_BASE = "https://api.easypost.com/beta"; - public static String apiKey; - public static int readTimeout; /** * Set a VCR to be used for all HTTP requests. diff --git a/src/main/java/com/easypost/http/Constant.java b/src/main/java/com/easypost/http/Constant.java index e39293a52..6e164ee67 100644 --- a/src/main/java/com/easypost/http/Constant.java +++ b/src/main/java/com/easypost/http/Constant.java @@ -13,13 +13,13 @@ import com.google.gson.GsonBuilder; public abstract class Constant { - public static final String EASYPOST_SUPPORT_EMAIL = "support@easypost.com"; + public static final String API_BASE = "https://api.easypost.com"; public static final String CHARSET = "UTF-8"; - public static final ArrayList GLOBAL_FIELD_ACCESSORS = new ArrayList<>( - Arrays.asList("getCreatedAt", "getUpdatedAt", "getFees")); public static final int DEFAULT_CONNECT_TIMEOUT_MILLISECONDS = 30000; public static final int DEFAULT_READ_TIMEOUT_MILLISECONDS = 60000; - public static final double DEFAULT_APP_ENGINE_TIMEOUT_SECONDS = 20.0; + public static final String EASYPOST_SUPPORT_EMAIL = "support@easypost.com"; + public static final ArrayList GLOBAL_FIELD_ACCESSORS = new ArrayList<>( + Arrays.asList("getCreatedAt", "getUpdatedAt", "getFees")); public static final Gson GSON = new GsonBuilder() .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) .registerTypeAdapter(HashMap.class, new HashMapSerializer()) diff --git a/src/main/java/com/easypost/http/Requestor.java b/src/main/java/com/easypost/http/Requestor.java index 201cf479b..6bf1d3bb8 100644 --- a/src/main/java/com/easypost/http/Requestor.java +++ b/src/main/java/com/easypost/http/Requestor.java @@ -27,6 +27,7 @@ import com.easypost.exception.General.MissingParameterError; import com.easypost.model.EasyPostResource; import com.easypost.model.Error; +import com.easypost.service.EasyPostClient; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -58,70 +59,20 @@ public enum RequestMethod { private static final String DNS_CACHE_TTL_PROPERTY_NAME = "networkaddress.cache.ttl"; private static final String CUSTOM_URL_STREAM_HANDLER_PROPERTY_NAME = "com.easypost.net.customURLStreamHandler"; - private static int connectTimeoutMilliseconds = Constant.DEFAULT_CONNECT_TIMEOUT_MILLISECONDS; - private static int readTimeoutMilliseconds = Constant.DEFAULT_READ_TIMEOUT_MILLISECONDS; - private static double appEngineTimeoutSeconds = Constant.DEFAULT_APP_ENGINE_TIMEOUT_SECONDS; - - /** - * Get the timeout in milliseconds for App Engine API requests. - * - * @return the timeout in milliseconds - */ - public static double getAppEngineTimeoutSeconds() { - return appEngineTimeoutSeconds; - } - - /** - * Set the timeout in seconds for App Engine API requests. - * - * @param seconds the timeout in seconds - */ - public static void setAppEngineTimeoutSeconds(double seconds) { - appEngineTimeoutSeconds = seconds; - } - - /** - * Get the timeout in milliseconds for connecting to the API. - * - * @return the timeout in milliseconds - */ - public static int getConnectTimeoutMilliseconds() { - return connectTimeoutMilliseconds; - } - - /** - * Set the timeout in milliseconds for connecting to the API. - * - * @param milliseconds the timeout in milliseconds - */ - public static void setConnectTimeoutMilliseconds(int milliseconds) { - connectTimeoutMilliseconds = milliseconds; - } - - /** - * Get the timeout in milliseconds for reading API responses. - * - * @return the timeout in milliseconds - */ - public static int getReadTimeoutMilliseconds() { - return readTimeoutMilliseconds; - } - - /** - * Set the timeout in milliseconds for reading API responses. - * - * @param milliseconds the timeout in milliseconds - */ - public static void setReadTimeoutMilliseconds(int milliseconds) { - readTimeoutMilliseconds = milliseconds; - } private static String urlEncodePair(final String key, final String value) throws UnsupportedEncodingException { return String.format("%s=%s", URLEncoder.encode(key, Constant.CHARSET), URLEncoder.encode(value, Constant.CHARSET)); } - static Map getHeaders(String apiKey) { + /** + * Set the header of the HTTP request. + * + * @param apiKey API of this HTTP request. + * @return HTTP header + * @throws MissingParameterError + */ + static Map generateHeaders(String apiKey) throws MissingParameterError { Map headers = new HashMap(); headers.put("Accept-Charset", Constant.CHARSET); headers.put("User-Agent", String.format("EasyPost/v2 JavaClient/%s Java/%s OS/%s OSVersion/%s OSArch/%s " + @@ -130,8 +81,8 @@ static Map getHeaders(String apiKey) { convertSpaceToHyphen(System.getProperty("os.arch")), convertSpaceToHyphen(System.getProperties().getProperty("java.vm.name")))); - if (apiKey == null) { - apiKey = EasyPost.apiKey; + if (apiKey == null || apiKey.isEmpty()) { + throw new MissingParameterError(Constants.INVALID_API_KEY_TYPE); } headers.put("Authorization", String.format("Bearer %s", apiKey)); @@ -139,12 +90,29 @@ static Map getHeaders(String apiKey) { return headers; } + /** + * Convert space to hyphen. + * + * @param string Input string. + * @return String that has hyphen instead of space. + */ private static String convertSpaceToHyphen(String string) { return string.replace(' ', '-'); } - private static javax.net.ssl.HttpsURLConnection createEasyPostConnection(final String url, final String apiKey, - final String method) throws IOException { + /** + * Create connection to EasyPost API endpoint. + * + * @param url URL of the HTTP request. + * @param client EasyPostClient object. + * @param method Method of the API request. + * @return HttpsURLConnection + * @throws IOException + * @throws MissingParameterError + */ + private static javax.net.ssl.HttpsURLConnection createEasyPostConnection(final String url, + final EasyPostClient client, + final String method) throws IOException, MissingParameterError { HttpsURLConnection conn = null; String customURLStreamHandlerClassName = System.getProperty(CUSTOM_URL_STREAM_HANDLER_PROPERTY_NAME, null); if (customURLStreamHandlerClassName != null) { @@ -182,25 +150,26 @@ private static javax.net.ssl.HttpsURLConnection createEasyPostConnection(final S URL urlObj = new URL(null, url); conn = (javax.net.ssl.HttpsURLConnection) urlObj.openConnection(); } - conn.setConnectTimeout(getConnectTimeoutMilliseconds()); + conn.setConnectTimeout(client.getConnectionTimeoutMilliseconds()); conn.setRequestMethod(method); - - int readTimeout; - if (EasyPost.readTimeout != 0) { - readTimeout = EasyPost.readTimeout; - } else { - readTimeout = getReadTimeoutMilliseconds(); - } - conn.setReadTimeout(readTimeout); + conn.setReadTimeout(client.getReadTimeoutMilliseconds()); conn.setUseCaches(false); - for (Map.Entry header : getHeaders(apiKey).entrySet()) { + for (Map.Entry header : generateHeaders(client.getApiKey()).entrySet()) { conn.setRequestProperty(header.getKey(), header.getValue()); } return conn; } + /** + * Set the property to the HttpsURLConnection for Post and Put methods. + * + * @param conn EasyPost HttpsURLConnection + * @param body Input body + * @return HttpsURLConnection + * @throws IOException + */ private static javax.net.ssl.HttpsURLConnection writeBody(final javax.net.ssl.HttpsURLConnection conn, final JsonObject body) throws IOException { if (body != null) { @@ -220,49 +189,102 @@ private static javax.net.ssl.HttpsURLConnection writeBody(final javax.net.ssl.Ht return conn; } + /** + * Create GET HTTP request connection. + * + * @param url URL of the HTTP request. + * @param query Query of the HTTP request. + * @param client EasyPostClient object. + * @return HttpsURLConnection object. + * @throws IOException + * @throws MissingParameterError + */ private static javax.net.ssl.HttpsURLConnection createGetConnection(final String url, final String query, - final String apiKey) throws IOException { + final EasyPostClient client) throws IOException, MissingParameterError { String getURL = url; if (query != null) { getURL = String.format("%s?%s", url, query); } - javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(getURL, apiKey, "GET"); + javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(getURL, client, "GET"); return conn; } + /** + * Create POST HTTP request connection. + * + * @param url URL of the HTTP request. + * @param body Body of the HTTP request. + * @param client EasyPostClient object. + * @return HttpsURLConnection object. + * @throws IOException + * @throws MissingParameterError + */ private static javax.net.ssl.HttpsURLConnection createPostConnection(final String url, final JsonObject body, - final String apiKey) throws IOException { - javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(url, apiKey, "POST"); + final EasyPostClient client) throws IOException, MissingParameterError { + javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(url, client, "POST"); conn = writeBody(conn, body); return conn; } + /** + * Create DELETE HTTP request connection. + * + * @param url URL of the HTTP request. + * @param query Query of the HTTP request. + * @param client EasyPostClient object. + * @return HttpsURLConnection object. + * @throws IOException + * @throws MissingParameterError + */ private static javax.net.ssl.HttpsURLConnection createDeleteConnection(final String url, final String query, - final String apiKey) throws IOException { + final EasyPostClient client) throws IOException, MissingParameterError { String deleteUrl = url; if (query != null) { deleteUrl = String.format("%s?%s", url, query); } - javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(deleteUrl, apiKey, "DELETE"); + javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(deleteUrl, client, "DELETE"); return conn; } + /** + * Create PUT HTTP request connection. + * + * @param url URL of the HTTP request. + * @param body Body of the HTTP request. + * @param client EasyPostClient object. + * @return HttpsURLConnection object. + * @throws IOException + * @throws MissingParameterError + */ private static javax.net.ssl.HttpsURLConnection createPutConnection(final String url, final JsonObject body, - final String apiKey) throws IOException { - javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(url, apiKey, "PUT"); + final EasyPostClient client) throws IOException, MissingParameterError { + javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(url, client, "PUT"); conn = writeBody(conn, body); return conn; } + /** + * Create body for the HTTP request. + * + * @param params Map of parameter for the HTTP request body. + * @return JsonObject of the Map object. + */ private static JsonObject createBody(final Map params) { // this is a hack to fix a broken concept: // https://github.com/google/gson/issues/1080 // noinspection rawtypes,unchecked - JsonElement jsonElement = Constant.GSON.toJsonTree(new HashMap(params)); + JsonElement jsonElement = Constant.GSON.toJsonTree(new HashMap<>(params)); JsonObject jsonObject = jsonElement.getAsJsonObject(); return jsonObject; } + /** + * Create query for the HTTP request. + * + * @param params Map of parameter for the HTTP request body. + * @return Query string of the Map object. + * @throws UnsupportedEncodingException + */ private static String createQuery(final Map params) throws UnsupportedEncodingException { Map flatParams = flattenParams(params); StringBuilder queryStringBuilder = new StringBuilder(); @@ -309,6 +331,13 @@ private static Map flattenParams(final Map param return flatParams; } + /** + * Get response body from the InputStream. + * + * @param responseStream The InputStream from the response body. + * @return InputStream in string value. + * @throws IOException + */ private static String getResponseBody(final InputStream responseStream) throws IOException { if (responseStream.available() == 0) { // Return empty string if the InputSteam is empty to avoid exceptions. @@ -321,24 +350,35 @@ private static String getResponseBody(final InputStream responseStream) throws I return rBody; } + /** + * Make URL connection request based on the API method. + * + * @param method API method. + * @param url URL of the HTTP request. + * @param query Query string of the HTTP request. + * @param body Body of the HTTP request. + * @param client EasyPostClient object + * @return EasyPostResponse object. + * @throws EasyPostException + */ private static EasyPostResponse makeURLConnectionRequest(final RequestMethod method, final String url, final String query, - final JsonObject body, final String apiKey) + final JsonObject body, final EasyPostClient client) throws EasyPostException { javax.net.ssl.HttpsURLConnection conn = null; try { switch (method) { case GET: - conn = createGetConnection(url, query, apiKey); + conn = createGetConnection(url, query, client); break; case POST: - conn = createPostConnection(url, body, apiKey); + conn = createPostConnection(url, body, client); break; case PUT: - conn = createPutConnection(url, body, apiKey); + conn = createPutConnection(url, body, client); break; case DELETE: - conn = createDeleteConnection(url, query, apiKey); + conn = createDeleteConnection(url, query, client); break; default: throw new EasyPostException( @@ -360,7 +400,7 @@ private static EasyPostResponse makeURLConnectionRequest(final RequestMethod met } catch (IOException e) { throw new EasyPostException(String.format("Could not connect to EasyPost (%s). " + "Please check your internet connection and try again. If this problem persists," + - "please contact us at %s.", EasyPost.API_BASE, Constant.EASYPOST_SUPPORT_EMAIL), e); + "please contact us at %s.", client.getApiBase(), Constant.EASYPOST_SUPPORT_EMAIL), e); } finally { if (conn != null) { conn.disconnect(); @@ -376,36 +416,18 @@ private static EasyPostResponse makeURLConnectionRequest(final RequestMethod met * @param url The URL of the API request. * @param params The params of the API request. * @param clazz The class of the object for deserialization - * @param apiKey The API key for this API request. - * - * @return A class object. - * @throws EasyPostException when the request fails. - */ - public static T request(final RequestMethod method, final String url, - final Map params, final Class clazz, final String apiKey) - throws EasyPostException { - return request(method, url, params, clazz, apiKey, true); - } - - /** - * Send an HTTP request to EasyPost. - * - * @param Any class. - * @param method The method of the API request. - * @param url The URL of the API request. - * @param params The params of the API request. - * @param clazz The class of the object for deserialization - * @param apiKey The API key for this API request. - * @param apiKeyRequired The API key for this HTTP request call if needed. + * @param client The EasyPostClient object. * * @return A class object. * @throws EasyPostException when the request fails. */ - protected static T request(final RequestMethod method, final String url, - final Map params, final Class clazz, final String apiKey, - final boolean apiKeyRequired) throws EasyPostException { + public static T request(final RequestMethod method, String url, + final Map params, final Class clazz, final EasyPostClient client) + throws EasyPostException { String originalDNSCacheTTL = null; boolean allowedToSetTTL = true; + url = String.format(url, client.getApiBase(), client.getApiVersion()); + try { originalDNSCacheTTL = java.security.Security.getProperty(DNS_CACHE_TTL_PROPERTY_NAME); // disable DNS cache @@ -415,7 +437,7 @@ protected static T request(final RequestMethod method, final String url, } try { - return _request(method, url, params, clazz, apiKey, apiKeyRequired); + return httpRequest(method, url, params, clazz, client); } finally { if (allowedToSetTTL) { if (originalDNSCacheTTL == null) { @@ -428,20 +450,23 @@ protected static T request(final RequestMethod method, final String url, } } + /** + * Send an HTTP request to EasyPost. + * + * @param Any class. + * @param method The method of the API request. + * @param url The URL of the API request. + * @param params The params of the API request. + * @param clazz The class of the object for deserialization + * @param client The EasyPostClient object. + * + * @return A class object. + * @throws EasyPostException when the request fails. + */ @SuppressWarnings("checkstyle:methodname") - protected static T _request(final RequestMethod method, final String url, - final Map params, final Class clazz, String apiKey, - final boolean apiKeyRequired) throws EasyPostException { - if ((EasyPost.apiKey == null || EasyPost.apiKey.length() == 0) && (apiKey == null || apiKey.length() == 0)) { - if (apiKeyRequired) { - throw new MissingParameterError(Constants.INVALID_API_KEY_TYPE); - } - } - - if (apiKey == null) { - apiKey = EasyPost.apiKey; - } - + protected static T httpRequest(final RequestMethod method, final String url, + final Map params, final Class clazz, final EasyPostClient client) + throws EasyPostException { String query = null; JsonObject body = null; if (params != null) { @@ -475,12 +500,12 @@ protected static T _request(final RequestMethod method, final String url, EasyPostResponse response; try { // HTTPSURLConnection verifies SSL cert by default - response = makeURLConnectionRequest(method, url, query, body, apiKey); + response = makeURLConnectionRequest(method, url, query, body, client); } catch (ClassCastException ce) { // appengine String appEngineEnv = System.getProperty("com.google.appengine.runtime.environment", null); if (appEngineEnv != null) { - response = makeAppEngineRequest(method, url, query, body, apiKey); + response = makeAppEngineRequest(method, url, query, body, client); } else { throw ce; } @@ -542,7 +567,7 @@ protected static void handleAPIError(String rBody, final int rCode) throws EasyP } private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, String url, final String query, - final JsonObject body, final String apiKey) + final JsonObject body, final EasyPostClient client) throws EasyPostException { String unknownErrorMessage = String.format( "Sorry, an unknown error occurred while trying to use the Google App Engine runtime." + @@ -575,7 +600,7 @@ private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, // Heroku times out after 30s, so leave some time for the API to return a // response fetchOptionsClass.getDeclaredMethod("setDeadline", java.lang.Double.class) - .invoke(fetchOptions, getAppEngineTimeoutSeconds()); + .invoke(fetchOptions, client.getConnectionTimeoutMilliseconds()); Class requestClass = Class.forName("com.google.appengine.api.urlfetch.HTTPRequest"); @@ -587,7 +612,7 @@ private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, requestClass.getDeclaredMethod("setPayload", byte[].class).invoke(request, bodyString.getBytes()); } - for (Map.Entry header : getHeaders(apiKey).entrySet()) { + for (Map.Entry header : generateHeaders(client.getApiKey()).entrySet()) { Class httpHeaderClass = Class.forName("com.google.appengine.api.urlfetch.HTTPHeader"); Object reqHeader = httpHeaderClass.getDeclaredConstructor(String.class, String.class) .newInstance(header.getKey(), header.getValue()); diff --git a/src/main/java/com/easypost/model/Address.java b/src/main/java/com/easypost/model/Address.java index 2a7d7aee7..5f0077833 100644 --- a/src/main/java/com/easypost/model/Address.java +++ b/src/main/java/com/easypost/model/Address.java @@ -1,12 +1,5 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.HashMap; -import java.util.Map; - public final class Address extends BaseAddress { private String message; private String carrierFacility; @@ -103,143 +96,4 @@ public AddressVerifications getVerifications() { public void setVerifications(final AddressVerifications verifications) { this.verifications = verifications; } - - /** - * Create Address object from parameter map. - * - * @param params Map of address parameters. - * @return Address object. - * @throws EasyPostException when the request fails. - */ - public static Address create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create Address object from parameter map. - * - * @param params Map of address parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Address object. - * @throws EasyPostException when the request fails. - */ - public static Address create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - - if (params.containsKey("verify")) { - wrappedParams.put("verify", params.remove("verify")); - } - - if (params.containsKey("verify_strict")) { - wrappedParams.put("verify_strict", params.remove("verify_strict")); - } - - wrappedParams.put("address", params); - - return Requestor.request(RequestMethod.POST, classURL(Address.class), wrappedParams, Address.class, apiKey); - } - - /** - * Retrieve Address object from API. - * - * @param id ID of address to retrieve. - * @return Address object. - * @throws EasyPostException when the request fails. - */ - public static Address retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve Address object from API. - * - * @param id ID of address to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return Address object. - * @throws EasyPostException when the request fails. - */ - public static Address retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(Address.class, id), null, Address.class, apiKey); - } - - /** - * List all Address objects. - * - * @param params Map of parameters. - * @return AddressCollection object. - * @throws EasyPostException when the request fails. - */ - public static AddressCollection all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * List all Address objects. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return AddressCollection object. - * @throws EasyPostException when the request fails. - */ - public static AddressCollection all(final Map params, final String apiKey) - throws EasyPostException { - return Requestor.request(RequestMethod.GET, classURL(Address.class), params, AddressCollection.class, apiKey); - } - - /** - * Create Address object from parameter map and immediately verify it. - * - * @param params Map of address parameters. - * @return Address object. - * @throws EasyPostException when the request fails. - */ - public static Address createAndVerify(final Map params) throws EasyPostException { - return createAndVerify(params, null); - } - - /** - * Create Address object from parameter map and immediately verify it. - * - * @param params Map of address parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Address object. - * @throws EasyPostException when the request fails. - */ - public static Address createAndVerify(final Map params, final String apiKey) - throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("address", params); - - AddressVerifyResponse response = - Requestor.request(RequestMethod.POST, String.format("%s/create_and_verify", classURL(Address.class)), - wrappedParams, AddressVerifyResponse.class, apiKey); - - return response.getAddress(); - } - - /** - * Verify this Address object. - * - * @return Address object. - * @throws EasyPostException when the request fails. - */ - public Address verify() throws EasyPostException { - return this.verify(null); - } - - /** - * Verify this Address object. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Address object. - * @throws EasyPostException when the request fails. - */ - public Address verify(final String apiKey) throws EasyPostException { - AddressVerifyResponse response; - response = - Requestor.request(RequestMethod.GET, String.format("%s/verify", - instanceURL(Address.class, this.getId())), null, AddressVerifyResponse.class, apiKey); - - return response.getAddress(); - } } diff --git a/src/main/java/com/easypost/model/ApiKeys.java b/src/main/java/com/easypost/model/ApiKeys.java index cbb33905d..efffcf39d 100644 --- a/src/main/java/com/easypost/model/ApiKeys.java +++ b/src/main/java/com/easypost/model/ApiKeys.java @@ -1,9 +1,5 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - import java.util.List; public final class ApiKeys extends EasyPostResource { @@ -45,25 +41,4 @@ public List getKeys() { public void setKeys(final List keys) { this.keys = keys; } - - /** - * Get all API keys. - * - * @return ApiKeys object. - * @throws EasyPostException when the request fails. - */ - public static ApiKeys all() throws EasyPostException { - return all(null); - } - - /** - * Get all API keys. - * - * @param apiKey API key to use for this request. - * @return ApiKeys object. - * @throws EasyPostException when the request fails. - */ - public static ApiKeys all(final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, classURL(ApiKey.class), null, ApiKeys.class, apiKey); - } } diff --git a/src/main/java/com/easypost/model/Batch.java b/src/main/java/com/easypost/model/Batch.java index dd95287f2..bac037235 100644 --- a/src/main/java/com/easypost/model/Batch.java +++ b/src/main/java/com/easypost/model/Batch.java @@ -1,12 +1,6 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.HashMap; import java.util.List; -import java.util.Map; public final class Batch extends EasyPostResource { private String state; @@ -107,137 +101,6 @@ public void setState(final String state) { this.state = state; } - /** - * Create a Batch object. - * - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public static Batch create() throws EasyPostException { - return create(null, null); - } - - /** - * Create a Batch object. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public static Batch create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("batch", params); - - return Requestor.request(RequestMethod.POST, classURL(Batch.class), wrappedParams, Batch.class, apiKey); - } - - /** - * Create a Batch object. - * - * @param params Map of parameters. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public static Batch create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Retrieve a Batch object from the API. - * - * @param id ID of the Batch to retrieve. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public static Batch retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a Batch object from the API. - * - * @param id ID of the Batch to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public static Batch retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(Batch.class, id), null, Batch.class, apiKey); - } - - /** - * List all Batch objects. - * - * @param params Map of parameters. - * @return BatchCollection object. - * @throws EasyPostException when the request fails. - */ - public static BatchCollection all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * List all Batch objects. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return BatchCollection object. - * @throws EasyPostException when the request fails. - */ - public static BatchCollection all(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, classURL(Batch.class), params, BatchCollection.class, apiKey); - } - - /** - * Create and buy a Batch object in one step. - * - * @param params Map of parameters. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public static Batch createAndBuy(final Map params) throws EasyPostException { - return createAndBuy(params, null); - } - - /** - * Create and buy a Batch object in one step. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public static Batch createAndBuy(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("batch", params); - - return Requestor.request(RequestMethod.POST, classURL(Batch.class), wrappedParams, Batch.class, apiKey); - } - - /** - * Refresh this Batch object. - * - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch refresh() throws EasyPostException { - return this.refresh(null, null); - } - - /** - * Refresh this Batch object. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch refresh(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, String.format("%s", instanceURL(Batch.class, this.getId())), params, - Batch.class, apiKey); - } - /** * Get label URL of this batch. * @@ -247,24 +110,6 @@ public String getLabelUrl() { return labelUrl; } - /** - * Get shipments in this batch. - * - * @return list of Shipment objects. - */ - public List getShipments() { - return shipments; - } - - /** - * Set shipments in this batch. - * - * @param shipments list of Shipment objects. - */ - public void setShipments(final List shipments) { - this.shipments = shipments; - } - /** * Set label url of this batch. * @@ -275,231 +120,20 @@ public void setLabelUrl(final String labelUrl) { } /** - * Refresh this Batch object. - * - * @param params Map of parameters. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch refresh(final Map params) throws EasyPostException { - return this.refresh(params, null); - } - - /** - * Refresh this Batch object. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch refresh(final String apiKey) throws EasyPostException { - return this.refresh(null, apiKey); - } - - /** - * Label this Batch object. - * - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch label() throws EasyPostException { - return this.label(null, null); - } - - /** - * Label this Batch object. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch label(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.POST, String.format("%s/label", - instanceURL(Batch.class, this.getId())), params, Batch.class, apiKey); - } - - /** - * Label this Batch object. - * - * @param params Map of parameters. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch label(final Map params) throws EasyPostException { - return this.label(params, null); - } - - /** - * Add shipments to this Batch object. - * - * @param shipments List of Shipment objects. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch addShipments(final List shipments) throws EasyPostException { - Map params = new HashMap(); - params.put("shipments", shipments); - return this.addShipments(params, null); - } - - /** - * Add shipments to this Batch object. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch addShipments(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.POST, String.format("%s/add_shipments", - instanceURL(Batch.class, this.getId())), params, Batch.class, apiKey); - } - - /** - * Add shipments to this Batch object. - * - * @param shipments List of Shipment objects. - * @param apiKey API key to use in request (overrides default API key). - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch addShipments(final List shipments, final String apiKey) throws EasyPostException { - Map params = new HashMap(); - params.put("shipments", shipments); - - return this.addShipments(params, apiKey); - } - - /** - * Add shipments to this Batch object. - * - * @param params Map of parameters. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch addShipments(final Map params) throws EasyPostException { - return this.addShipments(params, null); - } - - /** - * Remove shipments from this Batch object. - * - * @param shipments List of Shipment objects. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch removeShipments(final List shipments) throws EasyPostException { - Map params = new HashMap(); - params.put("shipments", shipments); - - return this.removeShipments(params, null); - } - - /** - * Remove shipments from this Batch object. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch removeShipments(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.POST, String.format("%s/remove_shipments", - instanceURL(Batch.class, this.getId())), params, Batch.class, apiKey); - } - - /** - * Remove shipments from this Batch object. - * - * @param shipments List of Shipment objects. - * @param apiKey API key to use in request (overrides default API key). - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch removeShipments(final List shipments, final String apiKey) throws EasyPostException { - Map params = new HashMap(); - params.put("shipments", shipments); - - return this.removeShipments(params, apiKey); - } - - /** - * Remove shipments from this Batch object. - * - * @param params Map of parameters. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch removeShipments(final Map params) throws EasyPostException { - return this.removeShipments(params, null); - } - - /** - * Buy this batch. - * - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch buy() throws EasyPostException { - return this.buy(null, null); - } - - /** - * Buy this batch. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch buy(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.POST, String.format("%s/buy", - instanceURL(Batch.class, this.getId())), params, Batch.class, apiKey); - } - - /** - * Buy this batch. - * - * @param params Map of parameters. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch buy(final Map params) throws EasyPostException { - return this.buy(params, null); - } - - /** - * Create a scan form for this batch. - * - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch createScanForm() throws EasyPostException { - return this.createScanForm(null, null); - } - - /** - * Create a scan form for this batch. + * Get shipments in this batch. * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Batch object. - * @throws EasyPostException when the request fails. + * @return list of Shipment objects. */ - public Batch createScanForm(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.POST, String.format("%s/scan_form", - instanceURL(Batch.class, this.getId())), params, Batch.class, apiKey); + public List getShipments() { + return shipments; } /** - * Create a scan form for this batch. + * Set shipments in this batch. * - * @param params Map of parameters. - * @return Batch object. - * @throws EasyPostException when the request fails. + * @param shipments list of Shipment objects. */ - public Batch createScanForm(final Map params) throws EasyPostException { - return this.createScanForm(params, null); + public void setShipments(final List shipments) { + this.shipments = shipments; } } diff --git a/src/main/java/com/easypost/model/Billing.java b/src/main/java/com/easypost/model/Billing.java index 9a824f465..6d20d4f16 100644 --- a/src/main/java/com/easypost/model/Billing.java +++ b/src/main/java/com/easypost/model/Billing.java @@ -1,140 +1,4 @@ package com.easypost.model; -import com.easypost.EasyPost; -import com.easypost.exception.Constants; -import com.easypost.exception.EasyPostException; -import com.easypost.exception.General.InvalidObjectError; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.HashMap; -import java.util.Map; - public final class Billing extends EasyPostResource { - /** - * Delete a payment method. - * - * @param priority Which type of payment method to delete. - * @throws EasyPostException when the request fails. - */ - public static void deletePaymentMethod(PaymentMethod.Priority priority) throws EasyPostException { - deletePaymentMethod(priority, null); - } - - /** - * Delete a payment method. - * - * @param priority Which type of payment method to delete. - * @param apiKey API key to use in request (overrides default API key). - * @throws EasyPostException when the request fails. - */ - public static void deletePaymentMethod(PaymentMethod.Priority priority, String apiKey) throws EasyPostException { - PaymentMethodObject paymentMethodObject = getPaymentMethodByPriority(priority, apiKey); - - // will attempt to serialize empty JSON to a PaymentMethod.class, that's fine - Requestor.request(RequestMethod.DELETE, - String.format("%s/%s/%s", EasyPost.API_BASE, paymentMethodObject.getEndpoint(), - paymentMethodObject.getId()), null, PaymentMethod.class, apiKey); - } - - /** - * Fund your wallet from the primary payment method. - * - * @param amount amount to fund. - * @throws EasyPostException when the request fails. - */ - public static void fundWallet(String amount) throws EasyPostException { - fundWallet(amount, PaymentMethod.Priority.PRIMARY, null); - } - - /** - * Fund your wallet from a specific payment method. - * - * @param amount amount to fund. - * @param priority which type of payment method to use to fund the wallet. Defaults to primary. - * @throws EasyPostException when the request fails. - */ - public static void fundWallet(String amount, PaymentMethod.Priority priority) throws EasyPostException { - fundWallet(amount, priority, null); - } - - /** - * Fund your wallet from a specific payment method. - * - * @param amount amount to fund. - * @param priority which type of payment method to use to fund the wallet. - * @param apiKey API key to use in request (overrides default API key). - * @throws EasyPostException when the request fails. - */ - public static void fundWallet(String amount, PaymentMethod.Priority priority, String apiKey) - throws EasyPostException { - PaymentMethodObject paymentMethodObject = getPaymentMethodByPriority(priority, apiKey); - - Map params = new HashMap<>(); - params.put("amount", amount); - - // will attempt to serialize empty JSON to a PaymentMethod.class, that's fine - Requestor.request(RequestMethod.POST, String.format("%s/%s/%s/%s", EasyPost.API_BASE, - paymentMethodObject.getEndpoint(), paymentMethodObject.getId(), "charges"), - params, PaymentMethod.class, apiKey); - } - - /** - * List all payment methods for this account. - * - * @return an EasyPost.PaymentMethod summary object. - * @throws EasyPostException when the request fails or billing has not been set up. - */ - public static PaymentMethod retrievePaymentMethods() throws EasyPostException { - return retrievePaymentMethods(null); - } - - /** - * List all payment methods for this account. - * - * @param apiKey API key to use in request (overrides default API key). - * @return an EasyPost.PaymentMethod summary object. - * @throws EasyPostException when the request fails or billing has not been set up. - */ - public static PaymentMethod retrievePaymentMethods(String apiKey) throws EasyPostException { - PaymentMethod response = - Requestor.request(RequestMethod.GET, String.format("%s/%s", EasyPost.API_BASE, "payment_methods"), null, - PaymentMethod.class, apiKey); - - if (response.getId() == null) { - throw new InvalidObjectError(Constants.NO_PAYMENT_METHODS); - } - - return response; - } - - /** - * Get a payment method by priority. - * - * @param priority which priority payment method to get. - * @param apiKey API key to use in request (overrides default API key). - * @return an EasyPost.PaymentMethodObject instance. - * @throws EasyPostException when the request fails. - */ - private static PaymentMethodObject getPaymentMethodByPriority(PaymentMethod.Priority priority, String apiKey) - throws EasyPostException { - PaymentMethod paymentMethods = retrievePaymentMethods(apiKey); - PaymentMethodObject paymentMethod = null; - switch (priority) { - case PRIMARY: - paymentMethod = paymentMethods.getPrimaryPaymentMethodObject(); - break; - case SECONDARY: - paymentMethod = paymentMethods.getSecondaryPaymentMethodObject(); - break; - default: - break; - } - - if (paymentMethod == null || paymentMethod.getId() == null) { - throw new InvalidObjectError(Constants.NO_PAYMENT_METHODS); - } - - return paymentMethod; - } } diff --git a/src/main/java/com/easypost/model/CarrierAccount.java b/src/main/java/com/easypost/model/CarrierAccount.java index 937e05fb3..53593af80 100644 --- a/src/main/java/com/easypost/model/CarrierAccount.java +++ b/src/main/java/com/easypost/model/CarrierAccount.java @@ -1,12 +1,5 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; import java.util.Map; public final class CarrierAccount extends EasyPostResource { @@ -111,96 +104,7 @@ public void setReference(final String reference) { this.reference = reference; } - /** - * Create a carrier account. - * - * @param params parameters to create. - * @return created CarrierAccount object. - * @throws EasyPostException when the request fails. - */ - public static CarrierAccount create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a carrier account. - * - * @param params parameters to create. - * @param apiKey API key to use in request (overrides default API key). - * @return created CarrierAccount object. - * @throws EasyPostException when the request fails. - */ - public static CarrierAccount create(final Map params, final String apiKey) - throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("carrier_account", params); - - return Requestor.request(RequestMethod.POST, classURL(CarrierAccount.class), - wrappedParams, CarrierAccount.class, apiKey); - } - - /** - * Retrieve a carrier account from the API. - * - * @param id id of the carrier account. - * @return CarrierAccount object. - * @throws EasyPostException when the request fails. - */ - public static CarrierAccount retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a carrier account from the API. - * - * @param id id of the carrier account. - * @param apiKey API key to use in request (overrides default API key). - * @return CarrierAccount object. - * @throws EasyPostException when the request fails. - */ - public static CarrierAccount retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(CarrierAccount.class, id), - null, CarrierAccount.class, apiKey); - } - - /** - * List all carrier accounts. - * - * @return List of CarrierAccount objects. - * @throws EasyPostException when the request fails. - */ - public static List all() throws EasyPostException { - return all(null, null); - } - - /** - * List all carrier accounts. - * - * @param params filters to apply to the list. - * @param apiKey API key to use in request (overrides default API key). - * @return List of CarrierAccount objects. - * @throws EasyPostException when the request fails. - */ - public static List all(final Map params, final String apiKey) - throws EasyPostException { - CarrierAccount[] response = Requestor.request(RequestMethod.GET, - classURL(CarrierAccount.class), params, CarrierAccount[].class, apiKey); - - return Arrays.asList(response); - } - - /** - * List all carrier accounts. - * - * @param params filters to apply to the list. - * @return List of CarrierAccount objects. - * @throws EasyPostException when the request fails. - */ - public static List all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** + /** * Get object type of the carrier account. * * @return object type of the carrier account. @@ -289,55 +193,4 @@ public Map getTestCredentials() { public void setTestCredentials(Map testCredentials) { this.testCredentials = testCredentials; } - - /** - * Update this carrier account. - * - * @param params parameters to update. - * @return updated carrier account. - * @throws EasyPostException when the request fails. - */ - public CarrierAccount update(final Map params) throws EasyPostException { - return this.update(params, null); - } - - /** - * Update this carrier account. - * - * @param params parameters to update. - * @param apiKey API key to use in request (overrides default API key). - * @return updated CarrierAccount object. - * @throws EasyPostException when the request fails. - */ - public CarrierAccount update(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("carrier_account", params); - - CarrierAccount response = - Requestor.request(RequestMethod.PUT, instanceURL(CarrierAccount.class, this.getId()), wrappedParams, - CarrierAccount.class, apiKey); - - this.merge(this, response); - return this; - } - - /** - * Delete this carrier account. - * - * @throws EasyPostException when the request fails. - */ - public void delete() throws EasyPostException { - this.delete(null); - } - - /** - * Delete this carrier account. - * - * @param apiKey API key to use in request (overrides default API key). - * @throws EasyPostException when the request fails. - */ - public void delete(final String apiKey) throws EasyPostException { - Requestor.request(RequestMethod.DELETE, instanceURL(CarrierAccount.class, this.getId()), - null, CarrierAccount.class, apiKey); - } } diff --git a/src/main/java/com/easypost/model/CarrierType.java b/src/main/java/com/easypost/model/CarrierType.java index 85c9769d1..ffc5c85c2 100644 --- a/src/main/java/com/easypost/model/CarrierType.java +++ b/src/main/java/com/easypost/model/CarrierType.java @@ -1,11 +1,5 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.Arrays; -import java.util.List; import java.util.Map; public final class CarrierType extends EasyPostResource { @@ -85,27 +79,4 @@ public String getType() { public void setType(final String type) { this.type = type; } - - /** - * Retrieve a list of available carriers for the account. - * - * @return list of carrier types that are available to the account. - * @throws EasyPostException when the request fails. - */ - public static List all() throws EasyPostException { - return all(null); - } - - /** - * Retrieve a list of available carriers for the given account. - * - * @param apikey the API key from the user input. - * @return list of carrier types that are available for the given account. - * @throws EasyPostException when the request fails. - */ - public static List all(final String apikey) throws EasyPostException { - CarrierType[] response = - Requestor.request(RequestMethod.GET, classURL(CarrierType.class), null, CarrierType[].class, apikey); - return Arrays.asList(response); - } } diff --git a/src/main/java/com/easypost/model/CreditCard.java b/src/main/java/com/easypost/model/CreditCard.java deleted file mode 100644 index d3f12df1a..000000000 --- a/src/main/java/com/easypost/model/CreditCard.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.easypost.model; - -import com.easypost.EasyPost; -import com.easypost.exception.Constants; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.HashMap; -import java.util.Map; - -/** - * CreditCard is a model class that represents a credit card. - * - * @deprecated Use {@link com.easypost.model.PaymentMethodObject} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ -@Deprecated -public class CreditCard extends BaseCreditCard { - /** - * Fund your EasyPost wallet by charging your primary or secondary card on file. - * - * @param amount amount to fund. - * @param primaryOrSecondary primary or secondary payment method. - * @return CreditCardFund object. - * @throws EasyPostException when the request fails. - * @deprecated Use {@link com.easypost.model.Billing#fundWallet(String, PaymentMethod.Priority)} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public static boolean fund(String amount, CreditCardPriority primaryOrSecondary) throws EasyPostException { - return fund(amount, primaryOrSecondary, null); - } - - /** - * Fund your EasyPost wallet by charging your primary or secondary card on file. - * - * @param amount amount to fund. - * @param primaryOrSecondary primary or secondary payment method. - * @param apiKey API key to use in request (overrides default API key). - * @return CreditCardFund object. - * @throws EasyPostException when the request fails. - * @deprecated Use {@link com.easypost.model.Billing#fundWallet(String, PaymentMethod.Priority, String)} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public static boolean fund(String amount, CreditCardPriority primaryOrSecondary, String apiKey) - throws EasyPostException { - PaymentMethod paymentMethods = PaymentMethod.all(); - String cardID = null; - - switch (primaryOrSecondary) { - case PRIMARY: - cardID = paymentMethods.getPrimaryPaymentMethod().getId(); - break; - case SECONDARY: - cardID = paymentMethods.getSecondaryPaymentMethod().getId(); - break; - default: - break; - } - - if (cardID == null || !cardID.startsWith("card_")) { - throw new EasyPostException(Constants.INVALID_PAYMENT); - } - - Map params = new HashMap<>(); - params.put("amount", amount); - - // will attempt to serialize the empty response to a CreditCard object (doesn't matter) - Requestor.request(RequestMethod.POST, String.format("%s/%s/%s/%s", - EasyPost.API_BASE, "credit_cards", cardID, "charges"), params, CreditCard.class, apiKey); - - return true; - } - - /** - * Delete a credit card by ID. - * - * @param creditCardId ID of credit card to delete. - * @throws EasyPostException when the request fails. - * @deprecated Use {@link com.easypost.model.Billing#deletePaymentMethod(PaymentMethod.Priority)} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public static void delete(String creditCardId) throws EasyPostException { - delete(creditCardId, null); - } - - /** - * Delete a credit card by ID. - * - * @param creditCardId ID of credit card to delete. - * @param apiKey API key to use in request (overrides default API key). - * @throws EasyPostException when the request fails. - * @deprecated Use {@link com.easypost.model.Billing#deletePaymentMethod(PaymentMethod.Priority, String)} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public static void delete(String creditCardId, String apiKey) throws EasyPostException { - Requestor.request(RequestMethod.DELETE, String.format("%s/%s/%s", - EasyPost.API_BASE, "credit_cards", creditCardId), null, CreditCard.class, apiKey); - } -} diff --git a/src/main/java/com/easypost/model/CreditCardPriority.java b/src/main/java/com/easypost/model/CreditCardPriority.java deleted file mode 100644 index 22bff8e40..000000000 --- a/src/main/java/com/easypost/model/CreditCardPriority.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.easypost.model; - -/** - * CreditCardPriority is an enum class that represents the payment method priority levels. - * - * @deprecated Use {@link com.easypost.model.PaymentMethod.Priority} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ -@Deprecated -public enum CreditCardPriority { - PRIMARY, - SECONDARY -} diff --git a/src/main/java/com/easypost/model/CustomsInfo.java b/src/main/java/com/easypost/model/CustomsInfo.java index c33d4c77d..0a6bd41cd 100644 --- a/src/main/java/com/easypost/model/CustomsInfo.java +++ b/src/main/java/com/easypost/model/CustomsInfo.java @@ -1,12 +1,6 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.HashMap; import java.util.List; -import java.util.Map; public final class CustomsInfo extends EasyPostResource { private String contentsType; @@ -199,55 +193,4 @@ public String getRestrictionType() { public void setRestrictionType(final String restrictionType) { this.restrictionType = restrictionType; } - - /** - * Create a CustomsInfo from a map of parameters. - * - * @param params the map of parameters. - * @return CustomsInfo object. - * @throws EasyPostException when the request fails. - */ - public static CustomsInfo create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a CustomsInfo from a map of parameters. - * - * @param params the map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return CustomsInfo object. - * @throws EasyPostException when the request fails. - */ - public static CustomsInfo create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("customs_info", params); - - return Requestor.request(RequestMethod.POST, classURL(CustomsInfo.class), - wrappedParams, CustomsInfo.class, apiKey); - } - - /** - * Retrieve a CustomsInfo from the API. - * - * @param id the ID of the CustomsInfo to retrieve. - * @return CustomsInfo object. - * @throws EasyPostException when the request fails. - */ - public static CustomsInfo retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a CustomsInfo from the API. - * - * @param id the ID of the CustomsInfo to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return CustomsInfo object. - * @throws EasyPostException when the request fails. - */ - public static CustomsInfo retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, - instanceURL(CustomsInfo.class, id), null, CustomsInfo.class, apiKey); - } } diff --git a/src/main/java/com/easypost/model/CustomsItem.java b/src/main/java/com/easypost/model/CustomsItem.java index d4383b41c..70e5c2cca 100644 --- a/src/main/java/com/easypost/model/CustomsItem.java +++ b/src/main/java/com/easypost/model/CustomsItem.java @@ -1,12 +1,5 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.HashMap; -import java.util.Map; - public final class CustomsItem extends EasyPostResource { private String description; private String hsTariffNumber; @@ -160,55 +153,4 @@ public Float getWeight() { public void setWeight(final Float weight) { this.weight = weight; } - - /** - * Create a CustomsItem from a map of parameters. - * - * @param params the map of parameters. - * @return CustomsItem object. - * @throws EasyPostException when the request fails. - */ - public static CustomsItem create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a CustomsItem from a map of parameters. - * - * @param params the map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return CustomsItem object. - * @throws EasyPostException when the request fails. - */ - public static CustomsItem create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("customs_item", params); - - return Requestor.request(RequestMethod.POST, classURL(CustomsItem.class), - wrappedParams, CustomsItem.class, apiKey); - } - - /** - * Retrieve a CustomsItem from the API. - * - * @param id the ID of the CustomsItem to retrieve. - * @return CustomsItem object. - * @throws EasyPostException when the request fails. - */ - public static CustomsItem retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a CustomsItem from the API. - * - * @param id the ID of the CustomsItem to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return CustomsItem object. - * @throws EasyPostException when the request fails. - */ - public static CustomsItem retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(CustomsItem.class, id), - null, CustomsItem.class, apiKey); - } } diff --git a/src/main/java/com/easypost/model/EasyPostResource.java b/src/main/java/com/easypost/model/EasyPostResource.java index 845e253f8..64cdd4fd6 100644 --- a/src/main/java/com/easypost/model/EasyPostResource.java +++ b/src/main/java/com/easypost/model/EasyPostResource.java @@ -9,15 +9,9 @@ package com.easypost.model; import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.util.ArrayList; -import java.util.Arrays; import java.util.Date; -import java.util.List; -import com.easypost.EasyPost; import com.easypost.http.Constant; public abstract class EasyPostResource { @@ -90,64 +84,21 @@ public void setUpdatedAt(final Date updatedAt) { this.updatedAt = updatedAt; } - protected static String instanceURL(final Class clazz, final String id) { - return String.format("%s/%s", classURL(clazz), id); - } - - protected static String classURL(final Class clazz) { - String singleURL = singleClassURL(clazz); - if (singleURL.charAt(singleURL.length() - 1) == 's' || singleURL.charAt(singleURL.length() - 1) == 'h') { - return String.format("%ses", singleClassURL(clazz)); - } else { - return String.format("%ss", singleClassURL(clazz)); - } - } - - protected static String singleClassURL(final Class clazz) { - return String.format("%s/%s", EasyPost.API_BASE, className(clazz)); - } - - private static String className(final Class clazz) { - return clazz.getSimpleName().replaceAll("([a-z])([A-Z])", "$1_$2").toLowerCase().replace("$", ""); - } - - /** - * Get all static methods for a particular class. - * - * @param type Class type to get methods for. - * @return List of class methods. - */ - private static List getAllStaticMethods(Class type) { - List allMethods = getAllMethods(type); - - List staticMethods = new ArrayList<>(); - for (Method method : allMethods) { - if (Modifier.isStatic(method.getModifiers())) { - staticMethods.add(method); - } - } - - return staticMethods; - } - - /** - * Get all methods for a particular class. - * - * @param type Class type to get methods for. - * @return List of class methods. - */ - private static List getAllMethods(Class type) { - return Arrays.asList(type.getMethods()); - } - /** * Returns a string representation of the object. + * + * @return String of the object. */ @Override public String toString() { return (String) this.getIdString(); } + /** + * Get the ID of the object. + * + * @return ID of the object. + */ private Object getIdString() { try { Field idField = this.getClass().getDeclaredField("id"); @@ -173,83 +124,6 @@ public String prettyPrint() { this.getIdString(), Constant.PRETTY_PRINT_GSON.toJson(this)); } - /** - * Merge two EasyPostResource objects. - * - * @param obj the base object - * @param update the object to merge - */ - public void merge(final EasyPostResource obj, final EasyPostResource update) { - if (!obj.getClass().isAssignableFrom(update.getClass())) { - return; - } - - // get all methods from the obj class and its superclasses - List methods = getAllNonStaticMethods(obj.getClass()); - - for (Method fromMethod : methods) { - if (fromMethod.getName().startsWith("get") - || Constant.GLOBAL_FIELD_ACCESSORS.contains(fromMethod.getName())) { - - if (fromMethod.isAnnotationPresent(Deprecated.class)) { - // skip deprecated methods - continue; - } - - String fromName = fromMethod.getName(); - String toName = fromName.replace("get", "set"); - - try { - Object value = fromMethod.invoke(update, (Object[]) null); - if (value != null) { - Method toMethod = obj.getClass().getMethod(toName, fromMethod.getReturnType()); - toMethod.invoke(obj, value); - } - } catch (Exception e) { - // TODO: Address situation below - /* - * The method getSmartrates() on the Shipment object is causing this exception. - * Since it found a method with "get" in the name, it expects there to be a - * "set" equivalent. - * There is not, causing this exception to be thrown, although nothing wrong has - * really happened. - * This code block was copy-pasted from StackOverflow: - * https://stackoverflow.com/a/7526414/13343799 - * Per the comments, there are some built-in expectations for how this will - * work, - * and should eventually be re-written or removed entirely - * (explore returning a brand-new object rather than modifying the existing - * one). - * For now, the easiest fix would be to - * a) just ignore this exception, or - * b) rename getSmartrates() in the Shipment class to just smartrates() - * (similar to how the other methods are named). - */ - // e.printStackTrace(); - } - } - } - } - - /** - * Get all non-static methods for a particular class. - * - * @param type Class type to get methods for. - * @return List of class methods. - */ - private static List getAllNonStaticMethods(Class type) { - List allMethods = getAllMethods(type); - - List nonStaticMethods = new ArrayList<>(); - for (Method method : allMethods) { - if (!Modifier.isStatic(method.getModifiers())) { - nonStaticMethods.add(method); - } - } - - return nonStaticMethods; - } - /** * Override the hashCode method because it is needed when overriding equals(). * diff --git a/src/main/java/com/easypost/model/EndShipper.java b/src/main/java/com/easypost/model/EndShipper.java index fc2b1a8cb..4b7af078a 100644 --- a/src/main/java/com/easypost/model/EndShipper.java +++ b/src/main/java/com/easypost/model/EndShipper.java @@ -1,120 +1,4 @@ package com.easypost.model; -import com.easypost.EasyPost; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.HashMap; -import java.util.Map; - public final class EndShipper extends BaseAddress { - /** - * Create EndShipper object from parameter map. - * - * @param params Map of EndShipper parameters. - * @return EndShipper object. - * @throws EasyPostException when the request fails. - */ - public static EndShipper create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create EndShipper object from parameter map. - * - * @param params Map of EndShipper parameters. - * @param apiKey Optional API key to use for this request. - * @return EndShipper object. - * @throws EasyPostException when the request fails. - */ - public static EndShipper create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - - wrappedParams.put("address", params); - - return Requestor.request(RequestMethod.POST, String.format("%s/%s", EasyPost.API_BASE, "end_shippers"), - wrappedParams, EndShipper.class, apiKey); - } - - /** - * Retrieve EndShipper object from API. - * - * @param id ID of EndShipper to retrieve. - * @return EndShipper object. - * @throws EasyPostException when the request fails. - */ - public static EndShipper retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve EndShipper object from API. - * - * @param id ID of EndShipper to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return EndShipper object. - * @throws EasyPostException when the request fails. - */ - public static EndShipper retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, - String.format("%s/%s/%s", EasyPost.API_BASE, "end_shippers", id), null, EndShipper.class, apiKey); - } - - /** - * List all EndShipper objects. - * - * @param params Map of parameters. - * @return EndShipperCollection object. - * @throws EasyPostException when the request fails. - */ - public static EndShipperCollection all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * List all EndShipper objects. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return EndShipperCollection object. - * @throws EasyPostException when the request fails. - */ - public static EndShipperCollection all(final Map params, final String apiKey) - throws EasyPostException { - return Requestor.request(RequestMethod.GET, - classURL(EndShipper.class), params, EndShipperCollection.class, apiKey); - } - - /** - * Update an EndShipper object. - * - * @param params Map of parameters. - * @return EndShipper object. - * @throws EasyPostException when the request fails. - */ - public EndShipper update(final Map params) throws EasyPostException { - return update(params, null); - } - - /** - * Update an EndShipper object. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return EndShipper object. - * @throws EasyPostException when the request fails. - */ - public EndShipper update(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - - wrappedParams.put("address", params); - - EndShipper response = Requestor.request(RequestMethod.PUT, - String.format("%s/%s/%s", EasyPost.API_BASE, "end_shippers", this.getId()), wrappedParams, - EndShipper.class, apiKey); - - this.merge(this, response); - return this; - } } diff --git a/src/main/java/com/easypost/model/Event.java b/src/main/java/com/easypost/model/Event.java index 52254cceb..1bee2744a 100644 --- a/src/main/java/com/easypost/model/Event.java +++ b/src/main/java/com/easypost/model/Event.java @@ -1,9 +1,5 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - import java.util.List; import java.util.Map; @@ -101,50 +97,4 @@ public List getCompletedUrls() { public void setCompletedUrls(List completedUrls) { this.completedUrls = completedUrls; } - - /** - * Retrieve a Event from the API. - * - * @param id ID of the Event to retrieve - * @return Event object - * @throws EasyPostException when the request fails. - */ - public static Event retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a Event from the API. - * - * @param id ID of the Event to retrieve - * @param apiKey API key to use in request (overrides default API key). - * @return Event object - * @throws EasyPostException when the request fails. - */ - public static Event retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(Event.class, id), null, Event.class, apiKey); - } - - /** - * Get a list of Events. - * - * @param params A map of parameters to pass to the API. - * @return EventCollection object - * @throws EasyPostException when the request fails. - */ - public static EventCollection all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * Get a list of Events. - * - * @param params A map of parameters to pass to the API. - * @param apiKey API key to use in request (overrides default API key). - * @return EventCollection object - * @throws EasyPostException when the request fails. - */ - public static EventCollection all(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, classURL(Event.class), params, EventCollection.class, apiKey); - } } diff --git a/src/main/java/com/easypost/model/Insurance.java b/src/main/java/com/easypost/model/Insurance.java index 6dd11eda0..d55d8eefe 100644 --- a/src/main/java/com/easypost/model/Insurance.java +++ b/src/main/java/com/easypost/model/Insurance.java @@ -1,12 +1,6 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.HashMap; import java.util.List; -import java.util.Map; public final class Insurance extends EasyPostResource { private String reference; @@ -165,103 +159,6 @@ public void setTracker(final Tracker tracker) { this.tracker = tracker; } - /** - * Create a new Insurance object from a map of parameters. - * - * @param params map of parameters - * @return Insurance object - * @throws EasyPostException when the request fails. - */ - public static Insurance create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a new Insurance object from a map of parameters. - * - * @param params a map of parameters - * @param apiKey API key to use in request (overrides default API key). - * @return Insurance object - * @throws EasyPostException when the request fails. - */ - public static Insurance create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("insurance", params); - - return Requestor.request(RequestMethod.POST, classURL(Insurance.class), wrappedParams, Insurance.class, apiKey); - } - - /** - * Retrieve an Insurance from the API. - * - * @param id the id of the Insurance to retrieve - * @return Insurance object - * @throws EasyPostException when the request fails. - */ - public static Insurance retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve an Insurance from the API. - * - * @param id the id of the Insurance to retrieve - * @param apiKey API key to use in request (overrides default API key). - * @return Insurance object - * @throws EasyPostException when the request fails. - */ - public static Insurance retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(Insurance.class, id), null, Insurance.class, apiKey); - } - - /** - * Get a list of Insurances. - * - * @param params a map of parameters - * @return InsuranceCollection object - * @throws EasyPostException when the request fails. - */ - public static InsuranceCollection all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * Get a list of Insurances. - * - * @param params a map of parameters - * @param apiKey API key to use in request (overrides default API key). - * @return InsuranceCollection object - * @throws EasyPostException when the request fails. - */ - public static InsuranceCollection all(final Map params, final String apiKey) - throws EasyPostException { - return Requestor.request(RequestMethod.GET, classURL(Insurance.class), - params, InsuranceCollection.class, apiKey); - } - - /** - * Refresh this Insurance. - * - * @return Insurance object - * @throws EasyPostException when the request fails. - */ - public Insurance refresh() throws EasyPostException { - return this.refresh(null, null); - } - - /** - * Refresh this Insurance. - * - * @param params a map of parameters - * @param apiKey API key to use in request (overrides default API key). - * @return Insurance object - * @throws EasyPostException when the request fails. - */ - public Insurance refresh(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, - String.format("%s", instanceURL(Insurance.class, this.getId())), params, Insurance.class, apiKey); - } - /** * Get the shipment ID of this Insurance. * @@ -315,26 +212,4 @@ public void setStatus(final String status) { public void setShipmentId(final String shipmentId) { this.shipmentId = shipmentId; } - - /** - * Refresh this Insurance. - * - * @param params a map of parameters - * @return Insurance object - * @throws EasyPostException when the request fails. - */ - public Insurance refresh(final Map params) throws EasyPostException { - return this.refresh(params, null); - } - - /** - * Refresh this Insurance. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Insurance object - * @throws EasyPostException when the request fails. - */ - public Insurance refresh(final String apiKey) throws EasyPostException { - return this.refresh(null, apiKey); - } } diff --git a/src/main/java/com/easypost/model/Order.java b/src/main/java/com/easypost/model/Order.java index 19e658998..dc8e7bf7a 100644 --- a/src/main/java/com/easypost/model/Order.java +++ b/src/main/java/com/easypost/model/Order.java @@ -1,10 +1,5 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.HashMap; import java.util.List; import java.util.Map; @@ -239,78 +234,6 @@ public void setToAddress(final Address toAddress) { this.toAddress = toAddress; } - /** - * Create an Order object from a map of paramters. - * - * @param params map of parameters. - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public static Order create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create an Order object from a map of paramters. - * - * @param params map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public static Order create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("order", params); - - return Requestor.request(RequestMethod.POST, classURL(Order.class), wrappedParams, Order.class, apiKey); - } - - /** - * Retrieve an Order object from the API. - * - * @param id ID of the Order to retrieve. - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public static Order retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve an Order object from the API. - * - * @param id ID of the Order to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public static Order retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(Order.class, id), null, Order.class, apiKey); - } - - /** - * Refresh this Order object. - * - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public Order refresh() throws EasyPostException { - return this.refresh(null, null); - } - - /** - * Refresh this Order object. - * - * @param params map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public Order refresh(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, String.format("%s", instanceURL(Order.class, this.getId())), params, - Order.class, apiKey); - } - /** * Get the shipments of the Order. * @@ -328,149 +251,4 @@ public List getShipments() { public void setShipments(final List shipments) { this.shipments = shipments; } - - /** - * Refresh this Order object. - * - * @param params map of parameters. - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public Order refresh(final Map params) throws EasyPostException { - return this.refresh(params, null); - } - - /** - * Refresh this Order object. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public Order refresh(final String apiKey) throws EasyPostException { - return this.refresh(null, apiKey); - } - - /** - * Get new rates for this Order. - * - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public Order newRates() throws EasyPostException { - return this.newRates(null, null); - } - - /** - * Get new rates for this Order. - * - * @param params map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public Order newRates(final Map params, final String apiKey) throws EasyPostException { - Order response = Requestor.request(RequestMethod.GET, String.format("%s/rates", - instanceURL(Order.class, this.getId())), params, Order.class, apiKey); - - this.merge(this, response); - return this; - } - - /** - * Get new rates for this Order. - * - * @param params map of parameters. - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public Order newRates(final Map params) throws EasyPostException { - return this.newRates(params, null); - } - - /** - * Get new rates for this Order. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public Order newRates(final String apiKey) throws EasyPostException { - return this.newRates(null, apiKey); - } - - /** - * Buy this Order. - * - * @param params map of parameters. - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public Order buy(final Map params) throws EasyPostException { - return this.buy(params, null); - } - - /** - * Buy this Order. - * - * @param params map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public Order buy(final Map params, final String apiKey) throws EasyPostException { - Order response = Requestor.request(RequestMethod.POST, String.format("%s/buy", - instanceURL(Order.class, this.getId())), params, Order.class, apiKey); - - this.merge(this, response); - return this; - } - - /** - * Buy this Order. - * - * @param rate Rate to buy. - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public Order buy(final Rate rate) throws EasyPostException { - Map params = new HashMap(); - params.put("carrier", rate.getCarrier()); - params.put("service", rate.getService()); - - return this.buy(params, null); - } - - /** - * Get the lowest rate for this Order. - * - * @return lowest Rate object - * @throws EasyPostException when the request fails. - */ - public Rate lowestRate() throws EasyPostException { - return this.lowestRate(null, null); - } - - /** - * Get the lowest rate for this Order. - * - * @param carriers the carriers to use in the filter. - * @param services the services to use in the filter. - * @return lowest Rate object - * @throws EasyPostException when the request fails. - */ - public Rate lowestRate(final List carriers, final List services) throws EasyPostException { - return Utilities.getLowestObjectRate(this.rates, carriers, services); - } - - /** - * Get the lowest rate for this order. - * - * @param carriers the carriers to use in the query. - * @return Rate object - * @throws EasyPostException when the request fails. - */ - public Rate lowestRate(final List carriers) throws EasyPostException { - return this.lowestRate(carriers, null); - } } diff --git a/src/main/java/com/easypost/model/Parcel.java b/src/main/java/com/easypost/model/Parcel.java index ae42d37b6..5343ddd9b 100644 --- a/src/main/java/com/easypost/model/Parcel.java +++ b/src/main/java/com/easypost/model/Parcel.java @@ -1,12 +1,5 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.HashMap; -import java.util.Map; - public final class Parcel extends EasyPostResource { private String predefinedPackage; private Float weight; @@ -103,53 +96,4 @@ public Float getWidth() { public void setWidth(final Float width) { this.width = width; } - - /** - * Create a Parcel from a map of parameters. - * - * @param params the map of the parameters to create a Parcel from. - * @return Parcel object. - * @throws EasyPostException when the request fails. - */ - public static Parcel create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a Parcel from a map of parameters. - * - * @param params the map of the parameters to create a Parcel from. - * @param apiKey API key to use in request (overrides default API key). - * @return Parcel object. - * @throws EasyPostException when the request fails. - */ - public static Parcel create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("parcel", params); - - return Requestor.request(RequestMethod.POST, classURL(Parcel.class), wrappedParams, Parcel.class, apiKey); - } - - /** - * Retrieve a Parcel from the API. - * - * @param id the ID of the Parcel to retrieve. - * @return Parcel object. - * @throws EasyPostException when the request fails. - */ - public static Parcel retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a Parcel from the API. - * - * @param id the ID of the Parcel to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return Parcel object. - * @throws EasyPostException when the request fails. - */ - public static Parcel retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(Parcel.class, id), null, Parcel.class, apiKey); - } } diff --git a/src/main/java/com/easypost/model/PaymentMethod.java b/src/main/java/com/easypost/model/PaymentMethod.java index 4b3ee250e..4661faa67 100644 --- a/src/main/java/com/easypost/model/PaymentMethod.java +++ b/src/main/java/com/easypost/model/PaymentMethod.java @@ -1,12 +1,5 @@ package com.easypost.model; -import com.easypost.EasyPost; -import com.easypost.exception.Constants; -import com.easypost.exception.EasyPostException; -import com.easypost.exception.General.InvalidObjectError; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - public class PaymentMethod extends EasyPostResource { public enum Priority { @@ -54,41 +47,6 @@ public SecondaryPaymentMethod getSecondaryPaymentMethod() { return secondaryPaymentMethod; } - /** - * List all payment methods. - * - * @return Billing object. - * @throws EasyPostException when the request fails. - * @deprecated Use {@link com.easypost.model.Billing#retrievePaymentMethods()} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public static PaymentMethod all() throws EasyPostException { - return all(null); - } - - /** - * List all payment methods. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Billing object. - * @throws EasyPostException when the request fails. - * @deprecated Use {@link com.easypost.model.Billing#retrievePaymentMethods()} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public static PaymentMethod all(String apiKey) throws EasyPostException { - PaymentMethod response = - Requestor.request(RequestMethod.GET, String.format("%s/%s", EasyPost.API_BASE, "payment_methods"), null, - PaymentMethod.class, apiKey); - - if (response.getId() == null) { - throw new InvalidObjectError(Constants.NO_PAYMENT_METHODS); - } - - return response; - } - /** * Get the object of this PaymentMethod object. * diff --git a/src/main/java/com/easypost/model/PaymentMethodObject.java b/src/main/java/com/easypost/model/PaymentMethodObject.java index b721f044e..df0f8e598 100644 --- a/src/main/java/com/easypost/model/PaymentMethodObject.java +++ b/src/main/java/com/easypost/model/PaymentMethodObject.java @@ -40,8 +40,6 @@ String getEndpoint() { // credit_card private int expYear; // both - private String id; - // both private String last4; // credit_card private String name; @@ -104,15 +102,6 @@ public int getExpYear() { return expYear; } - /** - * Get ID of this PaymentMethodObject object. - * - * @return ID of this PaymentMethodObject. - */ - public String getId() { - return id; - } - /** * Get the last 4 digits of this PaymentMethodObject object. * @@ -172,7 +161,7 @@ public PaymentMethodType getType() { * * @return the endpoint for this PaymentMethodObject. */ - String getEndpoint() { + public String getEndpoint() { PaymentMethodType type = getType(); if (type == null) { return null; diff --git a/src/main/java/com/easypost/model/Pickup.java b/src/main/java/com/easypost/model/Pickup.java index 1c35a1ddb..92d7c7de1 100644 --- a/src/main/java/com/easypost/model/Pickup.java +++ b/src/main/java/com/easypost/model/Pickup.java @@ -1,14 +1,7 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.ArrayList; import java.util.Date; -import java.util.HashMap; import java.util.List; -import java.util.Map; public final class Pickup extends EasyPostResource { private String status; @@ -185,78 +178,6 @@ public void setReference(final String reference) { this.reference = reference; } - /** - * Create a new Pickup object from a map of parameters. - * - * @param params Map of parameters. - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public static Pickup create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a new Pickup object from a map of parameters. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public static Pickup create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("pickup", params); - - return Requestor.request(RequestMethod.POST, classURL(Pickup.class), wrappedParams, Pickup.class, apiKey); - } - - /** - * Retrieve a Pickup from the API. - * - * @param id ID of Pickup to retrieve. - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public static Pickup retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a Pickup from the API. - * - * @param id ID of Pickup to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public static Pickup retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(Pickup.class, id), null, Pickup.class, apiKey); - } - - /** - * Refresh this Pickup. - * - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup refresh() throws EasyPostException { - return this.refresh(null, null); - } - - /** - * Refresh this Pickup. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup refresh(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, String.format("%s", - instanceURL(Pickup.class, this.getId())), params, Pickup.class, apiKey); - } - /** * Get the status of this Pickup. * @@ -276,188 +197,20 @@ public void setStatus(final String status) { } /** - * Refresh this Pickup. - * - * @param params Map of parameters. - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup refresh(final Map params) throws EasyPostException { - return this.refresh(params, null); - } - - /** - * Refresh this Pickup. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup refresh(final String apiKey) throws EasyPostException { - return this.refresh(null, apiKey); - } - - /** - * Buy this Pickup. - * - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup buy() throws EasyPostException { - return this.buy(null, null); - } - - /** - * Buy this Pickup. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup buy(final Map params, final String apiKey) throws EasyPostException { - Pickup response = Requestor.request(RequestMethod.POST, String.format("%s/buy", - instanceURL(Pickup.class, this.getId())), params, Pickup.class, apiKey); - - this.merge(this, response); - return this; - } - - /** - * Buy this Pickup. + * Get the pickupRates of this Pickup. * - * @param params Map of parameters. - * @return Pickup object. - * @throws EasyPostException when the request fails. + * @return the pickupRates of this Pickup. */ - public Pickup buy(final Map params) throws EasyPostException { - return this.buy(params, null); - } - - /** - * Buy this Pickup. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup buy(final String apiKey) throws EasyPostException { - return this.buy(null, apiKey); - } - - /** - * Buy this Pickup. - * - * @param pickupRate PickupRate to buy. - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup buy(final PickupRate pickupRate) throws EasyPostException { - Map params = new HashMap(); - params.put("rate", pickupRate); - - return this.buy(params, null); - } - - /** - * Cancel this Pickup. - * - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup cancel() throws EasyPostException { - return this.cancel(null, null); - } - - /** - * Cancel this Pickup. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup cancel(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.POST, String.format("%s/cancel", - instanceURL(Pickup.class, this.getId())), params, Pickup.class, apiKey); - } - - /** - * Cancel this Pickup. - * - * @param params Map of parameters. - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup cancel(final Map params) throws EasyPostException { - return this.cancel(params, null); - } - - /** - * Cancel this Pickup. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup cancel(final String apiKey) throws EasyPostException { - return this.cancel(null, apiKey); - } - - /** - * Get the lowest rate for this Pickup. - * - * @return lowest PickupRate object - * @throws EasyPostException when the request fails. - */ - public PickupRate lowestRate() throws EasyPostException { - return this.lowestRate(null, null); - } - - /** - * Get the lowest rate for this Pickup. - * - * @param carriers the carriers to use in the filter. - * @param services the services to use in the filter. - * @return lowest PickupRate object - * @throws EasyPostException when the request fails. - */ - public PickupRate lowestRate(final List carriers, final List services) throws EasyPostException { - List rates = new ArrayList(); - - for (PickupRate rate : this.getPickupRates()) { - rates.add((Rate) rate); - } - - return (PickupRate) Utilities.getLowestObjectRate(rates, carriers, services); - } - - /** - * Get the pickup rates of this Pickup. - * - * @return List of PickupRate objects. - */ - public List getPickupRates() { + public List getPickoutRates() { return pickupRates; } /** - * Set the pickup rates of this Pickup. + * Set the pickupRates of this Pickup. * - * @param pickupRates List of PickupRate objects. + * @param pickupRates the pickupRates of this Pickup. */ public void setPickupRates(final List pickupRates) { this.pickupRates = pickupRates; } - - /** - * Get the lowest rate for this pickup. - * - * @param carriers the carriers to use in the query. - * @return PickupRate object - * @throws EasyPostException when the request fails. - */ - public PickupRate lowestRate(final List carriers) throws EasyPostException { - return this.lowestRate(carriers, null); - } } diff --git a/src/main/java/com/easypost/model/Rate.java b/src/main/java/com/easypost/model/Rate.java index 26533d689..63375aad7 100644 --- a/src/main/java/com/easypost/model/Rate.java +++ b/src/main/java/com/easypost/model/Rate.java @@ -1,9 +1,5 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - public class Rate extends EasyPostResource { private String carrier; private String service; @@ -309,30 +305,4 @@ public String getService() { public void setService(final String service) { this.service = service; } - - /** - * Retrieve a Rate from the API. - * - * @param id ID of the Rate to retrieve. - * @return Rate object. - * @throws EasyPostException when the request fails. - */ - public static Rate retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a Rate from the API. - * - * @param id ID of the Rate to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return Rate object. - * @throws EasyPostException when the request fails. - */ - public static Rate retrieve(final String id, final String apiKey) throws EasyPostException { - Rate response; - response = Requestor.request(RequestMethod.GET, instanceURL(Rate.class, id), null, Rate.class, apiKey); - - return response; - } } diff --git a/src/main/java/com/easypost/model/ReferralCustomer.java b/src/main/java/com/easypost/model/ReferralCustomer.java index cc77eebad..ea35b46d8 100644 --- a/src/main/java/com/easypost/model/ReferralCustomer.java +++ b/src/main/java/com/easypost/model/ReferralCustomer.java @@ -1,22 +1,6 @@ package com.easypost.model; -import com.easypost.EasyPost; -import com.easypost.exception.Constants; -import com.easypost.exception.EasyPostException; -import com.easypost.exception.General.ExternalApiError; -import com.easypost.http.Constant; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.util.HashMap; import java.util.List; -import java.util.Map; public class ReferralCustomer extends BaseUser { private List apiKeys; @@ -38,222 +22,4 @@ public List getApiKeys() { public void setApiKeys(List apiKeys) { this.apiKeys = apiKeys; } - - /** - * Create a Referral object from parameter map. This function requires the Partner User's API key. - * - * @param params Map of the referral user parameters. - * @return Referral object. - * @throws EasyPostException when the request fails. - */ - public static ReferralCustomer create(Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a Referral Customer object from parameter map. This function requires the Partner User's API key. - * - * @param params Map of the referral user parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Referral object. - * @throws EasyPostException when the request fails. - */ - public static ReferralCustomer create(Map params, String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap<>(); - wrappedParams.put("user", params); - - return Requestor.request(RequestMethod.POST, String.format("%s/%s", EasyPost.API_BASE, "referral_customers"), - wrappedParams, ReferralCustomer.class, apiKey); - } - - /** - * Update a Referral object email. This function requires the Partner User's API key. - * - * @param email Email of the referral user to update. - * @param userId ID of the referral user to update. - * @throws EasyPostException when the request fails. - */ - public static void updateEmail(String email, String userId) throws EasyPostException { - updateEmail(email, userId, null); - } - - /** - * Update a Referral object email. This function requires the Partner User's API key. - * - * @param email Email of the referral user to update. - * @param userId ID of the referral user to update. - * @param apiKey API key to use in request (overrides default API key). - * @throws EasyPostException when the request fails. - */ - public static void updateEmail(String email, String userId, String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap<>(); - Map params = new HashMap<>(); - params.put("email", email); - wrappedParams.put("user", params); - - Requestor.request(RequestMethod.PUT, String.format("%s/%s/%s", EasyPost.API_BASE, "referral_customers", userId), - wrappedParams, ReferralCustomer.class, apiKey); - } - - /** - * List all Referral objects. This function requires the Partner User's API key. - * - * @param params Map of parameters. - * @return List object. - * @throws EasyPostException when the request fails. - */ - public static ReferralCustomerCollection all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * List all Referral objects. This function requires the Partner User's API key. - * - * @param params Map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return ReferralCustomerCollection object. - * @throws EasyPostException when the request fails. - */ - public static ReferralCustomerCollection all(final Map params, String apiKey) - throws EasyPostException { - return Requestor.request(RequestMethod.GET, String.format("%s/%s", EasyPost.API_BASE, "referral_customers"), - params, ReferralCustomerCollection.class, apiKey); - } - - /** - * Add credit card to a referral user. This function requires the Referral User's API key. - * - * @param referralApiKey API key of the referral user. - * @param number Credit card number. - * @param expirationMonth Expiration month of the credit card. - * @param expirationYear Expiration year of the credit card. - * @param cvc CVC of the credit card. - * @return PaymentMethodObject object. - * @throws Exception when the request fails. - */ - public static PaymentMethodObject addCreditCardToUser(String referralApiKey, String number, int expirationMonth, - int expirationYear, String cvc) throws Exception { - return addCreditCardToUser(referralApiKey, number, expirationMonth, expirationYear, cvc, - PaymentMethod.Priority.PRIMARY); - } - - /** - * Add credit card to a referral user. This function requires the Referral User's API key. - * - * @param referralApiKey API key of the referral user. - * @param number Credit card number. - * @param expirationMonth Expiration month of the credit card. - * @param expirationYear Expiration year of the credit card. - * @param cvc CVC of the credit card. - * @param priority Priority of this credit card. - * @return PaymentMethodObject object. - * @throws Exception when the request fails. - */ - public static PaymentMethodObject addCreditCardToUser(String referralApiKey, String number, int expirationMonth, - int expirationYear, String cvc, - PaymentMethod.Priority priority) throws Exception { - String easypostStripeApiKey = retrieveEasypostStripeApiKey(); - String stripeToken; - - try { - stripeToken = createStripeToken(number, expirationMonth, expirationYear, cvc, easypostStripeApiKey); - } catch (Exception e) { - throw new ExternalApiError(String.format(Constants.EXTERNAL_API_CALL_FAILED, "Stripe")); - } - - return createEasypostCreditCard(referralApiKey, stripeToken, priority.toString().toLowerCase()); - } - - /** - * Retrieve EasyPost Stripe API key. - * - * @return EasyPost Stripe API key. - * @throws EasyPostException when the request fails. - */ - private static String retrieveEasypostStripeApiKey() throws EasyPostException { - @SuppressWarnings ("unchecked") Map response = - Requestor.request(RequestMethod.GET, String.format("%s/%s", - EasyPost.API_BASE, "partners/stripe_public_key"), null, Map.class, null); - - return response.getOrDefault("public_key", ""); - } - - /** - * Get credit card token from Stripe. - * - * @param number Credit card number. - * @param expirationMonth Expiration month of the credit card. - * @param expirationYear Expiration year of the credit card. - * @param cvc CVC of the credit card. - * @param easypostStripeApiKey EasyPost Stripe API key. - * @return Stripe token. - * @throws Exception when the request fails. - */ - private static String createStripeToken(String number, int expirationMonth, int expirationYear, String cvc, - String easypostStripeApiKey) throws Exception { - Map params = new HashMap<>(); - params.put("number", number); - params.put("exp_month", String.valueOf(expirationMonth)); - params.put("exp_year", String.valueOf(expirationYear)); - params.put("cvc", cvc); - - URL stripeUrl = new URL("https://api.stripe.com/v1/tokens"); - HttpURLConnection conn = (HttpURLConnection) stripeUrl.openConnection(); - conn.setRequestMethod("POST"); - conn.setRequestProperty("Authorization", String.format("%s %s", "Bearer", easypostStripeApiKey)); - conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - conn.setDoOutput(true); - - String encodedURL = Utilities.getEncodedURL(params, "card"); - byte[] postData = encodedURL.getBytes(StandardCharsets.UTF_8); - - try (DataOutputStream wr = new DataOutputStream(conn.getOutputStream())) { - wr.write(postData); - } - - StringBuilder response; - - try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) { - - String line; - response = new StringBuilder(); - - while ((line = br.readLine()) != null) { - response.append(line); - response.append(System.lineSeparator()); - } - br.close(); - } finally { - conn.disconnect(); - } - - String responseBody = response.toString(); - - @SuppressWarnings ("unchecked") Map responseMap = - Constant.GSON.fromJson(responseBody, Map.class); - - return responseMap.get("id").toString(); - } - - /** - * Submit Stripe credit card token to EasyPost. - * - * @param referralApiKey API key of the referral user. - * @param stripeObjectId Stripe token. - * @param priority Credit card priority. - * @return CreditCard object. - * @throws EasyPostException when the request fails. - */ - private static PaymentMethodObject createEasypostCreditCard(String referralApiKey, String stripeObjectId, - String priority) throws EasyPostException { - Map params = new HashMap<>(); - params.put("stripe_object_id", stripeObjectId); - params.put("priority", priority); - - Map wrappedParams = new HashMap<>(); - wrappedParams.put("credit_card", params); - - return Requestor.request(RequestMethod.POST, String.format("%s/%s", EasyPost.API_BASE, "credit_cards"), - wrappedParams, PaymentMethodObject.class, referralApiKey); - } } diff --git a/src/main/java/com/easypost/model/Refund.java b/src/main/java/com/easypost/model/Refund.java index 1c95bfc50..9f7c154d0 100644 --- a/src/main/java/com/easypost/model/Refund.java +++ b/src/main/java/com/easypost/model/Refund.java @@ -1,14 +1,5 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - public final class Refund extends EasyPostResource { private String trackingCode; private String confirmationNumber; @@ -105,79 +96,4 @@ public void setStatus(final String status) { public void setShipmentId(final String shipmentId) { this.shipmentId = shipmentId; } - - /** - * Create a Refund object from a map of parameters. - * - * @param params Map of parameters - * @return Refund object - * @throws EasyPostException when the request fails. - */ - public static List create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a Refund object from a map of parameters. - * - * @param params Map of parameters - * @param apiKey API key to use in request (overrides default API key). - * @return Refund object - * @throws EasyPostException when the request fails. - */ - public static List create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("refund", params); - - Refund[] response = Requestor.request(RequestMethod.POST, classURL(Refund.class), - wrappedParams, Refund[].class, apiKey); - - return Arrays.asList(response); - } - - /** - * Retrieve a Refund object from the API. - * - * @param id ID of refund to retrieve - * @return Refund object - * @throws EasyPostException when the request fails. - */ - public static Refund retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a Refund object from the API. - * - * @param id ID of refund to retrieve - * @param apiKey API key to use in request (overrides default API key). - * @return Refund object - * @throws EasyPostException when the request fails. - */ - public static Refund retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(Refund.class, id), null, Refund.class, apiKey); - } - - /** - * List all Refunds objects. - * - * @param params Map of parameters - * @return RefundCollection object - * @throws EasyPostException when the request fails. - */ - public static RefundCollection all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * List all Refunds objects. - * - * @param params Map of parameters - * @param apiKey API key to use in request (overrides default API key). - * @return RefundCollection object - * @throws EasyPostException when the request fails. - */ - public static RefundCollection all(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, classURL(Refund.class), params, RefundCollection.class, apiKey); - } } diff --git a/src/main/java/com/easypost/model/Report.java b/src/main/java/com/easypost/model/Report.java index d1b1e8575..920bb0415 100644 --- a/src/main/java/com/easypost/model/Report.java +++ b/src/main/java/com/easypost/model/Report.java @@ -1,17 +1,6 @@ package com.easypost.model; -import com.easypost.EasyPost; -import com.easypost.exception.Constants; -import com.easypost.exception.EasyPostException; -import com.easypost.exception.General.InvalidObjectError; -import com.easypost.exception.General.InvalidParameterError; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.net.URLEncoder; import java.util.Date; -import java.util.HashMap; -import java.util.Map; public final class Report extends EasyPostResource { private Date startDate; @@ -128,97 +117,4 @@ public Date getUrlExpiresAt() { public void setUrlExpiresAt(final Date urlExpiresAt) { this.urlExpiresAt = urlExpiresAt; } - - /** - * Create a Report from a map of parameters. - * - * @param params a map of parameters. - * @return Report object. - * @throws EasyPostException when the request fails. - */ - public static Report create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a Report from a map of parameters. - * - * @param params a map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Report object. - * @throws EasyPostException when the request fails. - */ - public static Report create(final Map params, final String apiKey) throws EasyPostException { - if (params.containsKey("type")) { - HashMap paramsWithoutType = new HashMap<>(params); - paramsWithoutType.remove("type"); - return Requestor.request(RequestMethod.POST, - reportURL((String) params.get("type")), paramsWithoutType, Report.class, apiKey); - } else { - throw new InvalidObjectError(String.format(Constants.MISSING_REQUIRED_PARAMETER, "type")); - } - } - - /** - * Generate a report URL. - * - * @param type the type of report to generate. - * @return the URL to generate the report. - * @throws EasyPostException when the request fails. - */ - protected static String reportURL(final String type) throws EasyPostException { - try { - String urlType = URLEncoder.encode(type, "UTF-8").toLowerCase(); - return String.format("%s/reports/%s/", EasyPost.API_BASE, urlType); - } catch (java.io.UnsupportedEncodingException e) { - throw new InvalidParameterError(String.format(Constants.ENCODED_ERROR, "report type"), e); - } - } - - /** - * Retrieve a Report from the API. - * - * @param id the ID of the Report to retrieve. - * @return Report object. - * @throws EasyPostException when the request fails. - */ - public static Report retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a Report from the API. - * - * @param id the ID of the Report to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return Report object. - * @throws EasyPostException when the request fails. - */ - public static Report retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(Report.class, id), null, Report.class, apiKey); - } - - /** - * Get a list of Reports from the API. - * - * @param params a map of parameters. - * @return ReportCollection object. - * @throws EasyPostException when the request fails. - */ - public static ReportCollection all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * Get a list of Reports from the API. - * - * @param params a map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return ReportCollection object. - * @throws EasyPostException when the request fails. - */ - public static ReportCollection all(final Map params, final String apiKey) throws EasyPostException { - String type = (String) params.get("type"); - return Requestor.request(RequestMethod.GET, reportURL(type), params, ReportCollection.class, apiKey); - } } diff --git a/src/main/java/com/easypost/model/ScanForm.java b/src/main/java/com/easypost/model/ScanForm.java index 2b3fd1828..b1d39a054 100644 --- a/src/main/java/com/easypost/model/ScanForm.java +++ b/src/main/java/com/easypost/model/ScanForm.java @@ -1,11 +1,6 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - import java.util.List; -import java.util.Map; public class ScanForm extends EasyPostResource { private String status; @@ -178,74 +173,4 @@ public List getTrackingCodes() { public void setTrackingCodes(final List trackingCodes) { this.trackingCodes = trackingCodes; } - - /** - * Create a ScanForm from a map of parameters. - * - * @param params the map of parameters. - * @return ScanForm object. - * @throws EasyPostException when the request fails. when the request fails. - */ - public static ScanForm create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a ScanForm from a map of parameters. - * - * @param params the map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return ScanForm object. - * @throws EasyPostException when the request fails. when the request fails. - */ - public static ScanForm create(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.POST, classURL(ScanForm.class), params, ScanForm.class, apiKey); - } - - /** - * Retrieve a ScanForm from the API. - * - * @param id the id of the ScanForm to retrieve. - * @return ScanForm object. - * @throws EasyPostException when the request fails. when the request fails. - */ - public static ScanForm retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a ScanForm from the API. - * - * @param id the id of the ScanForm to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return ScanForm object. - * @throws EasyPostException when the request fails. when the request fails. - */ - public static ScanForm retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(ScanForm.class, id), null, ScanForm.class, apiKey); - } - - /** - * Get a list of ScanForms from the API. - * - * @param params the parameters to send to the API. - * @return ScanFormCollection object. - * @throws EasyPostException when the request fails. when the request fails. - */ - public static ScanFormCollection all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * Get a list of ScanForms from the API. - * - * @param params the parameters to send to the API. - * @param apiKey API key to use in request (overrides default API key). - * @return ScanFormCollection object. - * @throws EasyPostException when the request fails. when the request fails. - */ - public static ScanFormCollection all(final Map params, final String apiKey) - throws EasyPostException { - return Requestor.request(RequestMethod.GET, classURL(ScanForm.class), params, ScanFormCollection.class, apiKey); - } } diff --git a/src/main/java/com/easypost/model/Shipment.java b/src/main/java/com/easypost/model/Shipment.java index fe0bc027f..dcea07c5e 100644 --- a/src/main/java/com/easypost/model/Shipment.java +++ b/src/main/java/com/easypost/model/Shipment.java @@ -1,15 +1,11 @@ package com.easypost.model; -import com.easypost.exception.Constants; -import com.easypost.exception.EasyPostException; -import com.easypost.exception.General.FilteringError; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.HashMap; import java.util.List; import java.util.Map; +import com.easypost.exception.EasyPostException; +import com.easypost.utils.Utilities; + public final class Shipment extends EasyPostResource { private String reference; private Boolean isReturn; @@ -525,132 +521,6 @@ public void setFees(final List fees) { this.fees = fees; } - /** - * Create a new Shipment object from a map of parameters. - * - * @param params the map of parameters. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public static Shipment create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a new Shipment object from a map of parameters. - * - * @param params the map of parameters. - * @param withCarbonOffset whether to include a carbon offset when creating the shipment. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public static Shipment create(final Map params, boolean withCarbonOffset) throws EasyPostException { - return create(params, withCarbonOffset, null); - } - - /** - * Create a new Shipment object from a map of parameters. - * - * @param params the map of parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public static Shipment create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap<>(); - wrappedParams.put("shipment", params); - - return Requestor.request(RequestMethod.POST, classURL(Shipment.class), wrappedParams, Shipment.class, apiKey); - } - - /** - * Create a new Shipment object from a map of parameters. - * - * @param params the map of parameters. - * @param withCarbonOffset whether to include a carbon offset when creating the shipment. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public static Shipment create(final Map params, boolean withCarbonOffset, final String apiKey) - throws EasyPostException { - Map wrappedParams = new HashMap<>(); - wrappedParams.put("shipment", params); - wrappedParams.put("carbon_offset", withCarbonOffset); - - return Requestor.request(RequestMethod.POST, classURL(Shipment.class), wrappedParams, Shipment.class, apiKey); - } - - /** - * Retrieve a Shipment from the API. - * - * @param id the id of the Shipment to retrieve. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public static Shipment retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a Shipment from the API. - * - * @param id the id of the Shipment to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public static Shipment retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(Shipment.class, id), null, Shipment.class, apiKey); - } - - /** - * Get a list of all Shipment objects. - * - * @param params the options for the query. - * @return ShipmentCollection object - * @throws EasyPostException when the request fails. - */ - public static ShipmentCollection all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * Get a list of all Shipment objects. - * - * @param params the options for the query. - * @param apiKey API key to use in request (overrides default API key). - * @return ShipmentCollection object - * @throws EasyPostException when the request fails. - */ - public static ShipmentCollection all(final Map params, final String apiKey) - throws EasyPostException { - return Requestor.request(RequestMethod.GET, classURL(Shipment.class), params, ShipmentCollection.class, apiKey); - } - - /** - * Refresh this Shipment. - * - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment refresh() throws EasyPostException { - return this.refresh(null, null); - } - - /** - * Refresh this Shipment. - * - * @param params the options for the query. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment refresh(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, String.format("%s", - instanceURL(Shipment.class, this.getId())), params, Shipment.class, apiKey); - } - /** * Get the status of this Shipment. * @@ -687,600 +557,6 @@ public void setStatus(final String status) { this.status = status; } - /** - * Refresh this Shipment. - * - * @param params the options for the query. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment refresh(final Map params) throws EasyPostException { - return this.refresh(params, null); - } - - /** - * Refresh this Shipment. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment refresh(final String apiKey) throws EasyPostException { - return this.refresh(null, apiKey); - } - - /** - * Get new rates for this Shipment. - * - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment newRates() throws EasyPostException { - return this.newRates(new HashMap() {}, false, null); - } - - /** - * Get new rates for this Shipment. - * - * @param withCarbonOffset whether to include a carbon offset when re-rating the shipment. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment newRates(final boolean withCarbonOffset) throws EasyPostException { - return this.newRates(new HashMap() {}, withCarbonOffset, null); - } - - /** - * Get new rates for this Shipment. - * - * @param params the options for the query. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment newRates(final Map params) throws EasyPostException { - return this.newRates(params, false, null); - } - - /** - * Get new rates for this Shipment. - * - * @param params the options for the query. - * @param withCarbonOffset whether to include a carbon offset when re-rating the shipment. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment newRates(final Map params, final boolean withCarbonOffset) - throws EasyPostException { - return this.newRates(params, withCarbonOffset, null); - } - - /** - * Get new rates for this Shipment. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment newRates(final String apiKey) throws EasyPostException { - return this.newRates(new HashMap() {}, false, apiKey); - } - - /** - * Get new rates for this Shipment. - * - * @param withCarbonOffset whether to include a carbon offset when re-rating the shipment. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment newRates(final boolean withCarbonOffset, final String apiKey) throws EasyPostException { - return this.newRates(new HashMap() {}, withCarbonOffset, apiKey); - } - - /** - * Get new rates for this Shipment. - * - * @param params the options for the query. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment newRates(final Map params, final String apiKey) throws EasyPostException { - return this.newRates(params, false, apiKey); - } - - /** - * Get new rates for this Shipment. - * - * @param params the options for the query. - * @param withCarbonOffset whether to include a carbon offset when re-rating the shipment. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment newRates(final Map params, final boolean withCarbonOffset, final String apiKey) - throws EasyPostException { - params.put("carbon_offset", withCarbonOffset); - Shipment response = Requestor.request(RequestMethod.POST, String.format("%s/rerate", - instanceURL(Shipment.class, this.getId())), params, Shipment.class, apiKey); - - this.merge(this, response); - - return this; - } - - /** - * Get Smartrates for this Shipment. - * - * @param params the options for the query. - * @return List of Smartrate objects - * @throws EasyPostException when the request fails. - * @deprecated Use {@link #smartrates(Map)} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public List getSmartrates(final Map params) throws EasyPostException { - return this.smartrates(params); - } - - /** - * Get Smartrates for this Shipment. - * - * @param params the options for the query. - * @return List of Smartrate objects - * @throws EasyPostException when the request fails. - */ - public List smartrates(final Map params) throws EasyPostException { - return this.smartrates(params, null); - } - - /** - * Get Smartrates for this Shipment. - * - * @param params the options for the query. - * @param apiKey API key to use in request (overrides default API key). - * @return List of Smartrate objects - * @throws EasyPostException when the request fails. - * @deprecated Use {@link #smartrates(Map, String)} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public List getSmartrates(final Map params, final String apiKey) - throws EasyPostException { - return this.smartrates(params, apiKey); - } - - /** - * Get Smartrates for this Shipment. - * - * @param params the options for the query. - * @param apiKey API key to use in request (overrides default API key). - * @return List of Smartrate objects - * @throws EasyPostException when the request fails. - */ - public List smartrates(final Map params, final String apiKey) throws EasyPostException { - SmartrateCollection smartrateCollection = Requestor.request(RequestMethod.GET, String.format("%s/smartrate", - instanceURL(Shipment.class, this.getId())), params, SmartrateCollection.class, apiKey); - - return smartrateCollection.getSmartrates(); - } - - /** - * Get Smartrates for this Shipment. - * - * @param apiKey API key to use in request (overrides default API key). - * @return List of Smartrate objects - * @throws EasyPostException when the request fails. - * @deprecated Use {@link #smartrates(String)} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public List getSmartrates(final String apiKey) throws EasyPostException { - return this.smartrates(apiKey); - } - - /** - * Get Smartrates for this Shipment. - * - * @param apiKey API key to use in request (overrides default API key). - * @return List of Smartrate objects - * @throws EasyPostException when the request fails. - */ - public List smartrates(final String apiKey) throws EasyPostException { - return this.smartrates(null, apiKey); - } - - /** - * Buy this Shipment. - * - * @param params the options for the query. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment buy(final Map params) throws EasyPostException { - return this.buy(params, false, null); - } - - /** - * Buy this Shipment. - * - * @param rate the Rate to use for this Shipment. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment buy(final Rate rate) throws EasyPostException { - Map params = new HashMap<>(); - params.put("rate", rate); - - return this.buy(params, false, null); - } - - /** - * Buy this Shipment. - * - * @param rate the Rate to use for this Shipment. - * @param withCarbonOffset whether to include a carbon offset when buying the shipment. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment buy(final Rate rate, final boolean withCarbonOffset) throws EasyPostException { - Map params = new HashMap<>(); - params.put("rate", rate); - - return this.buy(params, withCarbonOffset, null, null); - } - - /** - * Buy this Shipment. - * - * @param rate the Rate to use for this Shipment. - * @param endShipperId the id of the end shipper to use for this purchase. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment buy(final Rate rate, final String endShipperId) throws EasyPostException { - Map params = new HashMap<>(); - params.put("rate", rate); - - return this.buy(params, false, endShipperId, null); - } - - /** - * Buy this Shipment. - * - * @param params the options for the query. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment buy(final Map params, final String apiKey) throws EasyPostException { - // TODO: When Java Client Library rewrite happens, the apiKey param will be replaced with endShipperId - return this.buy(params, false, null, apiKey); - } - - /** - * Buy this Shipment. - * - * @param params the options for the query. - * @param withCarbonOffset whether to include a carbon offset when buying the shipment. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment buy(final Map params, final boolean withCarbonOffset) throws EasyPostException { - return this.buy(params, withCarbonOffset, null); - } - - /** - * Buy this Shipment. - * - * @param rate the Rate to use for this Shipment. - * @param withCarbonOffset whether to include a carbon offset when buying the shipment. - * @param endShipperId the id of the end shipper to use for this purchase. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment buy(final Rate rate, final boolean withCarbonOffset, final String endShipperId, final String apiKey) - throws EasyPostException { - Map params = new HashMap<>(); - params.put("rate", rate); - - return this.buy(params, withCarbonOffset, endShipperId, apiKey); - } - - /** - * Buy this Shipment. - * - * @param params the options for the query. - * @param withCarbonOffset whether to include a carbon offset when buying the shipment. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment buy(final Map params, final boolean withCarbonOffset, final String apiKey) - throws EasyPostException { - return this.buy(params, withCarbonOffset, null, apiKey); - } - - /** - * Buy this Shipment. - * - * @param params the options for the query. - * @param endShipperId the id of the end shipper to use for this purchase. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment buy(final Map params, final String endShipperId, final String apiKey) - throws EasyPostException { - return this.buy(params, false, endShipperId, apiKey); - } - - /** - * Buy this Shipment. - * - * @param params the options for the query. - * @param withCarbonOffset whether to include a carbon offset when buying the shipment. - * @param endShipperId the id of the end shipper to use for this purchase. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment buy(final Map params, final boolean withCarbonOffset, - final String endShipperId, final String apiKey) throws EasyPostException { - params.put("carbon_offset", withCarbonOffset); - - if (endShipperId != null && !endShipperId.isEmpty()) { - params.put("end_shipper_id", endShipperId); - } - - Shipment response = Requestor.request(RequestMethod.POST, String.format("%s/buy", - instanceURL(Shipment.class, this.getId())), params, Shipment.class, apiKey); - - this.merge(this, response); - - return this; - } - - /** - * Refund this Shipment. - * - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment refund() throws EasyPostException { - return this.refund(null, null); - } - - /** - * Refund this Shipment. - * - * @param params the options for the query. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment refund(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.POST, String.format("%s/refund", - instanceURL(Shipment.class, this.getId())), params, Shipment.class, apiKey); - } - - /** - * Refund this Shipment. - * - * @param params the options for the query. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment refund(final Map params) throws EasyPostException { - return this.refund(params, null); - } - - /** - * Refund this Shipment. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment refund(final String apiKey) throws EasyPostException { - return this.refund(null, apiKey); - } - - /** - * Label this Shipment. - * - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment label() throws EasyPostException { - return this.label(null, null); - } - - /** - * Label this Shipment. - * - * @param params the options for the query. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment label(final Map params, final String apiKey) throws EasyPostException { - Shipment response = Requestor.request(RequestMethod.GET, String.format("%s/label", - instanceURL(Shipment.class, this.getId())), params, Shipment.class, apiKey); - - this.merge(this, response); - return this; - } - - /** - * Label this Shipment. - * - * @param params the options for the query. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment label(final Map params) throws EasyPostException { - return this.label(params, null); - } - - /** - * Label this Shipment. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment label(final String apiKey) throws EasyPostException { - return this.label(null, apiKey); - } - - /** - * Insure this Shipment. - * - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment insure() throws EasyPostException { - return this.insure(null, null); - } - - /** - * Insure this Shipment. - * - * @param params the options for the query. - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment insure(final Map params, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.POST, String.format("%s/insure", - instanceURL(Shipment.class, this.getId())), params, Shipment.class, apiKey); - } - - /** - * Insure this Shipment. - * - * @param params the options for the query. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment insure(final Map params) throws EasyPostException { - return this.insure(params, null); - } - - /** - * Insure this Shipment. - * - * @param apiKey API key to use in request (overrides default API key). - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment insure(final String apiKey) throws EasyPostException { - return this.insure(null, apiKey); - } - - /** - * Get the lowest smartrate for this Shipment. - * - * @param deliveryDay Delivery days restriction to use when filtering. - * @param deliveryAccuracy Delivery days accuracy restriction to use when filtering. - * @return lowest Smartrate object - * @throws EasyPostException when the request fails. - * @deprecated use {@link #lowestSmartRate(int, SmartrateAccuracy)} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public Smartrate lowestSmartRate(int deliveryDay, String deliveryAccuracy) throws EasyPostException { - return this.lowestSmartRate(deliveryDay, SmartrateAccuracy.getByKeyName(deliveryAccuracy)); - } - - /** - * Get the lowest smartrate for this Shipment. - * - * @param deliveryDay Delivery days restriction to use when filtering. - * @param deliveryAccuracy Delivery days accuracy restriction to use when filtering. - * @return lowest Smartrate object - * @throws EasyPostException when the request fails. - */ - public Smartrate lowestSmartRate(int deliveryDay, SmartrateAccuracy deliveryAccuracy) throws EasyPostException { - List smartrates = this.smartrates(); - - Smartrate lowestSmartrate = findLowestSmartrate(smartrates, deliveryDay, deliveryAccuracy); - - return lowestSmartrate; - } - - /** - * Get Smartrates for this Shipment. - * - * @return List of Smartrate objects - * @throws EasyPostException when the request fails. - * @deprecated Use {@link #smartrates()} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public List getSmartrates() throws EasyPostException { - return this.smartrates(); - } - - /** - * Get Smartrates for this Shipment. - * - * @return List of Smartrate objects - * @throws EasyPostException when the request fails. - */ - public List smartrates() throws EasyPostException { - return this.smartrates(null, null); - } - - /** - * Get the lowest Smartrate from a list of Smartrates. - * - * @param smartrates List of Smartrates to filter from. - * @param deliveryDay Delivery days restriction to use when filtering. - * @param deliveryAccuracy Delivery days accuracy restriction to use when filtering. - * @return lowest Smartrate object - * @throws EasyPostException when the request fails. - * @deprecated Use {@link #findLowestSmartrate(List, int, SmartrateAccuracy)} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public static Smartrate getLowestSmartRate(final List smartrates, int deliveryDay, - String deliveryAccuracy) throws EasyPostException { - return findLowestSmartrate(smartrates, deliveryDay, SmartrateAccuracy.getByKeyName(deliveryAccuracy)); - } - - /** - * Find the lowest Smartrate from a list of Smartrates. - * - * @param smartrates List of Smartrates to filter from. - * @param deliveryDay Delivery days restriction to use when filtering. - * @param deliveryAccuracy Delivery days accuracy restriction to use when filtering. - * @return lowest Smartrate object - * @throws EasyPostException when the request fails. - */ - public static Smartrate findLowestSmartrate(final List smartrates, int deliveryDay, - SmartrateAccuracy deliveryAccuracy) throws EasyPostException { - Smartrate lowestSmartrate = null; - - for (Smartrate rate : smartrates) { - int smartrateDeliveryDay = rate.getTimeInTransit().getBySmartrateAccuracy(deliveryAccuracy); - - if (smartrateDeliveryDay > deliveryDay) { - continue; - } else if (lowestSmartrate == null || rate.getRate() < lowestSmartrate.getRate()) { - lowestSmartrate = rate; - } - } - - if (lowestSmartrate == null) { - throw new FilteringError(String.format(Constants.NO_OBJECT_FOUND, "rate")); - } - - return lowestSmartrate; - } - /** * Get the lowest rate for this Shipment. * @@ -1299,8 +575,9 @@ public Rate lowestRate() throws EasyPostException { * @return lowest Rate object * @throws EasyPostException when the request fails. */ - public Rate lowestRate(final List carriers, final List services) throws EasyPostException { - return Utilities.getLowestObjectRate(this.rates, carriers, services); + public Rate lowestRate(final List carriers, final List services) + throws EasyPostException { + return Utilities.getLowestObjectRate(this.getRates(), carriers, services); } /** @@ -1313,59 +590,4 @@ public Rate lowestRate(final List carriers, final List services) public Rate lowestRate(final List carriers) throws EasyPostException { return this.lowestRate(carriers, null); } - - /** - * Generate a form for this shipment. - * - * @param formType the form type for this shipment. - * @throws EasyPostException when the request fails. - */ - public void generateForm(final String formType) throws EasyPostException { - this.generateForm(formType, null, null); - } - - /** - * Generate a form for this shipment. - * - * @param formType the form type for this shipment. - * @param apiKey API key to use in request (overrides default API key). - * @throws EasyPostException when the request fails. - */ - public void generateForm(final String formType, final String apiKey) throws EasyPostException { - this.generateForm(formType, null, apiKey); - } - - /** - * Generate a form for this shipment. - * - * @param formType the form type for this shipment. - * @param formOptions the form options for this shipment. - * @throws EasyPostException when the request fails. - */ - public void generateForm(final String formType, final Map formOptions) throws EasyPostException { - this.generateForm(formType, formOptions, null); - } - - /** - * Generate a form for this shipment. - * - * @param formType the form type for this shipment. - * @param formOptions the form options for this shipment. - * @param apiKey API key to use in request (overrides default API key). - * @throws EasyPostException when the request fails. - */ - public void generateForm(final String formType, final Map formOptions, String apiKey) - throws EasyPostException { - HashMap params = new HashMap<>(); - HashMap wrappedParams = new HashMap<>(); - - params.put("type", formType); - params.putAll(formOptions); - wrappedParams.put("form", params); - - Shipment response = Requestor.request(RequestMethod.POST, String.format("%s/forms", - instanceURL(Shipment.class, this.getId())), wrappedParams, Shipment.class, apiKey); - - this.merge(this, response); - } } diff --git a/src/main/java/com/easypost/model/Tracker.java b/src/main/java/com/easypost/model/Tracker.java index 66dfaee23..d7357e412 100644 --- a/src/main/java/com/easypost/model/Tracker.java +++ b/src/main/java/com/easypost/model/Tracker.java @@ -1,13 +1,7 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - import java.util.Date; -import java.util.HashMap; import java.util.List; -import java.util.Map; public final class Tracker extends EasyPostResource { private String trackingCode; @@ -219,103 +213,4 @@ public float getWeight() { public void setWeight(final float weight) { this.weight = weight; } - - /** - * Create a new Tracker object using a map of parameters. - * - * @param params Map of parameters used to create the Tracker. - * @return Tracker object. - * @throws EasyPostException when the request fails. - */ - public static Tracker create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a new Tracker object using a map of parameters. - * - * @param params Map of parameters used to create the Tracker. - * @param apiKey API key to use in request (overrides default API key). - * @return Tracker object. - * @throws EasyPostException when the request fails. - */ - public static Tracker create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("tracker", params); - - return Requestor.request(RequestMethod.POST, classURL(Tracker.class), wrappedParams, Tracker.class, apiKey); - } - - /** - * Retrieve a Tracker object from the API. - * - * @param id ID of the Tracker to retrieve. - * @return Tracker object. - * @throws EasyPostException when the request fails. - */ - public static Tracker retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a Tracker object from the API. - * - * @param id ID of the Tracker to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return Tracker object. - * @throws EasyPostException when the request fails. - */ - public static Tracker retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(Tracker.class, id), null, Tracker.class, apiKey); - } - - /** - * Get a list of all Tracker objects. - * - * @param params Map of parameters used to filter the list of Trackers. - * @return TrackerCollection object. - * @throws EasyPostException when the request fails. - */ - public static TrackerCollection all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * Get a list of all Tracker objects. - * - * @param params Map of parameters used to filter the list of Trackers. - * @param apiKey API key to use in request (overrides default API key). - * @return TrackerCollection object. - * @throws EasyPostException when the request fails. - */ - public static TrackerCollection all(final Map params, final String apiKey) - throws EasyPostException { - return Requestor.request(RequestMethod.GET, classURL(Tracker.class), params, TrackerCollection.class, apiKey); - } - - /** - * Create a list of Trackers. - * - * @param params Map of parameters used to create the Trackers. - * @throws EasyPostException when the request fails. - */ - public static void createList(final Map params) throws EasyPostException { - createList(params, null); - } - - /** - * Create a list of Trackers. - * - * @param params Map of parameters used to create the Trackers. - * @param apiKey API key to use in request (overrides default API key). - * @throws EasyPostException when the request fails. - */ - public static void createList(final Map params, final String apiKey) throws EasyPostException { - String createListUrl = String.format("%s/create_list", classURL(Tracker.class)); - - Map newParams = new HashMap(); - newParams.put("trackers", params); - - Requestor.request(RequestMethod.POST, createListUrl, newParams, Object.class, apiKey); - } } diff --git a/src/main/java/com/easypost/model/User.java b/src/main/java/com/easypost/model/User.java index c457e7a22..2778292e0 100644 --- a/src/main/java/com/easypost/model/User.java +++ b/src/main/java/com/easypost/model/User.java @@ -1,191 +1,4 @@ package com.easypost.model; -import com.easypost.exception.Constants; -import com.easypost.exception.EasyPostException; -import com.easypost.exception.General.FilteringError; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - public class User extends BaseUser { - /** - * Retrieve a User from the API. - * - * @param id The ID of the User to retrieve. - * @return User object. - * @throws EasyPostException when the request fails. - */ - public static User retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a User from the API. - * - * @param id The ID of the User to retrieve. - * @param apiKey API key to use in request (overrides default API key). - * @return User object. - * @throws EasyPostException when the request fails. - */ - public static User retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(User.class, id), null, User.class, apiKey); - } - - /** - * Retrieve your User from the API. - * - * @return User object. - * @throws EasyPostException when the request fails. - */ - public static User retrieveMe() throws EasyPostException { - return retrieveMe(null); - } - - /** - * Retrieve your User from the API. - * - * @param apiKey API key to use in request (overrides default API key). - * @return User object. - * @throws EasyPostException when the request fails. - */ - public static User retrieveMe(final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, classURL(User.class), null, User.class, apiKey); - } - - /** - * Create a User object with a map of parameters. - * - * @return User object. - * @throws EasyPostException when the request fails. - */ - public static User create() throws EasyPostException { - return create(null, null); - } - - /** - * Create a User object with a map of parameters. - * - * @param params map of User parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return User object. - * @throws EasyPostException when the request fails. - */ - public static User create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("user", params); - - return Requestor.request(RequestMethod.POST, classURL(User.class), wrappedParams, User.class, apiKey); - } - - /** - * Create a User object with a map of parameters. - * - * @param params map of User parameters. - * @return User object. - * @throws EasyPostException when the request fails. - */ - public static User create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Update this User. - * - * @param params map of User parameters. - * @return User object. - * @throws EasyPostException when the request fails. - */ - public User update(final Map params) throws EasyPostException { - return update(params, null); - } - - /** - * Update this User. - * - * @param params map of User parameters. - * @param apiKey API key to use in request (overrides default API key). - * @return User object. - * @throws EasyPostException when the request fails. - */ - public User update(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("user", params); - - User response = Requestor.request(RequestMethod.PUT, - instanceURL(User.class, this.getId()), wrappedParams, User.class, apiKey); - - this.merge(this, response); - return this; - } - - /** - * Delete this User. - * - * @throws EasyPostException when the request fails. - */ - public void delete() throws EasyPostException { - this.delete(null); - } - - /** - * Delete this User. - * - * @param apiKey API key to use in request (overrides default API key). - * @throws EasyPostException when the request fails. - */ - public void delete(final String apiKey) throws EasyPostException { - Requestor.request(RequestMethod.DELETE, instanceURL(User.class, this.getId()), null, User.class, apiKey); - } - - /** - * Get this User's API keys. - * - * @return List of ApiKey objects. - * @throws EasyPostException when the request fails. - */ - public List apiKeys() throws EasyPostException { - ApiKeys parentKeys = ApiKeys.all(); - - if (Objects.equals(this.getId(), parentKeys.getId())) { - return parentKeys.getKeys(); - } - - for (int i = 0; i < parentKeys.getChildren().size(); i++) { - if (this.getId().equals(parentKeys.getChildren().get(i).getId())) { - return parentKeys.getChildren().get(i).getKeys(); - } - } - - throw new FilteringError(String.format(Constants.NO_OBJECT_FOUND, "API keys")); - } - - /** - * Update the user brand. - * - * @param params Map of parameters. - * @return Brand object. - * @throws EasyPostException when the request fails. - */ - public Brand updateBrand(Map params) throws EasyPostException { - return updateBrand(params, null); - } - - /** - * Update the user brand. - * - * @param params Map of parameters. - * @param apiKey User API key. - * @return Brand object. - * @throws EasyPostException when the request fails. - */ - public Brand updateBrand(Map params, String apiKey) throws EasyPostException { - String updateBrandUrl = String.format("%s/brand", instanceURL(User.class, this.getId())); - Map wrappedParams = new HashMap(); - wrappedParams.put("brand", params); - return Requestor.request(RequestMethod.PUT, updateBrandUrl, wrappedParams, Brand.class, apiKey); - } } diff --git a/src/main/java/com/easypost/model/Webhook.java b/src/main/java/com/easypost/model/Webhook.java index 5a5b77150..78fc8a33f 100644 --- a/src/main/java/com/easypost/model/Webhook.java +++ b/src/main/java/com/easypost/model/Webhook.java @@ -1,18 +1,6 @@ package com.easypost.model; -import com.easypost.exception.Constants; -import com.easypost.exception.EasyPostException; -import com.easypost.exception.General.SignatureVerificationError; -import com.easypost.http.Constant; -import com.easypost.http.Requestor; -import com.easypost.http.Requestor.RequestMethod; -import com.easypost.utils.Cryptography; - -import java.nio.charset.StandardCharsets; -import java.text.Normalizer; import java.util.Date; -import java.util.HashMap; -import java.util.Map; public final class Webhook extends EasyPostResource { private String url; @@ -53,187 +41,4 @@ public String getUrl() { public void setUrl(final String url) { this.url = url; } - - /** - * Create a Webhook object from a map of parameters. - * - * @param params the map of parameters - * @return Webhook object - * @throws EasyPostException when the request fails. - */ - public static Webhook create(final Map params) throws EasyPostException { - return create(params, null); - } - - /** - * Create a Webhook object from a map of parameters. - * - * @param params the map of parameters - * @param apiKey API key to use in request (overrides default API key). - * @return Webhook object - * @throws EasyPostException when the request fails. - */ - public static Webhook create(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("webhook", params); - - return Requestor.request(RequestMethod.POST, classURL(Webhook.class), wrappedParams, Webhook.class, apiKey); - } - - /** - * Retrieve a Webhook object from the API. - * - * @param id the ID of the Webhook to retrieve - * @return Webhook object - * @throws EasyPostException when the request fails. - */ - public static Webhook retrieve(final String id) throws EasyPostException { - return retrieve(id, null); - } - - /** - * Retrieve a Webhook object from the API. - * - * @param id the ID of the Webhook to retrieve - * @param apiKey API key to use in request (overrides default API key). - * @return Webhook object - * @throws EasyPostException when the request fails. - */ - public static Webhook retrieve(final String id, final String apiKey) throws EasyPostException { - return Requestor.request(RequestMethod.GET, instanceURL(Webhook.class, id), null, Webhook.class, apiKey); - } - - /** - * Get a list of all Webhook objects. - * - * @return WebhookCollection object - * @throws EasyPostException when the request fails. - */ - public static WebhookCollection all() throws EasyPostException { - Map params = new HashMap(); - return all(params, null); - } - - /** - * Get a list of all Webhook objects. - * - * @param params params for request - * @param apiKey API key to use in request (overrides default API key). - * @return WebhookCollection object - * @throws EasyPostException when the request fails. - */ - public static WebhookCollection all(final Map params, final String apiKey) - throws EasyPostException { - return Requestor.request(RequestMethod.GET, classURL(Webhook.class), params, WebhookCollection.class, apiKey); - } - - /** - * Get a list of all Webhook objects. - * - * @param params params for request - * @return WebhookCollection object - * @throws EasyPostException when the request fails. - */ - public static WebhookCollection all(final Map params) throws EasyPostException { - return all(params, null); - } - - /** - * Delete this Webhook. - * - * @throws EasyPostException when the request fails. - */ - public void delete() throws EasyPostException { - this.delete(null); - } - - /** - * Delete this Webhook. - * - * @param apiKey API key to use in request (overrides default API key). - * @throws EasyPostException when the request fails. - */ - public void delete(final String apiKey) throws EasyPostException { - Requestor.request(RequestMethod.DELETE, instanceURL(Webhook.class, this.getId()), null, Webhook.class, apiKey); - } - - /** - * Update this webhook. - * - * @return Webhook object - * @throws EasyPostException when the request fails. - */ - public Webhook update() throws EasyPostException { - Map params = new HashMap(); - return this.update(params, null); - } - - /** - * Update this webhook. - * - * @param params the map of parameters - * @param apiKey API key to use in request (overrides default API key). - * @return Webhook object - * @throws EasyPostException when the request fails. - */ - public Webhook update(final Map params, final String apiKey) throws EasyPostException { - Map wrappedParams = new HashMap(); - wrappedParams.put("webhook", params); - - Webhook response = Requestor.request(RequestMethod.PUT, - instanceURL(Webhook.class, this.getId()), wrappedParams, Webhook.class, apiKey); - - this.merge(this, response); - return this; - } - - /** - * Update this webhook. - * - * @param params the map of parameters - * @return Webhook object - * @throws EasyPostException when the request fails. - */ - public Webhook update(final Map params) throws EasyPostException { - return this.update(params, null); - } - - /** - * Validate a webhook by comparing the HMAC signature header sent from EasyPost to your shared secret. - * If the signatures do not match, an error will be raised signifying - * the webhook either did not originate from EasyPost or the secrets do not match. - * If the signatures do match, the `event_body` will be returned as JSON. - * - * @param eventBody Data to validate - * @param headers Headers received from the webhook - * @param webhookSecret Shared secret to use in validation - * @return JSON string of the event body if the signatures match, otherwise an - * error will be raised. - * @throws EasyPostException when the request fails. - */ - public static Event validateWebhook(byte[] eventBody, Map headers, String webhookSecret) - throws EasyPostException { - - String providedSignature = null; - try { - providedSignature = headers.get("X-Hmac-Signature").toString(); - } catch (NullPointerException ignored) { // catch error raised if header key doesn't exist - } - - if (providedSignature != null) { - String calculatedDigest = - Cryptography.toHMACSHA256HexDigest(eventBody, webhookSecret, Normalizer.Form.NFKD); - String calculatedSignature = "hmac-sha256-hex=" + calculatedDigest; - - if (Cryptography.signaturesMatch(providedSignature, calculatedSignature)) { - // Serialize data into a JSON string, then into an Event object - String json = new String(eventBody, StandardCharsets.UTF_8); - return Constant.GSON.fromJson(json, Event.class); - } else { - throw new SignatureVerificationError(Constants.WEBHOOK_DOES_NOT_MATCH); - } - } else { - throw new SignatureVerificationError(Constants.INVALID_WEBHOOK_SIGNATURE); - } - } } diff --git a/src/main/java/com/easypost/service/AddressService.java b/src/main/java/com/easypost/service/AddressService.java new file mode 100644 index 000000000..f614cdf42 --- /dev/null +++ b/src/main/java/com/easypost/service/AddressService.java @@ -0,0 +1,108 @@ +package com.easypost.service; + +import java.util.HashMap; +import java.util.Map; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Address; +import com.easypost.model.AddressCollection; +import com.easypost.model.AddressVerifyResponse; +import com.easypost.utils.Utilities; + +public class AddressService { + private final EasyPostClient client; + + /** + * AddressService constructor. + * + * @param client The client object. + */ + AddressService(EasyPostClient client) { + this.client = client; + } + + /** + * Create Address object from parameter map. + * + * @param params Map of address parameters. + * @return Address object. + * @throws EasyPostException when the request fails. + */ + public Address create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + + if (params.containsKey("verify")) { + wrappedParams.put("verify", params.remove("verify")); + } + + if (params.containsKey("verify_strict")) { + wrappedParams.put("verify_strict", params.remove("verify_strict")); + } + + wrappedParams.put("address", params); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(Address.class), wrappedParams, Address.class, + client); + } + + /** + * Retrieve Address object from API. + * + * @param id ID of address to retrieve. + * @return Address object. + * @throws EasyPostException when the request fails. + */ + public Address retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Address.class, id), null, Address.class, + client); + } + + /** + * List all Address objects. + * + * @param params Map of parameters. + * @return AddressCollection object. + * @throws EasyPostException when the request fails. + */ + public AddressCollection all(final Map params) + throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.classURL(Address.class), params, AddressCollection.class, + client); + } + + /** + * Create Address object from parameter map and immediately verify it. + * + * @param params Map of address parameters. + * @return Address object. + * @throws EasyPostException when the request fails. + */ + public Address createAndVerify(final Map params) + throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("address", params); + + String url = String.format("%s/create_and_verify", Utilities.classURL(Address.class)); + AddressVerifyResponse response = Requestor.request(RequestMethod.POST, url, wrappedParams, + AddressVerifyResponse.class, client); + + return response.getAddress(); + } + + /** + * Verify this Address object. + * + * @param id The ID of address. + * @return Address object. + * @throws EasyPostException when the request fails. + */ + public Address verify(String id) throws EasyPostException { + String url = String.format("%s/verify", Utilities.instanceURL(Address.class, id)); + AddressVerifyResponse response = Requestor.request(RequestMethod.GET, url, null, AddressVerifyResponse.class, + client); + + return response.getAddress(); + } +} diff --git a/src/main/java/com/easypost/service/ApiKeyService.java b/src/main/java/com/easypost/service/ApiKeyService.java new file mode 100644 index 000000000..1f342310f --- /dev/null +++ b/src/main/java/com/easypost/service/ApiKeyService.java @@ -0,0 +1,32 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.ApiKey; +import com.easypost.model.ApiKeys; +import com.easypost.utils.Utilities; + +public class ApiKeyService { + private final EasyPostClient client; + + /** + * ApiKeyService constructor. + * + * @param client The client object. + */ + ApiKeyService(EasyPostClient client) { + this.client = client; + } + + /** + * Get all API keys. + * + * @return ApiKeys object. + * @throws EasyPostException when the request fails. + */ + public ApiKeys all() throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.classURL(ApiKey.class), + null, ApiKeys.class, client); + } +} diff --git a/src/main/java/com/easypost/service/BatchService.java b/src/main/java/com/easypost/service/BatchService.java new file mode 100644 index 000000000..3054e9b88 --- /dev/null +++ b/src/main/java/com/easypost/service/BatchService.java @@ -0,0 +1,247 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Batch; +import com.easypost.model.BatchCollection; +import com.easypost.model.Shipment; +import com.easypost.utils.Utilities; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class BatchService { + private final EasyPostClient client; + + /** + * BatchService constructor. + * + * @param client The client object. + */ + BatchService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a Batch object. + * + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch create() throws EasyPostException { + return create(null); + } + + /** + * Create a Batch object. + * + * @param params Map of parameters. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("batch", params); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(Batch.class), wrappedParams, Batch.class, + client); + } + + /** + * Retrieve a Batch object from the API. + * + * @param id ID of the Batch to retrieve. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Batch.class, id), null, Batch.class, client); + } + + /** + * List all Batch objects. + * + * @param params Map of parameters. + * @return BatchCollection object. + * @throws EasyPostException when the request fails. + */ + public BatchCollection all(final Map params) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.classURL(Batch.class), params, BatchCollection.class, + client); + } + + /** + * Create and buy a Batch object in one step. + * + * @param params Map of parameters. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch createAndBuy(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("batch", params); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(Batch.class), wrappedParams, Batch.class, + client); + } + + /** + * Refresh this Batch object. + * + * @param id The ID of batch. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch refresh(String id) throws EasyPostException { + return this.refresh(id, null); + } + + /** + * Refresh this Batch object. + * + * @param id The ID of batch. + * @param params Map of parameters. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch refresh(final String id, final Map params) throws EasyPostException { + String url = String.format("%s", Utilities.instanceURL(Batch.class, id)); + + return Requestor.request(RequestMethod.GET, url, params, Batch.class, client); + } + + /** + * Label this Batch object. + * + * @param id The ID of batch. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch label(String id) throws EasyPostException { + return this.label(id, null); + } + + /** + * Label this Batch object. + * + * @param id The ID of batch. + * @param params Map of parameters. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch label(final String id, final Map params) throws EasyPostException { + String url = String.format("%s/label", Utilities.instanceURL(Batch.class, id)); + + return Requestor.request(RequestMethod.POST, url, params, Batch.class, client); + } + + /** + * Add shipments to this Batch object. + * + * @param id The ID of batch. + * @param params Map of parameters. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch addShipments(final String id, final Map params) throws EasyPostException { + String url = String.format("%s/add_shipments", Utilities.instanceURL(Batch.class, id)); + + return Requestor.request(RequestMethod.POST, url, params, Batch.class, client); + } + + /** + * Add shipments to this Batch object. + * + * @param id The ID of batch. + * @param shipments List of Shipment objects. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch addShipments(final String id, final List shipments) throws EasyPostException { + Map params = new HashMap(); + params.put("shipments", shipments); + + return this.addShipments(id, params); + } + + /** + * Remove shipments from this Batch object. + * + * @param id The ID of batch. + * @param params Map of parameters. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch removeShipments(final String id, final Map params) throws EasyPostException { + String url = String.format("%s/remove_shipments", Utilities.instanceURL(Batch.class, id)); + + return Requestor.request(RequestMethod.POST, url, params, Batch.class, client); + } + + /** + * Remove shipments from this Batch object. + * + * @param id The ID of batch. + * @param shipments List of Shipment objects. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch removeShipments(final String id, final List shipments) throws EasyPostException { + Map params = new HashMap(); + params.put("shipments", shipments); + + return this.removeShipments(id, params); + } + + /** + * Buy this batch. + * + * @param id The ID of batch. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch buy(final String id) throws EasyPostException { + return this.buy(id, null); + } + + /** + * Buy this batch. + * + * @param id The ID of batch. + * @param params Map of parameters. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch buy(final String id, final Map params) throws EasyPostException { + String url = String.format("%s/buy", Utilities.instanceURL(Batch.class, id)); + + return Requestor.request(RequestMethod.POST, url, params, Batch.class, client); + } + + /** + * Create a scan form for this batch. + * + * @param id The ID of batch. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch createScanForm(final String id) throws EasyPostException { + return this.createScanForm(id, null); + } + + /** + * Create a scan form for this batch. + * + * @param id The ID of batch. + * @param params Map of parameters. + * @return Batch object. + * @throws EasyPostException when the request fails. + */ + public Batch createScanForm(final String id, final Map params) throws EasyPostException { + String url = String.format("%s/scan_form", Utilities.instanceURL(Batch.class, id)); + + return Requestor.request(RequestMethod.POST, url, params, Batch.class, client); + } +} diff --git a/src/main/java/com/easypost/service/BillingService.java b/src/main/java/com/easypost/service/BillingService.java new file mode 100644 index 000000000..6b4f57e43 --- /dev/null +++ b/src/main/java/com/easypost/service/BillingService.java @@ -0,0 +1,118 @@ +package com.easypost.service; + +import com.easypost.exception.Constants; +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.InvalidObjectError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.PaymentMethod; +import com.easypost.model.PaymentMethodObject; + +import java.util.HashMap; +import java.util.Map; + +public class BillingService { + private final EasyPostClient client; + + /** + * BillingService constructor. + * + * @param client The client object. + */ + BillingService(EasyPostClient client) { + this.client = client; + } + + /** + * Delete a payment method. + * + * @param priority Which type of payment method to delete. + * @throws EasyPostException when the request fails. + */ + public void deletePaymentMethod(PaymentMethod.Priority priority) throws EasyPostException { + PaymentMethodObject paymentMethodObject = getPaymentMethodByPriority(priority); + String url = String.format("%s/%s/%s/%s", client.getApiBase(), client.getApiVersion(), + paymentMethodObject.getEndpoint(), paymentMethodObject.getId()); + + // will attempt to serialize empty JSON to a PaymentMethod.class, that's fine + Requestor.request(RequestMethod.DELETE, url, null, PaymentMethod.class, client); + } + + /** + * Fund your wallet from the primary payment method. + * + * @param amount Amount to fund. + * @throws EasyPostException when the request fails. + */ + public void fundWallet(String amount) throws EasyPostException { + fundWallet(amount, PaymentMethod.Priority.PRIMARY); + } + + /** + * Fund your wallet from a specific payment method. + * + * @param amount Amount to fund. + * @param priority which type of payment method to use to fund the wallet. + * @throws EasyPostException when the request fails. + */ + public void fundWallet(String amount, PaymentMethod.Priority priority) + throws EasyPostException { + PaymentMethodObject paymentMethodObject = getPaymentMethodByPriority(priority); + + Map params = new HashMap<>(); + params.put("amount", amount); + + String url = String.format("%s/%s/%s/%s/%s", client.getApiBase(), client.getApiVersion(), + paymentMethodObject.getEndpoint(), paymentMethodObject.getId(), "charges"); + + // will attempt to serialize empty JSON to a PaymentMethod.class, that's fine + Requestor.request(RequestMethod.POST, url, params, PaymentMethod.class, client); + } + + /** + * List all payment methods for this account. + * + * @return an EasyPost.PaymentMethod summary object. + * @throws EasyPostException when the request fails or billing has not been set + * up. + */ + public PaymentMethod retrievePaymentMethods() throws EasyPostException { + String url = String.format("%s/%s/%s", client.getApiBase(), client.getApiVersion(), "payment_methods"); + PaymentMethod response = Requestor.request(RequestMethod.GET, url, null, PaymentMethod.class, client); + + if (response.getId() == null) { + throw new InvalidObjectError(Constants.NO_PAYMENT_METHODS); + } + + return response; + } + + /** + * Get a payment method by priority. + * + * @param priority Which priority payment method to get. + * @return an EasyPost.PaymentMethodObject instance. + * @throws EasyPostException when the request fails. + */ + private PaymentMethodObject getPaymentMethodByPriority(PaymentMethod.Priority priority) + throws EasyPostException { + PaymentMethod paymentMethods = retrievePaymentMethods(); + PaymentMethodObject paymentMethod = null; + switch (priority) { + case PRIMARY: + paymentMethod = paymentMethods.getPrimaryPaymentMethodObject(); + break; + case SECONDARY: + paymentMethod = paymentMethods.getSecondaryPaymentMethodObject(); + break; + default: + break; + } + + if (paymentMethod == null || paymentMethod.getId() == null) { + throw new InvalidObjectError(Constants.NO_PAYMENT_METHODS); + } + + return paymentMethod; + } +} diff --git a/src/main/java/com/easypost/service/CarrierAccountService.java b/src/main/java/com/easypost/service/CarrierAccountService.java new file mode 100644 index 000000000..74489d229 --- /dev/null +++ b/src/main/java/com/easypost/service/CarrierAccountService.java @@ -0,0 +1,106 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.CarrierAccount; +import com.easypost.utils.Utilities; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class CarrierAccountService { + private final EasyPostClient client; + + /** + * CarrierAccountService constructor. + * + * @param client The client object. + */ + CarrierAccountService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a carrier account. + * + * @param params Map of parameters to create. + * @return created CarrierAccount object. + * @throws EasyPostException when the request fails. + */ + public CarrierAccount create(final Map params) + throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("carrier_account", params); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(CarrierAccount.class), + wrappedParams, CarrierAccount.class, client); + } + + /** + * Retrieve a carrier account from the API. + * + * @param id id of the carrier account. + * @return CarrierAccount object. + * @throws EasyPostException when the request fails. + */ + public CarrierAccount retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(CarrierAccount.class, id), + null, CarrierAccount.class, client); + } + + /** + * List all carrier accounts. + * + * @return List of CarrierAccount objects. + * @throws EasyPostException when the request fails. + */ + public List all() throws EasyPostException { + return all(null); + } + + /** + * List all carrier accounts. + * + * @param params filters to apply to the list. + * @return List of CarrierAccount objects. + * @throws EasyPostException when the request fails. + */ + public List all(final Map params) + throws EasyPostException { + CarrierAccount[] response = Requestor.request(RequestMethod.GET, + Utilities.classURL(CarrierAccount.class), params, CarrierAccount[].class, client); + + return Arrays.asList(response); + } + + /** + * Update this carrier account. + * + * @param params parameters to update. + * @param id The ID of carrier account + * @return updated CarrierAccount object. + * @throws EasyPostException when the request fails. + */ + public CarrierAccount update(final Map params, String id) + throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("carrier_account", params); + + return Requestor.request(RequestMethod.PUT, Utilities.instanceURL(CarrierAccount.class, id), wrappedParams, + CarrierAccount.class, client); + } + + /** + * Delete this carrier account. + * + * @param id The ID of carrient account. + * @throws EasyPostException when the request fails. + */ + public void delete(String id) throws EasyPostException { + Requestor.request(RequestMethod.DELETE, Utilities.instanceURL(CarrierAccount.class, id), + null, CarrierAccount.class, client); + } +} diff --git a/src/main/java/com/easypost/service/CarrierTypeService.java b/src/main/java/com/easypost/service/CarrierTypeService.java new file mode 100644 index 000000000..f5fb26b49 --- /dev/null +++ b/src/main/java/com/easypost/service/CarrierTypeService.java @@ -0,0 +1,35 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.CarrierType; +import com.easypost.utils.Utilities; + +import java.util.Arrays; +import java.util.List; + +public class CarrierTypeService { + private final EasyPostClient client; + + /** + * CarrierTypeService constructor. + * + * @param client The client object. + */ + CarrierTypeService(EasyPostClient client) { + this.client = client; + } + + /** + * Retrieve a list of available carriers for the given account. + * + * @return list of carrier types that are available for the given account. + * @throws EasyPostException when the request fails. + */ + public List all() throws EasyPostException { + CarrierType[] response = Requestor.request(RequestMethod.GET, Utilities.classURL(CarrierType.class), + null, CarrierType[].class, client); + return Arrays.asList(response); + } +} diff --git a/src/main/java/com/easypost/service/CustomsInfoService.java b/src/main/java/com/easypost/service/CustomsInfoService.java new file mode 100644 index 000000000..84b0b1872 --- /dev/null +++ b/src/main/java/com/easypost/service/CustomsInfoService.java @@ -0,0 +1,50 @@ +package com.easypost.service; + +import java.util.HashMap; +import java.util.Map; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.CustomsInfo; +import com.easypost.utils.Utilities; + +public class CustomsInfoService { + private final EasyPostClient client; + + /** + * CustomsInfoService constructor. + * + * @param client The client object. + */ + CustomsInfoService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a CustomsInfo from a map of parameters. + * + * @param params Map of parameters. + * @return CustomsInfo object. + * @throws EasyPostException when the request fails. + */ + public CustomsInfo create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("customs_info", params); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(CustomsInfo.class), + wrappedParams, CustomsInfo.class, client); + } + + /** + * Retrieve a CustomsInfo from the API. + * + * @param id The ID of the CustomsInfo to retrieve. + * @return CustomsInfo object. + * @throws EasyPostException when the request fails. + */ + public CustomsInfo retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, + Utilities.instanceURL(CustomsInfo.class, id), null, CustomsInfo.class, client); + } +} diff --git a/src/main/java/com/easypost/service/CustomsItemService.java b/src/main/java/com/easypost/service/CustomsItemService.java new file mode 100644 index 000000000..5e7f90982 --- /dev/null +++ b/src/main/java/com/easypost/service/CustomsItemService.java @@ -0,0 +1,50 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.CustomsItem; +import com.easypost.utils.Utilities; + +import java.util.HashMap; +import java.util.Map; + +public class CustomsItemService { + private final EasyPostClient client; + + /** + * CustomsItemService constructor. + * + * @param client The client object. + */ + CustomsItemService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a CustomsItem from a map of parameters. + * + * @param params Map of parameters. + * @return CustomsItem object. + * @throws EasyPostException when the request fails. + */ + public CustomsItem create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("customs_item", params); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(CustomsItem.class), + wrappedParams, CustomsItem.class, client); + } + + /** + * Retrieve a CustomsItem from the API. + * + * @param id The ID of the CustomsItem to retrieve. + * @return CustomsItem object. + * @throws EasyPostException when the request fails. + */ + public CustomsItem retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(CustomsItem.class, id), + null, CustomsItem.class, client); + } +} diff --git a/src/main/java/com/easypost/service/EasyPostClient.java b/src/main/java/com/easypost/service/EasyPostClient.java new file mode 100644 index 000000000..119b428b3 --- /dev/null +++ b/src/main/java/com/easypost/service/EasyPostClient.java @@ -0,0 +1,185 @@ +package com.easypost.service; + +import com.easypost.exception.Constants; +import com.easypost.exception.General.MissingParameterError; +import com.easypost.http.Constant; + +public class EasyPostClient { + private final int connectTimeoutMilliseconds; + private final int readTimeoutMilliseconds; + private final String apiKey; + private final String apiVersion = "v2"; + private String apiBase; + public final AddressService address; + public final ApiKeyService apikeys; + public final BatchService batch; + public final BillingService billing; + public final CarrierAccountService carrierAccount; + public final CarrierTypeService carrierType; + public final CustomsInfoService customsInfo; + public final CustomsItemService customsItem; + public final EndShipperService endShipper; + public final EventService event; + public final InsuranceService insurance; + public final OrderService order; + public final ParcelService parcel; + public final PaymentMethodService paymentMethod; + public final PickupService pickup; + public final RateService rate; + public final ReferralCustomerService referralCustomer; + public final RefundService refund; + public final ReportService report; + public final ScanformService scanform; + public final ShipmentService shipment; + public final TrackerService tracker; + public final UserService user; + public final WebhookService webhook; + + /** + * EasyPostClient constructor. + * + * @param apiKey API key for API calls. + * @throws MissingParameterError + */ + public EasyPostClient(String apiKey) throws MissingParameterError { + this(apiKey, Constant.DEFAULT_CONNECT_TIMEOUT_MILLISECONDS); + } + + /** + * EasyPostClient constructor. + * + * @param apiKey API key for API calls. + * @param apiBase API base for API calls. + * @throws MissingParameterError + */ + public EasyPostClient(String apiKey, String apiBase) throws MissingParameterError { + this(apiKey, Constant.DEFAULT_CONNECT_TIMEOUT_MILLISECONDS, Constant.DEFAULT_READ_TIMEOUT_MILLISECONDS, + apiBase); + } + + /** + * EasyPostClient constructor. + * + * @param apiKey API key for API calls. + * @param connectTimeoutMilliseconds Timeout for connection. + * @throws MissingParameterError + */ + public EasyPostClient(String apiKey, int connectTimeoutMilliseconds) throws MissingParameterError { + this(apiKey, connectTimeoutMilliseconds, Constant.DEFAULT_READ_TIMEOUT_MILLISECONDS, Constant.API_BASE); + } + + /** + * EasyPostClient constructor. + * + * @param apiKey API key for API calls. + * @param connectTimeoutMilliseconds Timeout for connection. + * @param apiBase API base for API calls. + * @throws MissingParameterError + */ + public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, String apiBase) throws MissingParameterError { + this(apiKey, connectTimeoutMilliseconds, Constant.DEFAULT_READ_TIMEOUT_MILLISECONDS, apiBase); + } + + /** + * EasyPostClient constructor. + * + * @param apiKey API key for API calls. + * @param connectTimeoutMilliseconds Timeout for connection. + * @param readTimeoutMilliseconds Timeout for read. + * @throws MissingParameterError + */ + public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTimeoutMilliseconds) + throws MissingParameterError { + this(apiKey, connectTimeoutMilliseconds, readTimeoutMilliseconds, Constant.API_BASE); + } + + /** + * EasyPostClient constructor. + * + * @param apiKey API key for API calls. + * @param connectTimeoutMilliseconds Timeout for connection. + * @param readTimeoutMilliseconds Timeout for read. + * @param apiBase API base for API calls. + * @throws MissingParameterError + */ + public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTimeoutMilliseconds, String apiBase) + throws MissingParameterError { + if (apiKey == null || apiKey.isEmpty()) { + throw new MissingParameterError(Constants.INVALID_API_KEY_TYPE); + } + + this.apiBase = apiBase; + this.apiKey = apiKey; + this.connectTimeoutMilliseconds = connectTimeoutMilliseconds; + this.readTimeoutMilliseconds = readTimeoutMilliseconds; + this.address = new AddressService(this); + this.apikeys = new ApiKeyService(this); + this.batch = new BatchService(this); + this.billing = new BillingService(this); + this.carrierAccount = new CarrierAccountService(this); + this.carrierType = new CarrierTypeService(this); + this.customsInfo = new CustomsInfoService(this); + this.customsItem = new CustomsItemService(this); + this.endShipper = new EndShipperService(this); + this.event = new EventService(this); + this.insurance = new InsuranceService(this); + this.order = new OrderService(this); + this.parcel = new ParcelService(this); + this.paymentMethod = new PaymentMethodService(this); + this.pickup = new PickupService(this); + this.rate = new RateService(this); + this.referralCustomer = new ReferralCustomerService(this); + this.refund = new RefundService(this); + this.report = new ReportService(this); + this.scanform = new ScanformService(this); + this.shipment = new ShipmentService(this); + this.tracker = new TrackerService(this); + this.user = new UserService(this); + this.webhook = new WebhookService(this); + } + + /** + * Get connection timeout milliseconds for this EasyPostClient object. + * + * @return the connection timeout for this EasyPostClient object + */ + public int getConnectionTimeoutMilliseconds() { + return connectTimeoutMilliseconds; + } + + /** + * Get read timeout milliseconds for this EasyPostClient object. + * + * @return the read timeout for this EasyPostClient object + */ + public int getReadTimeoutMilliseconds() { + return readTimeoutMilliseconds; + } + + /** + * Get API key for this EasyPostClient object. + * + * @return the API key for this EasyPostClient object + */ + public String getApiKey() { + return apiKey; + } + + /** + * Get API version for this EasyPostClient object. + * + * @return the API version for this EasyPostClient object. + */ + public String getApiVersion() { + return apiVersion; + } + + /** + * Get API base for this EasyPostClient object. + * + * @return the API base for this EasyPostClient object. + */ + public String getApiBase() { + return apiBase; + } +} diff --git a/src/main/java/com/easypost/service/EndShipperService.java b/src/main/java/com/easypost/service/EndShipperService.java new file mode 100644 index 000000000..483233707 --- /dev/null +++ b/src/main/java/com/easypost/service/EndShipperService.java @@ -0,0 +1,85 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.EndShipper; +import com.easypost.model.EndShipperCollection; +import com.easypost.utils.Utilities; + +import java.util.HashMap; +import java.util.Map; + +public class EndShipperService { + private final EasyPostClient client; + + /** + * EndShipperService constructor. + * + * @param client The client object. + */ + EndShipperService(EasyPostClient client) { + this.client = client; + } + + /** + * Create EndShipper object from parameter map. + * + * @param params Map of EndShipper parameters. + * @return EndShipper object. + * @throws EasyPostException when the request fails. + */ + public EndShipper create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + + wrappedParams.put("address", params); + + String url = String.format("%s/%s/%s", client.getApiBase(), client.getApiVersion(), "end_shippers"); + + return Requestor.request(RequestMethod.POST, url, wrappedParams, EndShipper.class, client); + } + + /** + * Retrieve EndShipper object from API. + * + * @param id ID of EndShipper to retrieve. + * @return EndShipper object. + * @throws EasyPostException when the request fails. + */ + public EndShipper retrieve(final String id) throws EasyPostException { + String url = String.format("%s/%s/%s/%s", client.getApiBase(), client.getApiVersion(), "end_shippers", id); + + return Requestor.request(RequestMethod.GET, url, null, EndShipper.class, client); + } + + /** + * List all EndShipper objects. + * + * @param params Map of parameters. + * @return EndShipperCollection object. + * @throws EasyPostException when the request fails. + */ + public EndShipperCollection all(final Map params) + throws EasyPostException { + return Requestor.request(RequestMethod.GET, + Utilities.classURL(EndShipper.class), params, EndShipperCollection.class, client); + } + + /** + * Update an EndShipper object. + * + * @param params Map of parameters. + * @param id The ID of endshipper. + * @return EndShipper object. + * @throws EasyPostException when the request fails. + */ + public EndShipper update(final Map params, final String id) throws EasyPostException { + Map wrappedParams = new HashMap(); + + wrappedParams.put("address", params); + + String url = String.format("%s/%s/%s/%s", client.getApiBase(), client.getApiVersion(), "end_shippers", id); + + return Requestor.request(RequestMethod.PUT, url, wrappedParams, EndShipper.class, client); + } +} diff --git a/src/main/java/com/easypost/service/EventService.java b/src/main/java/com/easypost/service/EventService.java new file mode 100644 index 000000000..56e5029a8 --- /dev/null +++ b/src/main/java/com/easypost/service/EventService.java @@ -0,0 +1,46 @@ +package com.easypost.service; + +import java.util.Map; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Event; +import com.easypost.model.EventCollection; +import com.easypost.utils.Utilities; + +public class EventService { + private final EasyPostClient client; + + /** + * EventService constructor. + * + * @param client The client object. + */ + EventService(EasyPostClient client) { + this.client = client; + } + + /** + * Retrieve a Event from the API. + * + * @param id ID of the Event to retrieve + * @return Event object + * @throws EasyPostException when the request fails. + */ + public Event retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Event.class, id), null, Event.class, client); + } + + /** + * Get a list of Events. + * + * @param params A map of parameters to pass to the API. + * @return EventCollection object + * @throws EasyPostException when the request fails. + */ + public EventCollection all(final Map params) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.classURL(Event.class), params, EventCollection.class, + client); + } +} diff --git a/src/main/java/com/easypost/service/InsuranceService.java b/src/main/java/com/easypost/service/InsuranceService.java new file mode 100644 index 000000000..dd04d34e3 --- /dev/null +++ b/src/main/java/com/easypost/service/InsuranceService.java @@ -0,0 +1,89 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Insurance; +import com.easypost.model.InsuranceCollection; +import com.easypost.utils.Utilities; + +import java.util.HashMap; +import java.util.Map; + +public class InsuranceService { + private final EasyPostClient client; + + /** + * InsuranceService constructor. + * + * @param client The client object. + */ + InsuranceService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a new Insurance object from a map of parameters. + * + * @param params Map of parameters. + * @return Insurance object + * @throws EasyPostException when the request fails. + */ + public Insurance create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("insurance", params); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(Insurance.class), wrappedParams, + Insurance.class, client); + } + + /** + * Retrieve an Insurance from the API. + * + * @param id The ID of the Insurance to retrieve. + * @return Insurance object + * @throws EasyPostException when the request fails. + */ + public Insurance retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Insurance.class, id), null, Insurance.class, + client); + } + + /** + * Get a list of Insurances. + * + * @param params a map of parameters + * @return InsuranceCollection object + * @throws EasyPostException when the request fails. + */ + public InsuranceCollection all(final Map params) + throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.classURL(Insurance.class), + params, InsuranceCollection.class, client); + } + + /** + * Refresh this Insurance. + * + * @param id The ID of insurance. + * @return Insurance object + * @throws EasyPostException when the request fails. + */ + public Insurance refresh(final String id) throws EasyPostException { + return this.refresh(id, null); + } + + /** + * Refresh this Insurance. + * + * @param params Map of parameters. + * @param id The ID of insurance. + * @return Insurance object + * @throws EasyPostException when the request fails. + */ + public Insurance refresh(final String id, final Map params) throws EasyPostException { + return Requestor.request(RequestMethod.GET, + String.format("%s", Utilities.instanceURL(Insurance.class, id)), params, Insurance.class, + client); + } +} diff --git a/src/main/java/com/easypost/service/OrderService.java b/src/main/java/com/easypost/service/OrderService.java new file mode 100644 index 000000000..6453c8801 --- /dev/null +++ b/src/main/java/com/easypost/service/OrderService.java @@ -0,0 +1,166 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Order; +import com.easypost.model.Rate; +import com.easypost.utils.Utilities; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class OrderService { + private final EasyPostClient client; + + /** + * OrderService constructor. + * + * @param client The client object. + */ + OrderService(EasyPostClient client) { + this.client = client; + } + + /** + * Create an Order object from a map of paramters. + * + * @param params Map of parameters. + * @return Order object. + * @throws EasyPostException when the request fails. + */ + public Order create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("order", params); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(Order.class), wrappedParams, Order.class, + client); + } + + /** + * Retrieve an Order object from the API. + * + * @param id ID of the Order to retrieve. + * @return Order object. + * @throws EasyPostException when the request fails. + */ + public Order retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Order.class, id), null, Order.class, client); + } + + /** + * Refresh this Order object. + * + * @param id The ID of order. + * @return Order object. + * @throws EasyPostException when the request fails. + */ + public Order refresh(final String id) throws EasyPostException { + return this.refresh(id, null); + } + + /** + * Refresh this Order object. + * + * @param id The ID of order. + * @param params Map of parameters. + * @return Order object. + * @throws EasyPostException when the request fails. + */ + public Order refresh(final String id, final Map params) throws EasyPostException { + return Requestor.request(RequestMethod.GET, + String.format("%s", Utilities.instanceURL(Order.class, id)), params, + Order.class, client); + } + + /** + * Get new rates for this Order. + * + * @param id The ID of order. + * @return Order object. + * @throws EasyPostException when the request fails. + */ + public Order newRates(final String id) throws EasyPostException { + return this.newRates(id, null); + } + + /** + * Get new rates for this Order. + * + * @param id The ID of order. + * @param params Map of parameters. + * @return Order object. + * @throws EasyPostException when the request fails. + */ + public Order newRates(final String id, final Map params) throws EasyPostException { + return Requestor.request(RequestMethod.GET, String.format("%s/rates", + Utilities.instanceURL(Order.class, id)), params, Order.class, client); + } + + /** + * Buy this Order. + * + * @param id The ID of order. + * @param params Map of parameters. + * @return Order object. + * @throws EasyPostException when the request fails. + */ + public Order buy(final String id, final Map params) throws EasyPostException { + return Requestor.request(RequestMethod.POST, String.format("%s/buy", + Utilities.instanceURL(Order.class, id)), params, Order.class, client); + } + + /** + * Buy this Order. + * + * @param id The ID of order. + * @param rate Rate to buy. + * @return Order object. + * @throws EasyPostException when the request fails. + */ + public Order buy(final String id, final Rate rate) throws EasyPostException { + Map params = new HashMap(); + params.put("carrier", rate.getCarrier()); + params.put("service", rate.getService()); + + return this.buy(id, params); + } + + /** + * Get the lowest rate for this Order. + * + * @param order The order object. + * @return Lowest Rate object + * @throws EasyPostException when the request fails. + */ + public Rate lowestRate(final Order order) throws EasyPostException { + return this.lowestRate(null, null, order); + } + + /** + * Get the lowest rate for this Order. + * + * @param carriers The carriers to use in the filter. + * @param services The services to use in the filter. + * @param order The order object. + * @return Lowest Rate object + * @throws EasyPostException when the request fails. + */ + public Rate lowestRate(final List carriers, final List services, final Order order) + throws EasyPostException { + return Utilities.getLowestObjectRate(order.getRates(), carriers, services); + } + + /** + * Get the lowest rate for this order. + * + * @param carriers The carriers to use in the query. + * @param order The order object. + * @return Rate object + * @throws EasyPostException when the request fails. + */ + public Rate lowestRate(final List carriers, final Order order) throws EasyPostException { + return this.lowestRate(carriers, null, order); + } +} diff --git a/src/main/java/com/easypost/service/ParcelService.java b/src/main/java/com/easypost/service/ParcelService.java new file mode 100644 index 000000000..da74ba90c --- /dev/null +++ b/src/main/java/com/easypost/service/ParcelService.java @@ -0,0 +1,50 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Parcel; +import com.easypost.utils.Utilities; + +import java.util.HashMap; +import java.util.Map; + +public class ParcelService { + private final EasyPostClient client; + + /** + * ParcelService constructor. + * + * @param client The client object. + */ + ParcelService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a Parcel from a map of parameters. + * + * @param params The map of the parameters to create a Parcel from. + * @return Parcel object. + * @throws EasyPostException when the request fails. + */ + public Parcel create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("parcel", params); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(Parcel.class), wrappedParams, Parcel.class, + client); + } + + /** + * Retrieve a Parcel from the API. + * + * @param id The ID of the Parcel to retrieve. + * @return Parcel object. + * @throws EasyPostException when the request fails. + */ + public Parcel retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Parcel.class, id), null, Parcel.class, + client); + } +} diff --git a/src/main/java/com/easypost/service/PaymentMethodService.java b/src/main/java/com/easypost/service/PaymentMethodService.java new file mode 100644 index 000000000..a9e5832d4 --- /dev/null +++ b/src/main/java/com/easypost/service/PaymentMethodService.java @@ -0,0 +1,42 @@ +package com.easypost.service; + +import com.easypost.exception.Constants; +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.InvalidObjectError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.PaymentMethod; + +public class PaymentMethodService { + private final EasyPostClient client; + + /** + * PaymentMethodService constructor. + * + * @param client The client object. + */ + PaymentMethodService(EasyPostClient client) { + this.client = client; + } + + /** + * List all payment methods. + * + * @return Billing object. + * @throws EasyPostException when the request fails. + * @deprecated Use {@link com.easypost.service.BillingService#retrievePaymentMethods()} instead. + * Deprecated: v5.5.0 - v7.0.0 + */ + @Deprecated + public PaymentMethod all() throws EasyPostException { + String url = String.format("%s/%s", client.getApiBase(), "payment_methods"); + PaymentMethod response = + Requestor.request(RequestMethod.GET, url, null, PaymentMethod.class, client); + + if (response.getId() == null) { + throw new InvalidObjectError(Constants.NO_PAYMENT_METHODS); + } + + return response; + } +} diff --git a/src/main/java/com/easypost/service/PickupService.java b/src/main/java/com/easypost/service/PickupService.java new file mode 100644 index 000000000..50300314c --- /dev/null +++ b/src/main/java/com/easypost/service/PickupService.java @@ -0,0 +1,188 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Pickup; +import com.easypost.model.PickupRate; +import com.easypost.model.Rate; +import com.easypost.utils.Utilities; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class PickupService { + private final EasyPostClient client; + + /** + * PickupService constructor. + * + * @param client The client object. + */ + PickupService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a new Pickup object from a map of parameters. + * + * @param params Map of parameters. + * @return Pickup object. + * @throws EasyPostException when the request fails. + */ + public Pickup create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("pickup", params); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(Pickup.class), wrappedParams, Pickup.class, + client); + } + + /** + * Retrieve a Pickup from the API. + * + * @param id ID of Pickup to retrieve. + * @return Pickup object. + * @throws EasyPostException when the request fails. + */ + public Pickup retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Pickup.class, id), null, Pickup.class, + client); + } + + /** + * Refresh this Pickup. + * + * @param id The ID of pickup. + * @return Pickup object. + * @throws EasyPostException when the request fails. + */ + public Pickup refresh(final String id) throws EasyPostException { + return this.refresh(id, null); + } + + /** + * Refresh this Pickup. + * + * @param params Map of parameters. + * @param id The ID of pickup. + * @return Pickup object. + * @throws EasyPostException when the request fails. + */ + public Pickup refresh(final String id, final Map params) throws EasyPostException { + String url = String.format("%s", Utilities.instanceURL(Pickup.class, id)); + + return Requestor.request(RequestMethod.GET, url, params, Pickup.class, client); + } + + /** + * Buy this Pickup. + * + * @param id The ID of pickup. + * @return Pickup object. + * @throws EasyPostException when the request fails. + */ + public Pickup buy(final String id) throws EasyPostException { + // Pass in empty map to avoid method ambiguous. + return this.buy(id, new HashMap()); + } + + /** + * Buy this Pickup. + * + * @param id The ID of pickup. + * @param params Map of parameters. + * @return Pickup object. + * @throws EasyPostException when the request fails. + */ + public Pickup buy(final String id, final Map params) throws EasyPostException { + String url = String.format("%s/buy", Utilities.instanceURL(Pickup.class, id)); + + return Requestor.request(RequestMethod.POST, url, params, Pickup.class, client); + } + + /** + * Buy this Pickup. + * + * @param id The ID of pickup. + * @param pickupRate PickupRate to buy. + * @return Pickup object. + * @throws EasyPostException when the request fails. + */ + public Pickup buy(final String id, final PickupRate pickupRate) throws EasyPostException { + Map params = new HashMap(); + params.put("rate", pickupRate); + + return this.buy(id, params); + } + + /** + * Cancel this Pickup. + * + * @param id The ID of pickup. + * @return Pickup object. + * @throws EasyPostException when the request fails. + */ + public Pickup cancel(final String id) throws EasyPostException { + return this.cancel(id, null); + } + + /** + * Cancel this Pickup. + * + * @param id The ID of pickup. + * @param params Map of parameters. + * @return Pickup object. + * @throws EasyPostException when the request fails. + */ + public Pickup cancel(final String id, final Map params) throws EasyPostException { + String url = String.format("%s/cancel", Utilities.instanceURL(Pickup.class, id)); + + return Requestor.request(RequestMethod.POST, url, params, Pickup.class, client); + } + + /** + * Get the lowest rate for this Pickup. + * + * @param pickup The pickup object. + * @return lowest PickupRate object + * @throws EasyPostException when the request fails. + */ + public PickupRate lowestRate(final Pickup pickup) throws EasyPostException { + return this.lowestRate(null, null, pickup); + } + + /** + * Get the lowest rate for this Pickup. + * + * @param carriers The carriers to use in the filter. + * @param services The services to use in the filter. + * @param pickup The pickup object. + * @return lowest PickupRate object + * @throws EasyPostException when the request fails. + */ + public PickupRate lowestRate(final List carriers, final List services, final Pickup pickup) + throws EasyPostException { + List rates = new ArrayList(); + + for (PickupRate rate : pickup.getPickoutRates()) { + rates.add((Rate) rate); + } + + return (PickupRate) Utilities.getLowestObjectRate(rates, carriers, services); + } + + /** + * Get the lowest rate for this pickup. + * + * @param carriers The carriers to use in the query. + * @param pickup The pickup object. + * @return PickupRate object + * @throws EasyPostException when the request fails. + */ + public PickupRate lowestRate(final List carriers, final Pickup pickup) throws EasyPostException { + return this.lowestRate(carriers, null, pickup); + } +} diff --git a/src/main/java/com/easypost/service/RateService.java b/src/main/java/com/easypost/service/RateService.java new file mode 100644 index 000000000..62f02b99a --- /dev/null +++ b/src/main/java/com/easypost/service/RateService.java @@ -0,0 +1,35 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Rate; +import com.easypost.utils.Utilities; + +public class RateService { + private final EasyPostClient client; + + /** + * RateService constructor. + * + * @param client The client object. + */ + RateService(EasyPostClient client) { + this.client = client; + } + + /** + * Retrieve a Rate from the API. + * + * @param id ID of the Rate to retrieve. + * @return Rate object. + * @throws EasyPostException when the request fails. + */ + public Rate retrieve(final String id) throws EasyPostException { + Rate response; + response = Requestor.request(RequestMethod.GET, Utilities.instanceURL(Rate.class, id), null, Rate.class, + client); + + return response; + } +} diff --git a/src/main/java/com/easypost/service/ReferralCustomerService.java b/src/main/java/com/easypost/service/ReferralCustomerService.java new file mode 100644 index 000000000..83c7bf42a --- /dev/null +++ b/src/main/java/com/easypost/service/ReferralCustomerService.java @@ -0,0 +1,233 @@ +package com.easypost.service; + +import com.easypost.exception.Constants; +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.ExternalApiError; +import com.easypost.http.Constant; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.PaymentMethod; +import com.easypost.model.PaymentMethodObject; +import com.easypost.model.ReferralCustomer; +import com.easypost.model.ReferralCustomerCollection; +import com.easypost.utils.Utilities; + +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +public class ReferralCustomerService { + private final EasyPostClient client; + + /** + * ReferralCustomerService constructor. + * + * @param client The client object. + */ + ReferralCustomerService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a Referral Customer object from parameter map. This function requires + * the Partner User's API key. + * + * @param params Map of the referral user parameters. + * @return Referral object. + * @throws EasyPostException when the request fails. + */ + public ReferralCustomer create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap<>(); + wrappedParams.put("user", params); + + String url = String.format("%s/%s/%s", client.getApiBase(), client.getApiVersion(), "referral_customers"); + + return Requestor.request(RequestMethod.POST, url, wrappedParams, ReferralCustomer.class, client); + } + + /** + * Update a Referral object email. This function requires the Partner User's API + * key. + * + * @param email Email of the referral user to update. + * @param userId ID of the referral user to update. + * @throws EasyPostException when the request fails. + */ + public void updateEmail(final String email, final String userId) throws EasyPostException { + Map wrappedParams = new HashMap<>(); + Map params = new HashMap<>(); + params.put("email", email); + wrappedParams.put("user", params); + + String url = String.format("%s/%s/%s/%s", client.getApiBase(), client.getApiVersion(), "referral_customers", + userId); + + Requestor.request(RequestMethod.PUT, url, wrappedParams, ReferralCustomer.class, client); + } + + /** + * List all Referral objects. This function requires the Partner User's API key. + * + * @param params Map of parameters. + * @return ReferralCustomerCollection object. + * @throws EasyPostException when the request fails. + */ + public ReferralCustomerCollection all(final Map params) + throws EasyPostException { + String url = String.format("%s/%s/%s", client.getApiBase(), client.getApiVersion(), "referral_customers"); + + return Requestor.request(RequestMethod.GET, url, params, ReferralCustomerCollection.class, client); + } + + /** + * Add credit card to a referral user. This function requires the Referral + * User's API key. + * + * @param referralApiKey API key of the referral user. + * @param number Credit card number. + * @param expirationMonth Expiration month of the credit card. + * @param expirationYear Expiration year of the credit card. + * @param cvc CVC of the credit card. + * @return PaymentMethodObject object. + * @throws Exception when the request fails. + */ + public PaymentMethodObject addCreditCardToUser(final String referralApiKey, final String number, + final int expirationMonth, + final int expirationYear, final String cvc) throws Exception { + return addCreditCardToUser(referralApiKey, number, expirationMonth, expirationYear, cvc, + PaymentMethod.Priority.PRIMARY); + } + + /** + * Add credit card to a referral user. This function requires the Referral + * User's API key. + * + * @param referralApiKey API key of the referral user. + * @param number Credit card number. + * @param expirationMonth Expiration month of the credit card. + * @param expirationYear Expiration year of the credit card. + * @param cvc CVC of the credit card. + * @param priority Priority of this credit card. + * @return PaymentMethodObject object. + * @throws Exception when the request fails. + */ + public PaymentMethodObject addCreditCardToUser(final String referralApiKey, final String number, + final int expirationMonth, + final int expirationYear, final String cvc, + final PaymentMethod.Priority priority) throws Exception { + String easypostStripeApiKey = retrieveEasypostStripeApiKey(); + String stripeToken; + + try { + stripeToken = createStripeToken(number, expirationMonth, expirationYear, cvc, easypostStripeApiKey); + } catch (Exception e) { + throw new ExternalApiError(String.format(Constants.EXTERNAL_API_CALL_FAILED, "Stripe")); + } + + return createEasypostCreditCard(referralApiKey, stripeToken, priority.toString().toLowerCase()); + } + + /** + * Retrieve EasyPost Stripe API key. + * + * @return EasyPost Stripe API key. + * @throws EasyPostException when the request fails. + */ + private String retrieveEasypostStripeApiKey() throws EasyPostException { + String url = String.format("%s/%s/%s", client.getApiBase(), client.getApiVersion(), + "partners/stripe_public_key"); + @SuppressWarnings("unchecked") + Map response = Requestor.request(RequestMethod.GET, url, null, Map.class, client); + + return response.getOrDefault("public_key", ""); + } + + /** + * Get credit card token from Stripe. + * + * @param number Credit card number. + * @param expirationMonth Expiration month of the credit card. + * @param expirationYear Expiration year of the credit card. + * @param cvc CVC of the credit card. + * @param easypostStripeApiKey EasyPost Stripe API key. + * @return Stripe token. + * @throws Exception when the request fails. + */ + private static String createStripeToken(final String number, final int expirationMonth, final int expirationYear, + final String cvc, + final String easypostStripeApiKey) throws Exception { + Map params = new HashMap<>(); + params.put("number", number); + params.put("exp_month", String.valueOf(expirationMonth)); + params.put("exp_year", String.valueOf(expirationYear)); + params.put("cvc", cvc); + + URL stripeUrl = new URL("https://api.stripe.com/v1/tokens"); + HttpURLConnection conn = (HttpURLConnection) stripeUrl.openConnection(); + String apiToken = String.format("%s %s", "Bearer", easypostStripeApiKey); + + conn.setRequestMethod("POST"); + conn.setRequestProperty("Authorization", apiToken); + conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + conn.setDoOutput(true); + + String encodedURL = Utilities.getEncodedURL(params, "card"); + byte[] postData = encodedURL.getBytes(StandardCharsets.UTF_8); + + try (DataOutputStream wr = new DataOutputStream(conn.getOutputStream())) { + wr.write(postData); + } + + StringBuilder response; + + try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) { + + String line; + response = new StringBuilder(); + + while ((line = br.readLine()) != null) { + response.append(line); + response.append(System.lineSeparator()); + } + br.close(); + } finally { + conn.disconnect(); + } + + String responseBody = response.toString(); + + @SuppressWarnings("unchecked") + Map responseMap = Constant.GSON.fromJson(responseBody, Map.class); + + return responseMap.get("id").toString(); + } + + /** + * Submit Stripe credit card token to EasyPost. + * + * @param referralApiKey API key of the referral user. + * @param stripeObjectId Stripe token. + * @param priority Credit card priority. + * @return CreditCard object. + * @throws EasyPostException when the request fails. + */ + private PaymentMethodObject createEasypostCreditCard(final String referralApiKey, final String stripeObjectId, + final String priority) throws EasyPostException { + Map params = new HashMap<>(); + params.put("stripe_object_id", stripeObjectId); + params.put("priority", priority); + + Map wrappedParams = new HashMap<>(); + wrappedParams.put("credit_card", params); + + EasyPostClient referralClient = new EasyPostClient(referralApiKey); + String url = String.format("%s/%s/%s", client.getApiBase(), client.getApiVersion(), "credit_cards"); + + return Requestor.request(RequestMethod.POST, url, wrappedParams, PaymentMethodObject.class, referralClient); + } +} diff --git a/src/main/java/com/easypost/service/RefundService.java b/src/main/java/com/easypost/service/RefundService.java new file mode 100644 index 000000000..692882841 --- /dev/null +++ b/src/main/java/com/easypost/service/RefundService.java @@ -0,0 +1,67 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Refund; +import com.easypost.model.RefundCollection; +import com.easypost.utils.Utilities; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class RefundService { + private final EasyPostClient client; + + /** + * RefundService constructor. + * + * @param client The client object. + */ + RefundService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a Refund object from a map of parameters. + * + * @param params Map of parameters + * @return Refund object + * @throws EasyPostException when the request fails. + */ + public List create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("refund", params); + + Refund[] response = Requestor.request(RequestMethod.POST, Utilities.classURL(Refund.class), + wrappedParams, Refund[].class, client); + + return Arrays.asList(response); + } + + /** + * Retrieve a Refund object from the API. + * + * @param id ID of refund to retrieve + * @return Refund object + * @throws EasyPostException when the request fails. + */ + public Refund retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Refund.class, id), null, Refund.class, + client); + } + + /** + * List all Refunds objects. + * + * @param params Map of parameters + * @return RefundCollection object + * @throws EasyPostException when the request fails. + */ + public RefundCollection all(final Map params) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.classURL(Refund.class), params, RefundCollection.class, + client); + } +} diff --git a/src/main/java/com/easypost/service/ReportService.java b/src/main/java/com/easypost/service/ReportService.java new file mode 100644 index 000000000..6a3926a19 --- /dev/null +++ b/src/main/java/com/easypost/service/ReportService.java @@ -0,0 +1,86 @@ +package com.easypost.service; + +import com.easypost.exception.Constants; +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.InvalidObjectError; +import com.easypost.exception.General.InvalidParameterError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Report; +import com.easypost.model.ReportCollection; +import com.easypost.utils.Utilities; + +import java.net.URLEncoder; +import java.util.HashMap; +import java.util.Map; + +public class ReportService { + private final EasyPostClient client; + + /** + * ReportService constructor. + * + * @param client The client object. + */ + ReportService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a Report from a map of parameters. + * + * @param params a map of parameters. + * @return Report object. + * @throws EasyPostException when the request fails. + */ + public Report create(final Map params) throws EasyPostException { + if (params.containsKey("type")) { + HashMap paramsWithoutType = new HashMap<>(params); + paramsWithoutType.remove("type"); + return Requestor.request(RequestMethod.POST, + reportURL((String) params.get("type")), paramsWithoutType, Report.class, client); + } else { + throw new InvalidObjectError(String.format(Constants.MISSING_REQUIRED_PARAMETER, "type")); + } + } + + /** + * Generate a report URL. + * + * @param type the type of report to generate. + * @return the URL to generate the report. + * @throws EasyPostException when the request fails. + */ + protected String reportURL(final String type) throws EasyPostException { + try { + String urlType = URLEncoder.encode(type, "UTF-8").toLowerCase(); + return String.format("%s/%s/reports/%s/", client.getApiBase(), client.getApiVersion(), urlType); + } catch (java.io.UnsupportedEncodingException e) { + throw new InvalidParameterError(String.format(Constants.ENCODED_ERROR, "report type"), e); + } + } + + /** + * Retrieve a Report from the API. + * + * @param id the ID of the Report to retrieve. + * @return Report object. + * @throws EasyPostException when the request fails. + */ + public Report retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Report.class, id), null, Report.class, + client); + } + + /** + * Get a list of Reports from the API. + * + * @param params a map of parameters. + * @return ReportCollection object. + * @throws EasyPostException when the request fails. + */ + public ReportCollection all(final Map params) throws EasyPostException { + String type = (String) params.get("type"); + return Requestor.request(RequestMethod.GET, reportURL(type), params, ReportCollection.class, client); + } +} diff --git a/src/main/java/com/easypost/service/ScanformService.java b/src/main/java/com/easypost/service/ScanformService.java new file mode 100644 index 000000000..027c7db8c --- /dev/null +++ b/src/main/java/com/easypost/service/ScanformService.java @@ -0,0 +1,60 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.ScanForm; +import com.easypost.model.ScanFormCollection; +import com.easypost.utils.Utilities; + +import java.util.Map; + +public class ScanformService { + private final EasyPostClient client; + + /** + * ScanformService constructor. + * + * @param client The client object. + */ + ScanformService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a ScanForm from a map of parameters. + * + * @param params the map of parameters. + * @return ScanForm object. + * @throws EasyPostException when the request fails. when the request fails. + */ + public ScanForm create(final Map params) throws EasyPostException { + return Requestor.request(RequestMethod.POST, Utilities.classURL(ScanForm.class), params, ScanForm.class, + client); + } + + /** + * Retrieve a ScanForm from the API. + * + * @param id the id of the ScanForm to retrieve. + * @return ScanForm object. + * @throws EasyPostException when the request fails. when the request fails. + */ + public ScanForm retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(ScanForm.class, id), null, ScanForm.class, + client); + } + + /** + * Get a list of ScanForms from the API. + * + * @param params the parameters to send to the API. + * @return ScanFormCollection object. + * @throws EasyPostException when the request fails. when the request fails. + */ + public ScanFormCollection all(final Map params) + throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.classURL(ScanForm.class), params, + ScanFormCollection.class, client); + } +} diff --git a/src/main/java/com/easypost/service/ShipmentService.java b/src/main/java/com/easypost/service/ShipmentService.java new file mode 100644 index 000000000..80b105521 --- /dev/null +++ b/src/main/java/com/easypost/service/ShipmentService.java @@ -0,0 +1,537 @@ +package com.easypost.service; + +import com.easypost.exception.Constants; +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.FilteringError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Rate; +import com.easypost.model.Shipment; +import com.easypost.model.ShipmentCollection; +import com.easypost.model.Smartrate; +import com.easypost.model.SmartrateAccuracy; +import com.easypost.model.SmartrateCollection; +import com.easypost.utils.Utilities; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ShipmentService { + private final EasyPostClient client; + + /** + * ShipmentService constructor. + * + * @param client The client object. + */ + ShipmentService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a new Shipment object from a map of parameters. + * + * @param params The map of parameters. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment create(final Map params) throws EasyPostException { + return this.create(params, false); + } + + /** + * Create a new Shipment object from a map of parameters. + * + * @param params The map of parameters. + * @param withCarbonOffset Whether to include a carbon offset when creating the + * shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment create(final Map params, boolean withCarbonOffset) + throws EasyPostException { + Map wrappedParams = new HashMap<>(); + wrappedParams.put("shipment", params); + wrappedParams.put("carbon_offset", withCarbonOffset); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(Shipment.class), wrappedParams, Shipment.class, + client); + } + + /** + * Retrieve a Shipment from the API. + * + * @param id The ID of the Shipment to retrieve. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Shipment.class, id), null, Shipment.class, + client); + } + + /** + * Get a list of all Shipment objects. + * + * @param params The options for the query. + * @return ShipmentCollection object + * @throws EasyPostException when the request fails. + */ + public ShipmentCollection all(final Map params) + throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.classURL(Shipment.class), params, + ShipmentCollection.class, client); + } + + /** + * Refresh this Shipment. + * + * @param id The ID of shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment refresh(String id) throws EasyPostException { + return this.refresh(id, null); + } + + /** + * Refresh this Shipment. + * + * @param id The ID of shipment. + * @param params The options for the query. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment refresh(final String id, final Map params) throws EasyPostException { + String url = String.format("%s", Utilities.instanceURL(Shipment.class, id)); + + return Requestor.request(RequestMethod.GET, url, params, Shipment.class, client); + } + + /** + * Get new rates for this Shipment. + * + * @param id The ID of shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment newRates(final String id) throws EasyPostException { + return this.newRates(id, new HashMap(), false); + } + + /** + * Get new rates for this Shipment. + * + * @param id The ID of shipment. + * @param withCarbonOffset Whether to include a carbon offset when re-rating the + * shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment newRates(final String id, final boolean withCarbonOffset) throws EasyPostException { + return this.newRates(id, new HashMap() { + }, withCarbonOffset); + } + + /** + * Get new rates for this Shipment. + * + * @param id The ID of shipment. + * @param params The options for the query. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment newRates(final String id, final Map params) throws EasyPostException { + return this.newRates(id, params, false); + } + + /** + * Get new rates for this Shipment. + * + * @param id The ID of shipment. + * @param params The options for the query. + * @param withCarbonOffset Whether to include a carbon offset when re-rating the + * shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment newRates(final String id, final Map params, final boolean withCarbonOffset) + throws EasyPostException { + params.put("carbon_offset", withCarbonOffset); + + String url = String.format("%s/rerate", Utilities.instanceURL(Shipment.class, id)); + + return Requestor.request(RequestMethod.POST, url, params, Shipment.class, client); + } + + /** + * Get Smartrates for this Shipment. + * + * @param params The options for the query. + * @param id The ID of shipment. + * @return List of Smartrate objects + * @throws EasyPostException when the request fails. + * @deprecated Use {@link #smartrates(Map, Shipment)} instead. + * Deprecated: v5.5.0 - v7.0.0 + */ + @Deprecated + public List getSmartrates(final Map params, final String id) + throws EasyPostException { + return this.smartrates(id, params); + } + + /** + * Get Smartrates for this Shipment. + * + * @param id The ID of shipment. + * @return List of Smartrate objects + * @throws EasyPostException when the request fails. + */ + public List smartrates(final String id) throws EasyPostException { + return this.smartrates(id, null); + } + + /** + * Get Smartrates for this Shipment. + * + * @param id The ID of shipment. + * @param params The options for the query. + * @return List of Smartrate objects + * @throws EasyPostException when the request fails. + */ + public List smartrates(final String id, final Map params) + throws EasyPostException { + String url = String.format("%s/smartrate", Utilities.instanceURL(Shipment.class, id)); + SmartrateCollection smartrateCollection = Requestor.request(RequestMethod.GET, url, params, + SmartrateCollection.class, client); + + return smartrateCollection.getSmartrates(); + } + + /** + * Buy this Shipment. + * + * @param id The ID of shipment. + * @param params The options for the query. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment buy(final String id, final Map params) throws EasyPostException { + return this.buy(id, params, false, null); + } + + /** + * Buy this Shipment. + * + * @param id The ID of shipment. + * @param rate The Rate to use for this Shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment buy(final String id, final Rate rate) throws EasyPostException { + Map params = new HashMap<>(); + params.put("rate", rate); + + return this.buy(id, params, false, null); + } + + /** + * Buy this Shipment. + * + * @param id The ID of shipment. + * @param rate The Rate to use for this Shipment. + * @param withCarbonOffset Whether to include a carbon offset when buying the + * shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment buy(final String id, final Rate rate, final boolean withCarbonOffset) + throws EasyPostException { + Map params = new HashMap<>(); + params.put("rate", rate); + + return this.buy(id, params, withCarbonOffset, null); + } + + /** + * Buy this Shipment. + * + * @param id The ID of shipment. + * @param rate The Rate to use for this Shipment. + * @param endShipperId The id of the end shipper to use for this purchase. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment buy(final String id, final Rate rate, final String endShipperId) throws EasyPostException { + Map params = new HashMap<>(); + params.put("rate", rate); + + return this.buy(id, params, false, endShipperId); + } + + /** + * Buy this Shipment. + * + * @param id The ID of shipment. + * @param params The options for the query. + * @param endShipperId The ID of the endshipper. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment buy(final String id, final Map params, final String endShipperId) + throws EasyPostException { + return this.buy(id, params, false, endShipperId); + } + + /** + * Buy this Shipment. + * + * @param id The ID of shipment. + * @param params The options for the query. + * @param withCarbonOffset Whether to include a carbon offset when buying the + * shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment buy(final String id, final Map params, final boolean withCarbonOffset) + throws EasyPostException { + return this.buy(id, params, withCarbonOffset, null); + } + + /** + * Buy this Shipment. + * + * @param id The ID of shipment. + * @param params The options for the query. + * @param withCarbonOffset Whether to include a carbon offset when buying the + * shipment. + * @param endShipperId The id of the end shipper to use for this purchase. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment buy(final String id, final Map params, final boolean withCarbonOffset, + final String endShipperId) throws EasyPostException { + params.put("carbon_offset", withCarbonOffset); + + if (endShipperId != null && !endShipperId.isEmpty()) { + params.put("end_shipper_id", endShipperId); + } + + String url = String.format("%s/buy", Utilities.instanceURL(Shipment.class, id)); + + return Requestor.request(RequestMethod.POST, url, params, Shipment.class, client); + } + + /** + * Refund this Shipment. + * + * @param id The ID of shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment refund(final String id) throws EasyPostException { + return this.refund(null, id); + } + + /** + * Refund this Shipment. + * + * @param params The options for the query. + * @param id The ID of shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment refund(final Map params, final String id) throws EasyPostException { + String url = String.format("%s/refund", Utilities.instanceURL(Shipment.class, id)); + + return Requestor.request(RequestMethod.POST, url, params, Shipment.class, client); + } + + /** + * Label this Shipment. + * + * @param id The ID of shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment label(final String id) throws EasyPostException { + return this.label(null, id); + } + + /** + * Label this Shipment. + * + * @param params The options for the query. + * @param id The ID of shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment label(final Map params, final String id) throws EasyPostException { + String url = String.format("%s/label", Utilities.instanceURL(Shipment.class, id)); + + return Requestor.request(RequestMethod.GET, url, params, Shipment.class, client); + } + + /** + * Insure this Shipment. + * + * @param id The ID of shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment insure(final String id) throws EasyPostException { + return this.insure(null, id); + } + + /** + * Insure this Shipment. + * + * @param params The options for the query. + * @param id The ID of shipment. + * @return Shipment object + * @throws EasyPostException when the request fails. + */ + public Shipment insure(final Map params, final String id) throws EasyPostException { + String url = String.format("%s/insure", Utilities.instanceURL(Shipment.class, id)); + + return Requestor.request(RequestMethod.POST, url, params, Shipment.class, client); + } + + /** + * Get the lowest smartrate for this Shipment. + * + * @param id The ID of shipment. + * @param deliveryDay Delivery days restriction to use when filtering. + * @param deliveryAccuracy Delivery days accuracy restriction to use when + * filtering. + * @return lowest Smartrate object + * @throws EasyPostException when the request fails. + * @deprecated use {@link #lowestSmartRate(int, SmartrateAccuracy, Shipment)} + * instead. + * Deprecated: v5.5.0 - v7.0.0 + */ + @Deprecated + public Smartrate lowestSmartRate(final String id, int deliveryDay, String deliveryAccuracy) + throws EasyPostException { + return this.lowestSmartRate(id, deliveryDay, SmartrateAccuracy.getByKeyName(deliveryAccuracy)); + } + + /** + * Get the lowest smartrate for this Shipment. + * + * @param id The ID of shipment. + * @param deliveryDay Delivery days restriction to use when filtering. + * @param deliveryAccuracy Delivery days accuracy restriction to use when + * filtering. + * @return lowest Smartrate object + * @throws EasyPostException when the request fails. + */ + public Smartrate lowestSmartRate(final String id, final int deliveryDay, SmartrateAccuracy deliveryAccuracy) + throws EasyPostException { + List smartrates = this.smartrates(id, null); + + Smartrate lowestSmartrate = findLowestSmartrate(smartrates, deliveryDay, deliveryAccuracy); + + return lowestSmartrate; + } + + /** + * Get Smartrates for this Shipment. + * + * @param id The ID of shipment. + * @return List of Smartrate objects + * @throws EasyPostException when the request fails. + * @deprecated Use {@link #smartrates(Shipment)} instead. + * Deprecated: v5.5.0 - v7.0.0 + */ + @Deprecated + public List getSmartrates(final String id) throws EasyPostException { + return this.smartrates(id, null); + } + + /** + * Get the lowest Smartrate from a list of Smartrates. + * + * @param smartrates List of Smartrates to filter from. + * @param deliveryDay Delivery days restriction to use when filtering. + * @param deliveryAccuracy Delivery days accuracy restriction to use when + * filtering. + * @return lowest Smartrate object + * @throws EasyPostException when the request fails. + * @deprecated Use {@link #findLowestSmartrate(List, int, SmartrateAccuracy)} + * instead. + * Deprecated: v5.5.0 - v7.0.0 + */ + @Deprecated + public Smartrate getLowestSmartRate(final List smartrates, int deliveryDay, + String deliveryAccuracy) throws EasyPostException { + return findLowestSmartrate(smartrates, deliveryDay, SmartrateAccuracy.getByKeyName(deliveryAccuracy)); + } + + /** + * Find the lowest Smartrate from a list of Smartrates. + * + * @param smartrates List of Smartrates to filter from. + * @param deliveryDay Delivery days restriction to use when filtering. + * @param deliveryAccuracy Delivery days accuracy restriction to use when + * filtering. + * @return lowest Smartrate object + * @throws EasyPostException when the request fails. + */ + public Smartrate findLowestSmartrate(final List smartrates, int deliveryDay, + SmartrateAccuracy deliveryAccuracy) throws EasyPostException { + Smartrate lowestSmartrate = null; + + for (Smartrate rate : smartrates) { + int smartrateDeliveryDay = rate.getTimeInTransit().getBySmartrateAccuracy(deliveryAccuracy); + + if (smartrateDeliveryDay > deliveryDay) { + continue; + } else if (lowestSmartrate == null || rate.getRate() < lowestSmartrate.getRate()) { + lowestSmartrate = rate; + } + } + + if (lowestSmartrate == null) { + throw new FilteringError(String.format(Constants.NO_OBJECT_FOUND, "rate")); + } + + return lowestSmartrate; + } + + /** + * Generate a form for this shipment. + * + * @param formType The form type for this shipment. + * @param id The ID of shipment. + * @return Return a shipment object. + * @throws EasyPostException when the request fails. + */ + public Shipment generateForm(final String formType, final String id) throws EasyPostException { + return this.generateForm(formType, null, id); + } + + /** + * Generate a form for this shipment. + * + * @param formType The form type for this shipment. + * @param formOptions The form options for this shipment. + * @param id The ID of shipment. + * @return Return a shipment object. + * @throws EasyPostException when the request fails. + */ + public Shipment generateForm(final String formType, final Map formOptions, final String id) + throws EasyPostException { + HashMap params = new HashMap<>(); + HashMap wrappedParams = new HashMap<>(); + + params.put("type", formType); + params.putAll(formOptions); + wrappedParams.put("form", params); + + String url = String.format("%s/forms", Utilities.instanceURL(Shipment.class, id)); + + return Requestor.request(RequestMethod.POST, url, wrappedParams, Shipment.class, client); + } +} diff --git a/src/main/java/com/easypost/service/TrackerService.java b/src/main/java/com/easypost/service/TrackerService.java new file mode 100644 index 000000000..f17dc7624 --- /dev/null +++ b/src/main/java/com/easypost/service/TrackerService.java @@ -0,0 +1,79 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Tracker; +import com.easypost.model.TrackerCollection; +import com.easypost.utils.Utilities; + +import java.util.HashMap; +import java.util.Map; + +public class TrackerService { + private final EasyPostClient client; + + /** + * TrackerService constructor. + * + * @param client The client object. + */ + TrackerService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a new Tracker object using a map of parameters. + * + * @param params Map of parameters used to create the Tracker. + * @return Tracker object. + * @throws EasyPostException when the request fails. + */ + public Tracker create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("tracker", params); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(Tracker.class), + wrappedParams, Tracker.class, client); + } + + /** + * Retrieve a Tracker object from the API. + * + * @param id ID of the Tracker to retrieve. + * @return Tracker object. + * @throws EasyPostException when the request fails. + */ + public Tracker retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Tracker.class, id), + null, Tracker.class, client); + } + + /** + * Get a list of all Tracker objects. + * + * @param params Map of parameters used to filter the list of Trackers. + * @return TrackerCollection object. + * @throws EasyPostException when the request fails. + */ + public TrackerCollection all(final Map params) + throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.classURL(Tracker.class), + params, TrackerCollection.class, client); + } + + /** + * Create a list of Trackers. + * + * @param params Map of parameters used to create the Trackers. + * @throws EasyPostException when the request fails. + */ + public void createList(final Map params) throws EasyPostException { + String createListUrl = String.format("%s/create_list", Utilities.classURL(Tracker.class)); + + Map newParams = new HashMap(); + newParams.put("trackers", params); + + Requestor.request(RequestMethod.POST, createListUrl, newParams, Object.class, client); + } +} diff --git a/src/main/java/com/easypost/service/UserService.java b/src/main/java/com/easypost/service/UserService.java new file mode 100644 index 000000000..b6c74c675 --- /dev/null +++ b/src/main/java/com/easypost/service/UserService.java @@ -0,0 +1,131 @@ +package com.easypost.service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import com.easypost.exception.Constants; +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.FilteringError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.ApiKey; +import com.easypost.model.ApiKeys; +import com.easypost.model.Brand; +import com.easypost.model.User; +import com.easypost.utils.Utilities; + +public class UserService { + private final EasyPostClient client; + + /** + * UserService constructor. + * + * @param client The client object. + */ + UserService(EasyPostClient client) { + this.client = client; + } + + /** + * Retrieve a User from the API. + * + * @param id The ID of the User to retrieve. + * @return User object. + * @throws EasyPostException when the request fails. + */ + public User retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(User.class, id), null, User.class, client); + } + + /** + * Retrieve your User from the API. + * + * @return User object. + * @throws EasyPostException when the request fails. + */ + public User retrieveMe() throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.classURL(User.class), null, User.class, client); + } + + /** + * Create a User object with a map of parameters. + * + * @param params Map of User parameters. + * @return User object. + * @throws EasyPostException when the request fails. + */ + public User create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("user", params); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(User.class), wrappedParams, User.class, client); + } + + /** + * Update this User. + * + * @param id The ID of user. + * @param params Map of User parameters. + * @return User object. + * @throws EasyPostException when the request fails. + */ + public User update(final String id, final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("user", params); + + return Requestor.request(RequestMethod.PUT, + Utilities.instanceURL(User.class, id), wrappedParams, User.class, client); + } + + /** + * Delete this User. + * + * @param id The ID of the user. + * @throws EasyPostException when the request fails. + */ + public void delete(final String id) throws EasyPostException { + Requestor.request(RequestMethod.DELETE, Utilities.instanceURL(User.class, id), + null, User.class, client); + } + + /** + * Get this User's API keys. + * + * @param id The ID of the user. + * @return List of ApiKey objects. + * @throws EasyPostException when the request fails. + */ + public List apiKeys(final String id) throws EasyPostException { + ApiKeys parentKeys = client.apikeys.all(); + + if (Objects.equals(id, parentKeys.getId())) { + return parentKeys.getKeys(); + } + + for (int i = 0; i < parentKeys.getChildren().size(); i++) { + if (id.equals(parentKeys.getChildren().get(i).getId())) { + return parentKeys.getChildren().get(i).getKeys(); + } + } + + throw new FilteringError(String.format(Constants.NO_OBJECT_FOUND, "API keys")); + } + + /** + * Update the user brand. + * + * @param id The ID of user. + * @param params Map of parameters. + * @return Brand object. + * @throws EasyPostException when the request fails. + */ + public Brand updateBrand(final String id, final Map params) throws EasyPostException { + String updateBrandUrl = String.format("%s/brand", Utilities.instanceURL(User.class, id)); + Map wrappedParams = new HashMap(); + wrappedParams.put("brand", params); + + return Requestor.request(RequestMethod.PUT, updateBrandUrl, wrappedParams, Brand.class, client); + } +} diff --git a/src/main/java/com/easypost/service/WebhookService.java b/src/main/java/com/easypost/service/WebhookService.java new file mode 100644 index 000000000..bf2044a09 --- /dev/null +++ b/src/main/java/com/easypost/service/WebhookService.java @@ -0,0 +1,161 @@ +package com.easypost.service; + +import com.easypost.exception.Constants; +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.SignatureVerificationError; +import com.easypost.http.Constant; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Event; +import com.easypost.model.Webhook; +import com.easypost.model.WebhookCollection; +import com.easypost.utils.Cryptography; +import com.easypost.utils.Utilities; + +import java.nio.charset.StandardCharsets; +import java.text.Normalizer; +import java.util.HashMap; +import java.util.Map; + +public class WebhookService { + private final EasyPostClient client; + + /** + * WebhookService constructor. + * + * @param client The client object. + */ + WebhookService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a Webhook object from a map of parameters. + * + * @param params the map of parameters + * @return Webhook object + * @throws EasyPostException when the request fails. + */ + public Webhook create(final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("webhook", params); + + return Requestor.request(RequestMethod.POST, Utilities.classURL(Webhook.class), + wrappedParams, Webhook.class, client); + } + + /** + * Retrieve a Webhook object from the API. + * + * @param id the ID of the Webhook to retrieve + * @return Webhook object + * @throws EasyPostException when the request fails. + */ + public Webhook retrieve(final String id) throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Webhook.class, id), + null, Webhook.class, client); + } + + /** + * Get a list of all Webhook objects. + * + * @return WebhookCollection object + * @throws EasyPostException when the request fails. + */ + public WebhookCollection all() throws EasyPostException { + return all(null); + } + + /** + * Get a list of all Webhook objects. + * + * @param params params for request + * @return WebhookCollection object + * @throws EasyPostException when the request fails. + */ + public WebhookCollection all(final Map params) + throws EasyPostException { + return Requestor.request(RequestMethod.GET, Utilities.classURL(Webhook.class), + params, WebhookCollection.class, client); + } + + /** + * Delete this Webhook. + * + * @param id The ID of webhook. + * @throws EasyPostException when the request fails. + */ + public void delete(final String id) throws EasyPostException { + Requestor.request(RequestMethod.DELETE, Utilities.instanceURL(Webhook.class, + id), null, Webhook.class, client); + } + + /** + * Update this webhook. + * + * @param id The ID of webhook. + * @return Webhook object + * @throws EasyPostException when the request fails. + */ + public Webhook update(final String id) throws EasyPostException { + Map params = new HashMap(); + return this.update(id, params); + } + + /** + * Update this webhook. + * + * @param id The ID of webhook. + * @param params Map of parameters + * @return Webhook object + * @throws EasyPostException when the request fails. + */ + public Webhook update(final String id, final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + wrappedParams.put("webhook", params); + + return Requestor.request(RequestMethod.PUT, + Utilities.instanceURL(Webhook.class, id), wrappedParams, Webhook.class, client); + } + + /** + * Validate a webhook by comparing the HMAC signature header sent from EasyPost + * to your shared secret. + * If the signatures do not match, an error will be raised signifying + * the webhook either did not originate from EasyPost or the secrets do not + * match. + * If the signatures do match, the `event_body` will be returned as JSON. + * + * @param eventBody Data to validate + * @param headers Headers received from the webhook + * @param webhookSecret Shared secret to use in validation + * @return JSON string of the event body if the signatures match, otherwise an + * error will be raised. + * @throws EasyPostException when the request fails. + */ + public Event validateWebhook(byte[] eventBody, Map headers, String webhookSecret) + throws EasyPostException { + + String providedSignature = null; + try { + providedSignature = headers.get("X-Hmac-Signature").toString(); + } catch (NullPointerException ignored) { // catch error raised if header key doesn't exist + } + + if (providedSignature != null) { + String calculatedDigest = Cryptography.toHMACSHA256HexDigest(eventBody, webhookSecret, + Normalizer.Form.NFKD); + String calculatedSignature = "hmac-sha256-hex=" + calculatedDigest; + + if (Cryptography.signaturesMatch(providedSignature, calculatedSignature)) { + // Serialize data into a JSON string, then into an Event object + String json = new String(eventBody, StandardCharsets.UTF_8); + return Constant.GSON.fromJson(json, Event.class); + } else { + throw new SignatureVerificationError(Constants.WEBHOOK_DOES_NOT_MATCH); + } + } else { + throw new SignatureVerificationError(Constants.INVALID_WEBHOOK_SIGNATURE); + } + } +} diff --git a/src/main/java/com/easypost/service/package-info.java b/src/main/java/com/easypost/service/package-info.java new file mode 100644 index 000000000..ee3b8a066 --- /dev/null +++ b/src/main/java/com/easypost/service/package-info.java @@ -0,0 +1,9 @@ +/** + * Interact with the EasyPost API in Java. + * + * @author EasyPost developers + * @version 6.0 + * @see EasyPost API documentation + * @since 6.0 + */ +package com.easypost.service; diff --git a/src/main/java/com/easypost/model/Utilities.java b/src/main/java/com/easypost/utils/Utilities.java similarity index 60% rename from src/main/java/com/easypost/model/Utilities.java rename to src/main/java/com/easypost/utils/Utilities.java index 574141e85..9b0bc2737 100644 --- a/src/main/java/com/easypost/model/Utilities.java +++ b/src/main/java/com/easypost/utils/Utilities.java @@ -1,19 +1,16 @@ -package com.easypost.model; +package com.easypost.utils; import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.FilteringError; +import com.easypost.model.Rate; import java.net.URLEncoder; + import java.util.List; import java.util.Map; -public final class Utilities { - private Utilities() { - // Do not instantiate this class. - throw new IllegalStateException("Cannot be instantiated"); - } - +public abstract class Utilities { /** * Get the lowest rate from a list of rates. * @@ -52,7 +49,7 @@ public static Rate getLowestObjectRate(List rates, List carriers, if (lowestRate == null) { throw new FilteringError(String.format( - Constants.NO_OBJECT_FOUND, "lowest rate matching required criteria")); + Constants.NO_OBJECT_FOUND, "lowest rate matching required criteria")); } return lowestRate; @@ -88,4 +85,50 @@ public static String getEncodedURL(Map params, String parentKey) return result.toString(); } + + /** + * Get the URL for the instance object. + * + * @param clazz The class of the instance object. + * @param id The id of the object. + * @return The string of instance object name and its id. + */ + public static String instanceURL(final Class clazz, final String id) { + return String.format("%s/%s", classURL(clazz), id); + } + + /** + * Get the URL for the class. + * + * @param clazz The class of the URL. + * @return The string of the class name. + */ + public static String classURL(final Class clazz) { + String singleURL = singleClassURL(clazz); + if (singleURL.charAt(singleURL.length() - 1) == 's' || singleURL.charAt(singleURL.length() - 1) == 'h') { + return String.format("%ses", singleClassURL(clazz)); + } else { + return String.format("%ss", singleClassURL(clazz)); + } + } + + /** + * Get the URL for this class with the API base url. + * + * @param clazz The class name. + * @return String that has API base and class name. + */ + private static String singleClassURL(final Class clazz) { + return String.format("%s/%s", "%s/%s", className(clazz)); + } + + /** + * Get the class name from the given parameter. + * + * @param clazz The class name. + * @return String of class name. + */ + private static String className(final Class clazz) { + return clazz.getSimpleName().replaceAll("([a-z])([A-Z])", "$1_$2").toLowerCase().replace("$", ""); + } } diff --git a/src/test/cassettes/address/all.json b/src/test/cassettes/address/all.json index 50adfb562..1678e7021 100644 --- a/src/test/cassettes/address/all.json +++ b/src/test/cassettes/address/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456581, + "recordedAt": 1668466133, "request": { "body": "", "method": "GET", @@ -15,7 +15,7 @@ "uri": "https://api.easypost.com/v2/addresses?page_size\u003d5" }, "response": { - "body": "{\n \"addresses\": [\n {\n \"zip\": \"94104-1129\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:43:01+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.79342,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.40288\n },\n \"errors\": [\n {\n \"code\": \"E.SECONDARY_INFORMATION.INVALID\",\n \"field\": \"street2\",\n \"suggestion\": null,\n \"message\": \"Invalid secondary information(Apt/Suite#)\"\n }\n ]\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": [\n {\n \"code\": \"E.SECONDARY_INFORMATION.INVALID\",\n \"field\": \"street2\",\n \"suggestion\": null,\n \"message\": \"Invalid secondary information(Apt/Suite#)\"\n }\n ]\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:43:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EASYPOST\",\n \"street1\": \"417 MONTGOMERY ST FL 5\",\n \"id\": \"adr_20ea4a3224ae11ed9de6ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:54+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_1c9b582e24ae11ed9687ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:54+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_1c99886524ae11edb917ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:50+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_1abef25324ae11eda4f3ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:42:50+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:42:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_1abd394424ae11eda4f2ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n }\n ],\n \"has_more\": true\n}", + "body": "{\n \"addresses\": [\n {\n \"zip\": \"94104-1129\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:52+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.79342,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.40288\n },\n \"errors\": [\n {\n \"code\": \"E.SECONDARY_INFORMATION.INVALID\",\n \"field\": \"street2\",\n \"suggestion\": null,\n \"message\": \"Invalid secondary information(Apt/Suite#)\"\n }\n ]\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": [\n {\n \"code\": \"E.SECONDARY_INFORMATION.INVALID\",\n \"field\": \"street2\",\n \"suggestion\": null,\n \"message\": \"Invalid secondary information(Apt/Suite#)\"\n }\n ]\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:48:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EASYPOST\",\n \"street1\": \"417 MONTGOMERY ST FL 5\",\n \"id\": \"adr_831c9e2e646e11ed8728ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7cd15cb2646e11edae0aac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7ccf2b14646e11edae09ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7ad2f838646e11edad4bac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7ad0a681646e11ed830aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n }\n ],\n \"has_more\": true\n}", "httpVersion": null, "headers": { "null": [ @@ -28,7 +28,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,26 +55,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d0c5f7cb08da0008a166" + "3a8b2e0e6372c5d4e0da51840019e38f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.038679" + "0.034304" ], "etag": [ - "W/\"c46285c9d51caf86817a3ce87a0adc49\"" + "W/\"ab53aa3b46d65e80bee141bae7c9421b\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +85,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses?page_size\u003d5" }, - "duration": 160 + "duration": 254 } ] \ No newline at end of file diff --git a/src/test/cassettes/address/create.json b/src/test/cassettes/address/create.json index adb91ff49..aec7c96f2 100644 --- a/src/test/cassettes/address/create.json +++ b/src/test/cassettes/address/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456583, + "recordedAt": 1668466135, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/addresses" }, "response": { - "body": "{\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:43:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:43:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_222befd324ae11edb291ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", + "body": "{\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:55+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:55+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_8482b8f9646e11ed87b5ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d0c7f7a6296a0008a25c" + "3a8b2e0d6372c5d6e0da54b40019e46e" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.026567" + "0.037641" ], "etag": [ - "W/\"4dc1d34d3879de8fb59e1ab47e399d27\"" + "W/\"1fddbb1654517398a3de7ccb8a360138\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/addresses/adr_222befd324ae11edb291ac1f6bc7b362" + "/api/v2/addresses/adr_8482b8f9646e11ed87b5ac1f6bc7b362" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses" }, - "duration": 154 + "duration": 248 } ] \ No newline at end of file diff --git a/src/test/cassettes/address/create_and_verify.json b/src/test/cassettes/address/create_and_verify.json index 0d50d2e2f..9a51b5b41 100644 --- a/src/test/cassettes/address/create_and_verify.json +++ b/src/test/cassettes/address/create_and_verify.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456581, + "recordedAt": 1668466133, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/addresses/create_and_verify" }, "response": { - "body": "{\n \"address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:43:01+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:43:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_213b9ce924ae11ed9e83ac1f6b0a0d1e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n }\n}", + "body": "{\n \"address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:53+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_83806a17646e11ed8751ac1f6bc7b362\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d0c5f7b97c370008a193" + "3a8b2e0f6372c5d5e0da519d0019e3be" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.051402" + "0.043990" ], "etag": [ - "W/\"a8b4bab036cfb9badba55a405581b591\"" + "W/\"8af13b8213a7b4f71cc884536d0f7691\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/addresses/adr_213b9ce924ae11ed9e83ac1f6b0a0d1e" + "/api/v2/addresses/adr_83806a17646e11ed8751ac1f6bc7b362" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses/create_and_verify" }, - "duration": 176 + "duration": 265 } ] \ No newline at end of file diff --git a/src/test/cassettes/address/create_verify.json b/src/test/cassettes/address/create_verify.json index b67040983..5cebb6785 100644 --- a/src/test/cassettes/address/create_verify.json +++ b/src/test/cassettes/address/create_verify.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456581, + "recordedAt": 1668466132, "request": { "body": "{\n \"address\": {\n \"zip\": \"94104\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"company\": \"EasyPost\",\n \"street1\": \"417 montgomery street\",\n \"street2\": \"FL 5\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"verify\": true\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/addresses" }, "response": { - "body": "{\n \"zip\": \"94104-1129\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:43:01+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.79342,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.40288\n },\n \"errors\": [\n {\n \"code\": \"E.SECONDARY_INFORMATION.INVALID\",\n \"field\": \"street2\",\n \"suggestion\": null,\n \"message\": \"Invalid secondary information(Apt/Suite#)\"\n }\n ]\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": [\n {\n \"code\": \"E.SECONDARY_INFORMATION.INVALID\",\n \"field\": \"street2\",\n \"suggestion\": null,\n \"message\": \"Invalid secondary information(Apt/Suite#)\"\n }\n ]\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:43:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EASYPOST\",\n \"street1\": \"417 MONTGOMERY ST FL 5\",\n \"id\": \"adr_20ea4a3224ae11ed9de6ac1f6b0a0d1e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n}", + "body": "{\n \"zip\": \"94104-1129\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:52+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.79342,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.40288\n },\n \"errors\": [\n {\n \"code\": \"E.SECONDARY_INFORMATION.INVALID\",\n \"field\": \"street2\",\n \"suggestion\": null,\n \"message\": \"Invalid secondary information(Apt/Suite#)\"\n }\n ]\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": [\n {\n \"code\": \"E.SECONDARY_INFORMATION.INVALID\",\n \"field\": \"street2\",\n \"suggestion\": null,\n \"message\": \"Invalid secondary information(Apt/Suite#)\"\n }\n ]\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:48:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EASYPOST\",\n \"street1\": \"417 MONTGOMERY ST FL 5\",\n \"id\": \"adr_831c9e2e646e11ed8728ac1f6bc7b362\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,6 +51,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -58,29 +61,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d0c5e68d49ac0008a152" + "3a8b2e0e6372c5d4e0da51830019e368" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.043356" + "0.048254" ], "etag": [ - "W/\"9d42b1fab31f80f4252f071b9fa5d26f\"" + "W/\"e9960f234cad66d826185e8b2f79e170\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/addresses/adr_20ea4a3224ae11ed9de6ac1f6b0a0d1e" + "/api/v2/addresses/adr_831c9e2e646e11ed8728ac1f6bc7b362" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +94,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses" }, - "duration": 172 + "duration": 358 } ] \ No newline at end of file diff --git a/src/test/cassettes/address/create_verify_array.json b/src/test/cassettes/address/create_verify_array.json index d495f47e3..e19f46209 100644 --- a/src/test/cassettes/address/create_verify_array.json +++ b/src/test/cassettes/address/create_verify_array.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456583, + "recordedAt": 1668466134, "request": { "body": "{\n \"address\": {\n \"zip\": \"94104\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"company\": \"EasyPost\",\n \"street1\": \"417 montgomery street\",\n \"street2\": \"FL 5\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"verify\": [\n true\n ]\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/addresses" }, "response": { - "body": "{\n \"zip\": \"94104-1129\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:43:03+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.79342,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.40288\n },\n \"errors\": [\n {\n \"code\": \"E.SECONDARY_INFORMATION.INVALID\",\n \"field\": \"street2\",\n \"suggestion\": null,\n \"message\": \"Invalid secondary information(Apt/Suite#)\"\n }\n ]\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": [\n {\n \"code\": \"E.SECONDARY_INFORMATION.INVALID\",\n \"field\": \"street2\",\n \"suggestion\": null,\n \"message\": \"Invalid secondary information(Apt/Suite#)\"\n }\n ]\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:43:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EASYPOST\",\n \"street1\": \"417 MONTGOMERY ST FL 5\",\n \"id\": \"adr_21fa894224ae11ed82e6ac1f6bc72124\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n}", + "body": "{\n \"zip\": \"94104-1129\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:54+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.79342,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.40288\n },\n \"errors\": [\n {\n \"code\": \"E.SECONDARY_INFORMATION.INVALID\",\n \"field\": \"street2\",\n \"suggestion\": null,\n \"message\": \"Invalid secondary information(Apt/Suite#)\"\n }\n ]\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": [\n {\n \"code\": \"E.SECONDARY_INFORMATION.INVALID\",\n \"field\": \"street2\",\n \"suggestion\": null,\n \"message\": \"Invalid secondary information(Apt/Suite#)\"\n }\n ]\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:48:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EASYPOST\",\n \"street1\": \"417 MONTGOMERY ST FL 5\",\n \"id\": \"adr_844b8dc3646e11edb0daac1f6b0a0d1e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d0c7f7ee93d60008a228" + "3a8b2e0b6372c5d6e0da51a40019e451" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.040272" + "0.050694" ], "etag": [ - "W/\"59c0b5b942019eb8a6ea6b8e1720e642\"" + "W/\"17a88932f0ab072f5b2b60b774a10f5e\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/addresses/adr_21fa894224ae11ed82e6ac1f6bc72124" + "/api/v2/addresses/adr_844b8dc3646e11edb0daac1f6b0a0d1e" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses" }, - "duration": 173 + "duration": 265 } ] \ No newline at end of file diff --git a/src/test/cassettes/address/create_verify_strict.json b/src/test/cassettes/address/create_verify_strict.json index 19f195ab4..e7ceab46c 100644 --- a/src/test/cassettes/address/create_verify_strict.json +++ b/src/test/cassettes/address/create_verify_strict.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456582, + "recordedAt": 1668466133, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"verify_strict\": true\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/addresses" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:43:02+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:43:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_2170c9ce24ae11edb0e9ac1f6bc7b362\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:53+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_83b617b0646e11ed876cac1f6bc7b362\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d0c6f7bba5590008a1b2" + "3a8b2e096372c5d5e0da519f0019e3e5" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.051439" + "0.043868" ], "etag": [ - "W/\"64fec571130a3644f7cf3849689a8799\"" + "W/\"276615d6bc50ecb316f736c66d348823\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/addresses/adr_2170c9ce24ae11edb0e9ac1f6bc7b362" + "/api/v2/addresses/adr_83b617b0646e11ed876cac1f6bc7b362" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses" }, - "duration": 185 + "duration": 262 } ] \ No newline at end of file diff --git a/src/test/cassettes/address/error_address_creation.json b/src/test/cassettes/address/error_address_creation.json index d490f9440..5624f5344 100644 --- a/src/test/cassettes/address/error_address_creation.json +++ b/src/test/cassettes/address/error_address_creation.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1666294101, + "recordedAt": 1668466132, "request": { "body": "{}", "method": "POST", @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,23 +58,24 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "a224a4276351a154e0ebf65d0006037b" + "3a8b2e0f6372c5d4e0da51810019e342" ], "x-proxied": [ - "extlb1nuq 29913d444b", + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037111" + "0.093309" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210201856-ea17ac3304-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -86,6 +87,6 @@ }, "uri": "https://api.easypost.com/v2/addresses/create_and_verify" }, - "duration": 301 + "duration": 314 } ] \ No newline at end of file diff --git a/src/test/cassettes/address/retrieve.json b/src/test/cassettes/address/retrieve.json index 75e292026..6952b09c8 100644 --- a/src/test/cassettes/address/retrieve.json +++ b/src/test/cassettes/address/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456582, + "recordedAt": 1668466134, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/addresses" }, "response": { - "body": "{\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:43:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:43:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_21a7bd9224ae11edaeccac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", + "body": "{\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:54+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_83ec416a646e11edb0c1ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d0c6f7c8b9300008a1e3" + "3a8b2e0b6372c5d5e0da51a10019e40f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.038710" + "0.033984" ], "etag": [ - "W/\"b855277dcadd238b41b536446942a5f0\"" + "W/\"86da112baa083f0b738ed1b115d8ab40\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/addresses/adr_21a7bd9224ae11edaeccac1f6bc7bdc6" + "/api/v2/addresses/adr_83ec416a646e11edb0c1ac1f6b0a0d1e" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses" }, - "duration": 175 + "duration": 258 }, { - "recordedAt": 1661456582, + "recordedAt": 1668466134, "request": { "body": "", "method": "GET", @@ -108,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/addresses/adr_21a7bd9224ae11edaeccac1f6bc7bdc6" + "uri": "https://api.easypost.com/v2/addresses/adr_83ec416a646e11edb0c1ac1f6b0a0d1e" }, "response": { - "body": "{\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:43:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:43:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_21a7bd9224ae11edaeccac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", + "body": "{\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:54+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_83ec416a646e11edb0c1ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,7 +124,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -144,6 +144,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -151,26 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d0c6f7a64bbc0008a1f2" + "3a8b2e0b6372c5d6e0da51a20019e42f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.024402" + "0.026011" ], "etag": [ - "W/\"b855277dcadd238b41b536446942a5f0\"" + "W/\"86da112baa083f0b738ed1b115d8ab40\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +184,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/addresses/adr_21a7bd9224ae11edaeccac1f6bc7bdc6" + "uri": "https://api.easypost.com/v2/addresses/adr_83ec416a646e11edb0c1ac1f6b0a0d1e" }, - "duration": 147 + "duration": 243 } ] \ No newline at end of file diff --git a/src/test/cassettes/address/verify.json b/src/test/cassettes/address/verify.json index b20a78d2a..fb83d34c9 100644 --- a/src/test/cassettes/address/verify.json +++ b/src/test/cassettes/address/verify.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456583, + "recordedAt": 1668466135, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/addresses" }, "response": { - "body": "{\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:43:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:43:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_225f114424ae11edb302ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", + "body": "{\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:55+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:55+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_84bc36ee646e11ed8acaac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d0c7f7f030fd0008a27c" + "3a8b2e0c6372c5d7e0da54b60019e495" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.030231" + "0.041192" ], "etag": [ - "W/\"e6fd0a4f435f2aeb4264cb5e0c7d4877\"" + "W/\"a3619dfbf309414578390f9bf45eefd5\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/addresses/adr_225f114424ae11edb302ac1f6bc7b362" + "/api/v2/addresses/adr_84bc36ee646e11ed8acaac1f6bc7bdc6" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses" }, - "duration": 167 + "duration": 263 }, { - "recordedAt": 1661456583, + "recordedAt": 1668466135, "request": { "body": "", "method": "GET", @@ -108,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/addresses/adr_225f114424ae11edb302ac1f6bc7b362/verify" + "uri": "https://api.easypost.com/v2/addresses/adr_84bc36ee646e11ed8acaac1f6bc7bdc6/verify" }, "response": { - "body": "{\n \"address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:43:04+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:43:04+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_228151e824ae11ed8402ac1f6bc72124\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n }\n}", + "body": "{\n \"address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:55+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:55+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_84e8a826646e11edb120ac1f6b0a0d1e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -124,7 +124,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,29 +151,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d0c7f7ba84df0008a29f" + "3a8b2e0a6372c5d7e0da54bb0019e4b3" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.051407" + "0.051608" ], "etag": [ - "W/\"1ab71edb7d06b9aace6b8e27f514c20f\"" + "W/\"c1df7a9ff3fec2f64bcc2219a304b1bf\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/addresses/adr_228151e824ae11ed8402ac1f6bc72124" + "/api/v2/addresses/adr_84e8a826646e11edb120ac1f6b0a0d1e" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,9 +184,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/addresses/adr_225f114424ae11edb302ac1f6bc7b362/verify" + "uri": "https://api.easypost.com/v2/addresses/adr_84bc36ee646e11ed8acaac1f6bc7bdc6/verify" }, - "duration": 182 + "duration": 272 } ] \ No newline at end of file diff --git a/src/test/cassettes/batch/add_remove_shipment.json b/src/test/cassettes/batch/add_remove_shipment.json index 96a17c82c..f772c6b43 100644 --- a/src/test/cassettes/batch/add_remove_shipment.json +++ b/src/test/cassettes/batch/add_remove_shipment.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1666369118, + "recordedAt": 1668466004, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:18:37Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:18:38Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:18:38Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:18:38Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_203e7e6e7ea54c96b5e3c43519773c2b\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T16:18:38Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"tracking_code\": \"9400100106068144550088\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2FhMWQ0MGJhNzZhYjQ2MTdiYTkwMmRhOWNlZjExMTY3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T16:18:38Z\",\n \"signed_by\": null,\n \"id\": \"trk_aa1d40ba76ab4617ba902da9cef11167\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:18:37+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:18:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_04c37752515c11ed9679ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:18:37+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:18:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_04c37752515c11ed9679ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T16:18:38Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e0ccd15a47804a009a144d51b983dcd0.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T16:18:38Z\",\n \"id\": \"pl_a2025ff479924554bd62a54aff17b432\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T16:18:38Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:18:37Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:18:37Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_d65b942038894bf3a41ff5f996c9ee0e\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T16:18:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T16:18:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_04c0c74a515c11edaf02ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:18:37Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:18:37Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_77176897564449a39e5a4287ada610ac\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:18:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:18:37Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_203e7e6e7ea54c96b5e3c43519773c2b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:18:37Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:18:37Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_a9efae52a80f46c9b0462054381d0bff\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:18:37Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:18:37Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_beba7c364d754953a8d9584221d5982e\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T16:18:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T16:18:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_04c0c74a515c11edaf02ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144550088\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_814bbc80ce204482954888272a8cfca6\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:46:44Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"tracking_code\": \"9400100106068149679883\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE2M2IyZjRkNDA3MzQyZjY5Mzg2ZTI3ODNlZWViMzAz\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:46:44Z\",\n \"signed_by\": null,\n \"id\": \"trk_163b2f4d407342f69386e2783eeeb303\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:43+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_35ea9f52646e11edb964ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:43+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_35ea9f52646e11edb964ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/2b9650af184847579d17ae21d43cbfde.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"id\": \"pl_253a8d199e7d4969a9bf366a95b36b70\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:46:43Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_d3eaec8aef6d4b2ba440a737990dc874\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:46:43+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:46:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_35e7b257646e11edb963ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_87cc9aef74f14145b225fd4663961ef2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fff8fd85aa1e4eb7bbad7c5d5b7e121b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_814bbc80ce204482954888272a8cfca6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e8fc2c9dc970401f94e3c06fb17c0992\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:46:43+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:46:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_35e7b257646e11edb963ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149679883\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "9aa06c326352c65de0db69b90000ef1a" + "3a8b2e0b6372c553e0d9e3060019aa9f" ], "x-proxied": [ - "extlb1nuq 29913d444b", - "intlb2nuq 29913d444b" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.205318" + "1.024640" ], "etag": [ - "W/\"136358f3f4faedf3d9808fb112024e3e\"" + "W/\"1c4db4cd4bb10a1453d121ba21735ff1\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_04b5b6d8f75a4850aaa238804eb4273f" + "/api/v2/shipments/shp_0e6f2d8250674329bc0eab58d9776276" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -92,10 +93,10 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1478 + "duration": 1324 }, { - "recordedAt": 1666369119, + "recordedAt": 1668466004, "request": { "body": "{}", "method": "POST", @@ -113,7 +114,7 @@ "uri": "https://api.easypost.com/v2/batches" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-10-21T16:18:39Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-10-21T16:18:39Z\",\n \"id\": \"batch_6f24fcdbfc23492ca2e360ff69ccf0b3\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:46:44Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-11-14T22:46:44Z\",\n \"id\": \"batch_18ade8b3ad41449fac99e7c03b72b8e8\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -126,7 +127,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -153,7 +154,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "2c01d7c96352c65fe0db69da0001a49a" + "3a8b2e0b6372c554e0d9e3080019ab1f" ], "x-proxied": [ "extlb4wdc 29913d444b", @@ -164,16 +165,16 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037601" + "0.026402" ], "etag": [ - "W/\"3c042c1cf8541187783ace75c57b57c9\"" + "W/\"6c5181f46d2e4b1e2b671d93c5fed9f7\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -185,12 +186,12 @@ }, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 335 + "duration": 248 }, { - "recordedAt": 1666369119, + "recordedAt": 1668466004, "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_d65b942038894bf3a41ff5f996c9ee0e\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_77176897564449a39e5a4287ada610ac\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_203e7e6e7ea54c96b5e3c43519773c2b\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_a9efae52a80f46c9b0462054381d0bff\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_beba7c364d754953a8d9584221d5982e\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068144550088\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_04c0c74a515c11edaf02ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_04c37752515c11ed9679ac1f6bc7b362\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:38 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_203e7e6e7ea54c96b5e3c43519773c2b\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_04c0c74a515c11edaf02ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:38 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2FhMWQ0MGJhNzZhYjQ2MTdiYTkwMmRhOWNlZjExMTY3\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144550088\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_aa1d40ba76ab4617ba902da9cef11167\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_04c37752515c11ed9679ac1f6bc7b362\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 12:18:38 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_a2025ff479924554bd62a54aff17b432\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e0ccd15a47804a009a144d51b983dcd0.png\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n }\n ]\n}", + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_d3eaec8aef6d4b2ba440a737990dc874\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_87cc9aef74f14145b225fd4663961ef2\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_fff8fd85aa1e4eb7bbad7c5d5b7e121b\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_814bbc80ce204482954888272a8cfca6\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_e8fc2c9dc970401f94e3c06fb17c0992\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068149679883\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_35e7b257646e11edb963ac1f6bc7bdc6\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_35ea9f52646e11edb964ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_814bbc80ce204482954888272a8cfca6\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_35e7b257646e11edb963ac1f6bc7bdc6\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:44 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzE2M2IyZjRkNDA3MzQyZjY5Mzg2ZTI3ODNlZWViMzAz\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068149679883\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_163b2f4d407342f69386e2783eeeb303\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:44 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_35ea9f52646e11edb964ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_253a8d199e7d4969a9bf366a95b36b70\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/2b9650af184847579d17ae21d43cbfde.png\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -203,10 +204,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_6f24fcdbfc23492ca2e360ff69ccf0b3/add_shipments" + "uri": "https://api.easypost.com/v2/batches/batch_18ade8b3ad41449fac99e7c03b72b8e8/add_shipments" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-10-21T16:18:39Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"tracking_code\": \"9400100106068144550088\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-10-21T16:18:39Z\",\n \"id\": \"batch_6f24fcdbfc23492ca2e360ff69ccf0b3\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:46:44Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"tracking_code\": \"9400100106068149679883\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:46:44Z\",\n \"id\": \"batch_18ade8b3ad41449fac99e7c03b72b8e8\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -219,7 +220,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -246,7 +247,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "2c01d7cf6352c65fe0db69e00001a4c0" + "3a8b2e086372c554e0d9e30a0019ab40" ], "x-proxied": [ "extlb4wdc 29913d444b", @@ -257,16 +258,16 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.059276" + "0.051258" ], "etag": [ - "W/\"33b3403ff2053c5593bb8ed89ffbeefe\"" + "W/\"57cac23121e01424bacd6a1866932102\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -276,14 +277,14 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/batches/batch_6f24fcdbfc23492ca2e360ff69ccf0b3/add_shipments" + "uri": "https://api.easypost.com/v2/batches/batch_18ade8b3ad41449fac99e7c03b72b8e8/add_shipments" }, - "duration": 336 + "duration": 285 }, { - "recordedAt": 1666369120, + "recordedAt": 1668466005, "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_d65b942038894bf3a41ff5f996c9ee0e\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_77176897564449a39e5a4287ada610ac\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_203e7e6e7ea54c96b5e3c43519773c2b\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_a9efae52a80f46c9b0462054381d0bff\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_beba7c364d754953a8d9584221d5982e\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068144550088\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_04c0c74a515c11edaf02ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_04c37752515c11ed9679ac1f6bc7b362\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:38 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"currency\": \"USD\",\n \"id\": \"rate_203e7e6e7ea54c96b5e3c43519773c2b\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_04c0c74a515c11edaf02ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:38 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2FhMWQ0MGJhNzZhYjQ2MTdiYTkwMmRhOWNlZjExMTY3\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144550088\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_aa1d40ba76ab4617ba902da9cef11167\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:18:37 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_04c37752515c11ed9679ac1f6bc7b362\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:37 PM\"\n },\n \"id\": \"shp_04b5b6d8f75a4850aaa238804eb4273f\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 12:18:38 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_a2025ff479924554bd62a54aff17b432\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e0ccd15a47804a009a144d51b983dcd0.png\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 12:18:38 PM\"\n }\n ]\n}", + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_d3eaec8aef6d4b2ba440a737990dc874\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_87cc9aef74f14145b225fd4663961ef2\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_fff8fd85aa1e4eb7bbad7c5d5b7e121b\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_814bbc80ce204482954888272a8cfca6\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_e8fc2c9dc970401f94e3c06fb17c0992\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068149679883\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_35e7b257646e11edb963ac1f6bc7bdc6\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_35ea9f52646e11edb964ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_814bbc80ce204482954888272a8cfca6\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_35e7b257646e11edb963ac1f6bc7bdc6\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:44 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzE2M2IyZjRkNDA3MzQyZjY5Mzg2ZTI3ODNlZWViMzAz\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068149679883\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_163b2f4d407342f69386e2783eeeb303\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:44 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_35ea9f52646e11edb964ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_253a8d199e7d4969a9bf366a95b36b70\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/2b9650af184847579d17ae21d43cbfde.png\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -296,10 +297,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_6f24fcdbfc23492ca2e360ff69ccf0b3/remove_shipments" + "uri": "https://api.easypost.com/v2/batches/batch_18ade8b3ad41449fac99e7c03b72b8e8/remove_shipments" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-10-21T16:18:39Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-10-21T16:18:40Z\",\n \"id\": \"batch_6f24fcdbfc23492ca2e360ff69ccf0b3\",\n \"state\": \"purchased\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:46:44Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-11-14T22:46:45Z\",\n \"id\": \"batch_18ade8b3ad41449fac99e7c03b72b8e8\",\n \"state\": \"purchased\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -312,7 +313,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -339,27 +340,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "107f19416352c660e0db69e20012aa7c" + "3a8b2e0c6372c555e0d9e61a0019ab62" ], "x-proxied": [ - "extlb3wdc 29913d444b", - "intlb1wdc 29913d444b", + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.052643" + "0.069995" ], "etag": [ - "W/\"9e60d3c48ab9f3ac3ab430ee4cce8af4\"" + "W/\"34898a60349aba15fe2bb705e5300b8f\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -369,8 +370,8 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/batches/batch_6f24fcdbfc23492ca2e360ff69ccf0b3/remove_shipments" + "uri": "https://api.easypost.com/v2/batches/batch_18ade8b3ad41449fac99e7c03b72b8e8/remove_shipments" }, - "duration": 344 + "duration": 386 } ] \ No newline at end of file diff --git a/src/test/cassettes/batch/all.json b/src/test/cassettes/batch/all.json index b3b3c0004..8c4a7a9f2 100644 --- a/src/test/cassettes/batch/all.json +++ b/src/test/cassettes/batch/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456471, + "recordedAt": 1668466005, "request": { "body": "", "method": "GET", @@ -15,20 +15,20 @@ "uri": "https://api.easypost.com/v2/batches?page_size\u003d5" }, "response": { - "body": "{\n \"batches\": [\n {\n \"scan_form\": null,\n \"created_at\": \"2022-08-18T20:38:12Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-08-18T20:38:12Z\",\n \"id\": \"batch_c891c51065294fabb519c4e1c529e728\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n },\n {\n \"scan_form\": null,\n \"created_at\": \"2022-08-18T20:38:13Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-08-18T20:38:13Z\",\n \"id\": \"batch_22e1465de75f4a13835e6d4063b4cdef\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n },\n {\n \"scan_form\": null,\n \"created_at\": \"2022-08-18T20:38:14Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-08-18T20:38:14Z\",\n \"id\": \"batch_7cc212e648a44a8d92cf65c5e5567ae0\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n },\n {\n \"scan_form\": null,\n \"created_at\": \"2022-08-18T20:38:15Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"created\",\n \"id\": \"shp_2666d45e6e5e4e6b851ea76fcc3b1df3\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-18T20:38:15Z\",\n \"id\": \"batch_d0d29fcacb374bea8b9e7d4abba07d6a\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 1.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n },\n {\n \"scan_form\": null,\n \"created_at\": \"2022-08-18T20:38:16Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"created\",\n \"id\": \"shp_774445e863ce4723bc35b3e0110daaab\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-18T20:38:16Z\",\n \"id\": \"batch_23418e12a10b4989b36187dbba8683d0\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 1.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n }\n ],\n \"has_more\": true\n}", + "body": "{\n \"batches\": [\n {\n \"scan_form\": {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_8fee0ee1515811edaeebac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-10-21T15:53:55Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221021/ba7203f479224687b1425b7f241aa766.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_018b11f1d12a4d7d9d1677ba1f090daa\",\n \"created_at\": \"2022-10-21T15:53:55Z\",\n \"id\": \"sf_8c711db6980f49c994d87b2db3d2894d\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068144545244\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n },\n \"created_at\": \"2022-10-21T15:53:55Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"tracking_code\": \"9400100106068144545244\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-10-21T15:53:55Z\",\n \"id\": \"batch_018b11f1d12a4d7d9d1677ba1f090daa\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n },\n {\n \"scan_form\": {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:56+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_91ce672c515811ed97a6ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-10-21T15:53:58Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221021/41b631c176ed4884a08d6fbd8dff6b22.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_ecdcbd4c812c4912bdaba9f3da5671b8\",\n \"created_at\": \"2022-10-21T15:53:58Z\",\n \"id\": \"sf_4d29a8e1422f43a1a58b0c3f22d21ec6\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068144545275\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n },\n \"created_at\": \"2022-10-21T15:53:58Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"tracking_code\": \"9400100106068144545275\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-10-21T15:53:58Z\",\n \"id\": \"batch_ecdcbd4c812c4912bdaba9f3da5671b8\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n },\n {\n \"scan_form\": null,\n \"created_at\": \"2022-10-21T15:55:39Z\",\n \"pickup\": {\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:39+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_cf88dd7e515811eda536ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:39Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:41Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:41Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_c07014a77acc42b8913b012322c96df3\",\n \"pickup_id\": \"pickup_15f373f924dc4bfb9c3d2a3c6931072d\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62314242\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:43Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_15f373f924dc4bfb9c3d2a3c6931072d\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n },\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"tracking_code\": \"9400100106068144545565\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-10-21T15:55:39Z\",\n \"id\": \"batch_2c868321b33e434885e0eebd291931f3\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n },\n {\n \"scan_form\": null,\n \"created_at\": \"2022-10-21T15:55:46Z\",\n \"pickup\": {\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:46+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:46+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d33a4ca5515811edaf5aac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:46Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:46Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:46Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_15e6d4a314fc483c87b9c4ae44f2cde4\",\n \"pickup_id\": \"pickup_e4b0c0e7991b4e529b20fbd694360d58\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:46Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_e4b0c0e7991b4e529b20fbd694360d58\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n },\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"tracking_code\": \"9400100106068144545572\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-10-21T15:55:46Z\",\n \"id\": \"batch_9054678c530548f480a785eac94ffca5\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n },\n {\n \"scan_form\": null,\n \"created_at\": \"2022-10-21T15:55:49Z\",\n \"pickup\": {\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d5453c06515811eda836ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:49Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:50Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:50Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_eb9637b6eef14548bbd6661d20f887c4\",\n \"pickup_id\": \"pickup_2d0907b2b823406eb08e8cd65f5a0f74\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:49Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_2d0907b2b823406eb08e8cd65f5a0f74\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n },\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"tracking_code\": \"9400100106068144545589\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-10-21T15:55:49Z\",\n \"id\": \"batch_d461f579a03b436091fe7d132268d2e6\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n }\n ],\n \"has_more\": true\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "2207" + "8017" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,26 +55,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d057f7dd07320008692f" + "3a8b2e0c6372c555e0d9e61b0019ab88" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.054775" + "0.152548" ], "etag": [ - "W/\"33383c0871df679832ee47a5bd04a6e3\"" + "W/\"ebe3a8c25e38e050dfb1bb9a6317c0be\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +85,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/batches?page_size\u003d5" }, - "duration": 186 + "duration": 375 } ] \ No newline at end of file diff --git a/src/test/cassettes/batch/buy.json b/src/test/cassettes/batch/buy.json index 3b2e0acf6..f79e81e0f 100644 --- a/src/test/cassettes/batch/buy.json +++ b/src/test/cassettes/batch/buy.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456472, + "recordedAt": 1668466006, "request": { "body": "{\n \"batch\": {\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/batches" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:12Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-25T19:41:12Z\",\n \"id\": \"batch_05b48e468fd04e5aa8f5c3ccbf10edcf\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:46:46Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:46:46Z\",\n \"id\": \"batch_dbd16de4b9a5488c8a17e182a47913d8\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d058f7c8b98c00086976" + "3a8b2e0a6372c556e0d9e61d0019abaf" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.103143" + "0.041774" ], "etag": [ - "W/\"cafd0972197f5eeaa179cfdf768da752\"" + "W/\"f750bfcc2bd98a171e1231c2aa5eb60b\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 240 + "duration": 262 }, { - "recordedAt": 1661456472, + "recordedAt": 1668466006, "request": { "body": "", "method": "POST", @@ -105,10 +105,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_05b48e468fd04e5aa8f5c3ccbf10edcf/buy" + "uri": "https://api.easypost.com/v2/batches/batch_dbd16de4b9a5488c8a17e182a47913d8/buy" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:12Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"queued_for_purchase\",\n \"id\": \"shp_81cf2a8225484863bada9e822b4d6231\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-25T19:41:12Z\",\n \"id\": \"batch_05b48e468fd04e5aa8f5c3ccbf10edcf\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 1.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:46:46Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"queued_for_purchase\",\n \"id\": \"shp_9e66569007db442b80d82bbd93bb734b\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:46:46Z\",\n \"id\": \"batch_dbd16de4b9a5488c8a17e182a47913d8\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 1.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -121,7 +121,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -148,26 +148,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d058f7a6c2d300086994" + "3a8b2e0a6372c556e0d9e61e0019abc6" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.073609" + "0.054346" ], "etag": [ - "W/\"d9e27acf09c2173526e8eb1b85726a30\"" + "W/\"dd63e54497bd2a82e2c9bee1e70b894f\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,9 +178,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches/batch_05b48e468fd04e5aa8f5c3ccbf10edcf/buy" + "uri": "https://api.easypost.com/v2/batches/batch_dbd16de4b9a5488c8a17e182a47913d8/buy" }, - "duration": 214 + "duration": 270 } ] \ No newline at end of file diff --git a/src/test/cassettes/batch/create.json b/src/test/cassettes/batch/create.json index 9bd20c4b3..c5637d45b 100644 --- a/src/test/cassettes/batch/create.json +++ b/src/test/cassettes/batch/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456495, + "recordedAt": 1668466029, "request": { "body": "{\n \"batch\": {\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/batches" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:35Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-25T19:41:35Z\",\n \"id\": \"batch_1f7a361922ba40f58416225adec58a36\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:47:09Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:47:09Z\",\n \"id\": \"batch_a84df9b2f6464d5382e12beb8ddd586a\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d06ff7a521f300087514" + "3a8b2e0b6372c56de0d9e65f0019b4a6" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037300" + "0.041525" ], "etag": [ - "W/\"a8fa4a4f3f1fc4b997b71f17bca5bea5\"" + "W/\"af919de4f789b12e06f05632957e3dbf\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +88,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 179 + "duration": 267 } ] \ No newline at end of file diff --git a/src/test/cassettes/batch/create_and_buy.json b/src/test/cassettes/batch/create_and_buy.json index 08447f6c4..6fbf10945 100644 --- a/src/test/cassettes/batch/create_and_buy.json +++ b/src/test/cassettes/batch/create_and_buy.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456495, + "recordedAt": 1668466030, "request": { "body": "{\n \"batch\": {\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/batches" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:35Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-25T19:41:35Z\",\n \"id\": \"batch_a2272072344c446bac100f32b555cdef\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:47:10Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:47:10Z\",\n \"id\": \"batch_c8978aed8d4348ae8f92fae952bd82a5\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d06ff7dc00760008753e" + "3a8b2e0f6372c56de0d9e6610019b4ca" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.043812" + "0.044074" ], "etag": [ - "W/\"e5100bf4941c188ad394e35589dbce74\"" + "W/\"ee3b99fd6d0cf6ed6ff6e96f0591d33e\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +88,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 177 + "duration": 258 } ] \ No newline at end of file diff --git a/src/test/cassettes/batch/create_scanform.json b/src/test/cassettes/batch/create_scanform.json index 8efd69077..3799b4740 100644 --- a/src/test/cassettes/batch/create_scanform.json +++ b/src/test/cassettes/batch/create_scanform.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456472, + "recordedAt": 1668466006, "request": { "body": "{\n \"batch\": {\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/batches" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:12Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-25T19:41:12Z\",\n \"id\": \"batch_c97ca77dc6d646b0b7f0680426282d0e\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:46:46Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:46:46Z\",\n \"id\": \"batch_fb5bd98e37a9474aa921543b5abedb8a\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,6 +51,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -58,26 +61,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d058e68a0700000869d3" + "3a8b2e096372c556e0d9e6200019abf0" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037600" + "0.054212" ], "etag": [ - "W/\"f6805857f08345a4feacecee1197e2c1\"" + "W/\"f56fbcf6da57db36a6f99da3610e9eb9\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +91,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 172 + "duration": 273 }, { - "recordedAt": 1661456473, + "recordedAt": 1668466007, "request": { "body": "", "method": "POST", @@ -105,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_c97ca77dc6d646b0b7f0680426282d0e/buy" + "uri": "https://api.easypost.com/v2/batches/batch_fb5bd98e37a9474aa921543b5abedb8a/buy" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:12Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"queued_for_purchase\",\n \"id\": \"shp_059e9b2a645243edbaeca9fadb36f206\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-25T19:41:13Z\",\n \"id\": \"batch_c97ca77dc6d646b0b7f0680426282d0e\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 1.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:46:46Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"queued_for_purchase\",\n \"id\": \"shp_3dbcc58edda04ce486e3b81f8e3deaaa\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:46:47Z\",\n \"id\": \"batch_fb5bd98e37a9474aa921543b5abedb8a\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 1.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -121,7 +124,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -148,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d059f7cb7b0d000869eb" + "3a8b2e0b6372c557e0d9e6210019ac0c" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.058362" + "0.052074" ], "etag": [ - "W/\"f70a5d959f25a0f388db51590d90b404\"" + "W/\"df306c6f30694eb77d250d4d629a0a54\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +181,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches/batch_c97ca77dc6d646b0b7f0680426282d0e/buy" + "uri": "https://api.easypost.com/v2/batches/batch_fb5bd98e37a9474aa921543b5abedb8a/buy" }, - "duration": 185 + "duration": 270 }, { - "recordedAt": 1661456483, + "recordedAt": 1668466017, "request": { "body": "", "method": "POST", @@ -195,10 +198,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_c97ca77dc6d646b0b7f0680426282d0e/scan_form" + "uri": "https://api.easypost.com/v2/batches/batch_fb5bd98e37a9474aa921543b5abedb8a/scan_form" }, "response": { - "body": "{\n \"scan_form\": {\n \"address\": null,\n \"updated_at\": \"2022-08-25T19:41:23Z\",\n \"form_url\": null,\n \"form_file_type\": null,\n \"batch_id\": \"batch_c97ca77dc6d646b0b7f0680426282d0e\",\n \"created_at\": \"2022-08-25T19:41:23Z\",\n \"id\": \"sf_11ced65b6dba4dd29399ee2dfce22a69\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [],\n \"object\": \"ScanForm\",\n \"status\": \"creating\"\n },\n \"created_at\": \"2022-08-25T19:41:12Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_059e9b2a645243edbaeca9fadb36f206\",\n \"tracking_code\": \"9400100109361135003523\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-25T19:41:23Z\",\n \"id\": \"batch_c97ca77dc6d646b0b7f0680426282d0e\",\n \"state\": \"purchased\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": {\n \"address\": null,\n \"updated_at\": \"2022-11-14T22:46:57Z\",\n \"form_url\": null,\n \"form_file_type\": null,\n \"batch_id\": \"batch_fb5bd98e37a9474aa921543b5abedb8a\",\n \"created_at\": \"2022-11-14T22:46:57Z\",\n \"id\": \"sf_af26dfcaf0874d60b0cacb08ffbdeafc\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [],\n \"object\": \"ScanForm\",\n \"status\": \"creating\"\n },\n \"created_at\": \"2022-11-14T22:46:46Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_3dbcc58edda04ce486e3b81f8e3deaaa\",\n \"tracking_code\": \"9400100106068149679937\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:46:57Z\",\n \"id\": \"batch_fb5bd98e37a9474aa921543b5abedb8a\",\n \"state\": \"purchased\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -211,7 +214,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -238,26 +241,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d063f7df3de000086f07" + "3a8b2e0a6372c561e0d9e6230019aff6" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.104396" + "0.086702" ], "etag": [ - "W/\"e8aaaba039bc8a404a8a4bb6b56bfa9b\"" + "W/\"36e7e850adc9825f2bc76ce0ccf824e3\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -267,9 +271,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches/batch_c97ca77dc6d646b0b7f0680426282d0e/scan_form" + "uri": "https://api.easypost.com/v2/batches/batch_fb5bd98e37a9474aa921543b5abedb8a/scan_form" }, - "duration": 236 + "duration": 296 } ] \ No newline at end of file diff --git a/src/test/cassettes/batch/label.json b/src/test/cassettes/batch/label.json index c01316986..dc37b77a4 100644 --- a/src/test/cassettes/batch/label.json +++ b/src/test/cassettes/batch/label.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456483, + "recordedAt": 1668466017, "request": { "body": "{\n \"batch\": {\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/batches" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:23Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-25T19:41:23Z\",\n \"id\": \"batch_5379b920aaa740318012b21a751b42a7\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:46:57Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:46:57Z\",\n \"id\": \"batch_4cbc0955f76942f8bb23e8bb68cf1ef8\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d063f7b6baf200086f35" + "3a8b2e0b6372c561e0d9e63c0019b022" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.100026" + "0.035808" ], "etag": [ - "W/\"d5875f887193936b84a6804d07fde803\"" + "W/\"79982db3d4ed19eb5691254d37706f1c\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 237 + "duration": 271 }, { - "recordedAt": 1661456484, + "recordedAt": 1668466018, "request": { "body": "", "method": "POST", @@ -105,10 +105,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_5379b920aaa740318012b21a751b42a7/buy" + "uri": "https://api.easypost.com/v2/batches/batch_4cbc0955f76942f8bb23e8bb68cf1ef8/buy" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:23Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"queued_for_purchase\",\n \"id\": \"shp_583e27fc553e4c1c83fbd0d831013511\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-25T19:41:23Z\",\n \"id\": \"batch_5379b920aaa740318012b21a751b42a7\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 1.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:46:57Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"queued_for_purchase\",\n \"id\": \"shp_79d5500226ca41638db82f46eb5ba7ff\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:46:58Z\",\n \"id\": \"batch_4cbc0955f76942f8bb23e8bb68cf1ef8\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 1.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -121,7 +121,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -148,26 +148,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d064e68bbd4800086f55" + "3a8b2e0b6372c562e0d9e63d0019b042" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.054735" + "0.066302" ], "etag": [ - "W/\"9bb024082dc586d8d0a6d503097f1c19\"" + "W/\"b295ce61279f7311eaaf358ef0cde0ea\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +178,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches/batch_5379b920aaa740318012b21a751b42a7/buy" + "uri": "https://api.easypost.com/v2/batches/batch_4cbc0955f76942f8bb23e8bb68cf1ef8/buy" }, - "duration": 188 + "duration": 283 }, { - "recordedAt": 1661456494, + "recordedAt": 1668466028, "request": { "body": "{\n \"file_format\": \"ZPL\"\n}", "method": "POST", @@ -198,10 +198,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_5379b920aaa740318012b21a751b42a7/label" + "uri": "https://api.easypost.com/v2/batches/batch_4cbc0955f76942f8bb23e8bb68cf1ef8/label" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:23Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_583e27fc553e4c1c83fbd0d831013511\",\n \"tracking_code\": \"9400100109361135003561\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-25T19:41:34Z\",\n \"id\": \"batch_5379b920aaa740318012b21a751b42a7\",\n \"state\": \"label_generating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:46:57Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_79d5500226ca41638db82f46eb5ba7ff\",\n \"tracking_code\": \"9400100106068149680018\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:47:08Z\",\n \"id\": \"batch_4cbc0955f76942f8bb23e8bb68cf1ef8\",\n \"state\": \"label_generating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -214,7 +214,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -241,26 +241,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d06ef7dac90500087494" + "3a8b2e0f6372c56ce0d9e6430019b3dc" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.039156" + "0.065328" ], "etag": [ - "W/\"c5af8632b8e3585e34e329d5cec4ff75\"" + "W/\"c2a949f41649342e4ae081cd5d40bbf1\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -270,9 +271,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches/batch_5379b920aaa740318012b21a751b42a7/label" + "uri": "https://api.easypost.com/v2/batches/batch_4cbc0955f76942f8bb23e8bb68cf1ef8/label" }, - "duration": 172 + "duration": 372 } ] \ No newline at end of file diff --git a/src/test/cassettes/batch/retrieve.json b/src/test/cassettes/batch/retrieve.json index 7d23a2c7d..5932c5b43 100644 --- a/src/test/cassettes/batch/retrieve.json +++ b/src/test/cassettes/batch/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456494, + "recordedAt": 1668466029, "request": { "body": "{\n \"batch\": {\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/batches" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:34Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-25T19:41:34Z\",\n \"id\": \"batch_6e4ea32b6a9d4ad698a85c5114bb4d5c\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:47:09Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:47:09Z\",\n \"id\": \"batch_e9e973cf347842aaa026fc938d4c5894\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d06ef7dc0839000874b1" + "3a8b2e0d6372c56ce0d9e65c0019b441" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.130214" + "0.054820" ], "etag": [ - "W/\"ee556d5d49c09c4f64fc573407015fbd\"" + "W/\"df37bb6b6a3b5e5bc0d97baa1f4b6ebd\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 267 + "duration": 284 }, { - "recordedAt": 1661456495, + "recordedAt": 1668466029, "request": { "body": "", "method": "GET", @@ -105,10 +105,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_6e4ea32b6a9d4ad698a85c5114bb4d5c" + "uri": "https://api.easypost.com/v2/batches/batch_e9e973cf347842aaa026fc938d4c5894" }, "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-08-25T19:41:34Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"created\",\n \"id\": \"shp_c6341056616b4f72b058bcfc1ce1d1af\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-08-25T19:41:35Z\",\n \"id\": \"batch_6e4ea32b6a9d4ad698a85c5114bb4d5c\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 1.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:47:09Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"created\",\n \"id\": \"shp_a554ccbe8e89454585ab7d68581e0db0\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:47:09Z\",\n \"id\": \"batch_e9e973cf347842aaa026fc938d4c5894\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 1.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -121,7 +121,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -148,26 +148,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d06fe68c4101000874e2" + "3a8b2e0f6372c56de0d9e65d0019b46e" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.022897" + "0.023707" ], "etag": [ - "W/\"73a9115f8021bcf7b4f1c603ad54663f\"" + "W/\"25923c28bbcd03cf243ff1a715d08ccd\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,9 +178,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches/batch_6e4ea32b6a9d4ad698a85c5114bb4d5c" + "uri": "https://api.easypost.com/v2/batches/batch_e9e973cf347842aaa026fc938d4c5894" }, - "duration": 150 + "duration": 278 } ] \ No newline at end of file diff --git a/src/test/cassettes/carrier_account/all.json b/src/test/cassettes/carrier_account/all.json index 154faca5a..d97bf40ca 100644 --- a/src/test/cassettes/carrier_account/all.json +++ b/src/test/cassettes/carrier_account/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456575, + "recordedAt": 1668466124, "request": { "body": "", "method": "GET", @@ -28,7 +28,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -48,9 +48,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -58,17 +55,18 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d0bff7ef285400089e45" + "3a8b2e0e6372c5cce0da511d0019dfb3" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.200455" + "0.229158" ], "etag": [ "W/\"9a7664ede6fee21d32d9a27cfd30144a\"" @@ -77,7 +75,7 @@ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +85,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/carrier_accounts" }, - "duration": 327 + "duration": 482 } ] \ No newline at end of file diff --git a/src/test/cassettes/carrier_account/create.json b/src/test/cassettes/carrier_account/create.json index 18b3ca20e..37bb530f5 100644 --- a/src/test/cassettes/carrier_account/create.json +++ b/src/test/cassettes/carrier_account/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456577, + "recordedAt": 1668466127, "request": { "body": "{\n \"carrier_account\": {\n \"test_credentials\": {},\n \"credentials\": {},\n \"type\": \"DhlEcsAccount\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/carrier_accounts" }, "response": { - "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-08-25T19:42:57Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:42:57Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_56bedf5c7c554ebea53d9684ffc83ddc\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-11-14T22:48:47Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:48:47Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_4737d7fd85444fc98eeb2121d6ddaf26\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d0c1f7cd291400089f4e" + "3a8b2e0f6372c5cfe0da513c0019e100" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.112914" + "0.118312" ], "etag": [ - "W/\"05176cd79e94f82b4125ab31f4d513b3\"" + "W/\"b2334539dc85781dddee70ad1716b1a5\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/carrier_accounts" }, - "duration": 248 + "duration": 398 }, { - "recordedAt": 1661456577, + "recordedAt": 1668466127, "request": { "body": "", "method": "GET", @@ -105,10 +105,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_56bedf5c7c554ebea53d9684ffc83ddc" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_4737d7fd85444fc98eeb2121d6ddaf26" }, "response": { - "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-08-25T19:42:57Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:42:57Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_56bedf5c7c554ebea53d9684ffc83ddc\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-11-14T22:48:47Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:48:47Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_4737d7fd85444fc98eeb2121d6ddaf26\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ @@ -121,7 +121,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -148,26 +148,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d0c1f7bba0f500089f6e" + "3a8b2e096372c5cfe0da513d0019e135" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.027070" + "0.028238" ], "etag": [ - "W/\"05176cd79e94f82b4125ab31f4d513b3\"" + "W/\"b2334539dc85781dddee70ad1716b1a5\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +178,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_56bedf5c7c554ebea53d9684ffc83ddc" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_4737d7fd85444fc98eeb2121d6ddaf26" }, - "duration": 140 + "duration": 252 }, { - "recordedAt": 1661456577, + "recordedAt": 1668466128, "request": { "body": "", "method": "DELETE", @@ -195,7 +195,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_56bedf5c7c554ebea53d9684ffc83ddc" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_4737d7fd85444fc98eeb2121d6ddaf26" }, "response": { "body": "{}", @@ -211,7 +211,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -238,17 +238,18 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d0c1f7ca5e3000089f81" + "3a8b2e0c6372c5cfe0da513e0019e158" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.121117" + "0.127505" ], "etag": [ "W/\"44136fa355b3678a1146ad16f7e8649e\"" @@ -257,7 +258,7 @@ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -267,9 +268,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_56bedf5c7c554ebea53d9684ffc83ddc" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_4737d7fd85444fc98eeb2121d6ddaf26" }, - "duration": 248 + "duration": 386 } ] \ No newline at end of file diff --git a/src/test/cassettes/carrier_account/delete.json b/src/test/cassettes/carrier_account/delete.json index 936bc0b8f..7807d7509 100644 --- a/src/test/cassettes/carrier_account/delete.json +++ b/src/test/cassettes/carrier_account/delete.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456578, + "recordedAt": 1668466128, "request": { "body": "{\n \"carrier_account\": {\n \"test_credentials\": {},\n \"credentials\": {},\n \"type\": \"DhlEcsAccount\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/carrier_accounts" }, "response": { - "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-08-25T19:42:57Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:42:57Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_16de04b2f3cf483186a4a6f0c768001f\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-11-14T22:48:48Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:48:48Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_e61123c10d8742abb6c2be09ea77530b\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d0c1f7ef3a0100089fc0" + "3a8b2e0e6372c5d0e0da51400019e189" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.113760" + "0.118100" ], "etag": [ - "W/\"90f4bf267bd3ae52f1142790e4da781a\"" + "W/\"8b41dbcce55a561eb3ada3bb32f390a3\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/carrier_accounts" }, - "duration": 252 + "duration": 341 }, { - "recordedAt": 1661456578, + "recordedAt": 1668466128, "request": { "body": "", "method": "DELETE", @@ -105,7 +105,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_16de04b2f3cf483186a4a6f0c768001f" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_e61123c10d8742abb6c2be09ea77530b" }, "response": { "body": "{}", @@ -121,7 +121,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -148,17 +148,18 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d0c2f80134fb00089ff8" + "3a8b2e0a6372c5d0e0da51410019e1b4" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.113977" + "0.132244" ], "etag": [ "W/\"44136fa355b3678a1146ad16f7e8649e\"" @@ -167,7 +168,7 @@ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +178,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_16de04b2f3cf483186a4a6f0c768001f" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_e61123c10d8742abb6c2be09ea77530b" }, - "duration": 245 + "duration": 374 }, { - "recordedAt": 1661456578, + "recordedAt": 1668466129, "request": { "body": "", "method": "GET", @@ -195,10 +195,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_16de04b2f3cf483186a4a6f0c768001f" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_e61123c10d8742abb6c2be09ea77530b" }, "response": { - "body": null, + "body": "{\n \"error\": {\n \"code\": \"NOT_FOUND\",\n \"message\": \"The requested resource could not be found.\",\n \"errors\": []\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -211,7 +211,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -238,23 +238,24 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d0c2f7a636100008a011" + "3a8b2e086372c5d1e0da51420019e1da" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.040628" + "0.040233" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -264,9 +265,8 @@ "code": 404, "message": "Not Found" }, - "errors": "{\n \"error\": {\n \"code\": \"NOT_FOUND\",\n \"message\": \"The requested resource could not be found.\",\n \"errors\": []\n }\n}", - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_16de04b2f3cf483186a4a6f0c768001f" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_e61123c10d8742abb6c2be09ea77530b" }, - "duration": 173 + "duration": 263 } ] \ No newline at end of file diff --git a/src/test/cassettes/carrier_account/retrieve.json b/src/test/cassettes/carrier_account/retrieve.json index f28786994..6d57b1421 100644 --- a/src/test/cassettes/carrier_account/retrieve.json +++ b/src/test/cassettes/carrier_account/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456576, + "recordedAt": 1668466125, "request": { "body": "{\n \"carrier_account\": {\n \"test_credentials\": {},\n \"credentials\": {},\n \"type\": \"DhlEcsAccount\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/carrier_accounts" }, "response": { - "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-08-25T19:42:55Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:42:55Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_459e8455379b4677b4555d9b20d50311\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-11-14T22:48:45Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:48:45Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_24589988cf784e5babab74f796964409\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d0bff7dcfaae00089eaa" + "3a8b2e096372c5cde0da51200019e02e" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.112260" + "0.129495" ], "etag": [ - "W/\"2c01b8d5c38fd5b1cadcfcc9bbc00ba8\"" + "W/\"c068cfb3d28f09b5ad353bb9e0861330\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/carrier_accounts" }, - "duration": 243 + "duration": 456 }, { - "recordedAt": 1661456576, + "recordedAt": 1668466126, "request": { "body": "", "method": "GET", @@ -105,10 +105,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_459e8455379b4677b4555d9b20d50311" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_24589988cf784e5babab74f796964409" }, "response": { - "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-08-25T19:42:55Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:42:55Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_459e8455379b4677b4555d9b20d50311\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-11-14T22:48:45Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:48:45Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_24589988cf784e5babab74f796964409\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ @@ -148,26 +148,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d0c0f7ff215d00089ee2" + "3a8b2e086372c5cee0da51390019e0a1" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.028098" + "0.034066" ], "etag": [ - "W/\"2c01b8d5c38fd5b1cadcfcc9bbc00ba8\"" + "W/\"c068cfb3d28f09b5ad353bb9e0861330\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +178,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_459e8455379b4677b4555d9b20d50311" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_24589988cf784e5babab74f796964409" }, - "duration": 148 + "duration": 249 }, { - "recordedAt": 1661456576, + "recordedAt": 1668466126, "request": { "body": "", "method": "DELETE", @@ -195,7 +195,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_459e8455379b4677b4555d9b20d50311" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_24589988cf784e5babab74f796964409" }, "response": { "body": "{}", @@ -238,17 +238,18 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d0c0f7cdac9000089f0e" + "3a8b2e096372c5cee0da513a0019e0c2" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.114576" + "0.131337" ], "etag": [ "W/\"44136fa355b3678a1146ad16f7e8649e\"" @@ -257,7 +258,7 @@ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -267,9 +268,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_459e8455379b4677b4555d9b20d50311" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_24589988cf784e5babab74f796964409" }, - "duration": 250 + "duration": 347 } ] \ No newline at end of file diff --git a/src/test/cassettes/carrier_account/types.json b/src/test/cassettes/carrier_account/types.json index eefb7e776..17ff82d26 100644 --- a/src/test/cassettes/carrier_account/types.json +++ b/src/test/cassettes/carrier_account/types.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456575, + "recordedAt": 1668466125, "request": { "body": "", "method": "GET", @@ -15,20 +15,20 @@ "uri": "https://api.easypost.com/v2/carrier_types" }, "response": { - "body": "[\n {\n \"readable\": \"Amazon MWS\",\n \"logo\": null,\n \"type\": \"AmazonMwsAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"APC\",\n \"logo\": null,\n \"type\": \"ApcAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Asendia USA (Legacy)\",\n \"logo\": null,\n \"type\": \"AsendiaAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Asendia USA\",\n \"logo\": null,\n \"type\": \"AsendiaUsaAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Australia Post\",\n \"logo\": null,\n \"type\": \"AustraliaPostAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"AxlehireV3\",\n \"logo\": null,\n \"type\": \"AxlehireV3Account\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Better Trucks\",\n \"logo\": null,\n \"type\": \"BetterTrucksAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Bond\",\n \"logo\": null,\n \"type\": \"BondAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Canada Post\",\n \"logo\": null,\n \"type\": \"CanadaPostAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {},\n \"custom_workflow\": true\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Canpar\",\n \"logo\": null,\n \"type\": \"CanparAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"CDL Last Mile Solutions\",\n \"logo\": null,\n \"type\": \"ColumbusLastMileAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Courier Express\",\n \"logo\": null,\n \"type\": \"CourierExpressAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"CouriersPlease\",\n \"logo\": null,\n \"type\": \"CouriersPleaseAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Dai Post\",\n \"logo\": null,\n \"type\": \"DaiPostAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Deutsche Post UK\",\n \"logo\": null,\n \"type\": \"DeutschePostUKAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"DHL Ecommerce Asia\",\n \"logo\": null,\n \"type\": \"DhlEcommerceAsiaAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"DHL eCommerce Solutions\",\n \"logo\": null,\n \"type\": \"DhlEcsAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"DHL Express\",\n \"logo\": null,\n \"type\": \"DhlExpressAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"DHL Parcel\",\n \"logo\": null,\n \"type\": \"DhlParcelAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"DPD\",\n \"logo\": null,\n \"type\": \"DpdAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"DPD UK\",\n \"logo\": null,\n \"type\": \"DpdUkAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Estafeta\",\n \"logo\": null,\n \"type\": \"EstafetaAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Fastway\",\n \"logo\": null,\n \"type\": \"FastwayAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"FedEx\",\n \"logo\": null,\n \"type\": \"FedexAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {},\n \"creation_fields\": {\n \"company_information\": {\n \"corporate_company_name\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Name\"\n },\n \"corporate_job_title\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact Job Title\"\n },\n \"corporate_state\": {\n \"visibility\": \"visible\",\n \"label\": \"Company State\"\n },\n \"corporate_city\": {\n \"visibility\": \"visible\",\n \"label\": \"Company City\"\n },\n \"corporate_first_name\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact First Name\"\n },\n \"corporate_country_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Country Code\"\n },\n \"corporate_last_name\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact Last Name\"\n },\n \"corporate_email_address\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Email\"\n },\n \"corporate_postal_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Postal Code\"\n },\n \"corporate_phone_number\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Phone\"\n },\n \"corporate_streets\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Street\"\n }\n },\n \"credential_information\": {\n \"account_number\": {\n \"visibility\": \"visible\",\n \"label\": \"FedEx Account #\"\n }\n },\n \"address_information\": {\n \"shipping_state\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping State\"\n },\n \"shipping_city\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping City\"\n },\n \"shipping_streets\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Street\"\n },\n \"shipping_country_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Country Code\"\n },\n \"shipping_postal_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Postal Code \"\n }\n }\n },\n \"custom_workflow\": true\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"FedEx Cross Border\",\n \"logo\": null,\n \"type\": \"FedexCrossBorderAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"FedEx MailView\",\n \"logo\": null,\n \"type\": \"FedexMailviewAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"FedEx SameDay City\",\n \"logo\": null,\n \"type\": \"FedexSamedayCityAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"FedEx SmartPost\",\n \"logo\": null,\n \"type\": \"FedexSmartpostAccount\",\n \"fields\": {\n \"credentials\": {},\n \"creation_fields\": {\n \"company_information\": {\n \"corporate_company_name\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Name\"\n },\n \"corporate_job_title\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact Job Title\"\n },\n \"corporate_state\": {\n \"visibility\": \"visible\",\n \"label\": \"Company State\"\n },\n \"corporate_city\": {\n \"visibility\": \"visible\",\n \"label\": \"Company City\"\n },\n \"corporate_first_name\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact First Name\"\n },\n \"corporate_country_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Country Code\"\n },\n \"corporate_last_name\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact Last Name\"\n },\n \"corporate_email_address\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Email\"\n },\n \"corporate_postal_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Postal Code\"\n },\n \"corporate_phone_number\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Phone\"\n },\n \"corporate_streets\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Street\"\n }\n },\n \"credential_information\": {\n \"account_number\": {\n \"visibility\": \"visible\",\n \"label\": \"FedEx SmartPost Account #\"\n },\n \"hub_id\": {\n \"visibility\": \"visible\",\n \"label\": \"FedEx SmartPost Hub ID\"\n }\n },\n \"address_information\": {\n \"shipping_state\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping State\"\n },\n \"shipping_city\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping City\"\n },\n \"shipping_streets\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Street\"\n },\n \"shipping_country_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Country Code\"\n },\n \"shipping_postal_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Postal Code \"\n }\n }\n },\n \"custom_workflow\": true\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Globegistics\",\n \"logo\": null,\n \"type\": \"GlobegisticsAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"GSO\",\n \"logo\": null,\n \"type\": \"GsoAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Evri\",\n \"logo\": null,\n \"type\": \"HermesAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Interlink Express\",\n \"logo\": null,\n \"type\": \"InterlinkExpressAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"LaserShipV2\",\n \"logo\": null,\n \"type\": \"LasershipV2Account\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Loomis Express\",\n \"logo\": null,\n \"type\": \"LoomisExpressAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"LSO\",\n \"logo\": null,\n \"type\": \"LsoAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Newgistics\",\n \"logo\": null,\n \"type\": \"NewgisticsAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"OmniParcel\",\n \"logo\": null,\n \"type\": \"OmniParcelAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"OnTrac\",\n \"logo\": null,\n \"type\": \"OntracAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"OSM Worldwide\",\n \"logo\": null,\n \"type\": \"OsmWorldwideAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Parcel Force\",\n \"logo\": null,\n \"type\": \"ParcelForceAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Parcll\",\n \"logo\": null,\n \"type\": \"ParcllAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Passport Global\",\n \"logo\": null,\n \"type\": \"PassportGlobalAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Purolator\",\n \"logo\": null,\n \"type\": \"PurolatorAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Royal Mail\",\n \"logo\": null,\n \"type\": \"RoyalMailAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"ePost Global\",\n \"logo\": null,\n \"type\": \"RRDonnelleyAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Sendle\",\n \"logo\": null,\n \"type\": \"SendleAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"SF Express\",\n \"logo\": null,\n \"type\": \"SfExpressAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Spee-Dee\",\n \"logo\": null,\n \"type\": \"SpeedeeAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"StarTrack\",\n \"logo\": null,\n \"type\": \"StarTrackAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Swyft\",\n \"logo\": null,\n \"type\": \"SwyftAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"TForce\",\n \"logo\": null,\n \"type\": \"TforceConciseAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"UDS\",\n \"logo\": null,\n \"type\": \"UdsAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"UPS\",\n \"logo\": null,\n \"type\": \"UpsAccount\",\n \"fields\": {\n \"credentials\": {},\n \"custom_workflow\": true\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"UPS i-Parcel\",\n \"logo\": null,\n \"type\": \"UpsIparcelAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"UPS Mail Innovations\",\n \"logo\": null,\n \"type\": \"UpsMailInnovationsAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"USPS\",\n \"logo\": null,\n \"type\": \"UspsAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Veho\",\n \"logo\": null,\n \"type\": \"VehoAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n }\n]", + "body": "[\n {\n \"readable\": \"Amazon MWS\",\n \"logo\": null,\n \"type\": \"AmazonMwsAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"APC\",\n \"logo\": null,\n \"type\": \"ApcAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Asendia USA (Legacy)\",\n \"logo\": null,\n \"type\": \"AsendiaAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Asendia USA\",\n \"logo\": null,\n \"type\": \"AsendiaUsaAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Australia Post\",\n \"logo\": null,\n \"type\": \"AustraliaPostAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"AxlehireV3\",\n \"logo\": null,\n \"type\": \"AxlehireV3Account\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Better Trucks\",\n \"logo\": null,\n \"type\": \"BetterTrucksAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Bond\",\n \"logo\": null,\n \"type\": \"BondAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Canada Post\",\n \"logo\": null,\n \"type\": \"CanadaPostAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {},\n \"custom_workflow\": true\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Canpar\",\n \"logo\": null,\n \"type\": \"CanparAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"CDL Last Mile Solutions\",\n \"logo\": null,\n \"type\": \"ColumbusLastMileAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Courier Express\",\n \"logo\": null,\n \"type\": \"CourierExpressAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"CouriersPlease\",\n \"logo\": null,\n \"type\": \"CouriersPleaseAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Dai Post\",\n \"logo\": null,\n \"type\": \"DaiPostAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Deliver-It\",\n \"logo\": null,\n \"type\": \"DeliverItAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Deutsche Post UK\",\n \"logo\": null,\n \"type\": \"DeutschePostUKAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"DHL Ecommerce Asia\",\n \"logo\": null,\n \"type\": \"DhlEcommerceAsiaAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"DHL eCommerce Solutions\",\n \"logo\": null,\n \"type\": \"DhlEcsAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"DHL Express\",\n \"logo\": null,\n \"type\": \"DhlExpressAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"DHL Parcel\",\n \"logo\": null,\n \"type\": \"DhlParcelAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"DPD\",\n \"logo\": null,\n \"type\": \"DpdAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"DPD UK\",\n \"logo\": null,\n \"type\": \"DpdUkAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Estafeta\",\n \"logo\": null,\n \"type\": \"EstafetaAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Fastway\",\n \"logo\": null,\n \"type\": \"FastwayAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"FedEx\",\n \"logo\": null,\n \"type\": \"FedexAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {},\n \"creation_fields\": {\n \"company_information\": {\n \"corporate_company_name\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Name\"\n },\n \"corporate_job_title\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact Job Title\"\n },\n \"corporate_state\": {\n \"visibility\": \"visible\",\n \"label\": \"Company State\"\n },\n \"corporate_city\": {\n \"visibility\": \"visible\",\n \"label\": \"Company City\"\n },\n \"corporate_first_name\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact First Name\"\n },\n \"corporate_country_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Country Code\"\n },\n \"corporate_last_name\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact Last Name\"\n },\n \"corporate_email_address\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Email\"\n },\n \"corporate_postal_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Postal Code\"\n },\n \"corporate_phone_number\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Phone\"\n },\n \"corporate_streets\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Street\"\n }\n },\n \"credential_information\": {\n \"account_number\": {\n \"visibility\": \"visible\",\n \"label\": \"FedEx Account #\"\n }\n },\n \"address_information\": {\n \"shipping_state\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping State\"\n },\n \"shipping_city\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping City\"\n },\n \"shipping_streets\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Street\"\n },\n \"shipping_country_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Country Code\"\n },\n \"shipping_postal_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Postal Code \"\n }\n }\n },\n \"custom_workflow\": true\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"FedEx Cross Border\",\n \"logo\": null,\n \"type\": \"FedexCrossBorderAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"FedEx MailView\",\n \"logo\": null,\n \"type\": \"FedexMailviewAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"FedEx SameDay City\",\n \"logo\": null,\n \"type\": \"FedexSamedayCityAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"FedEx SmartPost\",\n \"logo\": null,\n \"type\": \"FedexSmartpostAccount\",\n \"fields\": {\n \"credentials\": {},\n \"creation_fields\": {\n \"company_information\": {\n \"corporate_company_name\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Name\"\n },\n \"corporate_job_title\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact Job Title\"\n },\n \"corporate_state\": {\n \"visibility\": \"visible\",\n \"label\": \"Company State\"\n },\n \"corporate_city\": {\n \"visibility\": \"visible\",\n \"label\": \"Company City\"\n },\n \"corporate_first_name\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact First Name\"\n },\n \"corporate_country_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Country Code\"\n },\n \"corporate_last_name\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact Last Name\"\n },\n \"corporate_email_address\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Email\"\n },\n \"corporate_postal_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Postal Code\"\n },\n \"corporate_phone_number\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Phone\"\n },\n \"corporate_streets\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Street\"\n }\n },\n \"credential_information\": {\n \"account_number\": {\n \"visibility\": \"visible\",\n \"label\": \"FedEx SmartPost Account #\"\n },\n \"hub_id\": {\n \"visibility\": \"visible\",\n \"label\": \"FedEx SmartPost Hub ID\"\n }\n },\n \"address_information\": {\n \"shipping_state\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping State\"\n },\n \"shipping_city\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping City\"\n },\n \"shipping_streets\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Street\"\n },\n \"shipping_country_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Country Code\"\n },\n \"shipping_postal_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Postal Code \"\n }\n }\n },\n \"custom_workflow\": true\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"First Mile\",\n \"logo\": null,\n \"type\": \"FirstMileConciseAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Globegistics\",\n \"logo\": null,\n \"type\": \"GlobegisticsAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"GSO\",\n \"logo\": null,\n \"type\": \"GsoAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Evri\",\n \"logo\": null,\n \"type\": \"HermesAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Interlink Express\",\n \"logo\": null,\n \"type\": \"InterlinkExpressAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"LaserShipV2\",\n \"logo\": null,\n \"type\": \"LasershipV2Account\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Loomis Express\",\n \"logo\": null,\n \"type\": \"LoomisExpressAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"LSO\",\n \"logo\": null,\n \"type\": \"LsoAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Newgistics\",\n \"logo\": null,\n \"type\": \"NewgisticsAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"OmniParcel\",\n \"logo\": null,\n \"type\": \"OmniParcelAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"OnTrac\",\n \"logo\": null,\n \"type\": \"OntracAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Optima\",\n \"logo\": null,\n \"type\": \"OptimaAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"OSM Worldwide\",\n \"logo\": null,\n \"type\": \"OsmWorldwideAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Parcel Force\",\n \"logo\": null,\n \"type\": \"ParcelForceAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Parcll\",\n \"logo\": null,\n \"type\": \"ParcllAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Passport Global\",\n \"logo\": null,\n \"type\": \"PassportGlobalAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Purolator\",\n \"logo\": null,\n \"type\": \"PurolatorAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Royal Mail\",\n \"logo\": null,\n \"type\": \"RoyalMailAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"ePost Global\",\n \"logo\": null,\n \"type\": \"RRDonnelleyAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Sendle\",\n \"logo\": null,\n \"type\": \"SendleAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"SF Express\",\n \"logo\": null,\n \"type\": \"SfExpressAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Sonic\",\n \"logo\": null,\n \"type\": \"SonicAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Spee-Dee\",\n \"logo\": null,\n \"type\": \"SpeedeeAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"StarTrack\",\n \"logo\": null,\n \"type\": \"StarTrackAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Swyft\",\n \"logo\": null,\n \"type\": \"SwyftAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"TForce\",\n \"logo\": null,\n \"type\": \"TforceConciseAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"UDS\",\n \"logo\": null,\n \"type\": \"UdsAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"UPS\",\n \"logo\": null,\n \"type\": \"UpsAccount\",\n \"fields\": {\n \"credentials\": {},\n \"creation_fields\": {\n \"registration_data\": {\n \"account_number\": {\n \"visibility\": \"visible\",\n \"label\": \"UPS Account Number\"\n },\n \"country\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Country\"\n },\n \"website\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Website\"\n },\n \"city\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping City\"\n },\n \"invoice_control_id\": {\n \"visibility\": \"visible\",\n \"label\": \"UPS Invoice Control ID\"\n },\n \"title\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact Job Title\"\n },\n \"invoice_amount\": {\n \"visibility\": \"visible\",\n \"label\": \"UPS Invoice Amount\"\n },\n \"invoice_date\": {\n \"visibility\": \"visible\",\n \"label\": \"UPS Invoice Date\"\n },\n \"phone\": {},\n \"name\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Contact Name\"\n },\n \"client_ip\": {},\n \"company\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Name\"\n },\n \"street1\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Street 1\"\n },\n \"street2\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Street 2\"\n },\n \"state\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping State\"\n },\n \"postal_code\": {\n \"visibility\": \"visible\",\n \"label\": \"Shipping Postal Code\"\n },\n \"invoice_currency\": {\n \"visibility\": \"visible\",\n \"label\": \"UPS Invoice Currency\"\n },\n \"invoice_number\": {\n \"visibility\": \"visible\",\n \"label\": \"UPS Invoice Number\"\n },\n \"email\": {\n \"visibility\": \"visible\",\n \"label\": \"Company Email\"\n }\n }\n },\n \"custom_workflow\": true\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"UPS i-Parcel\",\n \"logo\": null,\n \"type\": \"UpsIparcelAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"UPS Mail Innovations\",\n \"logo\": null,\n \"type\": \"UpsMailInnovationsAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"USPS\",\n \"logo\": null,\n \"type\": \"UspsAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Veho\",\n \"logo\": null,\n \"type\": \"VehoAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"XDelivery\",\n \"logo\": null,\n \"type\": \"XDeliveryAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n }\n]", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "32708" + "36604" ], "expires": [ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,26 +55,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d0bff7b7b1b100089e7c" + "3a8b2e0d6372c5cde0da511e0019e003" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.034258" + "0.037259" ], "etag": [ - "W/\"520345ce7fba75ebc602d7f8070d61c7\"" + "W/\"dac7e98243c5254fb9a0fb395643d881\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +85,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/carrier_types" }, - "duration": 164 + "duration": 276 } ] \ No newline at end of file diff --git a/src/test/cassettes/carrier_account/update.json b/src/test/cassettes/carrier_account/update.json index 5cc396c70..d1fd350b6 100644 --- a/src/test/cassettes/carrier_account/update.json +++ b/src/test/cassettes/carrier_account/update.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456579, + "recordedAt": 1668466129, "request": { "body": "{\n \"carrier_account\": {\n \"test_credentials\": {},\n \"credentials\": {},\n \"type\": \"DhlEcsAccount\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/carrier_accounts" }, "response": { - "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-08-25T19:42:59Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:42:59Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_98cc747e399a41ab92abbf54f49711a7\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-11-14T22:48:49Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:48:49Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_8e517a8f402b440b85f690a3fbd535b4\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d0c3f7ff07300008a06f" + "3a8b2e096372c5d1e0da515b0019e1fd" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.175086" + "0.116621" ], "etag": [ - "W/\"eacbd52093063d79d1cd7af0d72246aa\"" + "W/\"05783d30c318ddba32b8bf55484aa8b7\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/carrier_accounts" }, - "duration": 403 + "duration": 366 }, { - "recordedAt": 1661456579, + "recordedAt": 1668466130, "request": { "body": "{\n \"carrier_account\": {\n \"description\": \"My custom description\"\n }\n}", "method": "PUT", @@ -108,10 +108,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_98cc747e399a41ab92abbf54f49711a7" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_8e517a8f402b440b85f690a3fbd535b4" }, "response": { - "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-08-25T19:42:59Z\",\n \"description\": \"My custom description\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:42:59Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_98cc747e399a41ab92abbf54f49711a7\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-11-14T22:48:49Z\",\n \"description\": \"My custom description\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:48:50Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_8e517a8f402b440b85f690a3fbd535b4\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,7 +124,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d0c3f7dbe62e0008a097" + "3a8b2e0f6372c5d1e0da515d0019e22e" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.122649" + "0.140442" ], "etag": [ - "W/\"8fa2158af6f19c4f54aa9dc0a658628d\"" + "W/\"369e6146a6092628ae6453cd922bb51f\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,13 +181,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_98cc747e399a41ab92abbf54f49711a7" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_8e517a8f402b440b85f690a3fbd535b4" }, - "duration": 256 + "duration": 464 }, { - "recordedAt": 1661456579, + "recordedAt": 1668466130, "request": { "body": "", "method": "GET", @@ -198,10 +198,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_98cc747e399a41ab92abbf54f49711a7" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_8e517a8f402b440b85f690a3fbd535b4" }, "response": { - "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-08-25T19:42:59Z\",\n \"description\": \"My custom description\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:42:59Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_98cc747e399a41ab92abbf54f49711a7\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "body": "{\n \"readable\": \"DHL eCommerce Solutions\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2022-11-14T22:48:49Z\",\n \"description\": \"My custom description\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:48:50Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_8e517a8f402b440b85f690a3fbd535b4\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ @@ -214,7 +214,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -241,26 +241,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d0c3f7ca66f50008a0c7" + "3a8b2e0b6372c5d2e0da515e0019e259" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.029444" + "0.023997" ], "etag": [ - "W/\"8fa2158af6f19c4f54aa9dc0a658628d\"" + "W/\"369e6146a6092628ae6453cd922bb51f\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -270,13 +271,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_98cc747e399a41ab92abbf54f49711a7" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_8e517a8f402b440b85f690a3fbd535b4" }, - "duration": 153 + "duration": 263 }, { - "recordedAt": 1661456580, + "recordedAt": 1668466130, "request": { "body": "", "method": "DELETE", @@ -288,7 +288,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_98cc747e399a41ab92abbf54f49711a7" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_8e517a8f402b440b85f690a3fbd535b4" }, "response": { "body": "{}", @@ -304,7 +304,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -331,17 +331,18 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d0c4f7a499950008a0db" + "3a8b2e0d6372c5d2e0da515f0019e271" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.107952" + "0.133928" ], "etag": [ "W/\"44136fa355b3678a1146ad16f7e8649e\"" @@ -350,7 +351,7 @@ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -360,9 +361,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_98cc747e399a41ab92abbf54f49711a7" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_8e517a8f402b440b85f690a3fbd535b4" }, - "duration": 236 + "duration": 395 } ] \ No newline at end of file diff --git a/src/test/cassettes/customs_info/create.json b/src/test/cassettes/customs_info/create.json index aad477802..935dabc90 100644 --- a/src/test/cassettes/customs_info/create.json +++ b/src/test/cassettes/customs_info/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456506, + "recordedAt": 1668466044, "request": { "body": "{\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/customs_infos" }, "response": { - "body": "{\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-08-25T19:41:46Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-08-25T19:41:46Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:46Z\",\n \"currency\": null,\n \"id\": \"cstitem_c3d03441ebcb430d9d0b655e1e9dd467\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-08-25T19:41:46Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_867a5aef6ad646fab264e19a90d865ad\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n}", + "body": "{\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:24Z\",\n \"currency\": null,\n \"id\": \"cstitem_1bc12729925c48cc860c3d1c86ded111\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-11-14T22:47:24Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_f5dc56c520874558a08efe480499067d\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d07af7ca677300087b39" + "3a8b2e0f6372c57be0d9e7040019b9cc" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.032946" + "0.032011" ], "etag": [ - "W/\"7008ddd112fe468470783968cee5af40\"" + "W/\"18bec9d8a640ef2679bace941f84e35a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/customs_infos/cstinfo_867a5aef6ad646fab264e19a90d865ad" + "/api/v2/customs_infos/cstinfo_f5dc56c520874558a08efe480499067d" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/customs_infos" }, - "duration": 171 + "duration": 262 } ] \ No newline at end of file diff --git a/src/test/cassettes/customs_info/retrieve.json b/src/test/cassettes/customs_info/retrieve.json index edab1537f..b20799af9 100644 --- a/src/test/cassettes/customs_info/retrieve.json +++ b/src/test/cassettes/customs_info/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456506, + "recordedAt": 1668466043, "request": { "body": "{\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/customs_infos" }, "response": { - "body": "{\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-08-25T19:41:46Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-08-25T19:41:46Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:46Z\",\n \"currency\": null,\n \"id\": \"cstitem_6060ad66555b4e49ada8513d14d8220f\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-08-25T19:41:46Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_2e05f150163a4fb49399074f6a4d49d1\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n}", + "body": "{\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-11-14T22:47:23Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-11-14T22:47:23Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:23Z\",\n \"currency\": null,\n \"id\": \"cstitem_41e2dc611b524175835aabc0647780c3\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-11-14T22:47:23Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_c894e123ed59428b8903c96a2c31c9cb\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d07af7ed6e7400087af3" + "3a8b2e0e6372c57be0d9e7010019b97a" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.028621" + "0.031981" ], "etag": [ - "W/\"29d01013151e09d2b3f0266c28dbc5ca\"" + "W/\"ee64cce48110cc1bf7ee9b12a4eae9b9\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/customs_infos/cstinfo_2e05f150163a4fb49399074f6a4d49d1" + "/api/v2/customs_infos/cstinfo_c894e123ed59428b8903c96a2c31c9cb" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/customs_infos" }, - "duration": 165 + "duration": 243 }, { - "recordedAt": 1661456506, + "recordedAt": 1668466043, "request": { "body": "", "method": "GET", @@ -108,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/customs_infos/cstinfo_2e05f150163a4fb49399074f6a4d49d1" + "uri": "https://api.easypost.com/v2/customs_infos/cstinfo_c894e123ed59428b8903c96a2c31c9cb" }, "response": { - "body": "{\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-08-25T19:41:46Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-08-25T19:41:46Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:46Z\",\n \"currency\": null,\n \"id\": \"cstitem_6060ad66555b4e49ada8513d14d8220f\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-08-25T19:41:46Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_2e05f150163a4fb49399074f6a4d49d1\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n}", + "body": "{\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-11-14T22:47:23Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-11-14T22:47:23Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:23Z\",\n \"currency\": null,\n \"id\": \"cstitem_41e2dc611b524175835aabc0647780c3\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-11-14T22:47:23Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_c894e123ed59428b8903c96a2c31c9cb\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,7 +124,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d07af7a86bb900087b0b" + "3a8b2e0f6372c57be0d9e7020019b99a" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.024431" + "0.023052" ], "etag": [ - "W/\"29d01013151e09d2b3f0266c28dbc5ca\"" + "W/\"ee64cce48110cc1bf7ee9b12a4eae9b9\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +181,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/customs_infos/cstinfo_2e05f150163a4fb49399074f6a4d49d1" + "uri": "https://api.easypost.com/v2/customs_infos/cstinfo_c894e123ed59428b8903c96a2c31c9cb" }, - "duration": 157 + "duration": 252 } ] \ No newline at end of file diff --git a/src/test/cassettes/customs_item/create.json b/src/test/cassettes/customs_item/create.json index ce0d2d58e..95ec84058 100644 --- a/src/test/cassettes/customs_item/create.json +++ b/src/test/cassettes/customs_item/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456580, + "recordedAt": 1668466131, "request": { "body": "{\n \"customs_item\": {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/customs_items" }, "response": { - "body": "{\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-08-25T19:43:01Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:43:01Z\",\n \"currency\": null,\n \"id\": \"cstitem_aebbce7aece340f9b20b5c37b683b6b0\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n}", + "body": "{\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-11-14T22:48:51Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:51Z\",\n \"currency\": null,\n \"id\": \"cstitem_b70d0c5a2c7b4e2994e64c26d2c2aaf7\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d0c4f800399a0008a132" + "3a8b2e0f6372c5d3e0da517b0019e327" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.022698" + "0.025636" ], "etag": [ - "W/\"3479531fd248545e89de1e7b2d9acd40\"" + "W/\"7642d045031d6d0438e78be54db649cc\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/customs_items/cstitem_aebbce7aece340f9b20b5c37b683b6b0" + "/api/v2/customs_items/cstitem_b70d0c5a2c7b4e2994e64c26d2c2aaf7" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/customs_items" }, - "duration": 154 + "duration": 261 } ] \ No newline at end of file diff --git a/src/test/cassettes/customs_item/retrieve.json b/src/test/cassettes/customs_item/retrieve.json index 5d85f382d..9ba067dd6 100644 --- a/src/test/cassettes/customs_item/retrieve.json +++ b/src/test/cassettes/customs_item/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456580, + "recordedAt": 1668466131, "request": { "body": "{\n \"customs_item\": {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/customs_items" }, "response": { - "body": "{\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-08-25T19:43:00Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:43:00Z\",\n \"currency\": null,\n \"id\": \"cstitem_44e0b79edc5a474ab0e6aa921c9bb554\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n}", + "body": "{\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-11-14T22:48:51Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:51Z\",\n \"currency\": null,\n \"id\": \"cstitem_f4ac1013b4924d65a34193c0d57c6640\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d0c4f7c95ff60008a103" + "3a8b2e0c6372c5d3e0da51610019e2a3" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.028623" + "0.028289" ], "etag": [ - "W/\"359ce359ef9c1b5bd3774021ea701b85\"" + "W/\"3f41484da2c114a41c7053875d6e7f23\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/customs_items/cstitem_44e0b79edc5a474ab0e6aa921c9bb554" + "/api/v2/customs_items/cstitem_f4ac1013b4924d65a34193c0d57c6640" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/customs_items" }, - "duration": 163 + "duration": 313 }, { - "recordedAt": 1661456580, + "recordedAt": 1668466131, "request": { "body": "", "method": "GET", @@ -108,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/customs_items/cstitem_44e0b79edc5a474ab0e6aa921c9bb554" + "uri": "https://api.easypost.com/v2/customs_items/cstitem_f4ac1013b4924d65a34193c0d57c6640" }, "response": { - "body": "{\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-08-25T19:43:00Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:43:00Z\",\n \"currency\": null,\n \"id\": \"cstitem_44e0b79edc5a474ab0e6aa921c9bb554\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n}", + "body": "{\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-11-14T22:48:51Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:51Z\",\n \"currency\": null,\n \"id\": \"cstitem_f4ac1013b4924d65a34193c0d57c6640\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,7 +124,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d0c4f7df34750008a111" + "3a8b2e0d6372c5d3e0da51620019e2b9" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.025639" + "0.021832" ], "etag": [ - "W/\"359ce359ef9c1b5bd3774021ea701b85\"" + "W/\"3f41484da2c114a41c7053875d6e7f23\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +181,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/customs_items/cstitem_44e0b79edc5a474ab0e6aa921c9bb554" + "uri": "https://api.easypost.com/v2/customs_items/cstitem_f4ac1013b4924d65a34193c0d57c6640" }, - "duration": 155 + "duration": 230 } ] \ No newline at end of file diff --git a/src/test/cassettes/end_shipper/all.json b/src/test/cassettes/end_shipper/all.json index 440c246ab..a814d97f4 100644 --- a/src/test/cassettes/end_shipper/all.json +++ b/src/test/cassettes/end_shipper/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1666236891, + "recordedAt": 1668466149, "request": { "body": "", "method": "GET", @@ -15,20 +15,20 @@ "uri": "https://api.easypost.com/v2/end_shippers?page_size\u003d5" }, "response": { - "body": "{\n \"has_more\": false,\n \"end_shippers\": [\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:02+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_8eaae3d51c73441b99e4e4987967b108\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:03+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_7fe9380a871d462faba35c8badfe3af6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:03+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:04+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"NEW NAME\",\n \"company\": \"EASYPOST\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_2d007aa105de4b5e97cbcddf386a29b3\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n }\n ]\n}", + "body": "{\n \"has_more\": true,\n \"end_shippers\": [\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:02+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_8eaae3d51c73441b99e4e4987967b108\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:03+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_7fe9380a871d462faba35c8badfe3af6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:03+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:04+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"NEW NAME\",\n \"company\": \"EASYPOST\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_2d007aa105de4b5e97cbcddf386a29b3\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:35:00+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:35:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_b7ee940fb8f0487fa903360bca8e7237\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n },\n {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T16:20:41+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_182c2866d6c644038561f60c5976b1fa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "1141" + "1876" ], "expires": [ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,26 +55,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "c499f3b46350c1d9e2cba87b000bf068" + "3a8b2e0f6372c5e3e0da55380019e94f" ], "x-proxied": [ - "extlb1nuq 29913d444b", + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.735228" + "1.726421" ], "etag": [ - "W/\"3bda2e7b4995f9e4e53b637bc379de0f\"" + "W/\"6aa9e5bf6d2df9a5674558121d7d7e8f\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210192121-de6c7d8326-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +85,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/end_shippers?page_size\u003d5" }, - "duration": 1860 + "duration": 2017 } ] \ No newline at end of file diff --git a/src/test/cassettes/end_shipper/create.json b/src/test/cassettes/end_shipper/create.json index dbabc64e1..5596b13e8 100644 --- a/src/test/cassettes/end_shipper/create.json +++ b/src/test/cassettes/end_shipper/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1666236543, + "recordedAt": 1668466151, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/end_shippers" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:03+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_7fe9380a871d462faba35c8badfe3af6\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:49:10+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:49:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_311377b7bbb242bda3b4418c61f7bf30\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,27 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "85b6f8c76350c07fe2cb9fd1000961ef" + "3a8b2e0f6372c5e6e0da553d0019ea50" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", + "intlb1wdc 29913d444b", "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.052987" + "0.121419" ], "etag": [ - "W/\"90bc89628d353a14e6fb9bd721ad7b67\"" + "W/\"8412c8b7cbe8a11f3e1864cf0fb68083\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210192121-de6c7d8326-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -88,9 +88,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/end_shippers" }, - "duration": 418 + "duration": 398 } ] \ No newline at end of file diff --git a/src/test/cassettes/end_shipper/retrieve.json b/src/test/cassettes/end_shipper/retrieve.json index 5df0b5e67..2e5b949aa 100644 --- a/src/test/cassettes/end_shipper/retrieve.json +++ b/src/test/cassettes/end_shipper/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1666236542, + "recordedAt": 1668466150, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/end_shippers" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:02+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_8eaae3d51c73441b99e4e4987967b108\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:49:10+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:49:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_128d9ebaf3c443e9a190340550070acd\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,27 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "85b6f8c56350c07de2cb9cc0000961b9" + "3a8b2e0c6372c5e6e0da553a0019ea19" ], "x-proxied": [ "extlb4wdc 29913d444b", "intlb2wdc 29913d444b", - "intlb1nuq 29913d444b" + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.045062" + "0.047599" ], "etag": [ - "W/\"eeab1906a7a9250fb57f5e485468b32d\"" + "W/\"998f34033a6e10bcc84414112d742e9a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210192121-de6c7d8326-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -88,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/end_shippers" }, - "duration": 417 + "duration": 273 }, { - "recordedAt": 1666236542, + "recordedAt": 1668466150, "request": { "body": "", "method": "GET", @@ -106,10 +105,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/end_shippers/es_8eaae3d51c73441b99e4e4987967b108" + "uri": "https://api.easypost.com/v2/end_shippers/es_128d9ebaf3c443e9a190340550070acd" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:02+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_8eaae3d51c73441b99e4e4987967b108\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:49:10+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:49:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_128d9ebaf3c443e9a190340550070acd\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", "httpVersion": null, "headers": { "null": [ @@ -122,7 +121,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -142,6 +141,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -149,7 +151,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "85b6f8c06350c07ee2cb9fcf000961cd" + "3a8b2e0f6372c5e6e0da553b0019ea2a" ], "x-proxied": [ "extlb4wdc 29913d444b", @@ -160,16 +162,16 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.033413" + "0.033601" ], "etag": [ - "W/\"caf46cf486d8b579557a6f906308d794\"" + "W/\"b8fc9418015d90b9822f5e4de24cecf3\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210192121-de6c7d8326-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -179,9 +181,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/end_shippers/es_8eaae3d51c73441b99e4e4987967b108" + "uri": "https://api.easypost.com/v2/end_shippers/es_128d9ebaf3c443e9a190340550070acd" }, - "duration": 382 + "duration": 241 } ] \ No newline at end of file diff --git a/src/test/cassettes/end_shipper/update.json b/src/test/cassettes/end_shipper/update.json index 1ded276bf..322afcc3d 100644 --- a/src/test/cassettes/end_shipper/update.json +++ b/src/test/cassettes/end_shipper/update.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1666236543, + "recordedAt": 1668466151, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/end_shippers" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:03+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_2d007aa105de4b5e97cbcddf386a29b3\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:49:11+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:49:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_6c93659c15904c4f8c35b081ad1b6da9\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,27 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "85b6f8c76350c07fe2cb9fd300096206" + "3a8b2e0b6372c5e7e0da553f0019ea7b" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", + "intlb2wdc 29913d444b", "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.046669" + "0.041406" ], "etag": [ - "W/\"6b5c4d30ad53fe0538a717341448426c\"" + "W/\"d7d306cad732359c15ec81b6aae6f845\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210192121-de6c7d8326-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -88,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/end_shippers" }, - "duration": 392 + "duration": 281 }, { - "recordedAt": 1666236544, + "recordedAt": 1668466151, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"NEW NAME\",\n \"company\": \"EasyPost\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "PUT", @@ -109,10 +108,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/end_shippers/es_2d007aa105de4b5e97cbcddf386a29b3" + "uri": "https://api.easypost.com/v2/end_shippers/es_6c93659c15904c4f8c35b081ad1b6da9" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-20T03:29:03+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-20T03:29:04+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"NEW NAME\",\n \"company\": \"EASYPOST\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_2d007aa105de4b5e97cbcddf386a29b3\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:49:11+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:49:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"NEW NAME\",\n \"company\": \"EASYPOST\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_6c93659c15904c4f8c35b081ad1b6da9\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", "httpVersion": null, "headers": { "null": [ @@ -125,7 +124,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -152,27 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "85b6f8c36350c080e2cb9fd50009621e" + "3a8b2e096372c5e7e0da55410019ea98" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", - "intlb1nuq 29913d444b" + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.059590" + "0.064174" ], "etag": [ - "W/\"2618dc0063694be8677069fa6f9018fc\"" + "W/\"dc00bf1bab446f93e5d48167a358c22b\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210192121-de6c7d8326-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -182,9 +181,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/end_shippers/es_2d007aa105de4b5e97cbcddf386a29b3" + "uri": "https://api.easypost.com/v2/end_shippers/es_6c93659c15904c4f8c35b081ad1b6da9" }, - "duration": 432 + "duration": 370 } ] \ No newline at end of file diff --git a/src/test/cassettes/error/error.json b/src/test/cassettes/error/error.json index 334509fac..3de8e8da4 100644 --- a/src/test/cassettes/error/error.json +++ b/src/test/cassettes/error/error.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1666294010, + "recordedAt": 1668466152, "request": { - "body": "{}", + "body": "{\n \"carbon_offset\": false\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,23 +58,24 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "a224a4296351a0fae0ebf30a0005e4b2" + "3a8b2e0d6372c5e8e0da555a0019eac6" ], "x-proxied": [ - "extlb1nuq 29913d444b", + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.032120" + "0.035705" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210201856-ea17ac3304-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -86,6 +87,6 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 309 + "duration": 262 } ] \ No newline at end of file diff --git a/src/test/cassettes/event/all.json b/src/test/cassettes/event/all.json index 19ff2a844..9d1d0883b 100644 --- a/src/test/cassettes/event/all.json +++ b/src/test/cassettes/event/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456540, + "recordedAt": 1668466078, "request": { "body": "", "method": "GET", @@ -15,7 +15,7 @@ "uri": "https://api.easypost.com/v2/events?page_size\u003d5" }, "response": { - "body": "{\n \"has_more\": true,\n \"events\": [\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.created\",\n \"created_at\": \"2022-08-25T19:42:18.704Z\",\n \"id\": \"evt_077f41d024ae11edb9c91b5a718e3454\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.updated\",\n \"created_at\": \"2022-08-25T19:42:14.395Z\",\n \"id\": \"evt_04edd83224ae11ed8bd60b0a8a997384\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.updated\",\n \"created_at\": \"2022-08-25T19:42:13.904Z\",\n \"id\": \"evt_04a2edfe24ae11edb1690174852a1a5c\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.updated\",\n \"created_at\": \"2022-08-25T19:42:10.778Z\",\n \"id\": \"evt_02c5d5fa24ae11edbce20f79ccd3a408\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.created\",\n \"created_at\": \"2022-08-25T19:42:10.235Z\",\n \"id\": \"evt_0273007824ae11ed9e0e7554cdc03044\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n }\n ]\n}", + "body": "{\n \"has_more\": true,\n \"events\": [\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.created\",\n \"created_at\": \"2022-11-14T22:47:58.443Z\",\n \"id\": \"evt_62c23ec6646e11ed85ba3df5eacb9ac8\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.created\",\n \"created_at\": \"2022-11-14T22:47:55.946Z\",\n \"id\": \"evt_61453dfa646e11ed8edb6bbf0222a510\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.updated\",\n \"created_at\": \"2022-11-14T22:47:48.391Z\",\n \"id\": \"evt_5cc46e86646e11ed8b4523f728c7c5a8\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.updated\",\n \"created_at\": \"2022-11-14T22:47:47.678Z\",\n \"id\": \"evt_5c57b976646e11ed809c0b3fa8365ce7\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.created\",\n \"created_at\": \"2022-11-14T22:47:46.289Z\",\n \"id\": \"evt_5b83b4dc646e11edafe34535216f0f6f\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ @@ -55,26 +55,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d09cf7efb8f600088bb5" + "3a8b2e0f6372c59ee0d9eae70019cb17" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.223208" + "0.250294" ], "etag": [ - "W/\"9527332a93e95fdbb3e45a9b55113449\"" + "W/\"23471391007d7c86717b8bbbdc03b8da\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +85,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/events?page_size\u003d5" }, - "duration": 361 + "duration": 461 } ] \ No newline at end of file diff --git a/src/test/cassettes/event/retrieve.json b/src/test/cassettes/event/retrieve.json index e8f1c6d9e..01d7c34f1 100644 --- a/src/test/cassettes/event/retrieve.json +++ b/src/test/cassettes/event/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456540, + "recordedAt": 1668466079, "request": { "body": "", "method": "GET", @@ -15,20 +15,20 @@ "uri": "https://api.easypost.com/v2/events?page_size\u003d5" }, "response": { - "body": "{\n \"has_more\": true,\n \"events\": [\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.created\",\n \"created_at\": \"2022-08-25T19:42:18.704Z\",\n \"id\": \"evt_077f41d024ae11edb9c91b5a718e3454\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.updated\",\n \"created_at\": \"2022-08-25T19:42:14.395Z\",\n \"id\": \"evt_04edd83224ae11ed8bd60b0a8a997384\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.updated\",\n \"created_at\": \"2022-08-25T19:42:13.904Z\",\n \"id\": \"evt_04a2edfe24ae11edb1690174852a1a5c\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.updated\",\n \"created_at\": \"2022-08-25T19:42:10.778Z\",\n \"id\": \"evt_02c5d5fa24ae11edbce20f79ccd3a408\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.created\",\n \"created_at\": \"2022-08-25T19:42:10.235Z\",\n \"id\": \"evt_0273007824ae11ed9e0e7554cdc03044\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n }\n ]\n}", + "body": "{\n \"has_more\": true,\n \"events\": [\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.updated\",\n \"created_at\": \"2022-11-14T22:47:59.415Z\",\n \"id\": \"evt_6356aa70646e11ed9b044933f49af09c\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.created\",\n \"created_at\": \"2022-11-14T22:47:58.443Z\",\n \"id\": \"evt_62c23ec6646e11ed85ba3df5eacb9ac8\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.created\",\n \"created_at\": \"2022-11-14T22:47:55.946Z\",\n \"id\": \"evt_61453dfa646e11ed8edb6bbf0222a510\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.updated\",\n \"created_at\": \"2022-11-14T22:47:48.391Z\",\n \"id\": \"evt_5cc46e86646e11ed8b4523f728c7c5a8\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"tracker.updated\",\n \"created_at\": \"2022-11-14T22:47:47.678Z\",\n \"id\": \"evt_5c57b976646e11ed809c0b3fa8365ce7\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "1116" + "1118" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,26 +55,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d09cf7ed94d700088be8" + "3a8b2e0f6372c59fe0d9eae80019cb50" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.191760" + "0.194319" ], "etag": [ - "W/\"9527332a93e95fdbb3e45a9b55113449\"" + "W/\"505d86db3972371678aaeb6ae90b8281\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,13 +85,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/events?page_size\u003d5" }, - "duration": 330 + "duration": 410 }, { - "recordedAt": 1661456540, + "recordedAt": 1668466079, "request": { "body": "", "method": "GET", @@ -102,23 +102,23 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/events/evt_077f41d024ae11edb9c91b5a718e3454" + "uri": "https://api.easypost.com/v2/events/evt_6356aa70646e11ed9b044933f49af09c" }, "response": { - "body": "{\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:42:19.000Z\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"pending_urls\": [],\n \"description\": \"tracker.created\",\n \"previous_attributes\": {},\n \"created_at\": \"2022-08-25T19:42:19.000Z\",\n \"id\": \"evt_077f41d024ae11edb9c91b5a718e3454\",\n \"completed_urls\": [],\n \"status\": \"pending\",\n \"object\": \"Event\"\n}", + "body": "{\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:59.000Z\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"pending_urls\": [],\n \"description\": \"tracker.updated\",\n \"previous_attributes\": {\n \"status\": \"unknown\"\n },\n \"created_at\": \"2022-11-14T22:47:59.000Z\",\n \"id\": \"evt_6356aa70646e11ed9b044933f49af09c\",\n \"completed_urls\": [],\n \"status\": \"pending\",\n \"object\": \"Event\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "320" + "338" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -145,26 +145,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d09cf7f1d95400088c1c" + "3a8b2e0d6372c59fe0d9eb000019cb79" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.026741" + "0.026086" ], "etag": [ - "W/\"6582771cc38e1d7bb163a62c3b6be7db\"" + "W/\"de4b59cbc4312732070a0f9294fa4786\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -174,9 +175,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/events/evt_077f41d024ae11edb9c91b5a718e3454" + "uri": "https://api.easypost.com/v2/events/evt_6356aa70646e11ed9b044933f49af09c" }, - "duration": 159 + "duration": 275 } ] \ No newline at end of file diff --git a/src/test/cassettes/insurance/all.json b/src/test/cassettes/insurance/all.json index 3d60ba71e..cd00f8945 100644 --- a/src/test/cassettes/insurance/all.json +++ b/src/test/cassettes/insurance/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456496, + "recordedAt": 1668466030, "request": { "body": "", "method": "GET", @@ -15,7 +15,7 @@ "uri": "https://api.easypost.com/v2/insurances?page_size\u003d5" }, "response": { - "body": "{\n \"insurances\": [\n {\n \"amount\": \"50.00000\",\n \"fee\": {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-08-25T19:41:24Z\",\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:23+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_e6d0a45524ad11eda811ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_583e27fc553e4c1c83fbd0d831013511\",\n \"tracking_code\": \"9400100109361135003561\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:41:25Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:41:25Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:41:25Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:18:25Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_583e27fc553e4c1c83fbd0d831013511\",\n \"tracking_code\": \"9400100109361135003561\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2NkNDljMzQxOGExMzRmMTA5MGFjZjc2ZmE2MzlkODI5\",\n \"est_delivery_date\": \"2022-08-25T19:41:25Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:25Z\",\n \"signed_by\": null,\n \"id\": \"trk_cd49c3418a134f1090acf76fa639d829\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_270d5ec318564767a36420ff377ad72d\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:23+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:23+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_e6d2008624ad11eda812ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\n \"amount\": \"50.00000\",\n \"fee\": {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-08-25T19:41:13Z\",\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:12+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_e0513c7e24ad11ed8345ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_059e9b2a645243edbaeca9fadb36f206\",\n \"tracking_code\": \"9400100109361135003523\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:41:14Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:41:14Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:41:14Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:18:14Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_059e9b2a645243edbaeca9fadb36f206\",\n \"tracking_code\": \"9400100109361135003523\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzdhMWI2YTg1NjhkMjQ2MGU4ZDM2NDMwOGY4YzA0YWQy\",\n \"est_delivery_date\": \"2022-08-25T19:41:14Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:14Z\",\n \"signed_by\": null,\n \"id\": \"trk_7a1b6a8568d2460e8d364308f8c04ad2\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_cc116a9090e64849927ab56c62046653\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:12+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_e052d47924ad11eda62dac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\n \"amount\": \"50.00000\",\n \"fee\": {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-08-25T19:41:12Z\",\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:12+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_dff53e2024ad11edb63eac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_81cf2a8225484863bada9e822b4d6231\",\n \"tracking_code\": \"9400100109361135003516\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:41:13Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:41:13Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:41:13Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:18:13Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_81cf2a8225484863bada9e822b4d6231\",\n \"tracking_code\": \"9400100109361135003516\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzYzOGQxZDZkZGY4NTQ2MTY5NzA3MzBjMmZiOTUyNGFk\",\n \"est_delivery_date\": \"2022-08-25T19:41:13Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:13Z\",\n \"signed_by\": null,\n \"id\": \"trk_638d1d6ddf854616970730c2fb9524ad\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_8d006aeff16940ccbf1c0fe87c234441\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:12+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_dff75dcb24ad11eda609ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\n \"amount\": \"50.00000\",\n \"fee\": {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-08-25T19:41:09Z\",\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:09+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_de4478b724ad11ed82afac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"tracking_code\": \"9400100109361135003509\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:41:10Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:41:10Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:41:10Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:18:10Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_9486c62690b14875b499927e19a2b58b\",\n \"tracking_code\": \"9400100109361135003509\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzhiODZjNzQzNmU0NTRlY2I5YzdhNmUxNThlYjJmNjYy\",\n \"est_delivery_date\": \"2022-08-25T19:41:10Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:10Z\",\n \"signed_by\": null,\n \"id\": \"trk_8b86c7436e454ecb9c7a6e158eb2f662\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_d123b710d2cb429499373b4c46a93494\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:09+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_de46ce7d24ad11eda59aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\n \"amount\": \"50.00000\",\n \"fee\": {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-08-25T19:41:05Z\",\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:04+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_db81428a24ad11ed8f5fac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"tracking_code\": \"9400100109361135003493\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:41:05Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:41:05Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:41:05Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:18:05Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_022e5373de8e4addb2b1ffe37db07915\",\n \"tracking_code\": \"9400100109361135003493\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzRmNjdhNDY0YmQ2OTQ3NGM5ZDYyMjMxMWRkYTljNmU1\",\n \"est_delivery_date\": \"2022-08-25T19:41:05Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:06Z\",\n \"signed_by\": null,\n \"id\": \"trk_4f67a464bd69474c9d622311dda9c6e5\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_c5da4009f951409a89854dcd87c75860\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:04+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:04+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_db8308c124ad11edbc7dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n }\n ],\n \"has_more\": true\n}", + "body": "{\n \"insurances\": [\n {\n \"amount\": \"50.00000\",\n \"fee\": {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-11-14T22:46:58Z\",\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:46:57+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:46:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_3eb8005a646e11edacf4ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_79d5500226ca41638db82f46eb5ba7ff\",\n \"tracking_code\": \"9400100106068149680018\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:46:59Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:46:59Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:46:59Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:23:59Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_79d5500226ca41638db82f46eb5ba7ff\",\n \"tracking_code\": \"9400100106068149680018\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Q5OTA4YzhjYjE5NDQ3NjliYjRhZTVjNTU2ZTI4ZGJh\",\n \"est_delivery_date\": \"2022-11-14T22:46:59Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:46:59Z\",\n \"signed_by\": null,\n \"id\": \"trk_d9908c8cb1944769bb4ae5c556e28dba\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_a3d611714fad4878bfe7f1bb705dfee9\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:57+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_3eb995d3646e11edacf7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\n \"amount\": \"50.00000\",\n \"fee\": {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-11-14T22:46:47Z\",\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:46:46+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:46:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_382aab58646e11edb9d0ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_3dbcc58edda04ce486e3b81f8e3deaaa\",\n \"tracking_code\": \"9400100106068149679937\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:46:48Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:46:48Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:46:48Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:23:48Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_3dbcc58edda04ce486e3b81f8e3deaaa\",\n \"tracking_code\": \"9400100106068149679937\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzdhZjhkZmIwNDdjNjRjNWJiMTNhNDNiMDM0ZTFkMWQx\",\n \"est_delivery_date\": \"2022-11-14T22:46:48Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:46:48Z\",\n \"signed_by\": null,\n \"id\": \"trk_7af8dfb047c64c5bb13a43b034e1d1d1\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_8265f3be22d74823b242e0b1d6725bbb\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_382e39ec646e11edaaf0ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\n \"amount\": \"50.00000\",\n \"fee\": {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-11-14T22:46:46Z\",\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:46:46+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:46:46+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_37c50980646e11edaacdac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_9e66569007db442b80d82bbd93bb734b\",\n \"tracking_code\": \"9400100106068149679920\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:46:47Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:46:47Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:46:47Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:23:47Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_9e66569007db442b80d82bbd93bb734b\",\n \"tracking_code\": \"9400100106068149679920\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzY3NzNhNDZhODc3NDQ2OTZhZTQwZjYzOTNmMDMxMjll\",\n \"est_delivery_date\": \"2022-11-14T22:46:47Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:46:47Z\",\n \"signed_by\": null,\n \"id\": \"trk_6773a46a87744696ae40f6393f03129e\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_6361ed03d5d646d2b5bffdc7744f7236\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:46+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:46+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_37c6fde1646e11edabbaac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\n \"amount\": \"50.00000\",\n \"fee\": {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:46:43+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:46:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_35e7b257646e11edb963ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"tracking_code\": \"9400100106068149679883\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:46:44Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:46:44Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:46:44Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:23:44Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"tracking_code\": \"9400100106068149679883\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE2M2IyZjRkNDA3MzQyZjY5Mzg2ZTI3ODNlZWViMzAz\",\n \"est_delivery_date\": \"2022-11-14T22:46:44Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:46:44Z\",\n \"signed_by\": null,\n \"id\": \"trk_163b2f4d407342f69386e2783eeeb303\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_2a47950b26e14319951d960bb7b35c3f\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:43+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_35ea9f52646e11edb964ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\n \"amount\": \"50.00000\",\n \"fee\": {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-11-14T22:46:38Z\",\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:46:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:46:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_33149ad6646e11ed93b4ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"tracking_code\": \"9400100106068149679838\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:46:39Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:46:39Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:46:39Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:23:39Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"tracking_code\": \"9400100106068149679838\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Y2OGQ3ODFkMzk0ZDQ4MzZiZTg4YTQwNDNkM2FhYTQz\",\n \"est_delivery_date\": \"2022-11-14T22:46:39Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:46:39Z\",\n \"signed_by\": null,\n \"id\": \"trk_f68d781d394d4836be88a4043d3aaa43\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_3cf9a98a1b5c42ca95dbeec82f9d5b39\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_33175eb3646e11ed93b5ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n }\n ],\n \"has_more\": true\n}", "httpVersion": null, "headers": { "null": [ @@ -28,7 +28,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -48,6 +48,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -55,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d06ff7dcff5400087558" + "3a8b2e086372c56ee0d9e6620019b4e9" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.190956" + "0.216921" ], "etag": [ - "W/\"27d003b9bd4d28e691523c63496885a3\"" + "W/\"2373fcebd4aeef8b03dea968ebefa8a2\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +88,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/insurances?page_size\u003d5" }, - "duration": 313 + "duration": 504 } ] \ No newline at end of file diff --git a/src/test/cassettes/insurance/create.json b/src/test/cassettes/insurance/create.json index dc19d39c5..93aee1042 100644 --- a/src/test/cassettes/insurance/create.json +++ b/src/test/cassettes/insurance/create.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456499, + "recordedAt": 1668466034, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:41:38Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:39Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_abef53333dd64c1eb251732cbcfe5100\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:39Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_49b36d93c668491b8fd4d41c127088e5\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:41:39Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_abef53333dd64c1eb251732cbcfe5100\",\n \"tracking_code\": \"9400100109361135003608\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzg3ZGI0ZDIxNDU3NTQ1NWFhNGFhYmRhY2YwZTg0OTI2\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:39Z\",\n \"signed_by\": null,\n \"id\": \"trk_87db4d214575455aa4aabdacf0e84926\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ef86d5df24ad11edbefdac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_abef53333dd64c1eb251732cbcfe5100\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ef86d5df24ad11edbefdac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:41:39Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/9063c961bb084488b1288ca85e5b2e25.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:41:39Z\",\n \"id\": \"pl_d9e13ad81fb64e65a26ca02d61e34fc0\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:41:39Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:38Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:38Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_94673fb7658f4b6cbf33ce03dce28234\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_ef85695424ad11edb423ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:38Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_abef53333dd64c1eb251732cbcfe5100\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:38Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_d1cc1de92a324e56af2e9447a99c60c8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:41:38Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_abef53333dd64c1eb251732cbcfe5100\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:38Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_979999122fd04fc9bbcf56c9efffdcd8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:41:38Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_abef53333dd64c1eb251732cbcfe5100\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:38Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2c626de5f2cc4f2d84a03108f866f376\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:38Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_abef53333dd64c1eb251732cbcfe5100\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:38Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_49b36d93c668491b8fd4d41c127088e5\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_ef85695424ad11edb423ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003608\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:13Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:14Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:14Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_10efd524e0af45b88f0f0b95542b6a91\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:14Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ceec0bab808c4f68a08985f7aa5b14e8\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:47:14Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_10efd524e0af45b88f0f0b95542b6a91\",\n \"tracking_code\": \"9400100106068149680131\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2E1NmFiYzUyMzhmZTQyZDNiZjcwNDZmYzRmNzVmZGRl\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:14Z\",\n \"signed_by\": null,\n \"id\": \"trk_a56abc5238fe42d3bf7046fc4f75fdde\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4800bf3b646e11edaff5ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_10efd524e0af45b88f0f0b95542b6a91\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4800bf3b646e11edaff5ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:14Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/fc16ac629f6d48688ca54a50f78d8d95.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:14Z\",\n \"id\": \"pl_8ffd27bfb4ac4ce48eb8ef62752cf3fa\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:14Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:13Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:13Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f70ab61f2b7049258b0b3c9f6de81d6b\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:13+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_47fee184646e11edb0c2ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:13Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_10efd524e0af45b88f0f0b95542b6a91\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:13Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_97df52a6f65f4766b292982f850671b6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:13Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_10efd524e0af45b88f0f0b95542b6a91\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:13Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2ce2d5959e7e46dbb67d0dfb21ba7814\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_10efd524e0af45b88f0f0b95542b6a91\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:13Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ceec0bab808c4f68a08985f7aa5b14e8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:13Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_10efd524e0af45b88f0f0b95542b6a91\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:13Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_a6b2326bdfa24bff827da45c7cd46959\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:13+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_47fee184646e11edb0c2ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680131\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,9 +51,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -61,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d072f7c9ce75000876bf" + "3a8b2e0d6372c571e0d9e6800019b610" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.043638" + "1.380062" ], "etag": [ - "W/\"b1b7ed9ec2dd9797fdd355951165d835\"" + "W/\"78f37fcf5a1fe9ff1d2f77bb9e7e866f\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_abef53333dd64c1eb251732cbcfe5100" + "/api/v2/shipments/shp_10efd524e0af45b88f0f0b95542b6a91" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,15 +91,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1180 + "duration": 1605 }, { - "recordedAt": 1661456499, + "recordedAt": 1668466035, "request": { - "body": "{\n \"insurance\": {\n \"carrier\": \"USPS\",\n \"amount\": \"100\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"tracking_code\": \"9400100109361135003608\"\n }\n}", + "body": "{\n \"insurance\": {\n \"carrier\": \"USPS\",\n \"amount\": \"100\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"tracking_code\": \"9400100106068149680131\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -117,7 +114,7 @@ "uri": "https://api.easypost.com/v2/insurances" }, "response": { - "body": "{\n \"amount\": \"100.00000\",\n \"fee\": {\n \"amount\": \"0.50000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-08-25T19:41:39Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-08-25T19:41:39+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:41:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_f0576a6024ad11edb5c3ac1f6bc72124\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"9400100109361135003608\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:41:39Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:41:39Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:41:39Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:18:39Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_abef53333dd64c1eb251732cbcfe5100\",\n \"tracking_code\": \"9400100109361135003608\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzg3ZGI0ZDIxNDU3NTQ1NWFhNGFhYmRhY2YwZTg0OTI2\",\n \"est_delivery_date\": \"2022-08-25T19:41:39Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:39Z\",\n \"signed_by\": null,\n \"id\": \"trk_87db4d214575455aa4aabdacf0e84926\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_ea7373520f9446178f89237ad67a8f81\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:39+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f05b73bd24ad11ed8003ac1f6bc7bdc6\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"pending\"\n}", + "body": "{\n \"amount\": \"100.00000\",\n \"fee\": {\n \"amount\": \"0.50000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-11-14T22:47:15Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:47:15+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:47:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_49046d03646e11edb11aac1f6bc7b362\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"9400100106068149680131\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:47:15Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:14Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:14Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:14Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_10efd524e0af45b88f0f0b95542b6a91\",\n \"tracking_code\": \"9400100106068149680131\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2E1NmFiYzUyMzhmZTQyZDNiZjcwNDZmYzRmNzVmZGRl\",\n \"est_delivery_date\": \"2022-11-14T22:47:14Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:14Z\",\n \"signed_by\": null,\n \"id\": \"trk_a56abc5238fe42d3bf7046fc4f75fdde\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_fc916bf66e384f879ec3aadffd9478ca\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:15+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_49090144646e11edb04dac1f6bc72124\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"pending\"\n}", "httpVersion": null, "headers": { "null": [ @@ -130,7 +127,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -157,29 +154,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d073f7efb9ba00087783" + "3a8b2e0d6372c573e0d9e6a10019b6a3" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.150261" + "0.183717" ], "etag": [ - "W/\"c3db083a4992e0d5b7424aeabfab158f\"" + "W/\"0154f2c43719fa676880cd570351b4f1\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/insurances/ins_ea7373520f9446178f89237ad67a8f81" + "/api/v2/insurances/ins_fc916bf66e384f879ec3aadffd9478ca" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -189,9 +187,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/insurances" }, - "duration": 286 + "duration": 498 } ] \ No newline at end of file diff --git a/src/test/cassettes/insurance/retrieve.json b/src/test/cassettes/insurance/retrieve.json index e233eb0c3..e9abdef92 100644 --- a/src/test/cassettes/insurance/retrieve.json +++ b/src/test/cassettes/insurance/retrieve.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456497, + "recordedAt": 1668466032, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:41:36Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:37Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_96f533078e4c4d579aea1305aae36567\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:37Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5f999c12b6c744609dc61153fa794e5b\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:41:37Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_96f533078e4c4d579aea1305aae36567\",\n \"tracking_code\": \"9400100109361135003585\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2MxYWJjNjBmMzA3MzQzMTk4ZTE3OWQ0MmZhNTA3OWMz\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:37Z\",\n \"signed_by\": null,\n \"id\": \"trk_c1abc60f307343198e179d42fa5079c3\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:36+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ee6008f424ad11edb1c0ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_96f533078e4c4d579aea1305aae36567\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:36+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ee6008f424ad11edb1c0ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:41:37Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/8ab3cc30af834576af43029c9c69c41c.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:41:37Z\",\n \"id\": \"pl_557c6984caea4d6fbcfc1ca68de0efa7\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:41:37Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:36Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:36Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_27cf9950d9154b999920c28fb1d308b1\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:36+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_ee5e0a9624ad11ed8f34ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:36Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_96f533078e4c4d579aea1305aae36567\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:36Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_8eb8539bf2584ca2985cff2cb88bc3a8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:41:36Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_96f533078e4c4d579aea1305aae36567\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:36Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_667f82c49d81424ab2996422d2d6207c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:41:36Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_96f533078e4c4d579aea1305aae36567\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:36Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1b4de94d334648c0a13ee8be06402a6a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:36Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_96f533078e4c4d579aea1305aae36567\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:36Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5f999c12b6c744609dc61153fa794e5b\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:36+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_ee5e0a9624ad11ed8f34ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003585\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:11Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:12Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:11Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_433dfecbe7a84d47961bdfa07597b0cf\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:11Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9c89e266f3a54e40b239292e038c11db\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:47:12Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_433dfecbe7a84d47961bdfa07597b0cf\",\n \"tracking_code\": \"9400100106068149680117\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzVkYzE1YWU1MzNmYjQ5ZjU5Zjk5ZmI1NTVhMTNjNGQ2\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:12Z\",\n \"signed_by\": null,\n \"id\": \"trk_5dc15ae533fb49f59f99fb555a13c4d6\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_469ba8b7646e11ed99b0ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_433dfecbe7a84d47961bdfa07597b0cf\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_469ba8b7646e11ed99b0ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:11Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/4bc23e39f72d4613b8e8522a3c84420f.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:11Z\",\n \"id\": \"pl_cabe914fde1a4238a5c6d0e1dc03f101\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:11Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:11Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:11Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_0782568bedac47a38a1af9b7b94a91f1\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:11+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4698102e646e11edb04eac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:11Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_433dfecbe7a84d47961bdfa07597b0cf\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:11Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_fbfa54c489d246c2b3648674f2a92d85\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:11Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_433dfecbe7a84d47961bdfa07597b0cf\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:11Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7f386a72c4c14f27b11351fb8782d6d3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:11Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_433dfecbe7a84d47961bdfa07597b0cf\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:11Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c4554d8b958949fd835e6cda896d0044\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:11Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_433dfecbe7a84d47961bdfa07597b0cf\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:11Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9c89e266f3a54e40b239292e038c11db\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:11+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4698102e646e11edb04eac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680117\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d070f7a75334000875bd" + "3a8b2e086372c56ee0d9e6640019b529" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.931025" + "1.140444" ], "etag": [ - "W/\"d3b7bcd03c2e477c19c3704d81d189c3\"" + "W/\"c2f241ac5e341583e51f8a7acb8eaeb1\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_96f533078e4c4d579aea1305aae36567" + "/api/v2/shipments/shp_433dfecbe7a84d47961bdfa07597b0cf" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,15 +91,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1059 + "duration": 1383 }, { - "recordedAt": 1661456497, + "recordedAt": 1668466032, "request": { - "body": "{\n \"insurance\": {\n \"carrier\": \"USPS\",\n \"amount\": \"100\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"tracking_code\": \"9400100109361135003585\"\n }\n}", + "body": "{\n \"insurance\": {\n \"carrier\": \"USPS\",\n \"amount\": \"100\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"tracking_code\": \"9400100106068149680117\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +114,7 @@ "uri": "https://api.easypost.com/v2/insurances" }, "response": { - "body": "{\n \"amount\": \"100.00000\",\n \"fee\": {\n \"amount\": \"0.50000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-08-25T19:41:37Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-08-25T19:41:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:41:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_ef1e5d3c24ad11ed90a8ac1f6b0a0d1e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"9400100109361135003585\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:41:37Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:41:37Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:41:37Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:18:37Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_96f533078e4c4d579aea1305aae36567\",\n \"tracking_code\": \"9400100109361135003585\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2MxYWJjNjBmMzA3MzQzMTk4ZTE3OWQ0MmZhNTA3OWMz\",\n \"est_delivery_date\": \"2022-08-25T19:41:37Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:37Z\",\n \"signed_by\": null,\n \"id\": \"trk_c1abc60f307343198e179d42fa5079c3\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_47794ca5e06e4173a19ae1e3a332ed5b\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_ef2244a124ad11edb358ac1f6bc72124\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"pending\"\n}", + "body": "{\n \"amount\": \"100.00000\",\n \"fee\": {\n \"amount\": \"0.50000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-11-14T22:47:12Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:47:12+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:47:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_477b8bee646e11ed99fdac1f6b0a0d1e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"9400100106068149680117\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:47:12Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:12Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:12Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:12Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_433dfecbe7a84d47961bdfa07597b0cf\",\n \"tracking_code\": \"9400100106068149680117\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzVkYzE1YWU1MzNmYjQ5ZjU5Zjk5ZmI1NTVhMTNjNGQ2\",\n \"est_delivery_date\": \"2022-11-14T22:47:12Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:12Z\",\n \"signed_by\": null,\n \"id\": \"trk_5dc15ae533fb49f59f99fb555a13c4d6\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_2fc2f03720f04cc8bb645492ac2c6f60\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:12+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_47814778646e11edbcc2ac1f6bc7bdc6\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"pending\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +127,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,29 +154,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d071f7dfbdba00087657" + "3a8b2e0d6372c570e0d9e67d0019b5ba" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.161831" + "0.218041" ], "etag": [ - "W/\"163c828483afe431c5db3ce87fcf5440\"" + "W/\"65dc8537558f086d89f38976abeecf51\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/insurances/ins_47794ca5e06e4173a19ae1e3a332ed5b" + "/api/v2/insurances/ins_2fc2f03720f04cc8bb645492ac2c6f60" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,13 +187,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/insurances" }, - "duration": 293 + "duration": 473 }, { - "recordedAt": 1661456498, + "recordedAt": 1668466033, "request": { "body": "", "method": "GET", @@ -204,10 +204,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/insurances/ins_47794ca5e06e4173a19ae1e3a332ed5b" + "uri": "https://api.easypost.com/v2/insurances/ins_2fc2f03720f04cc8bb645492ac2c6f60" }, "response": { - "body": "{\n \"amount\": \"100.00000\",\n \"fee\": {\n \"amount\": \"0.50000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-08-25T19:41:37Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-08-25T19:41:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:41:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_ef1e5d3c24ad11ed90a8ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"9400100109361135003585\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-08-25T19:41:37Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:41:37Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:41:37Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:18:37Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_96f533078e4c4d579aea1305aae36567\",\n \"tracking_code\": \"9400100109361135003585\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2MxYWJjNjBmMzA3MzQzMTk4ZTE3OWQ0MmZhNTA3OWMz\",\n \"est_delivery_date\": \"2022-08-25T19:41:37Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:37Z\",\n \"signed_by\": null,\n \"id\": \"trk_c1abc60f307343198e179d42fa5079c3\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_47794ca5e06e4173a19ae1e3a332ed5b\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_ef2244a124ad11edb358ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"pending\"\n}", + "body": "{\n \"amount\": \"100.00000\",\n \"fee\": {\n \"amount\": \"0.50000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2022-11-14T22:47:12Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:47:12+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:47:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_477b8bee646e11ed99fdac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"9400100106068149680117\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2022-11-14T22:47:12Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:12Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:12Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:12Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_433dfecbe7a84d47961bdfa07597b0cf\",\n \"tracking_code\": \"9400100106068149680117\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzVkYzE1YWU1MzNmYjQ5ZjU5Zjk5ZmI1NTVhMTNjNGQ2\",\n \"est_delivery_date\": \"2022-11-14T22:47:12Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:12Z\",\n \"signed_by\": null,\n \"id\": \"trk_5dc15ae533fb49f59f99fb555a13c4d6\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_2fc2f03720f04cc8bb645492ac2c6f60\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:12+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_47814778646e11edbcc2ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"pending\"\n}", "httpVersion": null, "headers": { "null": [ @@ -220,7 +220,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -247,26 +247,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d072f7b8df370008768e" + "3a8b2e0d6372c570e0d9e67e0019b5ec" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.060818" + "0.083534" ], "etag": [ - "W/\"dcb93a6046f8b3034a592cac21d84405\"" + "W/\"aa5bdbbc747b09a1dc587cd48656b9bd\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -276,9 +277,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/insurances/ins_47794ca5e06e4173a19ae1e3a332ed5b" + "uri": "https://api.easypost.com/v2/insurances/ins_2fc2f03720f04cc8bb645492ac2c6f60" }, - "duration": 185 + "duration": 344 } ] \ No newline at end of file diff --git a/src/test/cassettes/order/buy.json b/src/test/cassettes/order/buy.json index a4bca7efe..a6defa547 100644 --- a/src/test/cassettes/order/buy.json +++ b/src/test/cassettes/order/buy.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456532, + "recordedAt": 1668466070, "request": { "body": "{\n \"order\": {\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/orders" }, "response": { - "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0356f83024ae11ed8a59ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_849cd078de0c4285b7a61b64b72d7b34\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_98780e9f002343b89a5e1d1478789197\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d0a9c77624b347b38af513a557ed019a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_73758973ce5c493c8b7645e9b69e4bab\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-08-25T19:42:11Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0356f83024ae11ed8a59ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:42:11Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:11Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_035823f624ae11edb86eac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_035823f624ae11edb86eac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:42:11Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:42:11Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f5175f638a3b4a26bc62c9af0fba5e01\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0356f83024ae11ed8a59ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:42:12Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:12Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_849cd078de0c4285b7a61b64b72d7b34\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:42:12Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:12Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_98780e9f002343b89a5e1d1478789197\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:42:12Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:12Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d0a9c77624b347b38af513a557ed019a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:12Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:12Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_73758973ce5c493c8b7645e9b69e4bab\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0356f83024ae11ed8a59ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_b9d0a56fb5b1468298d19af92d204145\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:12Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_035823f624ae11edb86eac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_b9d0a56fb5b1468298d19af92d204145\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_035823f624ae11edb86eac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b5146c0ea9b441929d47cf65c2865732\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cead58a1940a4354bf2db8dd19d2a2cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3d2cc050db8b4f29bc223a83c274dee2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8c12a562c07b49988b805ddea49edc06\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_721f34e06cf0445d99fb1514a7b18186\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b5146c0ea9b441929d47cf65c2865732\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cead58a1940a4354bf2db8dd19d2a2cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3d2cc050db8b4f29bc223a83c274dee2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8c12a562c07b49988b805ddea49edc06\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_e301707eaf5e4a2f9909388b7c1b5aea\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_e301707eaf5e4a2f9909388b7c1b5aea\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,9 +51,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -61,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d093e68a139c0008870a" + "3a8b2e086372c595e0d9eabe0019c5e1" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.695703" + "0.887458" ], "etag": [ - "W/\"5487d603d144b29dbe7e133d6ecfec76\"" + "W/\"a8c928963e43200ebbb226f83d6be539\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/orders/order_b9d0a56fb5b1468298d19af92d204145" + "/api/v2/orders/order_e301707eaf5e4a2f9909388b7c1b5aea" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/orders" }, - "duration": 832 + "duration": 1202 }, { - "recordedAt": 1661456533, + "recordedAt": 1668466071, "request": { "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"First\"\n}", "method": "POST", @@ -114,10 +111,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/orders/order_b9d0a56fb5b1468298d19af92d204145/buy" + "uri": "https://api.easypost.com/v2/orders/order_e301707eaf5e4a2f9909388b7c1b5aea/buy" }, "response": { - "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:42:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_0356f83024ae11ed8a59ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_849cd078de0c4285b7a61b64b72d7b34\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_98780e9f002343b89a5e1d1478789197\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d0a9c77624b347b38af513a557ed019a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_73758973ce5c493c8b7645e9b69e4bab\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-08-25T19:42:11Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:42:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_0356f83024ae11ed8a59ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:42:11Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:13Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:13Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_73758973ce5c493c8b7645e9b69e4bab\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:42:13Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"tracking_code\": \"9400100109361135003714\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzUxM2IwYjg5ZjU0YzQ3NDI5NDA2Y2I0NGQwMzNkNzg3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:13Z\",\n \"signed_by\": null,\n \"id\": \"trk_513b0b89f54c47429406cb44d033d787\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_035823f624ae11edb86eac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_035823f624ae11edb86eac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:42:13Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/19de9ee4aa2549d0931f59d77ea8ab32.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:42:13Z\",\n \"id\": \"pl_4e716225b9df4ff7a057600940b4dedb\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:42:13Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:42:11Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:42:11Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f5175f638a3b4a26bc62c9af0fba5e01\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:42:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_0356f83024ae11ed8a59ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:42:12Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:12Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_849cd078de0c4285b7a61b64b72d7b34\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:42:12Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:12Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_98780e9f002343b89a5e1d1478789197\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:42:12Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:12Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d0a9c77624b347b38af513a557ed019a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:12Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:12Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_73758973ce5c493c8b7645e9b69e4bab\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-08-25T19:42:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_0356f83024ae11ed8a59ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003714\",\n \"messages\": [],\n \"order_id\": \"order_b9d0a56fb5b1468298d19af92d204145\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:12Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_035823f624ae11edb86eac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_b9d0a56fb5b1468298d19af92d204145\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_035823f624ae11edb86eac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:47:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b5146c0ea9b441929d47cf65c2865732\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cead58a1940a4354bf2db8dd19d2a2cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3d2cc050db8b4f29bc223a83c274dee2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8c12a562c07b49988b805ddea49edc06\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:47:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:50Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cead58a1940a4354bf2db8dd19d2a2cc\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:47:51Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"tracking_code\": \"9400100106068149680445\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzYyMGRlZDA1NDY1MjQzNmRiYzE1Zjc5Yzc5ZTNjYWJl\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"signed_by\": null,\n \"id\": \"trk_620ded054652436dbc15f79c79e3cabe\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:50Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/40c4f81a5cc94e8dbbcb30a8b8c363af.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"id\": \"pl_c7c16842bcc0411f9eac52bebfe35e40\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:50Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_721f34e06cf0445d99fb1514a7b18186\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:47:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b5146c0ea9b441929d47cf65c2865732\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cead58a1940a4354bf2db8dd19d2a2cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3d2cc050db8b4f29bc223a83c274dee2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8c12a562c07b49988b805ddea49edc06\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:47:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680445\",\n \"messages\": [],\n \"order_id\": \"order_e301707eaf5e4a2f9909388b7c1b5aea\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_e301707eaf5e4a2f9909388b7c1b5aea\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", "httpVersion": null, "headers": { "null": [ @@ -130,7 +127,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -157,26 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d094f7dc843400088799" + "3a8b2e0f6372c596e0d9eac00019c692" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.972922" + "0.943272" ], "etag": [ - "W/\"91b61792ef21c887ddc3cdbaa460ccf8\"" + "W/\"b0dc23256f282da1a4a804efe86e0bf9\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,9 +184,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/orders/order_b9d0a56fb5b1468298d19af92d204145/buy" + "uri": "https://api.easypost.com/v2/orders/order_e301707eaf5e4a2f9909388b7c1b5aea/buy" }, - "duration": 1108 + "duration": 1168 } ] \ No newline at end of file diff --git a/src/test/cassettes/order/create.json b/src/test/cassettes/order/create.json index 747b51cb6..8f22182e9 100644 --- a/src/test/cassettes/order/create.json +++ b/src/test/cassettes/order/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456537, + "recordedAt": 1668466076, "request": { "body": "{\n \"order\": {\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/orders" }, "response": { - "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:16+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_062e65c224ae11ed8ebbac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ba1249e482a94f9e8c2534a92a60484d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f76dfac6994644279c7642a19c0c65f1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ba1249e482a94f9e8c2534a92a60484d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3a29b64c680f4087ad8adc987101604f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ba1249e482a94f9e8c2534a92a60484d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_dd5bb816eaf64662955b0ff508f81538\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ba1249e482a94f9e8c2534a92a60484d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a4f04faa7ddb45e395969fe647c61634\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-08-25T19:42:16Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:16+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_062e65c224ae11ed8ebbac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:42:16Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:16Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:16+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_063065b824ae11ed8ec3ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_ba1249e482a94f9e8c2534a92a60484d\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:16+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_063065b824ae11ed8ec3ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:42:16Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:42:16Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_5806f0c859c14c00a9f6e758fed9b8df\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:16+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_062e65c224ae11ed8ebbac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:42:17Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ba1249e482a94f9e8c2534a92a60484d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:17Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f76dfac6994644279c7642a19c0c65f1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:17Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ba1249e482a94f9e8c2534a92a60484d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:17Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3a29b64c680f4087ad8adc987101604f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:42:17Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ba1249e482a94f9e8c2534a92a60484d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:17Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_dd5bb816eaf64662955b0ff508f81538\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:42:17Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ba1249e482a94f9e8c2534a92a60484d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:17Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a4f04faa7ddb45e395969fe647c61634\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:16+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_062e65c224ae11ed8ebbac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_6d5ecaf82c3a4f0b94a9355fe11211d4\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:17Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:16+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_063065b824ae11ed8ec3ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_6d5ecaf82c3a4f0b94a9355fe11211d4\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:16+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_063065b824ae11ed8ec3ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:55+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:55+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_60bb6d3a646e11eda321ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0b8266b888b24e52ac017dcd4021a4e4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9a9a38eb789e43f199c3d74fe6427be9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0b8266b888b24e52ac017dcd4021a4e4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4abb441c6dcf437695ba8fcd1648a324\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0b8266b888b24e52ac017dcd4021a4e4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_08491dc0d880498bbea6ef756fb660a5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0b8266b888b24e52ac017dcd4021a4e4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0cc709f6a8464857b9ab23d24adb3f93\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-14T22:47:55Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:55+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:55+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_60bb6d3a646e11eda321ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:55Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:55Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:55+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:55+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_60bd0b35646e11edb8f1ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_0b8266b888b24e52ac017dcd4021a4e4\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:55+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:55+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_60bd0b35646e11edb8f1ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:55Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:55Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_e38e212c9c6b442eae4c65212411f7ae\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:55+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:55+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_60bb6d3a646e11eda321ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:56Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0b8266b888b24e52ac017dcd4021a4e4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:56Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9a9a38eb789e43f199c3d74fe6427be9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:56Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0b8266b888b24e52ac017dcd4021a4e4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:56Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4abb441c6dcf437695ba8fcd1648a324\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:56Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0b8266b888b24e52ac017dcd4021a4e4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:56Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_08491dc0d880498bbea6ef756fb660a5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:56Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0b8266b888b24e52ac017dcd4021a4e4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:56Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0cc709f6a8464857b9ab23d24adb3f93\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:55+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:55+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_60bb6d3a646e11eda321ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_afbb95d620774ae88f9ff407f79bb5ad\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:56Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:55+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:55+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_60bd0b35646e11edb8f1ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_afbb95d620774ae88f9ff407f79bb5ad\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:55+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:55+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_60bd0b35646e11edb8f1ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", "httpVersion": null, "headers": { "null": [ @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d098f7a63ad8000889c2" + "3a8b2e0c6372c59ae0d9eac70019c945" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.754012" + "1.377400" ], "etag": [ - "W/\"1e3a604de88a6a16f0225eff04df2add\"" + "W/\"9cac7c2b1258c1a90aca89e95492dbaf\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/orders/order_6d5ecaf82c3a4f0b94a9355fe11211d4" + "/api/v2/orders/order_afbb95d620774ae88f9ff407f79bb5ad" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/orders" }, - "duration": 897 + "duration": 1643 } ] \ No newline at end of file diff --git a/src/test/cassettes/order/get_rates.json b/src/test/cassettes/order/get_rates.json index 08d83fc51..1045b93fd 100644 --- a/src/test/cassettes/order/get_rates.json +++ b/src/test/cassettes/order/get_rates.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456531, + "recordedAt": 1668466068, "request": { "body": "{\n \"order\": {\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/orders" }, "response": { - "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_026942c824ae11ed993dac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6fb2ad00abf04f66814ba5cfd35cabf3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_08332dc7de8549d5807f8c7a1ad2e48b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6fb2ad00abf04f66814ba5cfd35cabf3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_57c4f690a3244f719bcbb551aaf42023\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6fb2ad00abf04f66814ba5cfd35cabf3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4153774b13104476b015b529ddeecf41\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6fb2ad00abf04f66814ba5cfd35cabf3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cc93e13d955d4142bb6bc9687fb8e39f\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-08-25T19:42:10Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_026942c824ae11ed993dac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:42:10Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:10Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_026a74a024ae11ed993eac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6fb2ad00abf04f66814ba5cfd35cabf3\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_026a74a024ae11ed993eac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:42:10Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:42:10Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_49de3cf98c514cb49e496be74f4b648b\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_026942c824ae11ed993dac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:42:11Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6fb2ad00abf04f66814ba5cfd35cabf3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:11Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_08332dc7de8549d5807f8c7a1ad2e48b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:42:11Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6fb2ad00abf04f66814ba5cfd35cabf3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:11Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_57c4f690a3244f719bcbb551aaf42023\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:42:11Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6fb2ad00abf04f66814ba5cfd35cabf3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:11Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4153774b13104476b015b529ddeecf41\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:11Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6fb2ad00abf04f66814ba5cfd35cabf3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:11Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cc93e13d955d4142bb6bc9687fb8e39f\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_026942c824ae11ed993dac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_1f4f47a8c0f6479c997435575a4b9831\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:11Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_026a74a024ae11ed993eac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_1f4f47a8c0f6479c997435575a4b9831\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_026a74a024ae11ed993eac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5c54b9d2646e11eda177ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6dbe00c1133d4b79b9fcf9b3b17b65d7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_fafc46a5abff40e090bf0b3abe684718\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6dbe00c1133d4b79b9fcf9b3b17b65d7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1a19abcfb02347ecab28fac342b82861\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6dbe00c1133d4b79b9fcf9b3b17b65d7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bcd6cb940e0a4a02a00fd17a405b021f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6dbe00c1133d4b79b9fcf9b3b17b65d7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_121f784f34f64d91bbf7567dcb8a5339\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-14T22:47:47Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5c54b9d2646e11eda177ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:47Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:47Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5c56483e646e11edb815ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6dbe00c1133d4b79b9fcf9b3b17b65d7\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5c56483e646e11edb815ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:47Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:47Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_b4324a9a92354d3abdf1488e0308d52f\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5c54b9d2646e11eda177ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:48Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6dbe00c1133d4b79b9fcf9b3b17b65d7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:48Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_fafc46a5abff40e090bf0b3abe684718\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:48Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6dbe00c1133d4b79b9fcf9b3b17b65d7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:48Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1a19abcfb02347ecab28fac342b82861\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:48Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6dbe00c1133d4b79b9fcf9b3b17b65d7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:48Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bcd6cb940e0a4a02a00fd17a405b021f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:48Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6dbe00c1133d4b79b9fcf9b3b17b65d7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:48Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_121f784f34f64d91bbf7567dcb8a5339\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5c54b9d2646e11eda177ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_eec0024f7de846d899511c20297b5e97\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:48Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5c56483e646e11edb815ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_eec0024f7de846d899511c20297b5e97\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5c56483e646e11edb815ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d092e68ccdca00088656" + "3a8b2e0a6372c593e0d9eaa50019c4fa" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.299750" + "1.055718" ], "etag": [ - "W/\"573bcebfc2e6ed0a1a3ddc087315f64a\"" + "W/\"7b23ac07cee54546b247fe364031e0ae\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/orders/order_1f4f47a8c0f6479c997435575a4b9831" + "/api/v2/orders/order_eec0024f7de846d899511c20297b5e97" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/orders" }, - "duration": 1439 + "duration": 1364 } ] \ No newline at end of file diff --git a/src/test/cassettes/order/lowest_rate.json b/src/test/cassettes/order/lowest_rate.json index 21f89b49c..edd0cbbcd 100644 --- a/src/test/cassettes/order/lowest_rate.json +++ b/src/test/cassettes/order/lowest_rate.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456536, + "recordedAt": 1668466074, "request": { "body": "{\n \"order\": {\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/orders" }, "response": { - "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05893cab24ae11edbb3fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_667d1e1fca364b01b72c4894e69304d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_75bf3258e94f4489b7af2a530827607f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_667d1e1fca364b01b72c4894e69304d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_061b022661d04c3e98385e171bf6287d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_667d1e1fca364b01b72c4894e69304d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c051cce77be9437c90f05352838958b6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_667d1e1fca364b01b72c4894e69304d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_16095c44748c4ed8858c50d529599147\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-08-25T19:42:15Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05893cab24ae11edbb3fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:42:15Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:15Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_058a917f24ae11edbb42ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_667d1e1fca364b01b72c4894e69304d9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_058a917f24ae11edbb42ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:42:15Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:42:15Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_03d7376d30994235a86b4aa4373c1a19\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05893cab24ae11edbb3fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:42:16Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_667d1e1fca364b01b72c4894e69304d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:16Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_75bf3258e94f4489b7af2a530827607f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:42:16Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_667d1e1fca364b01b72c4894e69304d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:16Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_061b022661d04c3e98385e171bf6287d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:16Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_667d1e1fca364b01b72c4894e69304d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:16Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c051cce77be9437c90f05352838958b6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:42:16Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_667d1e1fca364b01b72c4894e69304d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:16Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_16095c44748c4ed8858c50d529599147\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05893cab24ae11edbb3fac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_1879d25a237f4d298b26b41b9d87c895\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:16Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_058a917f24ae11edbb42ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_1879d25a237f4d298b26b41b9d87c895\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_058a917f24ae11edbb42ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ff17e3d646e11edb8a1ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5e94fbcb3cf146c0bb0149eea15543f1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_dfc8744a2fb7422e8d834eeed77daeb4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5e94fbcb3cf146c0bb0149eea15543f1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_48da26833bb149c68a9ed9c6629826b7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5e94fbcb3cf146c0bb0149eea15543f1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_30aed285663448e1ac0433aa1a987d84\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5e94fbcb3cf146c0bb0149eea15543f1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_603c7c110a2641a3afafc5a88436bacd\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-14T22:47:53Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ff17e3d646e11edb8a1ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:53Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:53Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5ff82dff646e11edb8a3ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_5e94fbcb3cf146c0bb0149eea15543f1\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5ff82dff646e11edb8a3ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:53Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:53Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_ac907d7ce3f14a14a4bc4451f88161b8\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ff17e3d646e11edb8a1ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:54Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5e94fbcb3cf146c0bb0149eea15543f1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:54Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_dfc8744a2fb7422e8d834eeed77daeb4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:54Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5e94fbcb3cf146c0bb0149eea15543f1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:54Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_48da26833bb149c68a9ed9c6629826b7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:54Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5e94fbcb3cf146c0bb0149eea15543f1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:54Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_30aed285663448e1ac0433aa1a987d84\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:54Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5e94fbcb3cf146c0bb0149eea15543f1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:54Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_603c7c110a2641a3afafc5a88436bacd\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ff17e3d646e11edb8a1ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_10bc367e29af4a38af3141faaf74d69e\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:54Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5ff82dff646e11edb8a3ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_10bc367e29af4a38af3141faaf74d69e\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5ff82dff646e11edb8a3ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", "httpVersion": null, "headers": { "null": [ @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d097f7a5100c0008892c" + "3a8b2e0b6372c599e0d9eac50019c84e" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.719436" + "0.959208" ], "etag": [ - "W/\"aeeb5f8643f1bc695438b2aa96b4a7e8\"" + "W/\"a10a45fece2cede2ed8cfb9a1505db27\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/orders/order_1879d25a237f4d298b26b41b9d87c895" + "/api/v2/orders/order_10bc367e29af4a38af3141faaf74d69e" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/orders" }, - "duration": 845 + "duration": 1231 } ] \ No newline at end of file diff --git a/src/test/cassettes/order/retrieve.json b/src/test/cassettes/order/retrieve.json index 9970dc845..31893e38a 100644 --- a/src/test/cassettes/order/retrieve.json +++ b/src/test/cassettes/order/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456534, + "recordedAt": 1668466072, "request": { "body": "{\n \"order\": {\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/orders" }, "response": { - "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_04b33fcd24ae11ed9794ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_74f206e2287d42b9a6bae6cb9d03c77a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8f2dd8990a694dc797446ebca823e8f9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ae446c4cdb7d4268a4131ad080a07b7a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5bde9b6d1891488f870f7d65a71a31de\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_04b33fcd24ae11ed9794ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_04b4b21b24ae11edb9a1ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_04b4b21b24ae11edb9a1ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_52f9aa241404485b961f5a27fa058592\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_04b33fcd24ae11ed9794ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_74f206e2287d42b9a6bae6cb9d03c77a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8f2dd8990a694dc797446ebca823e8f9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ae446c4cdb7d4268a4131ad080a07b7a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5bde9b6d1891488f870f7d65a71a31de\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_04b33fcd24ae11ed9794ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_e06d5ae00d354c8f8af125dcf2690eed\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_04b4b21b24ae11edb9a1ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_e06d5ae00d354c8f8af125dcf2690eed\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_04b4b21b24ae11edb9a1ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ec39c31646e11ed81ebac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9f96ba0801a84da39b0436122e3961b0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a8e59db29c824e4cbefec0ef8ec5c14d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8b0bfc4842ad471d87381639d78c70a2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_7ea90ef9d2f942249dfeb3d902e4e455\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-14T22:47:51Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ec39c31646e11ed81ebac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:51Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5ec5090c646e11eda25bac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5ec5090c646e11eda25bac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:51Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_17dd64f28e054aea8d38efa3aa470d62\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ec39c31646e11ed81ebac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:52Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:52Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9f96ba0801a84da39b0436122e3961b0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:52Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:52Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a8e59db29c824e4cbefec0ef8ec5c14d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:52Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:52Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8b0bfc4842ad471d87381639d78c70a2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:52Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:52Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_7ea90ef9d2f942249dfeb3d902e4e455\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ec39c31646e11ed81ebac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_65e7324d82b74ead9526823198c4d7b5\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:52Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5ec5090c646e11eda25bac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_65e7324d82b74ead9526823198c4d7b5\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5ec5090c646e11eda25bac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d095f7ee0c5b00088855" + "3a8b2e0c6372c597e0d9eac20019c752" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.690637" + "1.097334" ], "etag": [ - "W/\"69a259a6fa4bd8250d28e82ee3273c42\"" + "W/\"34c9090f6e5391668f76402233653153\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/orders/order_e06d5ae00d354c8f8af125dcf2690eed" + "/api/v2/orders/order_65e7324d82b74ead9526823198c4d7b5" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/orders" }, - "duration": 819 + "duration": 1367 }, { - "recordedAt": 1661456535, + "recordedAt": 1668466073, "request": { "body": "", "method": "GET", @@ -108,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/orders/order_e06d5ae00d354c8f8af125dcf2690eed" + "uri": "https://api.easypost.com/v2/orders/order_65e7324d82b74ead9526823198c4d7b5" }, "response": { - "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_04b33fcd24ae11ed9794ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_74f206e2287d42b9a6bae6cb9d03c77a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8f2dd8990a694dc797446ebca823e8f9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ae446c4cdb7d4268a4131ad080a07b7a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5bde9b6d1891488f870f7d65a71a31de\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_04b33fcd24ae11ed9794ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_04b4b21b24ae11edb9a1ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_04b4b21b24ae11edb9a1ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_52f9aa241404485b961f5a27fa058592\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_04b33fcd24ae11ed9794ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_74f206e2287d42b9a6bae6cb9d03c77a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8f2dd8990a694dc797446ebca823e8f9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ae446c4cdb7d4268a4131ad080a07b7a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:14Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0caec34200af4c20b43e85bfb4a088a8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5bde9b6d1891488f870f7d65a71a31de\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_04b33fcd24ae11ed9794ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [],\n \"order_id\": \"order_e06d5ae00d354c8f8af125dcf2690eed\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:14Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_04b4b21b24ae11edb9a1ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_e06d5ae00d354c8f8af125dcf2690eed\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:14+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_04b4b21b24ae11edb9a1ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ec39c31646e11ed81ebac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9f96ba0801a84da39b0436122e3961b0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a8e59db29c824e4cbefec0ef8ec5c14d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8b0bfc4842ad471d87381639d78c70a2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_7ea90ef9d2f942249dfeb3d902e4e455\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-14T22:47:51Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ec39c31646e11ed81ebac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:51Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5ec5090c646e11eda25bac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5ec5090c646e11eda25bac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:51Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_17dd64f28e054aea8d38efa3aa470d62\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ec39c31646e11ed81ebac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:52Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:52Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9f96ba0801a84da39b0436122e3961b0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:52Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:52Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a8e59db29c824e4cbefec0ef8ec5c14d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:52Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:52Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8b0bfc4842ad471d87381639d78c70a2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:52Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df25f21ee8054e43875e8072b5e928ef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:52Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_7ea90ef9d2f942249dfeb3d902e4e455\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5ec39c31646e11ed81ebac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [],\n \"order_id\": \"order_65e7324d82b74ead9526823198c4d7b5\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:52Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5ec5090c646e11eda25bac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_65e7324d82b74ead9526823198c4d7b5\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:51+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5ec5090c646e11eda25bac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,7 +124,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d096e6897300000888ea" + "3a8b2e0e6372c599e0d9eac30019c811" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.198025" + "0.147229" ], "etag": [ - "W/\"94f922eb7f2066a37297bb20ee677dc8\"" + "W/\"dcd847515cf5532fc622d228c94359c4\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +181,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/orders/order_e06d5ae00d354c8f8af125dcf2690eed" + "uri": "https://api.easypost.com/v2/orders/order_65e7324d82b74ead9526823198c4d7b5" }, - "duration": 330 + "duration": 381 } ] \ No newline at end of file diff --git a/src/test/cassettes/parcel/create.json b/src/test/cassettes/parcel/create.json index 97f56482f..58c0bb247 100644 --- a/src/test/cassettes/parcel/create.json +++ b/src/test/cassettes/parcel/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456469, + "recordedAt": 1668466002, "request": { "body": "{\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/parcels" }, "response": { - "body": "{\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:09Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:09Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_897794da7cc24300a523bd381f554b5d\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n}", + "body": "{\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:46:42Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:46:42Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_295a454d198e465e8381e02ca0bf694e\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d055f7ed0038000867d7" + "3a8b2e0d6372c552e0d9e3040019aa80" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.020708" + "0.021529" ], "etag": [ - "W/\"11c3f088fe56a2cdd0ed6680b4923ca2\"" + "W/\"9b3b372ff8bc1dfd22531749a5ce1270\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/parcels.prcl_897794da7cc24300a523bd381f554b5d" + "/api/prcl_295a454d198e465e8381e02ca0bf694e/parcels" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/parcels" }, - "duration": 151 + "duration": 246 } ] \ No newline at end of file diff --git a/src/test/cassettes/parcel/retrieve.json b/src/test/cassettes/parcel/retrieve.json index b011e5915..a8e55efe0 100644 --- a/src/test/cassettes/parcel/retrieve.json +++ b/src/test/cassettes/parcel/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456468, + "recordedAt": 1668466002, "request": { "body": "{\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/parcels" }, "response": { - "body": "{\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:08Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:08Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_5b192722e3a74e53b3aa5511447a4da9\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n}", + "body": "{\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:46:42Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:46:42Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a2df1b2751694bd8b3fc991bca77c83b\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n}", "httpVersion": null, "headers": { "null": [ @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d054f7efa3cf000867a0" + "3a8b2e0d6372c552e0d9e2ea0019aa3d" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.021409" + "0.022827" ], "etag": [ - "W/\"fa2fb20a3c8276853619b88017f77777\"" + "W/\"c1df101757de898ff56b85d76bbfe0e1\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/parcels.prcl_5b192722e3a74e53b3aa5511447a4da9" + "/api/prcl_a2df1b2751694bd8b3fc991bca77c83b/parcels" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/parcels" }, - "duration": 158 + "duration": 254 }, { - "recordedAt": 1661456468, + "recordedAt": 1668466002, "request": { "body": "", "method": "GET", @@ -108,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/parcels/prcl_5b192722e3a74e53b3aa5511447a4da9" + "uri": "https://api.easypost.com/v2/parcels/prcl_a2df1b2751694bd8b3fc991bca77c83b" }, "response": { - "body": "{\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:08Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:08Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_5b192722e3a74e53b3aa5511447a4da9\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n}", + "body": "{\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:46:42Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:46:42Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a2df1b2751694bd8b3fc991bca77c83b\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n}", "httpVersion": null, "headers": { "null": [ @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d054f7f0d2c1000867b7" + "3a8b2e086372c552e0d9e3020019aa62" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.026814" + "0.017518" ], "etag": [ - "W/\"fa2fb20a3c8276853619b88017f77777\"" + "W/\"c1df101757de898ff56b85d76bbfe0e1\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +181,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/parcels/prcl_5b192722e3a74e53b3aa5511447a4da9" + "uri": "https://api.easypost.com/v2/parcels/prcl_a2df1b2751694bd8b3fc991bca77c83b" }, - "duration": 162 + "duration": 236 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/buy.json b/src/test/cassettes/pickup/buy.json index 730f06485..f48e69b25 100644 --- a/src/test/cassettes/pickup/buy.json +++ b/src/test/cassettes/pickup/buy.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1666367739, + "recordedAt": 1668466050, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:55:37Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:55:38Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:38Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:38Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_19da4fa2df5143bd95b68ac1b333daf9\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:55:38Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"tracking_code\": \"9400100106068144545565\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzU4ZWNmOGY4ODY0YzQ0NDk4NTU5MzMyZmU0M2QzMGY3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:38Z\",\n \"signed_by\": null,\n \"id\": \"trk_58ecf8f8864c44498559332fe43d30f7\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:37+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ce3c036b515811eda49bac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:37+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ce3c036b515811eda49bac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:55:38Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/b1ee8d8af3a0411f8e97b8f25c2e549c.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:55:38Z\",\n \"id\": \"pl_2a07df86dfe24ca5b166d7fee5f9b561\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:55:38Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:55:37Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:55:37Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_0ca5e2f5c4114bd0a8e9913f49ee634f\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_ce396058515811ed84efac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:55:37Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:37Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_20b72254a6dd486187645b95d2d9b1b3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:55:37Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:37Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0a5dde23d26743b1970921426fd6d035\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:55:37Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:37Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_11dca4e3860e44658ec35b87083acc09\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:37Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_19da4fa2df5143bd95b68ac1b333daf9\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_ce396058515811ed84efac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545565\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:29Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:30Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:30Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2fef5e4e72c141939d74c404c61084db\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:47:30Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"tracking_code\": \"9400100106068149680278\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzhmZjRmNDM1ZWE2ODQ2N2M5ZjgwMjdlNTUwYmNkYTc3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:30Z\",\n \"signed_by\": null,\n \"id\": \"trk_8ff4f435ea68467c9f8027e550bcda77\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_519cb61a646e11ed9d3aac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_519cb61a646e11ed9d3aac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:30Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/e89a45a971b7487aa82f85dc912278be.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:30Z\",\n \"id\": \"pl_9d978d0e36ca42909b5ca209032dfb1f\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:30Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:29Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:29Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_1087f2a421214c629559cc64fde75196\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:29+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_51981b89646e11edb31fac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:29Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:29Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2fef5e4e72c141939d74c404c61084db\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:29Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:29Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_90bc7110790d433a8d2a0b3e2e319521\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:29Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:29Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5ccb92dfab5d478491876d034a7dae7d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:29Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:29Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d3d844b2324849789d0b621f9cc64ff8\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:29+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_51981b89646e11edb31fac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680278\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,9 +51,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -61,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "8424afb46352c0f9e0d9d53c0011d678" + "3a8b2e086372c581e0d9e7440019bbf1" ], "x-proxied": [ - "extlb1nuq 29913d444b", + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.311291" + "1.305993" ], "etag": [ - "W/\"a6b24947e7635c1cfccf6e2d39ac0d73\"" + "W/\"b7c34d18a7fb5e317322d5e7d2a50b66\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_c9625bb7c4dc439585311f624cc99d4d" + "/api/v2/shipments/shp_4a554f40176d4a50b45bbe207a5ae4a5" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -95,12 +93,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1693 + "duration": 1557 }, { - "recordedAt": 1666367741, + "recordedAt": 1668466052, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-11-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_0ca5e2f5c4114bd0a8e9913f49ee634f\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"currency\": \"USD\",\n \"id\": \"rate_20b72254a6dd486187645b95d2d9b1b3\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"currency\": \"USD\",\n \"id\": \"rate_0a5dde23d26743b1970921426fd6d035\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"currency\": \"USD\",\n \"id\": \"rate_11dca4e3860e44658ec35b87083acc09\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"currency\": \"USD\",\n \"id\": \"rate_19da4fa2df5143bd95b68ac1b333daf9\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545565\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_ce396058515811ed84efac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:38 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_ce3c036b515811eda49bac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:38 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"currency\": \"USD\",\n \"id\": \"rate_19da4fa2df5143bd95b68ac1b333daf9\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:38 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_ce396058515811ed84efac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:38 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:38 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzU4ZWNmOGY4ODY0YzQ0NDk4NTU5MzMyZmU0M2QzMGY3\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545565\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_58ecf8f8864c44498559332fe43d30f7\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:38 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:37 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_ce3c036b515811eda49bac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:37 AM\"\n },\n \"id\": \"shp_c9625bb7c4dc439585311f624cc99d4d\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:55:38 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_2a07df86dfe24ca5b166d7fee5f9b561\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/b1ee8d8af3a0411f8e97b8f25c2e549c.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:38 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:38 AM\"\n },\n \"min_datetime\": \"2022-11-01\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-12-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_1087f2a421214c629559cc64fde75196\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"currency\": \"USD\",\n \"id\": \"rate_2fef5e4e72c141939d74c404c61084db\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"currency\": \"USD\",\n \"id\": \"rate_90bc7110790d433a8d2a0b3e2e319521\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"currency\": \"USD\",\n \"id\": \"rate_5ccb92dfab5d478491876d034a7dae7d\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"currency\": \"USD\",\n \"id\": \"rate_d3d844b2324849789d0b621f9cc64ff8\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068149680278\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_51981b89646e11edb31fac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:30 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_519cb61a646e11ed9d3aac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:30 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"currency\": \"USD\",\n \"id\": \"rate_2fef5e4e72c141939d74c404c61084db\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:47:30 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_51981b89646e11edb31fac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:30 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:30 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzhmZjRmNDM1ZWE2ODQ2N2M5ZjgwMjdlNTUwYmNkYTc3\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068149680278\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_8ff4f435ea68467c9f8027e550bcda77\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:30 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_519cb61a646e11ed9d3aac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n },\n \"id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 14, 2022, 5:47:30 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_9d978d0e36ca42909b5ca209032dfb1f\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/e89a45a971b7487aa82f85dc912278be.png\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:30 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:30 PM\"\n },\n \"min_datetime\": \"2022-12-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -116,7 +114,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:39+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_cf88dd7e515811eda536ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:39Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:41Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:41Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_c07014a77acc42b8913b012322c96df3\",\n \"pickup_id\": \"pickup_15f373f924dc4bfb9c3d2a3c6931072d\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:39Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_15f373f924dc4bfb9c3d2a3c6931072d\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:31+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_529438e5646e11edb377ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:31Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:32Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:32Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_ed465270a6274945b74dbfcffaef9387\",\n \"pickup_id\": \"pickup_47f1aa3b91ef4bb59b3144fd55b9dec6\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:31Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_47f1aa3b91ef4bb59b3144fd55b9dec6\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -129,7 +127,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -149,6 +147,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -156,10 +157,10 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "107f19466352c0fbe0d9d53e0010468d" + "3a8b2e0b6372c583e0d9e7480019bc9f" ], "x-proxied": [ - "extlb3wdc 29913d444b", + "extlb4wdc 29913d444b", "intlb2wdc 29913d444b", "intlb2nuq 29913d444b" ], @@ -167,16 +168,16 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.487638" + "0.878255" ], "etag": [ - "W/\"442266a12a828e3ecbb0ea2b6e275b7c\"" + "W/\"23a7f9bf9776c06a5dbeeac704c3d911\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -188,10 +189,10 @@ }, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1843 + "duration": 1133 }, { - "recordedAt": 1666367743, + "recordedAt": 1668466053, "request": { "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"NextDay\"\n}", "method": "POST", @@ -206,10 +207,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_15f373f924dc4bfb9c3d2a3c6931072d/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_47f1aa3b91ef4bb59b3144fd55b9dec6/buy" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:39+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_cf88dd7e515811eda536ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:39Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:41Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:41Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_c07014a77acc42b8913b012322c96df3\",\n \"pickup_id\": \"pickup_15f373f924dc4bfb9c3d2a3c6931072d\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62314242\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:43Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_15f373f924dc4bfb9c3d2a3c6931072d\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:31+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_529438e5646e11edb377ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:31Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:32Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:32Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_ed465270a6274945b74dbfcffaef9387\",\n \"pickup_id\": \"pickup_47f1aa3b91ef4bb59b3144fd55b9dec6\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62390428\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:33Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_47f1aa3b91ef4bb59b3144fd55b9dec6\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", "httpVersion": null, "headers": { "null": [ @@ -249,26 +250,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "a4cf67b06352c0fee0d9d5400012629d" + "3a8b2e096372c584e0d9ea5b0019bd12" ], "x-proxied": [ - "extlb2nuq 29913d444b", - "intlb2nuq 29913d444b" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.654272" + "0.961973" ], "etag": [ - "W/\"bfdefefe91e259ee1ff5f7d5a1145f11\"" + "W/\"af05c4fd629f9c226210417b7015a864\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -278,8 +280,8 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/pickups/pickup_15f373f924dc4bfb9c3d2a3c6931072d/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_47f1aa3b91ef4bb59b3144fd55b9dec6/buy" }, - "duration": 2030 + "duration": 1243 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/cancel.json b/src/test/cassettes/pickup/cancel.json index 6cd2f8aa0..32597ed43 100644 --- a/src/test/cassettes/pickup/cancel.json +++ b/src/test/cassettes/pickup/cancel.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1666367752, + "recordedAt": 1668466060, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:55:50Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:51Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_233400edba8a43c9a50c0ef1473adaa9\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:55:52Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"tracking_code\": \"9400100106068144545602\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2QwMjlkZDQzZGQ4MTQ5NmM5MmRhYTM1NDdhMmRhMDlh\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:52Z\",\n \"signed_by\": null,\n \"id\": \"trk_d029dd43dd81496c92daa3547a2da09a\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:50+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d61c1ff2515811eda882ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:50+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d61c1ff2515811eda882ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:55:51Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e5e796b234924100b0a3864ad14ef8ec.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"id\": \"pl_302c9486db054b738ca1f9bd345b437e\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:55:51Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:55:50Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:55:50Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_605200fdbe1342b4b0d2059fa6f2d629\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:50+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d61a9bdc515811ed88aaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:51Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_233400edba8a43c9a50c0ef1473adaa9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:55:51Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d5d18df482604bb6b0f5df4c84e0fdc0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:55:51Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_155669533747422d98f54c67bf66cf57\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:55:51Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:51Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fed77550f49a40f2893afc8e2b77a89a\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:50+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d61a9bdc515811ed88aaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545602\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:40Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:39Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b9f9e8c0f5cc42af8791aafaaa40d4b0\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:47:40Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"tracking_code\": \"9400100106068149680360\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzZkZGEzY2JmNWQ0ZDRkYTg5MDZhZDAyYzRjYmMzNmEx\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:40Z\",\n \"signed_by\": null,\n \"id\": \"trk_6dda3cbf5d4d4da8906ad02c4cbc36a1\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:39+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_57587b7e646e11ed802aac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:39+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_57587b7e646e11ed802aac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/6323b82f7aac4946a52548c7c2701568.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:40Z\",\n \"id\": \"pl_fa8e52fc79274b4f87d4c400337616f9\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:39Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:39Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_9c6a5f046d8e46849938b1044c83c947\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:39+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_57557062646e11ed9f60ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:39Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_dc90bb1836504c6e8a8a70d10f2854d7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:39Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_06872af3244243dea7b58bfa0c679509\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:39Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4bfd1924eb534a269c007fe1bba19044\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:39Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b9f9e8c0f5cc42af8791aafaaa40d4b0\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:39+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_57557062646e11ed9f60ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680360\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,30 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "352b94386352c106e0d9d57a0011dd1b" + "3a8b2e086372c58be0d9ea7e0019c09a" ], "x-proxied": [ "extlb4wdc 29913d444b", "intlb2wdc 29913d444b", - "intlb1nuq 29913d444b" + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.266161" + "1.104005" ], "etag": [ - "W/\"284e46d46c49b911a492fba716f5bebc\"" + "W/\"397d4f76bf54274b02857b0ba1a1e094\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_d31148a1d7394fedb8248e6dc04de78a" + "/api/v2/shipments/shp_6ff1e0a455174c50b369bfaaeff147d9" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +93,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1563 + "duration": 1343 }, { - "recordedAt": 1666367753, + "recordedAt": 1668466061, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-11-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:50 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_605200fdbe1342b4b0d2059fa6f2d629\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:50 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:51 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"currency\": \"USD\",\n \"id\": \"rate_233400edba8a43c9a50c0ef1473adaa9\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:51 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"currency\": \"USD\",\n \"id\": \"rate_d5d18df482604bb6b0f5df4c84e0fdc0\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:51 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"currency\": \"USD\",\n \"id\": \"rate_155669533747422d98f54c67bf66cf57\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:51 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"currency\": \"USD\",\n \"id\": \"rate_fed77550f49a40f2893afc8e2b77a89a\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545602\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:50 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d61a9bdc515811ed88aaac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:50 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d61c1ff2515811eda882ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:50 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:51 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"currency\": \"USD\",\n \"id\": \"rate_233400edba8a43c9a50c0ef1473adaa9\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:50 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:50 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d61a9bdc515811ed88aaac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:52 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2QwMjlkZDQzZGQ4MTQ5NmM5MmRhYTM1NDdhMmRhMDlh\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545602\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_d029dd43dd81496c92daa3547a2da09a\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:52 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:50 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d61c1ff2515811eda882ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:50 AM\"\n },\n \"id\": \"shp_d31148a1d7394fedb8248e6dc04de78a\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:55:51 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_302c9486db054b738ca1f9bd345b437e\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e5e796b234924100b0a3864ad14ef8ec.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:51 AM\"\n },\n \"min_datetime\": \"2022-11-01\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-12-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:39 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_9c6a5f046d8e46849938b1044c83c947\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 14, 2022, 5:47:39 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:39 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_dc90bb1836504c6e8a8a70d10f2854d7\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 14, 2022, 5:47:39 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:39 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_06872af3244243dea7b58bfa0c679509\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 14, 2022, 5:47:39 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:39 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_4bfd1924eb534a269c007fe1bba19044\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 14, 2022, 5:47:39 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:39 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_b9f9e8c0f5cc42af8791aafaaa40d4b0\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:47:39 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068149680360\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:39 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_57557062646e11ed9f60ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:39 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:39 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_57587b7e646e11ed802aac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:39 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:39 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_b9f9e8c0f5cc42af8791aafaaa40d4b0\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:47:39 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:39 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:39 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_57557062646e11ed9f60ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:39 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:40 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzZkZGEzY2JmNWQ0ZDRkYTg5MDZhZDAyYzRjYmMzNmEx\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068149680360\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_6dda3cbf5d4d4da8906ad02c4cbc36a1\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:40 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:39 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_57587b7e646e11ed802aac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:39 PM\"\n },\n \"id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 14, 2022, 5:47:39 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_fa8e52fc79274b4f87d4c400337616f9\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/6323b82f7aac4946a52548c7c2701568.png\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:40 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:40 PM\"\n },\n \"min_datetime\": \"2022-12-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +114,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:52+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d72482e3515811ed890fac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:52Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:53Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:53Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_ccabb8e11d2a4edaaf510de16831a005\",\n \"pickup_id\": \"pickup_efe281ab38804a85ab2235db9831591f\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:52Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_efe281ab38804a85ab2235db9831591f\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:40+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5830f2ac646e11ed9facac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:40Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:41Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:41Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_3918e50a5afa4cdc98e9cc755624ad6c\",\n \"pickup_id\": \"pickup_0b2d650f7c9e490991e666652ace1192\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:40Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_0b2d650f7c9e490991e666652ace1192\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +127,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,7 +154,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "352b943d6352c108e0d9d57c0011ddb3" + "3a8b2e0a6372c58ce0d9ea800019c13f" ], "x-proxied": [ "extlb4wdc 29913d444b", @@ -165,16 +165,16 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.683423" + "0.680628" ], "etag": [ - "W/\"f9132c639e760deeddd8825067393744\"" + "W/\"db7039b6a5f8de0ebeebf17b4ea1a2dc\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,10 +186,10 @@ }, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1048 + "duration": 890 }, { - "recordedAt": 1666367755, + "recordedAt": 1668466062, "request": { "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"NextDay\"\n}", "method": "POST", @@ -204,10 +204,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_efe281ab38804a85ab2235db9831591f/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_0b2d650f7c9e490991e666652ace1192/buy" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:52+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d72482e3515811ed890fac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:52Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:53Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:53Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_ccabb8e11d2a4edaaf510de16831a005\",\n \"pickup_id\": \"pickup_efe281ab38804a85ab2235db9831591f\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62314244\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:54Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_efe281ab38804a85ab2235db9831591f\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:40+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5830f2ac646e11ed9facac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:40Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:41Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:41Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_3918e50a5afa4cdc98e9cc755624ad6c\",\n \"pickup_id\": \"pickup_0b2d650f7c9e490991e666652ace1192\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62390430\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:42Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_0b2d650f7c9e490991e666652ace1192\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", "httpVersion": null, "headers": { "null": [ @@ -220,7 +220,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -247,27 +247,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "352b943a6352c109e0d9d57e0011de10" + "3a8b2e0f6372c58de0d9ea820019c1b8" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb2nuq 29913d444b" + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.107913" + "0.854906" ], "etag": [ - "W/\"29d302386a5250c228a897d7de2683db\"" + "W/\"c161cf430efd7333ce822106f4d7419e\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -277,12 +277,12 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/pickups/pickup_efe281ab38804a85ab2235db9831591f/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_0b2d650f7c9e490991e666652ace1192/buy" }, - "duration": 1480 + "duration": 1173 }, { - "recordedAt": 1666367756, + "recordedAt": 1668466063, "request": { "body": "", "method": "POST", @@ -294,10 +294,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_efe281ab38804a85ab2235db9831591f/cancel" + "uri": "https://api.easypost.com/v2/pickups/pickup_0b2d650f7c9e490991e666652ace1192/cancel" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:52+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d72482e3515811ed890fac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:52Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:53Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:53Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_ccabb8e11d2a4edaaf510de16831a005\",\n \"pickup_id\": \"pickup_efe281ab38804a85ab2235db9831591f\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62314244\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:56Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_efe281ab38804a85ab2235db9831591f\",\n \"object\": \"Pickup\",\n \"status\": \"canceled\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:40+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5830f2ac646e11ed9facac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:40Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:41Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:41Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_3918e50a5afa4cdc98e9cc755624ad6c\",\n \"pickup_id\": \"pickup_0b2d650f7c9e490991e666652ace1192\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62390430\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:43Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_0b2d650f7c9e490991e666652ace1192\",\n \"object\": \"Pickup\",\n \"status\": \"canceled\"\n}", "httpVersion": null, "headers": { "null": [ @@ -310,7 +310,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -337,27 +337,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "352b94386352c10be0d9d57f0011de76" + "3a8b2e086372c58ee0d9ea830019c276" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb2nuq 29913d444b" + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.802140" + "0.838850" ], "etag": [ - "W/\"f44af22fcd00476efd775a4ee9ca7ebe\"" + "W/\"370a35dd150d6159cfe8a4509376dc6c\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -367,8 +367,8 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/pickups/pickup_efe281ab38804a85ab2235db9831591f/cancel" + "uri": "https://api.easypost.com/v2/pickups/pickup_0b2d650f7c9e490991e666652ace1192/cancel" }, - "duration": 1183 + "duration": 1093 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/create.json b/src/test/cassettes/pickup/create.json index 552d93425..235919467 100644 --- a/src/test/cassettes/pickup/create.json +++ b/src/test/cassettes/pickup/create.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1666367758, + "recordedAt": 1668466065, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:55:57Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:55:58Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:58Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:58Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b6f558ddb4884f5cb2afe2fcaa1354ac\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:55:58Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"tracking_code\": \"9400100106068144545626\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzdiYmJlODA4ZjkyODRiNmI5N2M2OGNhMDlmZjU5OWEy\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:58Z\",\n \"signed_by\": null,\n \"id\": \"trk_7bbbe808f9284b6b97c68ca09ff599a2\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:57+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_da2ebd18515811edab2aac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:57+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_da2ebd18515811edab2aac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:55:58Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/f76c54dd12974d48a8945e8ec61d6e68.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:55:58Z\",\n \"id\": \"pl_8c700cabcca54696bd0f7a3269311619\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:55:58Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:55:57Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:55:57Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_1e14787fe8034309a0f32ce912c5ba94\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:57+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_da2ca963515811ed89ffac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:55:57Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:57Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_0b7ea07ad5a640959bba6d53e371ec24\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:55:57Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:57Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_55748d56f693431ea8f2efcd9c3a2c13\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:55:57Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:57Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_39a96118395345b4883d58ef48e67f5c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:57Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:57Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b6f558ddb4884f5cb2afe2fcaa1354ac\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:57+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_da2ca963515811ed89ffac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545626\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2ee2fdbf262645579e321446806fe40d\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:47:45Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"tracking_code\": \"9400100106068149680391\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzc1NjllZDA5Yzg1YjRhYzdiMTA3NDA3MzdhOGI5ZTA5\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:45Z\",\n \"signed_by\": null,\n \"id\": \"trk_7569ed09c85b4ac7b10740737a8b9e09\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:44+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5a396e83646e11edb67bac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:44+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5a396e83646e11edb67bac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/4077ef586fea48c4803207b6b3485eef.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"id\": \"pl_036301218071404ab3e7a2f3592cba06\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:44Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_38b697aec9f84648ad04881936e0467f\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:44+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5a36c690646e11edb67aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f08659c6c07046c1ac5dfacdfec1e34e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bf73da4307be4378bea97c8d891bda1a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e060633948fd47d085b045188d2ed6e3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2ee2fdbf262645579e321446806fe40d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:44+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5a36c690646e11edb67aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680391\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,30 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "352b943c6352c10de0d9d5810011df46" + "3a8b2e096372c58fe0d9ea850019c316" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb2nuq 29913d444b" + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.040488" + "1.013900" ], "etag": [ - "W/\"61b69be685b83bf5d467d3096d3c770a\"" + "W/\"0799a5d409efcfb939fc4934b09d724a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_29aa7d5641d245199560727e239829e3" + "/api/v2/shipments/shp_2cf3f3cd27074f1dbfb6f745de8eb688" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +93,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 2313 + "duration": 1331 }, { - "recordedAt": 1666367759, + "recordedAt": 1668466066, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-11-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_1e14787fe8034309a0f32ce912c5ba94\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"currency\": \"USD\",\n \"id\": \"rate_0b7ea07ad5a640959bba6d53e371ec24\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"currency\": \"USD\",\n \"id\": \"rate_55748d56f693431ea8f2efcd9c3a2c13\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"currency\": \"USD\",\n \"id\": \"rate_39a96118395345b4883d58ef48e67f5c\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"currency\": \"USD\",\n \"id\": \"rate_b6f558ddb4884f5cb2afe2fcaa1354ac\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545626\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_da2ca963515811ed89ffac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:58 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_da2ebd18515811edab2aac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:58 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"currency\": \"USD\",\n \"id\": \"rate_b6f558ddb4884f5cb2afe2fcaa1354ac\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:58 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_da2ca963515811ed89ffac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:58 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:58 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzdiYmJlODA4ZjkyODRiNmI5N2M2OGNhMDlmZjU5OWEy\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545626\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_7bbbe808f9284b6b97c68ca09ff599a2\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:58 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:57 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_da2ebd18515811edab2aac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:57 AM\"\n },\n \"id\": \"shp_29aa7d5641d245199560727e239829e3\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:55:58 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_8c700cabcca54696bd0f7a3269311619\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/f76c54dd12974d48a8945e8ec61d6e68.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:58 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:58 AM\"\n },\n \"min_datetime\": \"2022-11-01\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-12-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:44 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_38b697aec9f84648ad04881936e0467f\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 14, 2022, 5:47:44 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:44 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"currency\": \"USD\",\n \"id\": \"rate_f08659c6c07046c1ac5dfacdfec1e34e\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 14, 2022, 5:47:44 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:44 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"currency\": \"USD\",\n \"id\": \"rate_bf73da4307be4378bea97c8d891bda1a\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 14, 2022, 5:47:44 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:44 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"currency\": \"USD\",\n \"id\": \"rate_e060633948fd47d085b045188d2ed6e3\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 14, 2022, 5:47:44 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:44 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"currency\": \"USD\",\n \"id\": \"rate_2ee2fdbf262645579e321446806fe40d\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:47:44 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068149680391\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:44 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_5a36c690646e11edb67aac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:44 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:44 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_5a396e83646e11edb67bac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:44 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:44 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"currency\": \"USD\",\n \"id\": \"rate_2ee2fdbf262645579e321446806fe40d\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:47:44 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:44 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:44 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_5a36c690646e11edb67aac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:44 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:45 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzc1NjllZDA5Yzg1YjRhYzdiMTA3NDA3MzdhOGI5ZTA5\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068149680391\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_7569ed09c85b4ac7b10740737a8b9e09\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:45 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:44 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_5a396e83646e11edb67bac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:44 PM\"\n },\n \"id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 14, 2022, 5:47:44 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_036301218071404ab3e7a2f3592cba06\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/4077ef586fea48c4803207b6b3485eef.png\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:44 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:44 PM\"\n },\n \"min_datetime\": \"2022-12-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +114,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:59+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:59+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_db130f15515811edaa29ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:59Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:59Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:59Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_5673dacc15f048f0908eaa3529665d48\",\n \"pickup_id\": \"pickup_0ff27fa7e4604f1aaee24a51c59c5301\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:59Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_0ff27fa7e4604f1aaee24a51c59c5301\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5b10c085646e11edb799ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:45Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:46Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:46Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_1a8115ebdfc84dc59bc4932700c43530\",\n \"pickup_id\": \"pickup_c2f156e8121b4c57bad6d3be2758bbb4\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:45Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_c2f156e8121b4c57bad6d3be2758bbb4\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -157,27 +157,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "352b943a6352c10fe0d9d59a0011dfc3" + "3a8b2e0f6372c591e0d9ea9e0019c3e9" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", - "intlb1nuq 29913d444b" + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.692799" + "0.734193" ], "etag": [ - "W/\"e0dc22b18b2ea76715a3b121deee77df\"" + "W/\"29aa9c05488e3814e2c001e5935cf7ec\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -189,6 +189,6 @@ }, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 975 + "duration": 1021 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/lowest_rate.json b/src/test/cassettes/pickup/lowest_rate.json index ac7e27c84..02afaf5d8 100644 --- a/src/test/cassettes/pickup/lowest_rate.json +++ b/src/test/cassettes/pickup/lowest_rate.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1666367749, + "recordedAt": 1668466057, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:55:47Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ca22109eb94545f68ffa714f2226fa97\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"tracking_code\": \"9400100106068144545589\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzcwMmQ1ZDY0NjkwNTQwMDk5YjEzZmRjOWFlYTA0ZGQw\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"signed_by\": null,\n \"id\": \"trk_702d5d64690540099b13fdc9aea04dd0\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d44e2eec515811edaa07ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d44e2eec515811edaa07ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/6dd731cc250b4d198bdecbbf23b2a22e.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"id\": \"pl_d5f458aee2074af4aae91555b562e52d\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:55:48Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:55:47Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:55:47Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_4616591c934d4d6bb091c9e98f1ef8c7\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:47+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d44bcabc515811edafcbac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ca22109eb94545f68ffa714f2226fa97\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_dbca706d7c944d789275c224ba68124e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_9a5bbda7f1b546dda1848809473d326f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:55:48Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:48Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0014304672b443a29fa6bf6a6220f1c4\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:47+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d44bcabc515811edafcbac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545589\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:36Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:37Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:37Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1361642615754f01a1c793edbf1403f3\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:47:37Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"tracking_code\": \"9400100106068149680339\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzIyZWUxMDExOGIwMDRkNDdiODY5MzEwYmM2ODk0YzZj\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:37Z\",\n \"signed_by\": null,\n \"id\": \"trk_22ee10118b004d47b869310bc6894c6c\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:36+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_55c9cf60646e11edb497ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:36+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_55c9cf60646e11edb497ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:37Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/d6a6941b08ec4afcbf2042e3a3c63b68.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:37Z\",\n \"id\": \"pl_f495ba69a670410e9561da6926dae5fa\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:37Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:36Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:36Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_6e4d2112f4414a71aea70d26cbd9d0c5\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:36+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_55c303a8646e11edb493ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:36Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:36Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_d1de42607cb8410691a2e0bf2302faf3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:36Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:36Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_94e8b5b806cc43359fdeb82c72c2165a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:36Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:36Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7819e791eef44539aee57c5bb8490f2f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:36Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:36Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1361642615754f01a1c793edbf1403f3\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:36+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_55c303a8646e11edb493ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680339\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,30 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "352b943d6352c103e0d9d55e0011dc34" + "3a8b2e0a6372c588e0d9ea630019bf58" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", - "intlb1nuq 29913d444b" + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.072394" + "1.010015" ], "etag": [ - "W/\"f8be98dba2dd56788a7060df64053d74\"" + "W/\"1d2c70a60cef72049551db5194dc8d4b\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_8a8edae167e4448894aa6bbc8abea017" + "/api/v2/shipments/shp_a1a17651bd6648f5a602302c45f0ded4" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +93,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1436 + "duration": 1325 }, { - "recordedAt": 1666367750, + "recordedAt": 1668466058, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-11-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:47 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_4616591c934d4d6bb091c9e98f1ef8c7\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:47 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"currency\": \"USD\",\n \"id\": \"rate_ca22109eb94545f68ffa714f2226fa97\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"currency\": \"USD\",\n \"id\": \"rate_dbca706d7c944d789275c224ba68124e\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"currency\": \"USD\",\n \"id\": \"rate_9a5bbda7f1b546dda1848809473d326f\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"currency\": \"USD\",\n \"id\": \"rate_0014304672b443a29fa6bf6a6220f1c4\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545589\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:47 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d44bcabc515811edafcbac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:47 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d44e2eec515811edaa07ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:47 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"currency\": \"USD\",\n \"id\": \"rate_ca22109eb94545f68ffa714f2226fa97\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:47 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:47 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d44bcabc515811edafcbac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzcwMmQ1ZDY0NjkwNTQwMDk5YjEzZmRjOWFlYTA0ZGQw\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545589\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_702d5d64690540099b13fdc9aea04dd0\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:47 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d44e2eec515811edaa07ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:47 AM\"\n },\n \"id\": \"shp_8a8edae167e4448894aa6bbc8abea017\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:55:48 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_d5f458aee2074af4aae91555b562e52d\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/6dd731cc250b4d198bdecbbf23b2a22e.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:48 AM\"\n },\n \"min_datetime\": \"2022-11-01\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-12-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:36 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_6e4d2112f4414a71aea70d26cbd9d0c5\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 14, 2022, 5:47:36 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:36 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"currency\": \"USD\",\n \"id\": \"rate_d1de42607cb8410691a2e0bf2302faf3\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 14, 2022, 5:47:36 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:36 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"currency\": \"USD\",\n \"id\": \"rate_94e8b5b806cc43359fdeb82c72c2165a\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 14, 2022, 5:47:36 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:36 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"currency\": \"USD\",\n \"id\": \"rate_7819e791eef44539aee57c5bb8490f2f\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 14, 2022, 5:47:36 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:36 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"currency\": \"USD\",\n \"id\": \"rate_1361642615754f01a1c793edbf1403f3\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:47:36 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068149680339\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:36 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_55c303a8646e11edb493ac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:36 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:36 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_55c9cf60646e11edb497ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:36 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:37 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"currency\": \"USD\",\n \"id\": \"rate_1361642615754f01a1c793edbf1403f3\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:47:37 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:36 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:36 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_55c303a8646e11edb493ac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:36 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:37 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzIyZWUxMDExOGIwMDRkNDdiODY5MzEwYmM2ODk0YzZj\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068149680339\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_22ee10118b004d47b869310bc6894c6c\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:37 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:36 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_55c9cf60646e11edb497ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:36 PM\"\n },\n \"id\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 14, 2022, 5:47:37 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_f495ba69a670410e9561da6926dae5fa\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/d6a6941b08ec4afcbf2042e3a3c63b68.png\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:37 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:37 PM\"\n },\n \"min_datetime\": \"2022-12-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +114,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d5453c06515811eda836ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:49Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:50Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:50Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_eb9637b6eef14548bbd6661d20f887c4\",\n \"pickup_id\": \"pickup_2d0907b2b823406eb08e8cd65f5a0f74\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:49Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_2d0907b2b823406eb08e8cd65f5a0f74\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_569aabe3646e11ed9eefac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:38Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:38Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:38Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_476bf73e9cc44d2fbf35c1fcff20c2c3\",\n \"pickup_id\": \"pickup_709c5c1cdf214272b4546e28163b292e\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:38Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_709c5c1cdf214272b4546e28163b292e\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +127,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -147,9 +147,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -157,27 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "352b94366352c105e0d9d5610011dcc3" + "3a8b2e0a6372c589e0d9ea7c0019bff6" ], "x-proxied": [ "extlb4wdc 29913d444b", "intlb2wdc 29913d444b", - "intlb1nuq 29913d444b" + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.872295" + "0.803600" ], "etag": [ - "W/\"4c87760ea4fe1bc98294d41633f5c5e6\"" + "W/\"45078a6518c1a228dc4269603059be2c\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -189,6 +186,6 @@ }, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1242 + "duration": 1132 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/retrieve.json b/src/test/cassettes/pickup/retrieve.json index d87aff0ed..ef0ff75e3 100644 --- a/src/test/cassettes/pickup/retrieve.json +++ b/src/test/cassettes/pickup/retrieve.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1666367745, + "recordedAt": 1668466054, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:55:45Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:44Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_71b8bc56de514f1ca4f7aca244b46fc4\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:55:45Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"tracking_code\": \"9400100106068144545572\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE1NGJlZGY3NGU0ZDQwYWJhMGFmNWMwNWM4Y2VlNDE3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:45Z\",\n \"signed_by\": null,\n \"id\": \"trk_154bedf74e4d40aba0af5c05c8cee417\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:44+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d230b6ec515811ed8718ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:55:44+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d230b6ec515811ed8718ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/3c028994e8ec4739b4ae5e146be7d0e7.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:55:45Z\",\n \"id\": \"pl_ce31f4fcef0b430a8875259d39dd5e50\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:55:44Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:55:44Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_99b5394a67994a71ae9e126668dd17b5\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:44+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d22ed6c5515811eda6d7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:44Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_c5c80f3721c24179a6802e85bb533566\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:44Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_71b8bc56de514f1ca4f7aca244b46fc4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:44Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2f28c98f45f945acb9c0088f2fd99f4b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:55:44Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:55:44Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0bd35ba510c7485ebd04c067fcf3f087\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:55:44+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:55:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d22ed6c5515811eda6d7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545572\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:33Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:34Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:34Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:34Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2afb84da767c485e870e990d2eedc442\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:47:34Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"tracking_code\": \"9400100106068149680308\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzNjNzVhNzBiYzBiZjQ2NGM5ZGIyYzdjYTE0OGRjMDJh\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:34Z\",\n \"signed_by\": null,\n \"id\": \"trk_3c75a70bc0bf464c9db2c7ca148dc02a\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:33+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5427e91e646e11edb3f5ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:33+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5427e91e646e11edb3f5ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:34Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/3063d4afcc704759a80b68f334f275cf.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:34Z\",\n \"id\": \"pl_b784e9d2b1604708bb14882c4d27a223\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:34Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:33Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:33Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f32ad516a1154d53b7b130a39a237c3c\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:33+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5425be76646e11edbf49ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:34Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:34Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_2e202ad788fa4442974db9d140aa9442\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:34Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:34Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ddc963eb578245ff9f63701993e13556\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:34Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:34Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f2aecc017a904d5aab371fedf4efd4e8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:34Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:34Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2afb84da767c485e870e990d2eedc442\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:33+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5425be76646e11edbf49ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680308\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,30 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "352b94366352c100e0d9d5590011daf1" + "3a8b2e0f6372c585e0d9ea5d0019bdd0" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", - "intlb2nuq 29913d444b" + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.107778" + "1.048973" ], "etag": [ - "W/\"603dcaaf698d8ba0ed23f7e944b5c1be\"" + "W/\"a6771e35c63cfb1734a86d8e1f9c28d0\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_c8f0fce2487a4529bb54eb6c9b3bd403" + "/api/v2/shipments/shp_6fef95012a3f454cb3d7e2adc1b49534" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +93,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1588 + "duration": 1325 }, { - "recordedAt": 1666367746, + "recordedAt": 1668466055, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-11-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_99b5394a67994a71ae9e126668dd17b5\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"currency\": \"USD\",\n \"id\": \"rate_c5c80f3721c24179a6802e85bb533566\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"currency\": \"USD\",\n \"id\": \"rate_71b8bc56de514f1ca4f7aca244b46fc4\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"currency\": \"USD\",\n \"id\": \"rate_2f28c98f45f945acb9c0088f2fd99f4b\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"currency\": \"USD\",\n \"id\": \"rate_0bd35ba510c7485ebd04c067fcf3f087\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545572\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d22ed6c5515811eda6d7ac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d230b6ec515811ed8718ac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"currency\": \"USD\",\n \"id\": \"rate_71b8bc56de514f1ca4f7aca244b46fc4\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d22ed6c5515811eda6d7ac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:45 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzE1NGJlZGY3NGU0ZDQwYWJhMGFmNWMwNWM4Y2VlNDE3\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545572\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_154bedf74e4d40aba0af5c05c8cee417\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:45 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d230b6ec515811ed8718ac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:44 AM\"\n },\n \"id\": \"shp_c8f0fce2487a4529bb54eb6c9b3bd403\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:55:44 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_ce31f4fcef0b430a8875259d39dd5e50\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/3c028994e8ec4739b4ae5e146be7d0e7.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:45 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:55:45 AM\"\n },\n \"min_datetime\": \"2022-11-01\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-12-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:33 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_f32ad516a1154d53b7b130a39a237c3c\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 14, 2022, 5:47:33 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:34 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"currency\": \"USD\",\n \"id\": \"rate_2e202ad788fa4442974db9d140aa9442\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 14, 2022, 5:47:34 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:34 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"currency\": \"USD\",\n \"id\": \"rate_ddc963eb578245ff9f63701993e13556\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 14, 2022, 5:47:34 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:34 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"currency\": \"USD\",\n \"id\": \"rate_f2aecc017a904d5aab371fedf4efd4e8\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 14, 2022, 5:47:34 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:34 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"currency\": \"USD\",\n \"id\": \"rate_2afb84da767c485e870e990d2eedc442\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:47:34 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068149680308\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:33 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_5425be76646e11edbf49ac1f6bc7bdc6\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:34 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:33 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_5427e91e646e11edb3f5ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:33 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:34 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"currency\": \"USD\",\n \"id\": \"rate_2afb84da767c485e870e990d2eedc442\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:47:34 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:33 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:33 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_5425be76646e11edbf49ac1f6bc7bdc6\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:34 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:34 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzNjNzVhNzBiYzBiZjQ2NGM5ZGIyYzdjYTE0OGRjMDJh\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068149680308\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_3c75a70bc0bf464c9db2c7ca148dc02a\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:34 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:33 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_5427e91e646e11edb3f5ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:33 PM\"\n },\n \"id\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 14, 2022, 5:47:34 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_b784e9d2b1604708bb14882c4d27a223\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/3063d4afcc704759a80b68f334f275cf.png\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:34 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:34 PM\"\n },\n \"min_datetime\": \"2022-12-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +114,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:46+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:46+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d33a4ca5515811edaf5aac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:46Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:46Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:46Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_15e6d4a314fc483c87b9c4ae44f2cde4\",\n \"pickup_id\": \"pickup_e4b0c0e7991b4e529b20fbd694360d58\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:46Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_e4b0c0e7991b4e529b20fbd694360d58\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_54f5c7a6646e11edb448ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:35Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:35Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:35Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_7ca74da6ae6f475d83711e224a886394\",\n \"pickup_id\": \"pickup_fcfd7b4016014189abb4570fb9c60265\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:35Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_fcfd7b4016014189abb4570fb9c60265\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +127,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,27 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "352b943c6352c101e0d9d55b0011db88" + "3a8b2e0f6372c587e0d9ea5f0019be8b" ], "x-proxied": [ "extlb4wdc 29913d444b", "intlb2wdc 29913d444b", - "intlb2nuq 29913d444b" + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.799467" + "0.610820" ], "etag": [ - "W/\"cb1a0f8a513ba59b0216fe1b49ff64ac\"" + "W/\"dd83ed76fb731dded373dbe557fd33ec\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,10 +186,10 @@ }, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1160 + "duration": 922 }, { - "recordedAt": 1666367747, + "recordedAt": 1668466056, "request": { "body": "", "method": "GET", @@ -201,10 +201,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_e4b0c0e7991b4e529b20fbd694360d58" + "uri": "https://api.easypost.com/v2/pickups/pickup_fcfd7b4016014189abb4570fb9c60265" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T15:55:46+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:55:46+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d33a4ca5515811edaf5aac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-11-01T00:00:00Z\",\n \"created_at\": \"2022-10-21T15:55:46Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:55:46Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-10-21T15:55:46Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_15e6d4a314fc483c87b9c4ae44f2cde4\",\n \"pickup_id\": \"pickup_e4b0c0e7991b4e529b20fbd694360d58\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-11-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-10-21T15:55:46Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_e4b0c0e7991b4e529b20fbd694360d58\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_54f5c7a6646e11edb448ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:35Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:35Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:35Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_7ca74da6ae6f475d83711e224a886394\",\n \"pickup_id\": \"pickup_fcfd7b4016014189abb4570fb9c60265\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:35Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_fcfd7b4016014189abb4570fb9c60265\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -217,7 +217,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -244,7 +244,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "352b943a6352c103e0d9d55c0011dbf1" + "3a8b2e0f6372c588e0d9ea610019bf28" ], "x-proxied": [ "extlb4wdc 29913d444b", @@ -255,16 +255,16 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.076810" + "0.064577" ], "etag": [ - "W/\"cb1a0f8a513ba59b0216fe1b49ff64ac\"" + "W/\"dd83ed76fb731dded373dbe557fd33ec\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -274,8 +274,8 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/pickups/pickup_e4b0c0e7991b4e529b20fbd694360d58" + "uri": "https://api.easypost.com/v2/pickups/pickup_fcfd7b4016014189abb4570fb9c60265" }, - "duration": 363 + "duration": 285 } ] \ No newline at end of file diff --git a/src/test/cassettes/rate/retrieve.json b/src/test/cassettes/rate/retrieve.json index fe744f730..50d4e9821 100644 --- a/src/test/cassettes/rate/retrieve.json +++ b/src/test/cassettes/rate/retrieve.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456467, + "recordedAt": 1668466001, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:41:07Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:07Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:41:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_dcdf530f24ad11eda2a5ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_dc776864dd95437f8cde7d247fa1c1ad\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:41:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_dcdf530f24ad11eda2a5ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:07Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:07Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_e51b505a322f4a0ba1b999bdab4d03a1\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_dcdd253924ad11eda29fac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:07Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dc776864dd95437f8cde7d247fa1c1ad\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:07Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_32e4fcb4046c4b7393c51ddd1d7bed33\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:41:07Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dc776864dd95437f8cde7d247fa1c1ad\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:07Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_008d029008224e3598d45688b9c05f9c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:41:07Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dc776864dd95437f8cde7d247fa1c1ad\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:07Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_007f6d0497fa4113b84efe668a8d4f88\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dc776864dd95437f8cde7d247fa1c1ad\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:07Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_25a7643355bc4f3a8320d18fe135a2f4\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_dcdd253924ad11eda29fac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:46:40Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:46:41Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:46:40+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_34613bdf646e11edaabdac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_55320dd32cb34ad4872de0f1b18c29ed\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:46:40+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_34613bdf646e11edaabdac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:46:40Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:46:40Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_ae855b9a280242ab93e4d949a6568c3e\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:40+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_345e6ced646e11ed941cac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:46:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_55320dd32cb34ad4872de0f1b18c29ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:41Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7ea4873b13594345acb247905d597977\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:46:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_55320dd32cb34ad4872de0f1b18c29ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:41Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b961adff7e564e66b54d06d5b3258a59\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:46:41Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_55320dd32cb34ad4872de0f1b18c29ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:41Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f7212f0723764504b45a165190bd0d49\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:46:41Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_55320dd32cb34ad4872de0f1b18c29ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:41Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_757dada40ecb43aabccd8bec29693f92\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:40+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_345e6ced646e11ed941cac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d053f7b9ef51000866f5" + "2db18c0a6372c550e0d9e2e7001b06e5" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb3wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.751292" + "0.924219" ], "etag": [ - "W/\"067b41d075185fb127359ba21ed2c521\"" + "W/\"7677fd6a96a784ae45915219f457a514\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_dc776864dd95437f8cde7d247fa1c1ad" + "/api/v2/shipments/shp_55320dd32cb34ad4872de0f1b18c29ed" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 966 + "duration": 1151 }, { - "recordedAt": 1661456468, + "recordedAt": 1668466001, "request": { "body": "", "method": "GET", @@ -108,23 +108,23 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/rates/rate_32e4fcb4046c4b7393c51ddd1d7bed33" + "uri": "https://api.easypost.com/v2/rates/rate_7ea4873b13594345acb247905d597977" }, "response": { - "body": "{\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:07Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dc776864dd95437f8cde7d247fa1c1ad\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:07Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_32e4fcb4046c4b7393c51ddd1d7bed33\",\n \"object\": \"Rate\"\n}", + "body": "{\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:46:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_55320dd32cb34ad4872de0f1b18c29ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:41Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7ea4873b13594345acb247905d597977\",\n \"object\": \"Rate\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "543" + "535" ], "expires": [ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d054f7dead5600086765" + "3a8b2e0e6372c551e0d9e2e80019aa16" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.147135" + "0.102152" ], "etag": [ - "W/\"6433d4b440e3e617ff9e8ca925f597b4\"" + "W/\"54524cf4abb601ad43814652533a8e03\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +181,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/rates/rate_32e4fcb4046c4b7393c51ddd1d7bed33" + "uri": "https://api.easypost.com/v2/rates/rate_7ea4873b13594345acb247905d597977" }, - "duration": 275 + "duration": 322 } ] \ No newline at end of file diff --git a/src/test/cassettes/refund/all.json b/src/test/cassettes/refund/all.json index fbbaebe93..f255bb267 100644 --- a/src/test/cassettes/refund/all.json +++ b/src/test/cassettes/refund/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456507, + "recordedAt": 1668466044, "request": { "body": "", "method": "GET", @@ -15,20 +15,20 @@ "uri": "https://api.easypost.com/v2/refunds?page_size\u003d5" }, "response": { - "body": "{\n \"has_more\": true,\n \"refunds\": [\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T18:58:51Z\",\n \"created_at\": \"2022-08-25T18:58:51Z\",\n \"id\": \"rfnd_9eb594faacb3437cbcb51bafaeb6027f\",\n \"shipment_id\": \"shp_a311f4a5b52048659b35f9c7b6855e7c\",\n \"tracking_code\": \"9400100109361134989064\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n },\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T18:58:49Z\",\n \"created_at\": \"2022-08-25T18:58:49Z\",\n \"id\": \"rfnd_49b52f315c564caabfc8b222644ffcd5\",\n \"shipment_id\": \"shp_c47f25c2263c4ead8f6cbd95a0aed54e\",\n \"tracking_code\": \"9400100109361134989019\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n },\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-24T20:42:05Z\",\n \"created_at\": \"2022-08-23T20:42:05Z\",\n \"id\": \"rfnd_55eea6f3b8d24dd59a5cc5ed1448746c\",\n \"shipment_id\": \"shp_ea568d78d6c64f63be07f30f0d9b400a\",\n \"tracking_code\": \"9400100109361134564223\",\n \"object\": \"Refund\",\n \"status\": \"rejected\"\n },\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-24T20:41:11Z\",\n \"created_at\": \"2022-08-23T20:41:11Z\",\n \"id\": \"rfnd_b71027bc5ddf48cc960da058d38e9c1b\",\n \"shipment_id\": \"shp_3bae12de08d940adbc185484ad3aa244\",\n \"tracking_code\": \"9400100109361134564049\",\n \"object\": \"Refund\",\n \"status\": \"rejected\"\n },\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-24T20:41:08Z\",\n \"created_at\": \"2022-08-23T20:41:08Z\",\n \"id\": \"rfnd_a4a76e624bec42e08f53c88ec46a7b2f\",\n \"shipment_id\": \"shp_a53e7a385f6e4d37943ffb254f1dac7d\",\n \"tracking_code\": \"9400100109361134564032\",\n \"object\": \"Refund\",\n \"status\": \"rejected\"\n }\n ]\n}", + "body": "{\n \"has_more\": true,\n \"refunds\": [\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:12:06Z\",\n \"created_at\": \"2022-11-14T22:12:06Z\",\n \"id\": \"rfnd_85fe06838c4f4be3950c4db28dcb36c8\",\n \"shipment_id\": \"shp_5b9ebe87de724620befedae5a81cd488\",\n \"tracking_code\": \"9400100106068149670484\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n },\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:11:00Z\",\n \"created_at\": \"2022-11-14T22:11:00Z\",\n \"id\": \"rfnd_43cf4f74822b4af198db31b792a22251\",\n \"shipment_id\": \"shp_856a0fa92d574c75ac9ab47b56ee368f\",\n \"tracking_code\": \"9400100106068149670156\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n },\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:10:57Z\",\n \"created_at\": \"2022-11-14T22:10:57Z\",\n \"id\": \"rfnd_94f0478e71594eb5a3f2b96ce4dbac46\",\n \"shipment_id\": \"shp_727bd8985e9f44588627c0d9f841ccc7\",\n \"tracking_code\": \"9400100106068149670149\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n },\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-11T23:28:17Z\",\n \"created_at\": \"2022-11-10T23:28:17Z\",\n \"id\": \"rfnd_72cb040702894f3292b7285a64e34d28\",\n \"shipment_id\": \"shp_8379c1916ac1461b99264261881ddf2f\",\n \"tracking_code\": \"9400100106068148866420\",\n \"object\": \"Refund\",\n \"status\": \"rejected\"\n },\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-11T23:27:34Z\",\n \"created_at\": \"2022-11-10T23:27:08Z\",\n \"id\": \"rfnd_ef8892b842fc4f3b82657ac34411760c\",\n \"shipment_id\": \"shp_458052a99b484090a2e4c8a932023269\",\n \"tracking_code\": \"9400100106068148866116\",\n \"object\": \"Refund\",\n \"status\": \"rejected\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "1506" + "1507" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,26 +55,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d07bf7f1669c00087b4b" + "3a8b2e0d6372c57ce0d9e7060019b9e4" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.067814" + "0.047991" ], "etag": [ - "W/\"bbd58599045318bbf872e1eb65fd8c16\"" + "W/\"4e4c69a6ae1a8a1397f017edbe4d812a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +85,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/refunds?page_size\u003d5" }, - "duration": 202 + "duration": 262 } ] \ No newline at end of file diff --git a/src/test/cassettes/refund/create.json b/src/test/cassettes/refund/create.json index 8508395bf..dc5d9ca92 100644 --- a/src/test/cassettes/refund/create.json +++ b/src/test/cassettes/refund/create.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456511, + "recordedAt": 1668466048, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:51Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_559453f73dd1420cb5ad556d6f83a27c\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:41:51Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"tracking_code\": \"9400100109361135003639\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzZmNzlmODkwZDk5YzRlZTlhZTZmZjk1YmY0YjA2ZDY0\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:51Z\",\n \"signed_by\": null,\n \"id\": \"trk_6f79f890d99c4ee9ae6ff95bf4b06d64\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f6634c2824ad11ed9fe8ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f6634c2824ad11ed9fe8ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/94ea2df343574b37bd4758fc30832b1f.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"id\": \"pl_8718e45a70114ff6aa4ffcfc542c1f7c\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:41:50Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_e18efafb8a2943b6a87cbeef718b60d0\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f6616b8c24ad11ed87adac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d472ca767c0b4be1a8c46008e596c909\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_559453f73dd1420cb5ad556d6f83a27c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_ded0d2ad23bc4517acef123b75cb3312\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_414c4e3c1cb64c26942bb5ac3be90f08\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f6616b8c24ad11ed87adac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003639\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:28Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:27Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2c88c8255c4e466f9f0613b45d7c45b8\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:47:28Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"tracking_code\": \"9400100106068149680247\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzNhYjhmZjU0OWYzZTQ5ZDdhNjQ5MDU2NWZhYTZjYWM5\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:28Z\",\n \"signed_by\": null,\n \"id\": \"trk_3ab8ff549f3e49d7a6490565faa6cac9\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_50313278646e11edb2a3ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_50313278646e11edb2a3ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/1d22eafb9ff84956a2e2673df7549dd2.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:28Z\",\n \"id\": \"pl_e5049e025a3149d5b9c13662a8944445\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:27Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:27Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_6a33dbe35637486b88bc988d0d414ab4\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:27+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_502ea5b9646e11ed9cc6ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:27Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e9e6879d597646c4939e65beafd6af27\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:27Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2c88c8255c4e466f9f0613b45d7c45b8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:27Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_9f10e55e7ab2404d91f42125c9772d8d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:27Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1f1b51d61b0246448dd2ef1d66fb61b9\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:27+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_502ea5b9646e11ed9cc6ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680247\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d07df7dc7fd100087cd2" + "3a8b2e086372c57fe0d9e7280019bafe" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.188556" + "1.052050" ], "etag": [ - "W/\"085230546a890607597ac57399e2831e\"" + "W/\"927f0b85d4202fb6d25d0450cc71757e\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_005a9b8851634a0fa5318d400ec44416" + "/api/v2/shipments/shp_8b54e7cf00724a15be85381105321902" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1376 + "duration": 1353 }, { - "recordedAt": 1661456511, + "recordedAt": 1668466048, "request": { "body": "", "method": "GET", @@ -108,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_005a9b8851634a0fa5318d400ec44416" + "uri": "https://api.easypost.com/v2/shipments/shp_8b54e7cf00724a15be85381105321902" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:51Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_559453f73dd1420cb5ad556d6f83a27c\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:41:51Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:41:51Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:18:51Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"tracking_code\": \"9400100109361135003639\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzZmNzlmODkwZDk5YzRlZTlhZTZmZjk1YmY0YjA2ZDY0\",\n \"est_delivery_date\": \"2022-08-25T19:41:51Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:51Z\",\n \"signed_by\": null,\n \"id\": \"trk_6f79f890d99c4ee9ae6ff95bf4b06d64\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f6634c2824ad11ed9fe8ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f6634c2824ad11ed9fe8ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/94ea2df343574b37bd4758fc30832b1f.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"id\": \"pl_8718e45a70114ff6aa4ffcfc542c1f7c\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:41:50Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_e18efafb8a2943b6a87cbeef718b60d0\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f6616b8c24ad11ed87adac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d472ca767c0b4be1a8c46008e596c909\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_559453f73dd1420cb5ad556d6f83a27c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_ded0d2ad23bc4517acef123b75cb3312\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:41:50Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:50Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_414c4e3c1cb64c26942bb5ac3be90f08\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f6616b8c24ad11ed87adac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003639\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:28Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:27Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2c88c8255c4e466f9f0613b45d7c45b8\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:28Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:28Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:28Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"tracking_code\": \"9400100106068149680247\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzNhYjhmZjU0OWYzZTQ5ZDdhNjQ5MDU2NWZhYTZjYWM5\",\n \"est_delivery_date\": \"2022-11-14T22:47:28Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:28Z\",\n \"signed_by\": null,\n \"id\": \"trk_3ab8ff549f3e49d7a6490565faa6cac9\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_50313278646e11edb2a3ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_50313278646e11edb2a3ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/1d22eafb9ff84956a2e2673df7549dd2.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:28Z\",\n \"id\": \"pl_e5049e025a3149d5b9c13662a8944445\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:27Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:27Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_6a33dbe35637486b88bc988d0d414ab4\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:27+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_502ea5b9646e11ed9cc6ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:27Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e9e6879d597646c4939e65beafd6af27\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:27Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2c88c8255c4e466f9f0613b45d7c45b8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:27Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_9f10e55e7ab2404d91f42125c9772d8d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:27Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:27Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1f1b51d61b0246448dd2ef1d66fb61b9\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:27+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_502ea5b9646e11ed9cc6ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680247\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,7 +124,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d07ff7de289900087d82" + "3a8b2e086372c580e0d9e7290019bb94" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.148796" + "0.157990" ], "etag": [ - "W/\"16777bd9a4187006c0f9a4b7b79ae4fe\"" + "W/\"e7462868085a00165e5e6cf3fe6068cf\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,15 +181,14 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_005a9b8851634a0fa5318d400ec44416" + "uri": "https://api.easypost.com/v2/shipments/shp_8b54e7cf00724a15be85381105321902" }, - "duration": 280 + "duration": 488 }, { - "recordedAt": 1661456511, + "recordedAt": 1668466049, "request": { - "body": "{\n \"refund\": {\n \"carrier\": \"USPS\",\n \"tracking_codes\": \"9400100109361135003639\"\n }\n}", + "body": "{\n \"refund\": {\n \"carrier\": \"USPS\",\n \"tracking_codes\": \"9400100106068149680247\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -204,7 +204,7 @@ "uri": "https://api.easypost.com/v2/refunds" }, "response": { - "body": "[\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:51Z\",\n \"created_at\": \"2022-08-25T19:41:51Z\",\n \"id\": \"rfnd_906c1ceeb21d469c93111e46df19375d\",\n \"shipment_id\": \"shp_005a9b8851634a0fa5318d400ec44416\",\n \"tracking_code\": \"9400100109361135003639\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n }\n]", + "body": "[\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:29Z\",\n \"created_at\": \"2022-11-14T22:47:29Z\",\n \"id\": \"rfnd_d76b6380f4664fce9be662d0ff694093\",\n \"shipment_id\": \"shp_8b54e7cf00724a15be85381105321902\",\n \"tracking_code\": \"9400100106068149680247\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n }\n]", "httpVersion": null, "headers": { "null": [ @@ -217,7 +217,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -244,26 +244,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d07ff7c9df7a00087dc0" + "3a8b2e0c6372c581e0d9e72b0019bbc2" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.066367" + "0.067387" ], "etag": [ - "W/\"b792c7a05df6ff339eee84191e998cad\"" + "W/\"4897983caa0e809125a69ba2a4825dff\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -273,9 +274,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/refunds" }, - "duration": 211 + "duration": 291 } ] \ No newline at end of file diff --git a/src/test/cassettes/refund/retrieve.json b/src/test/cassettes/refund/retrieve.json index fab50932d..188a384fa 100644 --- a/src/test/cassettes/refund/retrieve.json +++ b/src/test/cassettes/refund/retrieve.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456508, + "recordedAt": 1668466045, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:41:47Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:48Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:48Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:48Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_baf489db4e6444e29f458cac0cc46a9b\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:41:48Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"tracking_code\": \"9400100109361135003622\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE4ZDVjNWRjODIxMzRiMjc5Mjc4OTMyNjE2NTUzODc3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:48Z\",\n \"signed_by\": null,\n \"id\": \"trk_18d5c5dc82134b279278932616553877\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f4dd9cbd24ad11edaeedac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f4dd9cbd24ad11edaeedac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:41:48Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/8763adb979174a05adff0a10e5f28e1a.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:41:48Z\",\n \"id\": \"pl_a2feb171d328456f8e459d37b4d50703\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:41:48Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:47Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:47Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_62601608f5c346219a39b3b1cd1e27f7\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:47+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f4dbddd024ad11ed9ce2ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:41:47Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:47Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e2a559fef78644b78a5e060fdff9a7ac\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:47Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:47Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_01b4932a54c94d72949eb8d9b2cb5ebb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:47Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:47Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_baf489db4e6444e29f458cac0cc46a9b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:41:47Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:47Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ef862e9d99f54fb981914ed0af4dfada\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:47+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f4dbddd024ad11ed9ce2ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003622\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:25Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:25Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:25Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_94be099aa7bf420197b959dc6e9312f6\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:47:25Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"tracking_code\": \"9400100106068149680223\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzliMmQ0OTY4ZDgyMTQ4MTVhNzI0NDI4ZWQyMTExYzFk\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:25Z\",\n \"signed_by\": null,\n \"id\": \"trk_9b2d4968d8214815a724428ed2111c1d\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4ea6d3fd646e11edb2ebac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4ea6d3fd646e11edb2ebac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:25Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/8cebd6be870844098f143db5473b5efa.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:25Z\",\n \"id\": \"pl_45719e4ba6f54bc286a3f637c49aa036\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:25Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:24Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_01408a64ba7c4551b499f94cf368885f\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:24+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4ea316f5646e11edb22aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:24Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_36e6bc5c0ebe4dbdb9fc65143142b63a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:24Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_42673326fb2f42b98d3d0170692b270d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:24Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_82ee72fb50be4c119e2a13eee5866fdb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:24Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_94be099aa7bf420197b959dc6e9312f6\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:24+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4ea316f5646e11edb22aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680223\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d07bf7a6caf000087b6c" + "3a8b2e0c6372c57ce0d9e7080019ba0b" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.149877" + "1.117597" ], "etag": [ - "W/\"31038177be58bb11f155e9c1ea2e2bb2\"" + "W/\"a9672cd5bb13255e16fdce8db00ec35c\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_fdd13557301f4c879c83ca9877b5051f" + "/api/v2/shipments/shp_d52451b998c64fd7b652d19c6d507f2a" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1367 + "duration": 1387 }, { - "recordedAt": 1661456508, + "recordedAt": 1668466046, "request": { "body": "", "method": "GET", @@ -108,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_fdd13557301f4c879c83ca9877b5051f" + "uri": "https://api.easypost.com/v2/shipments/shp_d52451b998c64fd7b652d19c6d507f2a" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:41:47Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:41:48Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:48Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:48Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_baf489db4e6444e29f458cac0cc46a9b\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:41:48Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:41:48Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:18:48Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"tracking_code\": \"9400100109361135003622\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE4ZDVjNWRjODIxMzRiMjc5Mjc4OTMyNjE2NTUzODc3\",\n \"est_delivery_date\": \"2022-08-25T19:41:48Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:48Z\",\n \"signed_by\": null,\n \"id\": \"trk_18d5c5dc82134b279278932616553877\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f4dd9cbd24ad11edaeedac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:41:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:41:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f4dd9cbd24ad11edaeedac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:41:48Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/8763adb979174a05adff0a10e5f28e1a.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:41:48Z\",\n \"id\": \"pl_a2feb171d328456f8e459d37b4d50703\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:41:48Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:41:47Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:41:47Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_62601608f5c346219a39b3b1cd1e27f7\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:47+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f4dbddd024ad11ed9ce2ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:41:47Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:47Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e2a559fef78644b78a5e060fdff9a7ac\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:41:47Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:47Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_01b4932a54c94d72949eb8d9b2cb5ebb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:41:47Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:47Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_baf489db4e6444e29f458cac0cc46a9b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:41:47Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:41:47Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ef862e9d99f54fb981914ed0af4dfada\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:41:47+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:41:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f4dbddd024ad11ed9ce2ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003622\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:25Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:25Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:25Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_94be099aa7bf420197b959dc6e9312f6\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:25Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:25Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:25Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"tracking_code\": \"9400100106068149680223\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzliMmQ0OTY4ZDgyMTQ4MTVhNzI0NDI4ZWQyMTExYzFk\",\n \"est_delivery_date\": \"2022-11-14T22:47:25Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:25Z\",\n \"signed_by\": null,\n \"id\": \"trk_9b2d4968d8214815a724428ed2111c1d\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4ea6d3fd646e11edb2ebac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4ea6d3fd646e11edb2ebac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:25Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/8cebd6be870844098f143db5473b5efa.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:25Z\",\n \"id\": \"pl_45719e4ba6f54bc286a3f637c49aa036\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:25Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:24Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_01408a64ba7c4551b499f94cf368885f\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:24+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4ea316f5646e11edb22aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:24Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_36e6bc5c0ebe4dbdb9fc65143142b63a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:24Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_42673326fb2f42b98d3d0170692b270d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:24Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_82ee72fb50be4c119e2a13eee5866fdb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:24Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:24Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_94be099aa7bf420197b959dc6e9312f6\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:24+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4ea316f5646e11edb22aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680223\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,7 +124,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d07ce68b290300087c3e" + "3a8b2e0c6372c57de0d9e7090019ba91" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.110975" + "0.124263" ], "etag": [ - "W/\"e1efb5dd867a48968eaa7dda9ba14365\"" + "W/\"d75ba9b40b1ac87688188bc328ae98ff\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,15 +181,14 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_fdd13557301f4c879c83ca9877b5051f" + "uri": "https://api.easypost.com/v2/shipments/shp_d52451b998c64fd7b652d19c6d507f2a" }, - "duration": 244 + "duration": 381 }, { - "recordedAt": 1661456509, + "recordedAt": 1668466046, "request": { - "body": "{\n \"refund\": {\n \"carrier\": \"USPS\",\n \"tracking_codes\": \"9400100109361135003622\"\n }\n}", + "body": "{\n \"refund\": {\n \"carrier\": \"USPS\",\n \"tracking_codes\": \"9400100106068149680223\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -204,7 +204,7 @@ "uri": "https://api.easypost.com/v2/refunds" }, "response": { - "body": "[\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:49Z\",\n \"created_at\": \"2022-08-25T19:41:49Z\",\n \"id\": \"rfnd_1e0c0e03089942f299720f6682421b8c\",\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"tracking_code\": \"9400100109361135003622\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n }\n]", + "body": "[\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:26Z\",\n \"created_at\": \"2022-11-14T22:47:26Z\",\n \"id\": \"rfnd_48012cac49564934b6350de640761b29\",\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"tracking_code\": \"9400100106068149680223\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n }\n]", "httpVersion": null, "headers": { "null": [ @@ -217,7 +217,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -237,9 +237,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -247,26 +244,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d07df8012fd000087c77" + "3a8b2e0e6372c57ee0d9e7220019bac2" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.186724" + "0.073890" ], "etag": [ - "W/\"fe711b782557107a3edef280e641ab66\"" + "W/\"b0c142bfc3b743fe564b7bc92a0dc358\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -276,13 +274,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/refunds" }, - "duration": 326 + "duration": 305 }, { - "recordedAt": 1661456509, + "recordedAt": 1668466046, "request": { "body": "", "method": "GET", @@ -294,10 +291,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/refunds/rfnd_1e0c0e03089942f299720f6682421b8c" + "uri": "https://api.easypost.com/v2/refunds/rfnd_48012cac49564934b6350de640761b29" }, "response": { - "body": "{\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:49Z\",\n \"created_at\": \"2022-08-25T19:41:49Z\",\n \"id\": \"rfnd_1e0c0e03089942f299720f6682421b8c\",\n \"shipment_id\": \"shp_fdd13557301f4c879c83ca9877b5051f\",\n \"tracking_code\": \"9400100109361135003622\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n}", + "body": "{\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:26Z\",\n \"created_at\": \"2022-11-14T22:47:26Z\",\n \"id\": \"rfnd_48012cac49564934b6350de640761b29\",\n \"shipment_id\": \"shp_d52451b998c64fd7b652d19c6d507f2a\",\n \"tracking_code\": \"9400100106068149680223\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n}", "httpVersion": null, "headers": { "null": [ @@ -310,7 +307,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -337,26 +334,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d07df7b7361200087c95" + "3a8b2e086372c57ee0d9e7230019bae0" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.046259" + "0.038338" ], "etag": [ - "W/\"25f7a0093e5ec708fde18410beab3eb0\"" + "W/\"a0a3f1656e45bac895c121bbf04720ec\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -366,9 +364,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/refunds/rfnd_1e0c0e03089942f299720f6682421b8c" + "uri": "https://api.easypost.com/v2/refunds/rfnd_48012cac49564934b6350de640761b29" }, - "duration": 170 + "duration": 259 } ] \ No newline at end of file diff --git a/src/test/cassettes/report/all_reports.json b/src/test/cassettes/report/all_reports.json index 11f913dd6..e9cac75b4 100644 --- a/src/test/cassettes/report/all_reports.json +++ b/src/test/cassettes/report/all_reports.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456541, + "recordedAt": 1668466081, "request": { "body": "", "method": "GET", @@ -15,14 +15,14 @@ "uri": "https://api.easypost.com/v2/reports/shipment/?page_size\u003d5\u0026type\u003dshipment" }, "response": { - "body": "{\n \"reports\": [\n {\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-08-25T19:42:21Z\",\n \"created_at\": \"2022-08-25T19:42:21Z\",\n \"id\": \"shprep_1c5d6cf0c59441a696e4151b1c168cdb\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"new\"\n },\n {\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-08-25T19:42:21Z\",\n \"created_at\": \"2022-08-25T19:42:21Z\",\n \"id\": \"shprep_62427e8273914444ba72e718526e2ac8\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"empty\"\n },\n {\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-08-23T20:41:37Z\",\n \"created_at\": \"2022-08-23T20:41:37Z\",\n \"id\": \"shprep_358fc2d3177442ddbb2fee9e443f1a79\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"empty\"\n },\n {\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-08-23T20:41:36Z\",\n \"created_at\": \"2022-08-23T20:41:36Z\",\n \"id\": \"shprep_c541d35b4fe34747b9b537f19b0180f3\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"empty\"\n },\n {\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-08-23T20:41:36Z\",\n \"created_at\": \"2022-08-23T20:41:36Z\",\n \"id\": \"shprep_682d5d6ee84a446cb08f0d39b55553cb\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"empty\"\n }\n ],\n \"has_more\": true\n}", + "body": "{\n \"reports\": [\n {\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-11-14T22:48:00Z\",\n \"created_at\": \"2022-11-14T22:48:00Z\",\n \"id\": \"shprep_4b64f327f677441a81f3a3bb83d6c7ee\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"new\"\n },\n {\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-11-14T22:48:00Z\",\n \"created_at\": \"2022-11-14T22:48:00Z\",\n \"id\": \"shprep_dfcc28ede23d4caaae3383e654ccb159\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"new\"\n },\n {\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-11-10T23:27:41Z\",\n \"created_at\": \"2022-11-10T23:27:41Z\",\n \"id\": \"shprep_73c5b243ae2b410b9e25ec673c0d0277\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"empty\"\n },\n {\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-11-10T23:27:40Z\",\n \"created_at\": \"2022-11-10T23:27:40Z\",\n \"id\": \"shprep_4f6ef686287b4fdf85d2670db384954e\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"empty\"\n },\n {\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-11-10T23:27:40Z\",\n \"created_at\": \"2022-11-10T23:27:39Z\",\n \"id\": \"shprep_d31e28fe5267419081e321f5664b976b\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"empty\"\n }\n ],\n \"has_more\": true\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "1457" + "1455" ], "expires": [ "0" @@ -55,26 +55,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d09df7cae2f800088cb5" + "3a8b2e0a6372c5a0e0d9eb070019cc48" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.025242" + "0.035794" ], "etag": [ - "W/\"6e0dfa315976d1002ef27082565f3b1d\"" + "W/\"b4fff8b911e5a84a81d6146b677026a9\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +85,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/reports/shipment/?page_size\u003d5\u0026type\u003dshipment" }, - "duration": 154 + "duration": 261 } ] \ No newline at end of file diff --git a/src/test/cassettes/report/all_reports_no_type.json b/src/test/cassettes/report/all_reports_no_type.json index 7357ef126..02aa02b13 100644 --- a/src/test/cassettes/report/all_reports_no_type.json +++ b/src/test/cassettes/report/all_reports_no_type.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456542, + "recordedAt": 1668466081, "request": { "body": "", "method": "GET", @@ -15,7 +15,7 @@ "uri": "https://api.easypost.com/v2/reports/test/?type\u003dtest" }, "response": { - "body": null, + "body": "{\n \"error\": {\n \"code\": \"NOT_FOUND\",\n \"message\": \"The requested resource could not be found.\",\n \"errors\": []\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -28,7 +28,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,23 +55,24 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d09ef7cc1dbe00088d0b" + "3a8b2e0e6372c5a1e0d9eb210019cc8b" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.020700" + "0.017967" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -81,9 +82,8 @@ "code": 404, "message": "Not Found" }, - "errors": "{\n \"error\": {\n \"code\": \"NOT_FOUND\",\n \"message\": \"The requested resource could not be found.\",\n \"errors\": []\n }\n}", "uri": "https://api.easypost.com/v2/reports/test/?type\u003dtest" }, - "duration": 146 + "duration": 234 } ] \ No newline at end of file diff --git a/src/test/cassettes/report/create_report.json b/src/test/cassettes/report/create_report.json index b96f5d44d..84ed76c85 100644 --- a/src/test/cassettes/report/create_report.json +++ b/src/test/cassettes/report/create_report.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456541, + "recordedAt": 1668466080, "request": { "body": "{\n \"end_date\": \"2022-05-04\",\n \"start_date\": \"2022-05-04\"\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/reports/shipment/" }, "response": { - "body": "{\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-08-25T19:42:21Z\",\n \"created_at\": \"2022-08-25T19:42:21Z\",\n \"id\": \"shprep_62427e8273914444ba72e718526e2ac8\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"new\"\n}", + "body": "{\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-11-14T22:48:00Z\",\n \"created_at\": \"2022-11-14T22:48:00Z\",\n \"id\": \"shprep_dfcc28ede23d4caaae3383e654ccb159\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"new\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d09df7ecfb1200088c6e" + "3a8b2e0d6372c5a0e0d9eb040019cbcc" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037700" + "0.041816" ], "etag": [ - "W/\"59bf1176c35d457d37c7488881fcb842\"" + "W/\"6ec9cb9c48df661c36ebf3670a52259e\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +88,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/reports/shipment/" }, - "duration": 166 + "duration": 267 } ] \ No newline at end of file diff --git a/src/test/cassettes/report/create_report_no_type.json b/src/test/cassettes/report/create_report_no_type.json index b33e67815..085a09ea9 100644 --- a/src/test/cassettes/report/create_report_no_type.json +++ b/src/test/cassettes/report/create_report_no_type.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456541, + "recordedAt": 1668466080, "request": { "body": "{}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/reports/test/" }, "response": { - "body": null, + "body": "{\n \"error\": {\n \"code\": \"NOT_FOUND\",\n \"message\": \"The requested resource could not be found.\",\n \"errors\": []\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,23 +58,24 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d09de689723600088c41" + "3a8b2e0d6372c59fe0d9eb020019cb9c" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.018655" + "0.018039" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +85,8 @@ "code": 404, "message": "Not Found" }, - "errors": "{\n \"error\": {\n \"code\": \"NOT_FOUND\",\n \"message\": \"The requested resource could not be found.\",\n \"errors\": []\n }\n}", "uri": "https://api.easypost.com/v2/reports/test/" }, - "duration": 155 + "duration": 242 } ] \ No newline at end of file diff --git a/src/test/cassettes/report/create_report_with_additional_columns.json b/src/test/cassettes/report/create_report_with_additional_columns.json index 248eed804..1c5e92657 100644 --- a/src/test/cassettes/report/create_report_with_additional_columns.json +++ b/src/test/cassettes/report/create_report_with_additional_columns.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456542, + "recordedAt": 1668466081, "request": { "body": "{\n \"end_date\": \"2022-05-04\",\n \"additional_columns\": [\n \"from_name\",\n \"from_company\"\n ],\n \"start_date\": \"2022-05-04\"\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/reports/shipment/" }, "response": { - "body": "{\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-08-25T19:42:22Z\",\n \"created_at\": \"2022-08-25T19:42:22Z\",\n \"id\": \"shprep_5577d686558d4d1c9ee0f819afda080f\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"new\"\n}", + "body": "{\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-11-14T22:48:01Z\",\n \"created_at\": \"2022-11-14T22:48:01Z\",\n \"id\": \"shprep_6c6d12ee425f44eda9202771e611a88f\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"new\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d09ef7ed8ff100088cd8" + "3a8b2e096372c5a1e0d9eb090019cc6c" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.047198" + "0.042909" ], "etag": [ - "W/\"cca3721f64482bcc3713c62fc3a5938e\"" + "W/\"82845acbf29fce13a70da3ac609f655e\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +88,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/reports/shipment/" }, - "duration": 187 + "duration": 286 } ] \ No newline at end of file diff --git a/src/test/cassettes/report/create_report_with_columns.json b/src/test/cassettes/report/create_report_with_columns.json index b2e70b366..7cad77440 100644 --- a/src/test/cassettes/report/create_report_with_columns.json +++ b/src/test/cassettes/report/create_report_with_columns.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456541, + "recordedAt": 1668466080, "request": { "body": "{\n \"end_date\": \"2022-05-04\",\n \"columns\": [\n \"usps_zone\"\n ],\n \"start_date\": \"2022-05-04\"\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/reports/shipment/" }, "response": { - "body": "{\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-08-25T19:42:21Z\",\n \"created_at\": \"2022-08-25T19:42:21Z\",\n \"id\": \"shprep_1c5d6cf0c59441a696e4151b1c168cdb\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"new\"\n}", + "body": "{\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-11-14T22:48:00Z\",\n \"created_at\": \"2022-11-14T22:48:00Z\",\n \"id\": \"shprep_4b64f327f677441a81f3a3bb83d6c7ee\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"new\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,6 +51,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -58,26 +61,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d09df7a6d3d600088ca1" + "3a8b2e0a6372c5a0e0d9eb060019cbf6" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037358" + "0.043128" ], "etag": [ - "W/\"8b89ad393da3b35fc83aa7767cf292bb\"" + "W/\"7a4e1fc75e306e00382f35e303de0002\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/reports/shipment/" }, - "duration": 161 + "duration": 264 } ] \ No newline at end of file diff --git a/src/test/cassettes/report/retrieve_report.json b/src/test/cassettes/report/retrieve_report.json index 6d5bf154a..e1b58b990 100644 --- a/src/test/cassettes/report/retrieve_report.json +++ b/src/test/cassettes/report/retrieve_report.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456542, + "recordedAt": 1668466082, "request": { "body": "{\n \"end_date\": \"2022-05-04\",\n \"start_date\": \"2022-05-04\"\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/reports/shipment/" }, "response": { - "body": "{\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-08-25T19:42:22Z\",\n \"created_at\": \"2022-08-25T19:42:22Z\",\n \"id\": \"shprep_01e48fbd5d1248869186908b65820d5c\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"new\"\n}", + "body": "{\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-11-14T22:48:02Z\",\n \"created_at\": \"2022-11-14T22:48:02Z\",\n \"id\": \"shprep_1d6dbfc677934ae39879f7926154c113\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"new\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d09ef7c8d73000088d25" + "3a8b2e096372c5a1e0d9eb230019cca7" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.040801" + "0.040529" ], "etag": [ - "W/\"b0195cc6f907297bdff0089627fc57ac\"" + "W/\"38d4ee006f5b5867e58e017a2ca3e714\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/reports/shipment/" }, - "duration": 178 + "duration": 262 }, { - "recordedAt": 1661456543, + "recordedAt": 1668466082, "request": { "body": "", "method": "GET", @@ -105,23 +105,23 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/reports/shprep_01e48fbd5d1248869186908b65820d5c" + "uri": "https://api.easypost.com/v2/reports/shprep_1d6dbfc677934ae39879f7926154c113" }, "response": { - "body": "{\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-08-25T19:42:22Z\",\n \"created_at\": \"2022-08-25T19:42:22Z\",\n \"id\": \"shprep_01e48fbd5d1248869186908b65820d5c\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"empty\"\n}", + "body": "{\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2022-11-14T22:48:02Z\",\n \"created_at\": \"2022-11-14T22:48:02Z\",\n \"id\": \"shprep_1d6dbfc677934ae39879f7926154c113\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"new\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "285" + "283" ], "expires": [ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -141,9 +141,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -151,26 +148,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d09ff7a52dca00088d51" + "3a8b2e096372c5a2e0d9eb240019ccc1" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037081" + "0.018037" ], "etag": [ - "W/\"b5749b06c448c803bdea4d1bea86fa07\"" + "W/\"38d4ee006f5b5867e58e017a2ca3e714\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +178,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/reports/shprep_01e48fbd5d1248869186908b65820d5c" + "uri": "https://api.easypost.com/v2/reports/shprep_1d6dbfc677934ae39879f7926154c113" }, - "duration": 163 + "duration": 221 } ] \ No newline at end of file diff --git a/src/test/cassettes/scan_form/all.json b/src/test/cassettes/scan_form/all.json index e5ea21701..5aa4c3389 100644 --- a/src/test/cassettes/scan_form/all.json +++ b/src/test/cassettes/scan_form/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1666367632, + "recordedAt": 1668465994, "request": { "body": "", "method": "GET", @@ -15,20 +15,20 @@ "uri": "https://api.easypost.com/v2/scan_forms?page_size\u003d5" }, "response": { - "body": "{\n \"has_more\": false,\n \"scan_forms\": [\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:27+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045402b640d211eda4c0ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-09-30T15:10:29Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220930/919c06cc1c4f4a219c71cb31068fc844.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_04635f2ee5b8411cad432a7f7a40f8fd\",\n \"created_at\": \"2022-09-30T15:10:29Z\",\n \"id\": \"sf_ac482d5fa7094688be81bfb2992c4367\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361140305025\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n },\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-09-30T15:10:30+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-09-30T15:10:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_05ebac6040d211eda401ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-09-30T15:10:32Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20220930/13873b6db72a44e1b963b940ee90063e.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_1243b4048eb34e2b87c61130092bbb35\",\n \"created_at\": \"2022-09-30T15:10:31Z\",\n \"id\": \"sf_b5e896aa86cb4a5ba64438e94cb68c4c\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100109361140305032\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n }\n ]\n}", + "body": "{\n \"has_more\": true,\n \"scan_forms\": [\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:10:19+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:10:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_20377da3646911eda40aac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-11-14T22:10:30Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221114/f0bb4c876be040dc804d6f24c9ed57e8.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_bfdf146db8294703b36aa93bd7bc29a5\",\n \"created_at\": \"2022-11-14T22:10:29Z\",\n \"id\": \"sf_56818087df7e405eb5d258fb4c97c130\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068149670033\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n },\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:10:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:10:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_1b0445c0646911edbf39ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-11-14T22:10:12Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221114/60edd4a51903464bb5e4843e331dc122.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_833e3262b2dc4251a2de2e525e68445b\",\n \"created_at\": \"2022-11-14T22:10:12Z\",\n \"id\": \"sf_37cea8e35c7643c9a3bc849c06f8cac7\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068149670002\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n },\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:10:08+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:10:08+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_19a257e1646911edbeddac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-11-14T22:10:09Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221114/431756e3779e4eeabd8bc9c188fefbca.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_94f2067d61344425983a6ba2e0195f36\",\n \"created_at\": \"2022-11-14T22:10:09Z\",\n \"id\": \"sf_38d4aae7fda7477dbd24076c9890f867\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068149669990\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n },\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-10T23:26:25+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-10T23:26:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_1860135d614f11ed8407ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-11-10T23:26:36Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221110/815f8d91915146b2897c4ee86ac52f31.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_03370b8c47c143eaa99953ec2294d433\",\n \"created_at\": \"2022-11-10T23:26:36Z\",\n \"id\": \"sf_9793d80bb7ab45dfbed515df087a5ab0\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068148865980\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n },\n {\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-10T23:26:16+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-10T23:26:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_12f22b15614f11edafd4ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-11-10T23:26:18Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221110/5fe6a0d2bd4f413594e6b9be3cbd9784.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_dae3d1bf2b8b46a0b640d2ce55a63a52\",\n \"created_at\": \"2022-11-10T23:26:18Z\",\n \"id\": \"sf_69e3d279c1db4904992191c50fda6561\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068148865898\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "1841" + "4552" ], "expires": [ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,26 +55,26 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "a4cf67b16352c090e0d9cd5e001245ee" + "175b74b76372c54ae0d9e2c5001cf3c2" ], "x-proxied": [ - "extlb2nuq 29913d444b", + "extlb1nuq 29913d444b", "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.094510" + "0.052712" ], "etag": [ - "W/\"edc117a7c9bf066c5df416c358422beb\"" + "W/\"fe78bdc63a6238943854c868fd3d74f9\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -86,6 +86,6 @@ }, "uri": "https://api.easypost.com/v2/scan_forms?page_size\u003d5" }, - "duration": 489 + "duration": 443 } ] \ No newline at end of file diff --git a/src/test/cassettes/scan_form/create.json b/src/test/cassettes/scan_form/create.json index 97c2e0cba..e61a88f9d 100644 --- a/src/test/cassettes/scan_form/create.json +++ b/src/test/cassettes/scan_form/create.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1666367637, + "recordedAt": 1668465999, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:53:56Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:53:57Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:53:57Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:57Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a6ee5af447bb4a95a1db5f8eac926aa4\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:53:57Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"tracking_code\": \"9400100106068144545275\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzYxOTYxM2NkMWQ4MzRmNzA4YTIwZTFkNzNlNDNmN2Mz\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:53:57Z\",\n \"signed_by\": null,\n \"id\": \"trk_619613cd1d834f708a20e1d73e43f7c3\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:56+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_91ce672c515811ed97a6ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:56+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_91ce672c515811ed97a6ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:53:57Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/f59832ccbd104baa8ec7b78cb7f562f9.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:53:57Z\",\n \"id\": \"pl_3d7489e55ded4bc78fc8233cfa0783d6\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:53:57Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:53:56Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:53:56Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_67a75636b8164ea3a1be7cfefc4eda58\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:53:56+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:53:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_91cbf5dd515811ed97a4ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:53:56Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:56Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_6a85e63dfc5c4976bc85d886d8afa36f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:53:56Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:56Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_eb11c33e7a9440c19b12c7c3f0dc4375\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:53:56Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:56Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3b7d816779be4970b16ca5da0d95b9ae\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:53:56Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:56Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a6ee5af447bb4a95a1db5f8eac926aa4\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:53:56+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:53:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_91cbf5dd515811ed97a4ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545275\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:46:38Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:46:39Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:46:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:39Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_266e34818c0c4ddc8e2292196964c085\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:46:39Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"tracking_code\": \"9400100106068149679838\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Y2OGQ3ODFkMzk0ZDQ4MzZiZTg4YTQwNDNkM2FhYTQz\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:46:39Z\",\n \"signed_by\": null,\n \"id\": \"trk_f68d781d394d4836be88a4043d3aaa43\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_33175eb3646e11ed93b5ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_33175eb3646e11ed93b5ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:46:39Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/506dd47b74a64713aeb56c1cd9960f4a.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:46:39Z\",\n \"id\": \"pl_37761a52c62b4ffb863ab6dff0768cc0\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:46:39Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:46:38Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:46:38Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_aa17cd5feaa24955bee7b53ba25aa335\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:46:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:46:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_33149ad6646e11ed93b4ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:46:38Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:38Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_d50f7c072e6b407988d6c7eff21948c8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:46:38Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:38Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_72e047bc459344fc94e10ada61780c26\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:46:38Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:38Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_99b9bf2dbaea433b8a61a61f301dc2f1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:46:38Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:38Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_266e34818c0c4ddc8e2292196964c085\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:46:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:46:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_33149ad6646e11ed93b4ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149679838\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,30 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "107f19436352c094e0d9cd7d00102b20" + "3a8b2e0e6372c54ee0d9e2e30019a8d9" ], "x-proxied": [ - "extlb3wdc 29913d444b", - "intlb1wdc 29913d444b", + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.193781" + "1.081046" ], "etag": [ - "W/\"6e4b2e3f7fb5eb129971e4d50baaf95b\"" + "W/\"5ed8b61cf534c6e587839697682c9ca8\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_f2f59ecd324c46d0b8b0c4369fa00a76" + "/api/v2/shipments/shp_fa1a4640fc234e8599c1a7380f31207a" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +93,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1502 + "duration": 1352 }, { - "recordedAt": 1666367638, + "recordedAt": 1668466000, "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_67a75636b8164ea3a1be7cfefc4eda58\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"currency\": \"USD\",\n \"id\": \"rate_6a85e63dfc5c4976bc85d886d8afa36f\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"currency\": \"USD\",\n \"id\": \"rate_eb11c33e7a9440c19b12c7c3f0dc4375\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"currency\": \"USD\",\n \"id\": \"rate_3b7d816779be4970b16ca5da0d95b9ae\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"currency\": \"USD\",\n \"id\": \"rate_a6ee5af447bb4a95a1db5f8eac926aa4\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545275\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_91cbf5dd515811ed97a4ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_91ce672c515811ed97a6ac1f6bc7b362\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:57 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"currency\": \"USD\",\n \"id\": \"rate_a6ee5af447bb4a95a1db5f8eac926aa4\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:53:57 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_91cbf5dd515811ed97a4ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:57 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzYxOTYxM2NkMWQ4MzRmNzA4YTIwZTFkNzNlNDNmN2Mz\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545275\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_619613cd1d834f708a20e1d73e43f7c3\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:57 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:56 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_91ce672c515811ed97a6ac1f6bc7b362\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:56 AM\"\n },\n \"id\": \"shp_f2f59ecd324c46d0b8b0c4369fa00a76\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:53:57 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_3d7489e55ded4bc78fc8233cfa0783d6\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/f59832ccbd104baa8ec7b78cb7f562f9.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:57 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:57 AM\"\n }\n ]\n}", + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:38 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_aa17cd5feaa24955bee7b53ba25aa335\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 14, 2022, 5:46:38 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:38 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"currency\": \"USD\",\n \"id\": \"rate_d50f7c072e6b407988d6c7eff21948c8\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 14, 2022, 5:46:38 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:38 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"currency\": \"USD\",\n \"id\": \"rate_72e047bc459344fc94e10ada61780c26\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 14, 2022, 5:46:38 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:38 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"currency\": \"USD\",\n \"id\": \"rate_99b9bf2dbaea433b8a61a61f301dc2f1\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 14, 2022, 5:46:38 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:38 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"currency\": \"USD\",\n \"id\": \"rate_266e34818c0c4ddc8e2292196964c085\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:46:38 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068149679838\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:38 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_33149ad6646e11ed93b4ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:38 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:38 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_33175eb3646e11ed93b5ac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:38 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:39 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"currency\": \"USD\",\n \"id\": \"rate_266e34818c0c4ddc8e2292196964c085\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:46:39 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:38 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:38 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_33149ad6646e11ed93b4ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:38 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:39 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2Y2OGQ3ODFkMzk0ZDQ4MzZiZTg4YTQwNDNkM2FhYTQz\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068149679838\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_f68d781d394d4836be88a4043d3aaa43\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:39 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:38 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_33175eb3646e11ed93b5ac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:38 PM\"\n },\n \"id\": \"shp_fa1a4640fc234e8599c1a7380f31207a\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 14, 2022, 5:46:39 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_37761a52c62b4ffb863ab6dff0768cc0\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/506dd47b74a64713aeb56c1cd9960f4a.png\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:39 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:39 PM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +114,7 @@ "uri": "https://api.easypost.com/v2/scan_forms" }, "response": { - "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:56+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_91ce672c515811ed97a6ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-10-21T15:53:58Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221021/41b631c176ed4884a08d6fbd8dff6b22.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_ecdcbd4c812c4912bdaba9f3da5671b8\",\n \"created_at\": \"2022-10-21T15:53:58Z\",\n \"id\": \"sf_4d29a8e1422f43a1a58b0c3f22d21ec6\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068144545275\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", + "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_33175eb3646e11ed93b5ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-11-14T22:46:40Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221114/2d7596efe350403386112375f8f9e649.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_f7c82674e87f4847bc530a0b294a4522\",\n \"created_at\": \"2022-11-14T22:46:39Z\",\n \"id\": \"sf_741a33117db2447ab1ef6b7545ddd009\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068149679838\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +127,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -147,6 +147,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -154,26 +157,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "8424afb56352c096e0d9cd7f0011bd18" + "2db18c0c6372c54fe0d9e2e5001b06bb" ], "x-proxied": [ - "extlb1nuq 29913d444b", - "intlb2nuq 29913d444b" + "extlb3wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.235697" + "0.323144" ], "etag": [ - "W/\"e4d53bedeef982d95bc44f35060f2659\"" + "W/\"57d301bdcff0cdcb032b75b6112121aa\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -185,6 +189,6 @@ }, "uri": "https://api.easypost.com/v2/scan_forms" }, - "duration": 587 + "duration": 604 } ] \ No newline at end of file diff --git a/src/test/cassettes/scan_form/retrieve.json b/src/test/cassettes/scan_form/retrieve.json index 6c6e81af0..854fdd830 100644 --- a/src/test/cassettes/scan_form/retrieve.json +++ b/src/test/cassettes/scan_form/retrieve.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1666367634, + "recordedAt": 1668465996, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T15:53:54Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:53Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0a1dd7531aa448399a480fa5eb8e649f\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T15:53:54Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"tracking_code\": \"9400100106068144545244\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzRkM2M4YWU5N2NkYzQ4ODRhZjY5Yzk2MjJjYmQ2OGM2\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T15:53:54Z\",\n \"signed_by\": null,\n \"id\": \"trk_4d3c8ae97cdc4884af69c9622cbd68c6\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_8fee0ee1515811edaeebac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_8fee0ee1515811edaeebac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e3ab4c62cf9541a8bb26462d04d70c67.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T15:53:54Z\",\n \"id\": \"pl_5ba088a123f34ea3a6f03f833a0cfd6b\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T15:53:53Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T15:53:53Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_2a9fbb2691934b668970db030592d514\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:53:53+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:53:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_8fec1180515811ed9707ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:53Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_69426510d95149cfa5a1f330847818a4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:53Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0a1dd7531aa448399a480fa5eb8e649f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:53Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f1e4a51dbe874a4e9d07070ba6affb2e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T15:53:53Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T15:53:53Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b045ad0cdfe94974b172599ad917668d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T15:53:53+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-10-21T15:53:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_8fec1180515811ed9707ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144545244\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:46:35Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:46:36Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:46:36Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:36Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ccc26c6269f14e159e41294f55900c2a\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:46:36Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"tracking_code\": \"9400100106068149679814\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzk0ODI0YmE4ZTM2MzQ0ZWVhMzEyZGI4MjM0YzljNTEw\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:46:36Z\",\n \"signed_by\": null,\n \"id\": \"trk_94824ba8e36344eea312db8234c9c510\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_31628103646e11eda8d9ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_31628103646e11eda8d9ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:46:36Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/e0ef9495570448c4a6234716bed8916c.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:46:36Z\",\n \"id\": \"pl_7b7d48db80414c6e9f76b2c8ebe08b98\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:46:36Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:46:35Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:46:35Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_e2bc3c1459e142a890b87d4e4969e868\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:46:35+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:46:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_316068d0646e11eda8d7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:46:35Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:35Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_bc48219e5cec4caebc0b39389330705a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:46:35Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:35Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fa9377a88e2d49fab204af922fbd6cf7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:46:35Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:35Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f5d2e23c3bf24ea19eda25cbaae89830\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:46:35Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:35Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ccc26c6269f14e159e41294f55900c2a\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:46:35+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:46:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_316068d0646e11eda8d7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149679814\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,9 +51,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -61,29 +58,29 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "a4cf67b06352c091e0d9cd6000124627" + "175b74b46372c54be0d9e2c7001cf403" ], "x-proxied": [ - "extlb2nuq 29913d444b", + "extlb1nuq 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.129061" + "1.105705" ], "etag": [ - "W/\"2d2244bb8c5614b15ef49b0cbfa6c14a\"" + "W/\"b8bba1573d7e2fafa042eb1d5138366b\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_490363d57c5d46e898a6f8133534ea6b" + "/api/v2/shipments/shp_a7c7069d6fc1452c9e48f38bc742298f" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -95,12 +92,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1407 + "duration": 1386 }, { - "recordedAt": 1666367635, + "recordedAt": 1668465997, "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_2a9fbb2691934b668970db030592d514\",\n \"height\": 4.0,\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"currency\": \"USD\",\n \"id\": \"rate_69426510d95149cfa5a1f330847818a4\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"currency\": \"USD\",\n \"id\": \"rate_0a1dd7531aa448399a480fa5eb8e649f\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"currency\": \"USD\",\n \"id\": \"rate_f1e4a51dbe874a4e9d07070ba6affb2e\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"currency\": \"USD\",\n \"id\": \"rate_b045ad0cdfe94974b172599ad917668d\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068144545244\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_8fec1180515811ed9707ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_8fee0ee1515811edaeebac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"currency\": \"USD\",\n \"id\": \"rate_0a1dd7531aa448399a480fa5eb8e649f\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_8fec1180515811ed9707ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:54 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzRkM2M4YWU5N2NkYzQ4ODRhZjY5Yzk2MjJjYmQ2OGM2\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068144545244\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_4d3c8ae97cdc4884af69c9622cbd68c6\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:54 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_8fee0ee1515811edaeebac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:53 AM\"\n },\n \"id\": \"shp_490363d57c5d46e898a6f8133534ea6b\",\n \"postageLabel\": {\n \"createdAt\": \"Oct 21, 2022, 11:53:53 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_5ba088a123f34ea3a6f03f833a0cfd6b\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/e3ab4c62cf9541a8bb26462d04d70c67.png\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:54 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Oct 21, 2022, 11:53:54 AM\"\n }\n ]\n}", + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:35 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_e2bc3c1459e142a890b87d4e4969e868\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 14, 2022, 5:46:35 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:35 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"currency\": \"USD\",\n \"id\": \"rate_bc48219e5cec4caebc0b39389330705a\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 14, 2022, 5:46:35 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:35 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"currency\": \"USD\",\n \"id\": \"rate_fa9377a88e2d49fab204af922fbd6cf7\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 14, 2022, 5:46:35 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:35 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"currency\": \"USD\",\n \"id\": \"rate_f5d2e23c3bf24ea19eda25cbaae89830\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 14, 2022, 5:46:35 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:35 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"currency\": \"USD\",\n \"id\": \"rate_ccc26c6269f14e159e41294f55900c2a\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:46:35 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068149679814\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:35 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_316068d0646e11eda8d7ac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:35 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:35 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_31628103646e11eda8d9ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:35 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:36 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"currency\": \"USD\",\n \"id\": \"rate_ccc26c6269f14e159e41294f55900c2a\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:46:36 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:35 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:35 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_316068d0646e11eda8d7ac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:35 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:36 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzk0ODI0YmE4ZTM2MzQ0ZWVhMzEyZGI4MjM0YzljNTEw\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068149679814\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_94824ba8e36344eea312db8234c9c510\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:36 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:35 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_31628103646e11eda8d9ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:35 PM\"\n },\n \"id\": \"shp_a7c7069d6fc1452c9e48f38bc742298f\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 14, 2022, 5:46:36 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_7b7d48db80414c6e9f76b2c8ebe08b98\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/e0ef9495570448c4a6234716bed8916c.png\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:36 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:36 PM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -116,7 +113,7 @@ "uri": "https://api.easypost.com/v2/scan_forms" }, "response": { - "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_8fee0ee1515811edaeebac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-10-21T15:53:55Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221021/ba7203f479224687b1425b7f241aa766.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_018b11f1d12a4d7d9d1677ba1f090daa\",\n \"created_at\": \"2022-10-21T15:53:55Z\",\n \"id\": \"sf_8c711db6980f49c994d87b2db3d2894d\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068144545244\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", + "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_31628103646e11eda8d9ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-11-14T22:46:37Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221114/b5055a7cb6e24e0b8cf32512193c04f7.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_4898aa0d0fd74853955ec62b4213f3ab\",\n \"created_at\": \"2022-11-14T22:46:37Z\",\n \"id\": \"sf_a9d1d7345f73431f836f2d700698a215\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068149679814\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", "httpVersion": null, "headers": { "null": [ @@ -129,7 +126,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -156,27 +153,26 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "352b943b6352c093e0d9cd630011b4a8" + "91684cba6372c54de0d9e2c9001aa49f" ], "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb2nuq 29913d444b" + "extlb2nuq 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.321294" + "0.242667" ], "etag": [ - "W/\"d107ac272c26e35849d1cd18245f3d98\"" + "W/\"1d23a40b9e0469d9d72e67e0cfc2c267\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -188,10 +184,10 @@ }, "uri": "https://api.easypost.com/v2/scan_forms" }, - "duration": 615 + "duration": 538 }, { - "recordedAt": 1666367635, + "recordedAt": 1668465998, "request": { "body": "", "method": "GET", @@ -203,10 +199,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/scan_forms/sf_8c711db6980f49c994d87b2db3d2894d" + "uri": "https://api.easypost.com/v2/scan_forms/sf_a9d1d7345f73431f836f2d700698a215" }, "response": { - "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T15:53:53+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T15:53:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_8fee0ee1515811edaeebac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-10-21T15:53:55Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221021/ba7203f479224687b1425b7f241aa766.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_018b11f1d12a4d7d9d1677ba1f090daa\",\n \"created_at\": \"2022-10-21T15:53:55Z\",\n \"id\": \"sf_8c711db6980f49c994d87b2db3d2894d\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068144545244\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", + "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_31628103646e11eda8d9ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2022-11-14T22:46:37Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20221114/b5055a7cb6e24e0b8cf32512193c04f7.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_4898aa0d0fd74853955ec62b4213f3ab\",\n \"created_at\": \"2022-11-14T22:46:37Z\",\n \"id\": \"sf_a9d1d7345f73431f836f2d700698a215\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100106068149679814\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", "httpVersion": null, "headers": { "null": [ @@ -219,7 +215,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -239,6 +235,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -246,27 +245,26 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "107f19426352c093e0d9cd7b00102b00" + "91684cb66372c54de0d9e2e1001aa4bc" ], "x-proxied": [ - "extlb3wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb1nuq 29913d444b" + "extlb2nuq 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.026127" + "0.047973" ], "etag": [ - "W/\"d107ac272c26e35849d1cd18245f3d98\"" + "W/\"1d23a40b9e0469d9d72e67e0cfc2c267\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -276,8 +274,8 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/scan_forms/sf_8c711db6980f49c994d87b2db3d2894d" + "uri": "https://api.easypost.com/v2/scan_forms/sf_a9d1d7345f73431f836f2d700698a215" }, - "duration": 316 + "duration": 326 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/all.json b/src/test/cassettes/shipment/all.json index 640e10b9c..adf72c641 100644 --- a/src/test/cassettes/shipment/all.json +++ b/src/test/cassettes/shipment/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456959, + "recordedAt": 1668466095, "request": { "body": "", "method": "GET", @@ -15,20 +15,20 @@ "uri": "https://api.easypost.com/v2/shipments?page_size\u003d5" }, "response": { - "body": "{\n \"has_more\": true,\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:14Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7eb646a01e2d4cf6bb81bf9634bf3e64\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:49:14Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:49:14Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:26:14Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"tracking_code\": \"9400100109361135004643\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzUzNjUzMDI4MDMyZTRiNTM5ODQwOWMzY2YyZTA3Yzk3\",\n \"est_delivery_date\": \"2022-08-25T19:49:14Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:49:14Z\",\n \"signed_by\": null,\n \"id\": \"trk_53653028032e4b5398409c3cf2e07c97\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_feadd53b24ae11ed8c4dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_feadd53b24ae11ed8c4dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/d4efdb242da24bad9495bbb84e35974b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:49:14Z\",\n \"id\": \"pl_c6d43f9d636546eba245e7e1b51fb9fb\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:49:13Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_8083ed40761d4cd48d5d519b4ba10472\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:13+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_feac09a524ae11ed8c4cac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_610ed7f383c84dd3a9e060c9c767851c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_530f8629386848abbe1d8766f2607f88\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7eb646a01e2d4cf6bb81bf9634bf3e64\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b2f28a856a34411b8fcb9f5d285e38a1\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:13+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_feac09a524ae11ed8c4cac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004643\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [\n {\n \"mode\": \"test\",\n \"submitted_electronically\": null,\n \"updated_at\": \"2022-08-25T19:49:15Z\",\n \"form_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20220825/a7f65b02f01e45458bdbcf517bcfc838.pdf\",\n \"created_at\": \"2022-08-25T19:49:14Z\",\n \"id\": \"form_3deea58fc34640aa9d5b9932f7179f76\",\n \"form_type\": \"return_packing_slip\",\n \"object\": \"Form\"\n }\n ],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.11000\",\n \"refunded\": false,\n \"type\": \"CarbonOffsetFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:11Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:12Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:12Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:12Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_02bfd56b3da147a0a558e814d5d224b4\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:49:13Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:26:13Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"tracking_code\": \"9400100109361135004629\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzI4OGM1YjM0MWMxMzQzYjVhZTkzMWQ4ODZiZmRiMmMx\",\n \"est_delivery_date\": \"2022-08-25T19:49:13Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"signed_by\": null,\n \"id\": \"trk_288c5b341c1343b5ae931d886bfdb2c1\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fdad873c24ae11ed8b40ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fdad873c24ae11ed8b40ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:49:12Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/82624815a4d644a782cf12e5923ac15f.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:49:12Z\",\n \"id\": \"pl_b5dbc89e3b6148978c5a6a1ec99f065c\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:49:12Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:11Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:11Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_fce9465e9cfa4aebba2b12b256dbd8a4\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:11+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fdab0d8b24ae11ed9f20ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:11Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:11Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_47611e330d9b40a7af9dcf01c9a5edd5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:11Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:11Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_02bfd56b3da147a0a558e814d5d224b4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:11Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:11Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_75e987fb04fa4a549f5816909ab4841c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:11Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:11Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8e34e965c70448b2833c56322a710592\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:11+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fdab0d8b24ae11ed9f20ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004629\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:48:41Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:48:41Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:48:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:41Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_95ecb50906744975874582e042aef558\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:48:42Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:48:42Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:25:42Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"tracking_code\": \"9400100109361135004551\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzY2MTdiMzgxNjZkZTRjMWQ5YTlmMjNjNDEyN2VlNjhi\",\n \"est_delivery_date\": \"2022-08-25T19:48:42Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:48:42Z\",\n \"signed_by\": null,\n \"id\": \"trk_6617b38166de4c1d9a9f23c4127ee68b\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:48:41+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:48:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_eb72d72f24ae11ed89cdac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:48:41+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:48:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_eb72d72f24ae11ed89cdac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:48:41Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/33deb1268b1e41cca84a100bb1c6a307.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:48:41Z\",\n \"id\": \"pl_bb071df987c04a6f94833f92a48f47c4\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:48:41Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:48:41Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:48:41Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_b7a19166938f4fb095f897a3ee4e4a5d\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:48:41+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:48:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_eb71448324ae11ed89c7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:48:42Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:42Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c400543df8344de78ee52e66ce6bd5e5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:48:42Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:42Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_67c9d68bd99846879eaa7df9c74089a5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:48:42Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:42Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1e75604f94b042eeae622a4222ef8802\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:48:42Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:42Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3c619340429945bdbc507075cab3011d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:48:41+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:48:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_eb71448324ae11ed89c7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004551\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:42:51Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:46:54Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:51Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b0c5759a07e6443c8397ddc23e415e31\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:51Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_84cdfc5f17264594b0281254c9afe009\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": \"2022-07-28T09:36:52Z\",\n \"origin_tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:42:52Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:45:52Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:22:52Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T18:27:52Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Arrived at USPS Origin Facility\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"arrived_at_facility\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-27T20:03:52Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Arrived at USPS Facility\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"arrived_at_facility\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-27T22:54:52Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Arrived at Post Office\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"arrived_at_facility\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-28T04:34:52Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-28T04:44:52Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Out for Delivery\",\n \"object\": \"TrackingDetail\",\n \"status\": \"out_for_delivery\",\n \"status_detail\": \"out_for_delivery\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-28T09:36:52Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Delivered\",\n \"object\": \"TrackingDetail\",\n \"status\": \"delivered\",\n \"status_detail\": \"arrived_at_destination\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_b0c5759a07e6443c8397ddc23e415e31\",\n \"tracking_code\": \"9400100109361135003813\",\n \"status_detail\": \"arrived_at_destination\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzlmNGZiZDVmZjhlNjQ4Y2FiM2FmODZjMGU1MjVmMDE3\",\n \"est_delivery_date\": \"2022-08-25T19:45:52Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:45:52Z\",\n \"signed_by\": \"John Tester\",\n \"id\": \"trk_9f4fbd5ff8e648cab3af86c0e525f017\",\n \"object\": \"Tracker\",\n \"status\": \"delivered\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:50+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_1abef25324ae11eda4f3ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_b0c5759a07e6443c8397ddc23e415e31\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:50+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_1abef25324ae11eda4f3ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:42:51Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/123f620fd09140fe9d002efc5775cc3e.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:42:53Z\",\n \"id\": \"pl_1161c406aaa54a00a05a034d52e5579e\",\n \"label_zpl_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/postage_label/20220825/a3d724e8ccf6416f9d35eb886a356a59.zpl\",\n \"label_date\": \"2022-08-25T19:42:51Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:42:51Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:42:51Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_cd5d760a6a914bf481b2d6bdcd7f7571\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:42:50+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:42:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_1abd394424ae11eda4f2ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:42:51Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b0c5759a07e6443c8397ddc23e415e31\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:51Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_2cce0ecb551a4306bfbf4e898a57c1ae\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:42:51Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b0c5759a07e6443c8397ddc23e415e31\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:51Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_52dba337156b4d8aae86368c517ee323\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:51Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b0c5759a07e6443c8397ddc23e415e31\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:51Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_84cdfc5f17264594b0281254c9afe009\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:42:51Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b0c5759a07e6443c8397ddc23e415e31\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:51Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5030bdb5a85d41cc806d875b42d80708\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:42:50+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:42:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_1abd394424ae11eda4f2ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003813\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"delivered\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:42:49Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:47:18Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:49Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1f73743204ed4d1e9185a1a80230d8d0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:49Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_85bf1a7bf7ef40c687b92cbe064a591c\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": \"2022-07-28T09:36:50Z\",\n \"origin_tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:42:50Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:45:50Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:22:50Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T18:27:50Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Arrived at USPS Origin Facility\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"arrived_at_facility\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-27T20:03:50Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Arrived at USPS Facility\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"arrived_at_facility\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-27T22:54:50Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Arrived at Post Office\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"arrived_at_facility\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-28T04:34:50Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-28T04:44:50Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Out for Delivery\",\n \"object\": \"TrackingDetail\",\n \"status\": \"out_for_delivery\",\n \"status_detail\": \"out_for_delivery\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-28T09:36:50Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Delivered\",\n \"object\": \"TrackingDetail\",\n \"status\": \"delivered\",\n \"status_detail\": \"arrived_at_destination\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_1f73743204ed4d1e9185a1a80230d8d0\",\n \"tracking_code\": \"9400100109361135003806\",\n \"status_detail\": \"arrived_at_destination\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2M3NGI0MjA1NjVlNjRjY2ZiYTQ2MjU2YzZiMTgwZDVm\",\n \"est_delivery_date\": \"2022-08-25T19:45:50Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:45:50Z\",\n \"signed_by\": \"John Tester\",\n \"id\": \"trk_c74b420565e64ccfba46256c6b180d5f\",\n \"object\": \"Tracker\",\n \"status\": \"delivered\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_199f877524ae11eda4aaac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_1f73743204ed4d1e9185a1a80230d8d0\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:42:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_199f877524ae11eda4aaac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:42:49Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/f8bd789d6918483cba5b8466f342e936.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:42:50Z\",\n \"id\": \"pl_51db3951436c4ba487bdd8760c2ed478\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:42:49Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:42:49Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:42:49Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_74bf9e6baceb40499f5febed4f83ea5c\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": \"submitted\",\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:42:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:42:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_199dc38e24ae11edb515ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:42:49Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1f73743204ed4d1e9185a1a80230d8d0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:49Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a76b9bd3987b4e5c8d68f2a3e93de33f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:42:49Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1f73743204ed4d1e9185a1a80230d8d0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:49Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_09c4249ad17a4f199a3bc9fafe548bbf\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:42:49Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1f73743204ed4d1e9185a1a80230d8d0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:49Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_85bf1a7bf7ef40c687b92cbe064a591c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:42:49Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1f73743204ed4d1e9185a1a80230d8d0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:49Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_83ba9f02edb04d528b7b135ca0ea2a62\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:42:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:42:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_199dc38e24ae11edb515ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135003806\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"delivered\",\n \"object\": \"Shipment\"\n }\n ]\n}", + "body": "{\n \"has_more\": true,\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:08Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1061ec1d5081475daebffa9d6064095f\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:48:08Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:48:08Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:25:08Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"tracking_code\": \"9400100106068149680582\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2JjMjAwN2JlZWZiNjQ3YmQ4ZjJiZmJjZGYzMjUzODVl\",\n \"est_delivery_date\": \"2022-11-14T22:48:08Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:08Z\",\n \"signed_by\": null,\n \"id\": \"trk_bc2007beefb647bd8f2bfbcdf325385e\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_67ffb7e4646e11ed842bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_67ffb7e4646e11ed842bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/4f52f6917128475d889921549d75ba8b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"id\": \"pl_a97244168b07409ead3efa56e5eefced\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:07Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_43380eaf72de4e4d816f72d57784e7fe\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_67fd0057646e11edbbb7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6829c94e973146fbad8de4b222af0574\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_865a3cc353c346b68642eeb7057fbb9e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1061ec1d5081475daebffa9d6064095f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_6dfb76ef60964f12a02e96a9e7fcb7bb\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_67fd0057646e11edbbb7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680582\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [\n {\n \"mode\": \"test\",\n \"submitted_electronically\": null,\n \"updated_at\": \"2022-11-14T22:48:09Z\",\n \"form_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20221114/822b53eb3ad3412690d5fec748d5c486.pdf\",\n \"created_at\": \"2022-11-14T22:48:08Z\",\n \"id\": \"form_1e19b2fe67be4cfabe0e126136ad3087\",\n \"form_type\": \"return_packing_slip\",\n \"object\": \"Form\"\n }\n ],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.11000\",\n \"refunded\": false,\n \"type\": \"CarbonOffsetFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:05Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:06Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:06Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:06Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f9c2388fe00a43069d5b2e5e4b7b7aea\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:48:06Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:48:06Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:25:06Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"tracking_code\": \"9400100106068149680568\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzcwMmMzODEyZDRiYzQ2NTA4N2Y1ZGZhNjE5MDdkNGVj\",\n \"est_delivery_date\": \"2022-11-14T22:48:06Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:06Z\",\n \"signed_by\": null,\n \"id\": \"trk_702c3812d4bc465087f5dfa61907d4ec\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:05+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_66d2736b646e11eda563ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:05+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_66d2736b646e11eda563ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:06Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/0e3e980478e0406fb363a1d00df3f6d6.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:06Z\",\n \"id\": \"pl_4542e79a993840f39394b48a78fad78c\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:06Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:05Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:05Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c471733cfba1437ea44ba6a5bd6e44f3\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:05+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_66d09934646e11eda562ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:05Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:05Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_528e9428a04d4cb3bb6108f96829591f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:05Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:05Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e89105103ec74b9da48dc33b4157d788\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:05Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:05Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3b8cff5dc9774de1b52cdf676a916c78\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:05Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:05Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f9c2388fe00a43069d5b2e5e4b7b7aea\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:05+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_66d09934646e11eda562ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680568\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:50Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cead58a1940a4354bf2db8dd19d2a2cc\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:51Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:51Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:51Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"tracking_code\": \"9400100106068149680445\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzYyMGRlZDA1NDY1MjQzNmRiYzE1Zjc5Yzc5ZTNjYWJl\",\n \"est_delivery_date\": \"2022-11-14T22:47:51Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"signed_by\": null,\n \"id\": \"trk_620ded054652436dbc15f79c79e3cabe\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:50Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/40c4f81a5cc94e8dbbcb30a8b8c363af.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"id\": \"pl_c7c16842bcc0411f9eac52bebfe35e40\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:50Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_721f34e06cf0445d99fb1514a7b18186\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:47:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b5146c0ea9b441929d47cf65c2865732\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cead58a1940a4354bf2db8dd19d2a2cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3d2cc050db8b4f29bc223a83c274dee2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8c12a562c07b49988b805ddea49edc06\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:47:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680445\",\n \"messages\": [],\n \"order_id\": \"order_e301707eaf5e4a2f9909388b7c1b5aea\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": \"batch_d56946cb2bf6405b80e56a495c1f47b3\",\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2ee2fdbf262645579e321446806fe40d\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:45Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:45Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:45Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"tracking_code\": \"9400100106068149680391\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzc1NjllZDA5Yzg1YjRhYzdiMTA3NDA3MzdhOGI5ZTA5\",\n \"est_delivery_date\": \"2022-11-14T22:47:45Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:45Z\",\n \"signed_by\": null,\n \"id\": \"trk_7569ed09c85b4ac7b10740737a8b9e09\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:44+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5a396e83646e11edb67bac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:44+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5a396e83646e11edb67bac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/4077ef586fea48c4803207b6b3485eef.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"id\": \"pl_036301218071404ab3e7a2f3592cba06\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:44Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_38b697aec9f84648ad04881936e0467f\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:44+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5a36c690646e11edb67aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f08659c6c07046c1ac5dfacdfec1e34e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bf73da4307be4378bea97c8d891bda1a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e060633948fd47d085b045188d2ed6e3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:44Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2ee2fdbf262645579e321446806fe40d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:44+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_5a36c690646e11edb67aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680391\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": \"batch_89ec198acf0844b98c3c687ea93f6500\",\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:40Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:39Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b9f9e8c0f5cc42af8791aafaaa40d4b0\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:40Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:40Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:40Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"tracking_code\": \"9400100106068149680360\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzZkZGEzY2JmNWQ0ZDRkYTg5MDZhZDAyYzRjYmMzNmEx\",\n \"est_delivery_date\": \"2022-11-14T22:47:40Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:40Z\",\n \"signed_by\": null,\n \"id\": \"trk_6dda3cbf5d4d4da8906ad02c4cbc36a1\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:39+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_57587b7e646e11ed802aac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:39+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_57587b7e646e11ed802aac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/6323b82f7aac4946a52548c7c2701568.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:40Z\",\n \"id\": \"pl_fa8e52fc79274b4f87d4c400337616f9\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:39Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:39Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_9c6a5f046d8e46849938b1044c83c947\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:39+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_57557062646e11ed9f60ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:39Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_dc90bb1836504c6e8a8a70d10f2854d7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:39Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_06872af3244243dea7b58bfa0c679509\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:39Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4bfd1924eb534a269c007fe1bba19044\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:39Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b9f9e8c0f5cc42af8791aafaaa40d4b0\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:39+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_57557062646e11ed9f60ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680360\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "45756" + "41650" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -48,6 +48,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -55,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92346307d23ff7b8f054000932d0" + "3a8b2e0a6372c5aee0d9eb6b0019d300" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.413124" + "0.547354" ], "etag": [ - "W/\"dd47214a17779953235332d3d0216119\"" + "W/\"f8faa235c10d6d3d137cd2443de8bc4b\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +88,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments?page_size\u003d5" }, - "duration": 541 + "duration": 766 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy.json b/src/test/cassettes/shipment/buy.json index 660d06359..a436f5fae 100644 --- a/src/test/cassettes/shipment/buy.json +++ b/src/test/cassettes/shipment/buy.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1666369239, + "recordedAt": 1668466096, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:20:38Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4d006928515c11eda6f9ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4d006928515c11eda6f9ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:38Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:20:38Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_fe55efc12e5947d089b74f3dd72f9288\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4ce446ef515c11edac3bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_402ac0d0513b467bb6f3252c52aa0788\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9f45993b64dc41bfb0ceb0a47a6173cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f48ab940d58e438da82883f75996970e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62122d6888fb4462b1433b5ac65aae71\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4ce446ef515c11edac3bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:15Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6cf6d116646e11edbeb3ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6cf6d116646e11edbeb3ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:15Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:15Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_307bbea2ecc54645af1dca19100e8181\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6cf51540646e11eda7eaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_87d873f591ff455e93e147cd3a2997eb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_85ca3b94a3f74269a78fa38e00f65616\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ed5a616bddeb4b9fb46bbdf386c483a7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2237a1b544834cbebd1ef53aca910054\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6cf51540646e11eda7eaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,30 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "2c01d7ca6352c6d6e0db87e40001d0bf" + "3a8b2e0b6372c5afe0d9eb840019d37f" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb2nuq 29913d444b" + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.183406" + "1.226045" ], "etag": [ - "W/\"d7f47f239f4bf33f9db4b7640fb5e650\"" + "W/\"09c0dbfaadc9c1a14de2140369372165\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_37530e797d3c4eb98dcacc1eea58cf0a" + "/api/v2/shipments/shp_1308f75de89d4ca2baa6a9233f559e54" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +93,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1470 + "duration": 1520 }, { - "recordedAt": 1666369241, + "recordedAt": 1668466098, "request": { - "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:20:39 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"currency\": \"USD\",\n \"id\": \"rate_62122d6888fb4462b1433b5ac65aae71\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:20:39 PM\"\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:48:16 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"currency\": \"USD\",\n \"id\": \"rate_2237a1b544834cbebd1ef53aca910054\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:48:16 PM\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -111,10 +111,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_37530e797d3c4eb98dcacc1eea58cf0a/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_1308f75de89d4ca2baa6a9233f559e54/buy" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:20:38Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:20:41Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:40Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62122d6888fb4462b1433b5ac65aae71\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T16:20:41Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"tracking_code\": \"9400100106068144550323\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE4ODE2ZTM5NmM1NDQxOGZiYzI3Mjk5OTZmYTY1YTc1\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T16:20:41Z\",\n \"signed_by\": null,\n \"id\": \"trk_18816e396c54418fbc2729996fa65a75\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4d006928515c11eda6f9ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4d006928515c11eda6f9ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T16:20:40Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/72b29f4d26004c18b99ab45fe30a902e.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T16:20:40Z\",\n \"id\": \"pl_8f9c9b0627b94a29b7de0d0244adc912\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T16:20:40Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:38Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:20:38Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_fe55efc12e5947d089b74f3dd72f9288\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-21T16:20:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_4ce446ef515c11edac3bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_402ac0d0513b467bb6f3252c52aa0788\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9f45993b64dc41bfb0ceb0a47a6173cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f48ab940d58e438da82883f75996970e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_37530e797d3c4eb98dcacc1eea58cf0a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:39Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62122d6888fb4462b1433b5ac65aae71\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-21T16:20:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-21T16:20:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_4ce446ef515c11edac3bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144550323\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:15Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:17Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:17Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:17Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2237a1b544834cbebd1ef53aca910054\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:48:17Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"tracking_code\": \"9400100106068149680643\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE0MjdhYjVkYTFiODRiOWJiMTc3YzRhNjQxMjE1YjEy\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:17Z\",\n \"signed_by\": null,\n \"id\": \"trk_1427ab5da1b84b9bb177c4a641215b12\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6cf6d116646e11edbeb3ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6cf6d116646e11edbeb3ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:17Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/38cc80d1eeb4440e970a393c3c715b7e.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:17Z\",\n \"id\": \"pl_75de16e0915b4b24b87e64b60bdf8bfe\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:17Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:15Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:15Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_307bbea2ecc54645af1dca19100e8181\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:48:17+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6cf51540646e11eda7eaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_87d873f591ff455e93e147cd3a2997eb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_85ca3b94a3f74269a78fa38e00f65616\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ed5a616bddeb4b9fb46bbdf386c483a7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2237a1b544834cbebd1ef53aca910054\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:48:17+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6cf51540646e11eda7eaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680643\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +127,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,7 +154,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "2c01d7ca6352c6d8e0db88050001d18a" + "3a8b2e0a6372c5b1e0d9eb860019d448" ], "x-proxied": [ "extlb4wdc 29913d444b", @@ -165,16 +165,16 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.845423" + "0.834370" ], "etag": [ - "W/\"988eff397cab775df0bd30b0c7a11aa5\"" + "W/\"0c2c9e2431c51d85a6c1df895454444c\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -184,8 +184,8 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/shipments/shp_37530e797d3c4eb98dcacc1eea58cf0a/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_1308f75de89d4ca2baa6a9233f559e54/buy" }, - "duration": 1125 + "duration": 1123 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy_shipment_with_carbon_offset.json b/src/test/cassettes/shipment/buy_shipment_with_carbon_offset.json index d762459cd..b5bb6a2a7 100644 --- a/src/test/cassettes/shipment/buy_shipment_with_carbon_offset.json +++ b/src/test/cassettes/shipment/buy_shipment_with_carbon_offset.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1666369246, + "recordedAt": 1668466105, "request": { - "body": "{\n \"shipment\": {\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n },\n \"reference\": \"123\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"options\": {\n \"label_format\": \"PNG\",\n \"invoice_number\": \"123\"\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n },\n \"reference\": \"123\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"options\": {\n \"label_format\": \"PNG\",\n \"invoice_number\": \"123\"\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_50c83788515c11edad24ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_50c83788515c11edad24ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:45Z\",\n \"currency\": null,\n \"id\": \"cstitem_a0274258642e41c188d77656932aa6d4\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-10-21T16:20:45Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_0465be8f5ea34c3d92caa79d2326ffd0\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:45Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_6a5fbc498ed144d9a17131f5e57f4ced\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_50c5ba12515c11edb131ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c67a97ae2ae643c681ad451889f0a5e8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3b761a91d7c649cb97607d7bc7bab2c5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_784f77a38c154c6f8b8a88fa5fd272e0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_65391832ded3475bb20d47b03b1dd01d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_50c5ba12515c11edb131ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:26Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_729461f3646e11ed810dac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_81bfa1e93c434991bd2a38ad0fb27ef9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_729461f3646e11ed810dac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"currency\": null,\n \"id\": \"cstitem_abf4b40c97a54bd1b508899b549a3746\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_236bbe1e779f436b995f4984c82c1717\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f88f5cf799d04b44a738817f97fade6a\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_72920385646e11edaa72ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_81bfa1e93c434991bd2a38ad0fb27ef9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_de95f1adad8b4655b66d96ef9c0c44f7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_81bfa1e93c434991bd2a38ad0fb27ef9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3d50f4df7ea34bbba08157016df14f9e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_81bfa1e93c434991bd2a38ad0fb27ef9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_23e89b09398940a0974bd61ab0c8b9ec\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_81bfa1e93c434991bd2a38ad0fb27ef9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1cc3c64ca0b547d7b3ad867a87698742\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_72920385646e11edaa72ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -58,7 +58,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "2c01d7d06352c6dde0db8b600001d3a4" + "3a8b2e0e6372c5b8e0da507c0019d7b0" ], "x-proxied": [ "extlb4wdc 29913d444b", @@ -69,19 +69,19 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.111804" + "1.087839" ], "etag": [ - "W/\"d733a3abe57a14b8ac680ef98da4eeb2\"" + "W/\"7a5912930bf605f4b217a7ab6126ef4a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_3df1e757d39d4348b385e7090581a1da" + "/api/v2/shipments/shp_81bfa1e93c434991bd2a38ad0fb27ef9" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +93,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1391 + "duration": 1313 }, { - "recordedAt": 1666369248, + "recordedAt": 1668466107, "request": { - "body": "{\n \"carbon_offset\": true,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:20:46 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"currency\": \"USD\",\n \"id\": \"rate_784f77a38c154c6f8b8a88fa5fd272e0\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:20:46 PM\"\n }\n}", + "body": "{\n \"carbon_offset\": true,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:48:25 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_81bfa1e93c434991bd2a38ad0fb27ef9\",\n \"currency\": \"USD\",\n \"id\": \"rate_1cc3c64ca0b547d7b3ad867a87698742\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:48:25 PM\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -111,10 +111,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_3df1e757d39d4348b385e7090581a1da/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_81bfa1e93c434991bd2a38ad0fb27ef9/buy" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.11000\",\n \"refunded\": false,\n \"type\": \"CarbonOffsetFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:20:47Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:47Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:47Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_784f77a38c154c6f8b8a88fa5fd272e0\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T16:20:48Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"tracking_code\": \"9400100106068144550385\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2U2NTEyMTcxN2I1YzQ0NDA4MjY5M2JhOTZkZThkZGVi\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T16:20:48Z\",\n \"signed_by\": null,\n \"id\": \"trk_e65121717b5c444082693ba96de8ddeb\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_50c83788515c11edad24ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_50c83788515c11edad24ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:45Z\",\n \"currency\": null,\n \"id\": \"cstitem_a0274258642e41c188d77656932aa6d4\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-10-21T16:20:45Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_0465be8f5ea34c3d92caa79d2326ffd0\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T16:20:47Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/af0cf58617584e72b0d5e39396fb453c.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T16:20:47Z\",\n \"id\": \"pl_ecfb231a05cb4b17b987273e1c6e5faf\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T16:20:47Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:45Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:20:45Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_6a5fbc498ed144d9a17131f5e57f4ced\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-21T16:20:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_50c5ba12515c11edb131ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c67a97ae2ae643c681ad451889f0a5e8\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3b761a91d7c649cb97607d7bc7bab2c5\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_784f77a38c154c6f8b8a88fa5fd272e0\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:20:46Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_3df1e757d39d4348b385e7090581a1da\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:46Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_65391832ded3475bb20d47b03b1dd01d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-21T16:20:45+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-21T16:20:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_50c5ba12515c11edb131ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144550385\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.11000\",\n \"refunded\": false,\n \"type\": \"CarbonOffsetFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:27Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:27Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_81bfa1e93c434991bd2a38ad0fb27ef9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:27Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1cc3c64ca0b547d7b3ad867a87698742\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:48:27Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_81bfa1e93c434991bd2a38ad0fb27ef9\",\n \"tracking_code\": \"9400100106068149680711\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2RjYjM1ZTI1MGUwMDQ3MWU5OTNiNzlmNDkzNDgxYmVk\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:27Z\",\n \"signed_by\": null,\n \"id\": \"trk_dcb35e250e00471e993b79f493481bed\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_729461f3646e11ed810dac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_81bfa1e93c434991bd2a38ad0fb27ef9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_729461f3646e11ed810dac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"currency\": null,\n \"id\": \"cstitem_abf4b40c97a54bd1b508899b549a3746\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_236bbe1e779f436b995f4984c82c1717\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:27Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/cfe4d4e9f36d437a8bae557298fd7063.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:27Z\",\n \"id\": \"pl_f9e8d639be2c4a7a9c872b9822f4af9e\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:27Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f88f5cf799d04b44a738817f97fade6a\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:48:24+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:48:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_72920385646e11edaa72ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_81bfa1e93c434991bd2a38ad0fb27ef9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_de95f1adad8b4655b66d96ef9c0c44f7\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_81bfa1e93c434991bd2a38ad0fb27ef9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3d50f4df7ea34bbba08157016df14f9e\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_81bfa1e93c434991bd2a38ad0fb27ef9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_23e89b09398940a0974bd61ab0c8b9ec\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:25Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_81bfa1e93c434991bd2a38ad0fb27ef9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:25Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1cc3c64ca0b547d7b3ad867a87698742\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:48:24+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:48:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_72920385646e11edaa72ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680711\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +127,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,27 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "2c01d7d06352c6dee0db8b660001d460" + "3a8b2e086372c5bae0da50950019d861" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", + "intlb2wdc 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.273149" + "1.258933" ], "etag": [ - "W/\"c32772b539a3a2065e161002aade30bd\"" + "W/\"a0a044111c9b5e54fb8c7453efc2fa72\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -184,7 +184,7 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/shipments/shp_3df1e757d39d4348b385e7090581a1da/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_81bfa1e93c434991bd2a38ad0fb27ef9/buy" }, "duration": 1557 } diff --git a/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json b/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json index ecee20a10..d4c31b0c9 100644 --- a/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json +++ b/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1666369241, + "recordedAt": 1668466100, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/end_shippers" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-10-21T16:20:41+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_182c2866d6c644038561f60c5976b1fa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_07b096c80f514179904dd00ea470254f\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,27 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "2c01d7ca6352c6d9e0db880d0001d240" + "3a8b2e0c6372c5b4e0d9eb8d0019d5d0" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", + "intlb1wdc 29913d444b", "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.043907" + "0.040453" ], "etag": [ - "W/\"e83041268e713a482a5bb8e060c84642\"" + "W/\"9393bec82a60350820cdb76b30130ec0\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,12 +90,12 @@ }, "uri": "https://api.easypost.com/v2/end_shippers" }, - "duration": 332 + "duration": 301 }, { - "recordedAt": 1666369243, + "recordedAt": 1668466101, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -111,7 +111,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:20:42Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4f19e53a515c11eda7c3ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4f19e53a515c11eda7c3ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:42Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:20:42Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_3a2cac0382cc430eb27dcea645b36b16\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4f176858515c11edb09aac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_664d60a10a2948c5a319e0d6c368c5ab\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_679c2a45b0d5459d8e7b33f812d34b64\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9d0ac84156e844f2afd02eee211f562f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a69b5d73b370454cb021389169cb8e45\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4f176858515c11edb09aac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:20Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_701f7de4646e11edbf31ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_701f7de4646e11edbf31ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:20Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:20Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f8516ad9fa7e46828993b9e7b59ac7ee\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_701d0615646e11ed8006ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_bdb73ede209e4cd097ad49d51bb6f707\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a990f04172f7441098c5d77b04d8c70f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_23d9de547b334e55817020e90c840617\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e557655ae9464f86bcc03c2bbf257c49\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_701d0615646e11ed8006ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,7 +124,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,30 +151,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "2c01d7c96352c6dae0db882a0001d275" + "3a8b2e086372c5b4e0da50740019d5f9" ], "x-proxied": [ "extlb4wdc 29913d444b", "intlb2wdc 29913d444b", - "intlb2nuq 29913d444b" + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.876229" + "0.743743" ], "etag": [ - "W/\"815b81b3cce8c3590d153b332c06fe3b\"" + "W/\"53e58684d88a3190728d4707c53a7c22\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_f3991df6d4874a0091f2778e4deb5db9" + "/api/v2/shipments/shp_f36380d7eb4849ee83a6db9ff636dfbc" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,12 +186,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1156 + "duration": 1038 }, { - "recordedAt": 1666369244, + "recordedAt": 1668466102, "request": { - "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Oct 21, 2022, 12:20:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"currency\": \"USD\",\n \"id\": \"rate_9d0ac84156e844f2afd02eee211f562f\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Oct 21, 2022, 12:20:43 PM\"\n },\n \"end_shipper_id\": \"es_182c2866d6c644038561f60c5976b1fa\"\n}", + "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:48:21 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"currency\": \"USD\",\n \"id\": \"rate_e557655ae9464f86bcc03c2bbf257c49\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:48:21 PM\"\n },\n \"end_shipper_id\": \"es_07b096c80f514179904dd00ea470254f\"\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -204,10 +204,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_f3991df6d4874a0091f2778e4deb5db9/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_f36380d7eb4849ee83a6db9ff636dfbc/buy" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-10-21T16:20:42Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-10-21T16:20:44Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:44Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9d0ac84156e844f2afd02eee211f562f\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-10-21T16:20:44Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"tracking_code\": \"9400100106068144550354\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzJiZTgxZWUxN2VkNjQ4MTk4NzAwYjVmY2MwZTQzMWQ0\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-10-21T16:20:44Z\",\n \"signed_by\": null,\n \"id\": \"trk_2be81ee17ed648198700b5fcc0e431d4\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4f19e53a515c11eda7c3ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-10-21T16:20:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4f19e53a515c11eda7c3ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-10-21T16:20:44Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221021/2fa161927ec54895972e2dd6cc2b410f.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-10-21T16:20:44Z\",\n \"id\": \"pl_75da4c41528340029fbf954b6399a5a6\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-10-21T16:20:44Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-10-21T16:20:42Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-10-21T16:20:42Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_3a2cac0382cc430eb27dcea645b36b16\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-21T16:20:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_4f176858515c11edb09aac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_664d60a10a2948c5a319e0d6c368c5ab\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_679c2a45b0d5459d8e7b33f812d34b64\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9d0ac84156e844f2afd02eee211f562f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-10-21T16:20:43Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f3991df6d4874a0091f2778e4deb5db9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-10-21T16:20:43Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a69b5d73b370454cb021389169cb8e45\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-10-21T16:20:42+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-10-21T16:20:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_4f176858515c11edb09aac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068144550354\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:20Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:22Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:22Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:22Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e557655ae9464f86bcc03c2bbf257c49\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:48:22Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"tracking_code\": \"9400100106068149680681\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2VlOTI4ZGY3MWNkOTQzMmZhNmExZTc1YzNhNGNkYTNm\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:22Z\",\n \"signed_by\": null,\n \"id\": \"trk_ee928df71cd9432fa6a1e75c3a4cda3f\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_701f7de4646e11edbf31ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_701f7de4646e11edbf31ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:22Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/e3771b5a2db04cedaa4f7995dd565bad.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:22Z\",\n \"id\": \"pl_3f987e07d5424f6bbafc5fab0004b4d6\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:22Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:20Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:20Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f8516ad9fa7e46828993b9e7b59ac7ee\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:48:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_701d0615646e11ed8006ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_bdb73ede209e4cd097ad49d51bb6f707\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a990f04172f7441098c5d77b04d8c70f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_23d9de547b334e55817020e90c840617\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e557655ae9464f86bcc03c2bbf257c49\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:48:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_701d0615646e11ed8006ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680681\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -220,7 +220,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -247,27 +247,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "2c01d7cc6352c6dbe0db8b3e0001d305" + "3a8b2e096372c5b5e0da50760019d670" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb1nuq 29913d444b" + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.918155" + "0.980139" ], "etag": [ - "W/\"50ab82b47e3a371fc9bf7b9b0194d7ef\"" + "W/\"b3b3fb13fcf18f560bd9348b2010a2d5\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202210202007-e12f77437d-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -277,8 +277,8 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/shipments/shp_f3991df6d4874a0091f2778e4deb5db9/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_f36380d7eb4849ee83a6db9ff636dfbc/buy" }, - "duration": 1186 + "duration": 1206 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/convert_label.json b/src/test/cassettes/shipment/convert_label.json index 3198156fa..cf121ab74 100644 --- a/src/test/cassettes/shipment/convert_label.json +++ b/src/test/cassettes/shipment/convert_label.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456978, + "recordedAt": 1668466119, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_50e70987a6244ae187ad8de49a3c484e\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:49:38Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"tracking_code\": \"9400100109361135004742\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzViMDA4MjFhZTdhMTQxNWNhODJjOTU5YmJlOGM2ZDlm\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:49:38Z\",\n \"signed_by\": null,\n \"id\": \"trk_5b00821ae7a1415ca82c959bbe8c6d9f\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:37+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0ccf5d8524af11ed953dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:37+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0ccf5d8524af11ed953dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/a9962cc2740b4e538fd1af4a78ba7fc9.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"id\": \"pl_80c4bea4f7eb42e084c33f8ce1caedfa\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:49:37Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f7256734792740b6a9ebe7405ffe983b\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0ccddc4e24af11eda838ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a0e6a0668a0d4b099144f8e1ed66151d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_af6604f539714d7b86b2de81ddc6ce27\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_50e70987a6244ae187ad8de49a3c484e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_4dc1cc065f6b4ab8bba383afba8a8754\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0ccddc4e24af11eda838ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004742\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:38Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:39Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:39Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9dc3a2e7368f42c6831d69ca9584d57a\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:48:39Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"tracking_code\": \"9400100106068149680803\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzI3MzI4N2ZmNGYzZDQ2YTg4YjU5OWQ3Y2M3MDU0OTMw\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:39Z\",\n \"signed_by\": null,\n \"id\": \"trk_273287ff4f3d46a88b599d7cc7054930\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7ad2f838646e11edad4bac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7ad2f838646e11edad4bac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:39Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/bb76d92a8dd244559a3f48a9a470b20c.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:39Z\",\n \"id\": \"pl_9f5089069a6e4ac3baf8684e7acd28a4\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:39Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:38Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:38Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_958b10c991f84e58884e6e5fc122872d\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7ad0a681646e11ed830aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:38Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:38Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9dc3a2e7368f42c6831d69ca9584d57a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:38Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:38Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f33bec80595249d4b08e5b4fe7b1d33e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:38Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:38Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0787a104c5fa47c6b00cfee4f3cfd9fd\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:38Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:38Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_88fb6a4fb9984ab191e19e4c2fd8ee13\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7ad0a681646e11ed830aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680803\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92316307d251f7cb7f930009392d" + "3a8b2e086372c5c6e0da50fe0019dd49" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.012228" + "0.991265" ], "etag": [ - "W/\"34b36661f64a041e84f466d39febf9b5\"" + "W/\"53f6ea30751a0ff0458738856c6282b8\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_cd5b10aea1234f7abf18443c81a363b5" + "/api/v2/shipments/shp_4aa00ccab1314ee8a982d0162665182b" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1134 + "duration": 1315 }, { - "recordedAt": 1661456979, + "recordedAt": 1668466121, "request": { "body": "", "method": "GET", @@ -108,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_cd5b10aea1234f7abf18443c81a363b5/label?file_format\u003dZPL" + "uri": "https://api.easypost.com/v2/shipments/shp_4aa00ccab1314ee8a982d0162665182b/label?file_format\u003dZPL" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_50e70987a6244ae187ad8de49a3c484e\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:49:38Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:49:38Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:26:38Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"tracking_code\": \"9400100109361135004742\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzViMDA4MjFhZTdhMTQxNWNhODJjOTU5YmJlOGM2ZDlm\",\n \"est_delivery_date\": \"2022-08-25T19:49:38Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:49:38Z\",\n \"signed_by\": null,\n \"id\": \"trk_5b00821ae7a1415ca82c959bbe8c6d9f\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:37+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0ccf5d8524af11ed953dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:37+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0ccf5d8524af11ed953dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/a9962cc2740b4e538fd1af4a78ba7fc9.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:49:39Z\",\n \"id\": \"pl_80c4bea4f7eb42e084c33f8ce1caedfa\",\n \"label_zpl_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/postage_label/20220825/7b3a6a5a27434b53ad2961990fdccb27.zpl\",\n \"label_date\": \"2022-08-25T19:49:37Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f7256734792740b6a9ebe7405ffe983b\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0ccddc4e24af11eda838ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a0e6a0668a0d4b099144f8e1ed66151d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_af6604f539714d7b86b2de81ddc6ce27\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_50e70987a6244ae187ad8de49a3c484e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:37Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cd5b10aea1234f7abf18443c81a363b5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:37Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_4dc1cc065f6b4ab8bba383afba8a8754\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:37+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0ccddc4e24af11eda838ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004742\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:38Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:39Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:39Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9dc3a2e7368f42c6831d69ca9584d57a\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:48:39Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:48:39Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:25:39Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"tracking_code\": \"9400100106068149680803\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzI3MzI4N2ZmNGYzZDQ2YTg4YjU5OWQ3Y2M3MDU0OTMw\",\n \"est_delivery_date\": \"2022-11-14T22:48:39Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:39Z\",\n \"signed_by\": null,\n \"id\": \"trk_273287ff4f3d46a88b599d7cc7054930\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7ad2f838646e11edad4bac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7ad2f838646e11edad4bac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:39Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/bb76d92a8dd244559a3f48a9a470b20c.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:41Z\",\n \"id\": \"pl_9f5089069a6e4ac3baf8684e7acd28a4\",\n \"label_zpl_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/postage_label/20221114/9916441efaa54549946c9d30f2ad1396.zpl\",\n \"label_date\": \"2022-11-14T22:48:39Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:38Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:38Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_958b10c991f84e58884e6e5fc122872d\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7ad0a681646e11ed830aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:38Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:38Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9dc3a2e7368f42c6831d69ca9584d57a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:38Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:38Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f33bec80595249d4b08e5b4fe7b1d33e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:38Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:38Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0787a104c5fa47c6b00cfee4f3cfd9fd\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:38Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4aa00ccab1314ee8a982d0162665182b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:38Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_88fb6a4fb9984ab191e19e4c2fd8ee13\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:38+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7ad0a681646e11ed830aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680803\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,7 +124,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92356307d252f7ff103a0009399b" + "3a8b2e0a6372c5c7e0da51180019ddfb" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.579787" + "1.598808" ], "etag": [ - "W/\"4f2232ab7be5957f383a086ec46cdec4\"" + "W/\"7c0d7b5c4cbbcec170de1555fe4ae54c\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +181,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_cd5b10aea1234f7abf18443c81a363b5/label?file_format\u003dZPL" + "uri": "https://api.easypost.com/v2/shipments/shp_4aa00ccab1314ee8a982d0162665182b/label?file_format\u003dZPL" }, - "duration": 1706 + "duration": 1917 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/create.json b/src/test/cassettes/shipment/create.json index 947e013d0..62d85b588 100644 --- a/src/test/cassettes/shipment/create.json +++ b/src/test/cassettes/shipment/create.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456971, + "recordedAt": 1668466113, "request": { - "body": "{\n \"shipment\": {\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n },\n \"reference\": \"123\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"options\": {\n \"label_format\": \"PNG\",\n \"invoice_number\": \"123\"\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n },\n \"reference\": \"123\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"options\": {\n \"label_format\": \"PNG\",\n \"invoice_number\": \"123\"\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:31Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:31Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:31+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_093f29a224af11ed8fd4ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_ed272132485f46c1bcbd805907dc63a3\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:31+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_093f29a224af11ed8fd4ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-08-25T19:49:31Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-08-25T19:49:31Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:31Z\",\n \"currency\": null,\n \"id\": \"cstitem_dd26bdad37a24ca8b844d2c299f1b187\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-08-25T19:49:31Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_53ce7500873646a4ae38e15972670311\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:31Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:31Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_cd7de3b718504b86a65d223e9547dee1\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:31+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_093d509a24af11edb3bcac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ed272132485f46c1bcbd805907dc63a3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:31Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3ef493edf72a4cfcb12860603d8549f8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ed272132485f46c1bcbd805907dc63a3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:31Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1612c6a69f8a4b928bb5ce1dc27d7a0d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:31Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ed272132485f46c1bcbd805907dc63a3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:31Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5b343687d37f41a6875379ce04d87f1a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:31Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ed272132485f46c1bcbd805907dc63a3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:31Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_c072846a16c34d22a24e0c7c17b7ed97\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:31+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_093d509a24af11edb3bcac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:32Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:32+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_76f51a52646e11edac04ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_1e612b20a0f24b79861f79b865e2c200\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:32+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_76f51a52646e11edac04ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-11-14T22:48:32Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-11-14T22:48:32Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:32Z\",\n \"currency\": null,\n \"id\": \"cstitem_2d4b5a55f009417095ef57d26ba2d24d\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-11-14T22:48:32Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_86aaa15fc66b43a5804ad63d3248faa7\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:32Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:32Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_8014424fe78747b4830e4d4b665e62c9\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:32+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_76f30df7646e11edac02ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1e612b20a0f24b79861f79b865e2c200\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_c3e6179f343d4217aeed5e3c1a4979ca\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1e612b20a0f24b79861f79b865e2c200\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4dc765ead6404be9b714166a4ca59979\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1e612b20a0f24b79861f79b865e2c200\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0a5c651d25f049f9b88d73f204658cc4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1e612b20a0f24b79861f79b865e2c200\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_dfb005230942412d8b9d07dfd9eae2f2\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:32+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_76f30df7646e11edac02ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92336307d24ae68aa4e7000936c8" + "3a8b2e0e6372c5c0e0da50d60019da9b" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.977141" + "0.870095" ], "etag": [ - "W/\"dfb6544f0e555be43dd742ace0de8b6d\"" + "W/\"bb798fe4a84aa6b522982b62a39610ea\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_ed272132485f46c1bcbd805907dc63a3" + "/api/v2/shipments/shp_1e612b20a0f24b79861f79b865e2c200" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1148 + "duration": 1136 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/create_empty_objects.json b/src/test/cassettes/shipment/create_empty_objects.json index afcd4df0b..33f849f53 100644 --- a/src/test/cassettes/shipment/create_empty_objects.json +++ b/src/test/cassettes/shipment/create_empty_objects.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456957, + "recordedAt": 1668466091, "request": { - "body": "{\n \"shipment\": {\n \"customs_info\": {\n \"customs_items\": []\n },\n \"reference\": \"\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"customs_info\": {\n \"customs_items\": []\n },\n \"reference\": \"\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:17Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:17Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:17+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:17+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_00d3331424af11edb0afac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4fc2e39146b2461eb95a383fe53558c1\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:17+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:17+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_00d3331424af11edb0afac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-08-25T19:49:17Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-08-25T19:49:17Z\",\n \"customs_certify\": false,\n \"eel_pfc\": null,\n \"customs_signer\": null,\n \"id\": \"cstinfo_6c7edef4023d46efb9e9254bfb5b83db\",\n \"contents_explanation\": null,\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:17Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:17Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f172a4c79f5c439d99b73b1f17e92130\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:16+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_00cf04fb24af11eda019ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:17Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4fc2e39146b2461eb95a383fe53558c1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:17Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5a0691e0422b48068aedbfb52567146d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:17Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4fc2e39146b2461eb95a383fe53558c1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:17Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_34d2e222f555418c8283e6b8a50dd848\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:17Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4fc2e39146b2461eb95a383fe53558c1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:17Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f2dacfe6fd364b89b2fcf3a13e32df18\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:17Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4fc2e39146b2461eb95a383fe53558c1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:17Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e80ce50386c04c34b1ce3eaf2c3620bb\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:16+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_00cf04fb24af11eda019ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:10Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:11Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6a164f03646e11eda6c2ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6dcf893441f04e93917f19d6f989decc\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6a164f03646e11eda6c2ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-11-14T22:48:10Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-11-14T22:48:10Z\",\n \"customs_certify\": false,\n \"eel_pfc\": null,\n \"customs_signer\": null,\n \"id\": \"cstinfo_37b659079180450ead14184b27b5efc0\",\n \"contents_explanation\": null,\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:10Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:10Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_fbec337b8bd348d39fa5ffdd238154d2\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6a137e3d646e11edbc84ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:11Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6dcf893441f04e93917f19d6f989decc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:11Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3a8efb542c9e4dcaad581f3567c03392\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:11Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6dcf893441f04e93917f19d6f989decc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:11Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_69347b0ee2754ab397cd05f6890f94fe\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:11Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6dcf893441f04e93917f19d6f989decc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:11Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_12f1041efd1946f68c6f05b37f15d4db\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:11Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6dcf893441f04e93917f19d6f989decc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:11Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1af806c82e0a4d2484c034e35683fd67\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6a137e3d646e11edbc84ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92346307d23cf7ca6bd4000931f6" + "3a8b2e0c6372c5aae0d9eb660019d0eb" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.753790" + "0.992246" ], "etag": [ - "W/\"17af29f72dccf2205b4a63fda47d216d\"" + "W/\"7ea06e9602cd648754388f3eebdec468\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_4fc2e39146b2461eb95a383fe53558c1" + "/api/v2/shipments/shp_6dcf893441f04e93917f19d6f989decc" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 954 + "duration": 1248 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/create_shipment_with_carbon_offset.json b/src/test/cassettes/shipment/create_shipment_with_carbon_offset.json index 3e926fec5..6c1ca2c7b 100644 --- a/src/test/cassettes/shipment/create_shipment_with_carbon_offset.json +++ b/src/test/cassettes/shipment/create_shipment_with_carbon_offset.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456956, + "recordedAt": 1668466090, "request": { "body": "{\n \"carbon_offset\": true,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:15Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:16Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_fff7573524ae11ed8caaac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_7535a545b318481cac81c65deb13dbb0\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_fff7573524ae11ed8caaac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:15Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:15Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_03423e719c654cabb155bc3527bd92e8\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fff54f6f24ae11edb065ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:16Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7535a545b318481cac81c65deb13dbb0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:16Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_2192a2c0d48e45f399c9b29592743485\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:16Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7535a545b318481cac81c65deb13dbb0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:16Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b753d33f98644d16a9a99d7c8413917d\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:16Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7535a545b318481cac81c65deb13dbb0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:16Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4b46cf592a14479fa86694ad69a7f9eb\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:16Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7535a545b318481cac81c65deb13dbb0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:16Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_984c58df879a4d2fa1451422b6157f9d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fff54f6f24ae11edb065ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:09Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:10Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:09+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_695ea40d646e11edbd30ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_a522f5d1a290437ba6a098feed38dc92\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:09+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_695ea40d646e11edbd30ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:09Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:09Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_087670d41f1a4f9699ed26fcdb69ca62\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:09+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_695c73d1646e11eda676ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:10Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a522f5d1a290437ba6a098feed38dc92\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:10Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4bce0277abc8416dbb8b895af0506ac9\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:10Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a522f5d1a290437ba6a098feed38dc92\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:10Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_c8ecfabd6739485b81880bcf5173b208\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:10Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a522f5d1a290437ba6a098feed38dc92\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:10Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5c24c7d1067e4c98b99f95b6338db657\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:10Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a522f5d1a290437ba6a098feed38dc92\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:10Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ba8034949a10431aa491a11abc11006b\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:09+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_695c73d1646e11eda676ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92356307d23bf7a5b1f00009315e" + "3a8b2e0c6372c5a9e0d9eb4b0019d070" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.059440" + "0.864345" ], "etag": [ - "W/\"ec47dcc02519c54ea00f4abe8b7cb9ab\"" + "W/\"82d64aba2ac7791404c6834fe193211e\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_7535a545b318481cac81c65deb13dbb0" + "/api/v2/shipments/shp_a522f5d1a290437ba6a098feed38dc92" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1257 + "duration": 1069 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/create_tax_identifiers.json b/src/test/cassettes/shipment/create_tax_identifiers.json index d7a8c860c..6f133404a 100644 --- a/src/test/cassettes/shipment/create_tax_identifiers.json +++ b/src/test/cassettes/shipment/create_tax_identifiers.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456975, + "recordedAt": 1668466116, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"tax_identifiers\": [\n {\n \"issuing_country\": \"GB\",\n \"tax_id_type\": \"IOSS\",\n \"entity\": \"SENDER\",\n \"tax_id\": \"12345\"\n }\n ]\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"tax_identifiers\": [\n {\n \"issuing_country\": \"GB\",\n \"tax_id_type\": \"IOSS\",\n \"entity\": \"SENDER\",\n \"tax_id\": \"12345\"\n }\n ]\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:34Z\",\n \"tax_identifiers\": [\n {\n \"issuing_country\": \"GB\",\n \"tax_id_type\": \"IOSS\",\n \"entity\": \"SENDER\",\n \"tax_id\": \"HIDDEN\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:34+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0afb940a24af11edb57aac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_c71785e084af494ebdc92b3837fe423c\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:34+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0afb940a24af11edb57aac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:34Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:34Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_dfec90d73812435caeba8c5f39497959\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:34+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0af9e29724af11ed8ec6ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c71785e084af494ebdc92b3837fe423c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e9f053ea44bb4373be8940b8c4526f7f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c71785e084af494ebdc92b3837fe423c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_2cc9861ffbc040ae8fdde94dbc6ee4d1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c71785e084af494ebdc92b3837fe423c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c4061ab5969b4568a632cf1c4e1e8bd6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:35Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c71785e084af494ebdc92b3837fe423c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:35Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_429548c51eca4b7e8669ecf372fd27ac\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:34+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0af9e29724af11ed8ec6ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:35Z\",\n \"tax_identifiers\": [\n {\n \"issuing_country\": \"GB\",\n \"tax_id_type\": \"IOSS\",\n \"entity\": \"SENDER\",\n \"tax_id\": \"HIDDEN\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:36Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_78e7642d646e11ed8363ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_17f9b7f3bb384cdea767417fdcf9f2a2\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_78e7642d646e11ed8363ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:35Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:35Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_2b76a3971db94ad0acf324fe35959d2f\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_78e506d9646e11edacadac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:36Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_17f9b7f3bb384cdea767417fdcf9f2a2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:36Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_64189c7c341244bba8d9963256f983d9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:36Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_17f9b7f3bb384cdea767417fdcf9f2a2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:36Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0e0e3c5facac459f9d5d3ef75f4a8075\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:36Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_17f9b7f3bb384cdea767417fdcf9f2a2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:36Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_76aa741ca57a450fa1bd6ea4761e63c1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:36Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_17f9b7f3bb384cdea767417fdcf9f2a2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:36Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_130b138b196644d697faeac9b0ed8966\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_78e506d9646e11edacadac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92326307d24ef7de9ff6000937de" + "3a8b2e0e6372c5c3e0da50f80019dbd7" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.037520" + "1.038739" ], "etag": [ - "W/\"7892ba2f9eaf6364dc9b9e1a86a6c424\"" + "W/\"595f765bbac8abdaf903d42916e80a78\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_c71785e084af494ebdc92b3837fe423c" + "/api/v2/shipments/shp_17f9b7f3bb384cdea767417fdcf9f2a2" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1192 + "duration": 1265 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/generate_form.json b/src/test/cassettes/shipment/generate_form.json index d315bc09f..0128f1d8d 100644 --- a/src/test/cassettes/shipment/generate_form.json +++ b/src/test/cassettes/shipment/generate_form.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456954, + "recordedAt": 1668466088, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:14Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7eb646a01e2d4cf6bb81bf9634bf3e64\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:49:14Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"tracking_code\": \"9400100109361135004643\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzUzNjUzMDI4MDMyZTRiNTM5ODQwOWMzY2YyZTA3Yzk3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:49:14Z\",\n \"signed_by\": null,\n \"id\": \"trk_53653028032e4b5398409c3cf2e07c97\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_feadd53b24ae11ed8c4dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_feadd53b24ae11ed8c4dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/d4efdb242da24bad9495bbb84e35974b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:49:14Z\",\n \"id\": \"pl_c6d43f9d636546eba245e7e1b51fb9fb\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:49:13Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_8083ed40761d4cd48d5d519b4ba10472\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:13+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_feac09a524ae11ed8c4cac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_610ed7f383c84dd3a9e060c9c767851c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_530f8629386848abbe1d8766f2607f88\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7eb646a01e2d4cf6bb81bf9634bf3e64\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b2f28a856a34411b8fcb9f5d285e38a1\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:13+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_feac09a524ae11ed8c4cac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004643\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:08Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1061ec1d5081475daebffa9d6064095f\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:48:08Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"tracking_code\": \"9400100106068149680582\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2JjMjAwN2JlZWZiNjQ3YmQ4ZjJiZmJjZGYzMjUzODVl\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:08Z\",\n \"signed_by\": null,\n \"id\": \"trk_bc2007beefb647bd8f2bfbcdf325385e\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_67ffb7e4646e11ed842bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_67ffb7e4646e11ed842bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/4f52f6917128475d889921549d75ba8b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"id\": \"pl_a97244168b07409ead3efa56e5eefced\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:07Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_43380eaf72de4e4d816f72d57784e7fe\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_67fd0057646e11edbbb7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6829c94e973146fbad8de4b222af0574\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_865a3cc353c346b68642eeb7057fbb9e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1061ec1d5081475daebffa9d6064095f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_6dfb76ef60964f12a02e96a9e7fcb7bb\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_67fd0057646e11edbbb7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680582\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92346307d239f7a7418c0009309c" + "3a8b2e0f6372c5a7e0d9eb470019cf3f" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.996200" + "0.977210" ], "etag": [ - "W/\"b87b93e204e69e63cbe9ae3b40e836be\"" + "W/\"86a47ca5627db897afc762fabd7124b4\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_7772489f34614a3eb023c61c402ff675" + "/api/v2/shipments/shp_194a05f44bfe47919cce864d57b9136a" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1132 + "duration": 1264 }, { - "recordedAt": 1661456955, + "recordedAt": 1668466089, "request": { "body": "{\n \"form\": {\n \"line_items\": [\n {\n \"product\": {\n \"title\": \"Square Reader\",\n \"barcode\": \"855658003251\"\n },\n \"units\": 8.0\n }\n ],\n \"type\": \"return_packing_slip\",\n \"barcode\": \"RMA12345678900\"\n }\n}", "method": "POST", @@ -111,10 +111,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_7772489f34614a3eb023c61c402ff675/forms" + "uri": "https://api.easypost.com/v2/shipments/shp_194a05f44bfe47919cce864d57b9136a/forms" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:14Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7eb646a01e2d4cf6bb81bf9634bf3e64\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:49:14Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:49:14Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:26:14Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"tracking_code\": \"9400100109361135004643\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzUzNjUzMDI4MDMyZTRiNTM5ODQwOWMzY2YyZTA3Yzk3\",\n \"est_delivery_date\": \"2022-08-25T19:49:14Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:49:14Z\",\n \"signed_by\": null,\n \"id\": \"trk_53653028032e4b5398409c3cf2e07c97\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_feadd53b24ae11ed8c4dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_feadd53b24ae11ed8c4dac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/d4efdb242da24bad9495bbb84e35974b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:49:14Z\",\n \"id\": \"pl_c6d43f9d636546eba245e7e1b51fb9fb\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:49:13Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_8083ed40761d4cd48d5d519b4ba10472\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:13+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_feac09a524ae11ed8c4cac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_610ed7f383c84dd3a9e060c9c767851c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_530f8629386848abbe1d8766f2607f88\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7eb646a01e2d4cf6bb81bf9634bf3e64\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:13Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7772489f34614a3eb023c61c402ff675\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:13Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b2f28a856a34411b8fcb9f5d285e38a1\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:13+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_feac09a524ae11ed8c4cac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004643\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [\n {\n \"mode\": \"test\",\n \"submitted_electronically\": null,\n \"updated_at\": \"2022-08-25T19:49:15Z\",\n \"form_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20220825/a7f65b02f01e45458bdbcf517bcfc838.pdf\",\n \"created_at\": \"2022-08-25T19:49:14Z\",\n \"id\": \"form_3deea58fc34640aa9d5b9932f7179f76\",\n \"form_type\": \"return_packing_slip\",\n \"object\": \"Form\"\n }\n ],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:08Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1061ec1d5081475daebffa9d6064095f\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:48:08Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:48:08Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:25:08Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"tracking_code\": \"9400100106068149680582\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2JjMjAwN2JlZWZiNjQ3YmQ4ZjJiZmJjZGYzMjUzODVl\",\n \"est_delivery_date\": \"2022-11-14T22:48:08Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:08Z\",\n \"signed_by\": null,\n \"id\": \"trk_bc2007beefb647bd8f2bfbcdf325385e\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_67ffb7e4646e11ed842bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_67ffb7e4646e11ed842bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/4f52f6917128475d889921549d75ba8b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"id\": \"pl_a97244168b07409ead3efa56e5eefced\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:07Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_43380eaf72de4e4d816f72d57784e7fe\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_67fd0057646e11edbbb7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6829c94e973146fbad8de4b222af0574\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_865a3cc353c346b68642eeb7057fbb9e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1061ec1d5081475daebffa9d6064095f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_6dfb76ef60964f12a02e96a9e7fcb7bb\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_67fd0057646e11edbbb7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680582\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [\n {\n \"mode\": \"test\",\n \"submitted_electronically\": null,\n \"updated_at\": \"2022-11-14T22:48:09Z\",\n \"form_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20221114/822b53eb3ad3412690d5fec748d5c486.pdf\",\n \"created_at\": \"2022-11-14T22:48:08Z\",\n \"id\": \"form_1e19b2fe67be4cfabe0e126136ad3087\",\n \"form_type\": \"return_packing_slip\",\n \"object\": \"Form\"\n }\n ],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +127,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -147,9 +147,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -157,29 +154,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92366307d23af7cd295a0009310f" + "3a8b2e0b6372c5a8e0d9eb490019cff9" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.550263" + "0.650669" ], "etag": [ - "W/\"67e06077895d15d2f435fd5ce4c67599\"" + "W/\"1b28021ba0585c05643d99152705579f\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_7772489f34614a3eb023c61c402ff675/forms/return_packing_slip" + "/api/v2/shipments/shp_194a05f44bfe47919cce864d57b9136a/forms/return_packing_slip" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -189,9 +187,8 @@ "code": 201, "message": "Created" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_7772489f34614a3eb023c61c402ff675/forms" + "uri": "https://api.easypost.com/v2/shipments/shp_194a05f44bfe47919cce864d57b9136a/forms" }, - "duration": 679 + "duration": 876 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/insure.json b/src/test/cassettes/shipment/insure.json index b0fedf20c..19b98f361 100644 --- a/src/test/cassettes/shipment/insure.json +++ b/src/test/cassettes/shipment/insure.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456973, + "recordedAt": 1668466114, "request": { - "body": "{\n \"shipment\": {\n \"insurance\": 0.0,\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"insurance\": 0.0,\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:33Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:32Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d9906758eb884973a3d61ba3c09d1156\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:49:33Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"tracking_code\": \"9400100109361135004711\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzMxNGNmZGRkMmMwODQzMjZhMDI1NGI5ZmE2MTE4M2My\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:49:33Z\",\n \"signed_by\": null,\n \"id\": \"trk_314cfddd2c084326a0254b9fa61183c2\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:32+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_09fa4cb624af11edb4c7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:32+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_09fa4cb624af11edb4c7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/8146ddbbd6d744dfa58f485dc23984d6.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:49:33Z\",\n \"id\": \"pl_e182c19a5cf446239da2b0ccc468c432\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:49:32Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:32Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c724ed9059e349938840b043edccaa98\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:32+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_09f8759f24af11ed90d6ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:32Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d9906758eb884973a3d61ba3c09d1156\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:32Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9389938204224b8c8ef5ee2596e49900\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:32Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b3d64d83385d4d61a33aea15dcfa5909\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:32Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8ed71a14129b4b089631a4153b1a5647\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:32+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_09f8759f24af11ed90d6ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004711\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:34Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:34Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:34Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8cc43a04c59c4e4bb15616e0e40eb8ec\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:48:34Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"tracking_code\": \"9400100106068149680766\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzNmNmRlNjVmNWJmYTRmMjZhYzZiYzkwNjljMWZmNGEx\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:34Z\",\n \"signed_by\": null,\n \"id\": \"trk_3f6de65f5bfa4f26ac6bc9069c1ff4a1\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:33+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_77b35d9b646e11edac43ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:33+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_77b35d9b646e11edac43ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:34Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/e93c5b30cd9f4eff915f0b9d298a74c9.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:34Z\",\n \"id\": \"pl_e2d6c6dc1bdb41f88e3a71211a4ddafb\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:34Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_4801b15884464b67a2fd0bce79eb6324\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:33+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_77b0df17646e11edac41ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bb2e81be46db45e28c4a4c44a976a1c8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8cc43a04c59c4e4bb15616e0e40eb8ec\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_2e3eb0b90bcb4f94aa7401ce4695819d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_03a043cb85fc4daaaecf2ea5c58686ac\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:33+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_77b0df17646e11edac41ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680766\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92326307d24cf7cb83cf0009373f" + "3a8b2e0b6372c5c1e0da50db0019db02" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.928615" + "1.107602" ], "etag": [ - "W/\"1d11f78250176161f90fbc37bcd64378\"" + "W/\"cabcac96abaf3b3ee2be2cf6440f1300\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_0eae6e28526141489f1af86a0dbfbf66" + "/api/v2/shipments/shp_2bb7b6e85c3f4874a20df7c19f2f6e0d" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1071 + "duration": 1332 }, { - "recordedAt": 1661456973, + "recordedAt": 1668466115, "request": { "body": "{\n \"amount\": \"100\"\n}", "method": "POST", @@ -111,10 +111,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_0eae6e28526141489f1af86a0dbfbf66/insure" + "uri": "https://api.easypost.com/v2/shipments/shp_2bb7b6e85c3f4874a20df7c19f2f6e0d/insure" }, "response": { - "body": "{\n \"insurance\": \"100.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.50000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:33Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:32Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d9906758eb884973a3d61ba3c09d1156\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:49:33Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:49:33Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:26:33Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"tracking_code\": \"9400100109361135004711\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzMxNGNmZGRkMmMwODQzMjZhMDI1NGI5ZmE2MTE4M2My\",\n \"est_delivery_date\": \"2022-08-25T19:49:33Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:49:33Z\",\n \"signed_by\": null,\n \"id\": \"trk_314cfddd2c084326a0254b9fa61183c2\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:32+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_09fa4cb624af11edb4c7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:32+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_09fa4cb624af11edb4c7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/8146ddbbd6d744dfa58f485dc23984d6.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:49:33Z\",\n \"id\": \"pl_e182c19a5cf446239da2b0ccc468c432\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:49:32Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:32Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c724ed9059e349938840b043edccaa98\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:32+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_09f8759f24af11ed90d6ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:32Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d9906758eb884973a3d61ba3c09d1156\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:32Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9389938204224b8c8ef5ee2596e49900\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:32Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b3d64d83385d4d61a33aea15dcfa5909\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:32Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0eae6e28526141489f1af86a0dbfbf66\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:32Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8ed71a14129b4b089631a4153b1a5647\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:32+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_09f8759f24af11ed90d6ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004711\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"100.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.50000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:34Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:34Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:34Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8cc43a04c59c4e4bb15616e0e40eb8ec\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:48:34Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:48:34Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:25:34Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"tracking_code\": \"9400100106068149680766\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzNmNmRlNjVmNWJmYTRmMjZhYzZiYzkwNjljMWZmNGEx\",\n \"est_delivery_date\": \"2022-11-14T22:48:34Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:34Z\",\n \"signed_by\": null,\n \"id\": \"trk_3f6de65f5bfa4f26ac6bc9069c1ff4a1\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:33+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_77b35d9b646e11edac43ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:33+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_77b35d9b646e11edac43ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:34Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/e93c5b30cd9f4eff915f0b9d298a74c9.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:34Z\",\n \"id\": \"pl_e2d6c6dc1bdb41f88e3a71211a4ddafb\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:34Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_4801b15884464b67a2fd0bce79eb6324\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:33+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_77b0df17646e11edac41ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bb2e81be46db45e28c4a4c44a976a1c8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8cc43a04c59c4e4bb15616e0e40eb8ec\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_2e3eb0b90bcb4f94aa7401ce4695819d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:33Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2bb7b6e85c3f4874a20df7c19f2f6e0d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:33Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_03a043cb85fc4daaaecf2ea5c58686ac\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:33+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_77b0df17646e11edac41ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680766\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +127,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,26 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92346307d24df7b95e70000937af" + "3a8b2e0b6372c5c2e0da50df0019dbab" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.146196" + "0.157381" ], "etag": [ - "W/\"dcc1bd3e9ffb36e8413cef2d9ae380fc\"" + "W/\"0b2ddc9df47167555b00c64226dc6d92\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,9 +184,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_0eae6e28526141489f1af86a0dbfbf66/insure" + "uri": "https://api.easypost.com/v2/shipments/shp_2bb7b6e85c3f4874a20df7c19f2f6e0d/insure" }, - "duration": 282 + "duration": 388 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/lowest_rate.json b/src/test/cassettes/shipment/lowest_rate.json index 66e537915..09473ef12 100644 --- a/src/test/cassettes/shipment/lowest_rate.json +++ b/src/test/cassettes/shipment/lowest_rate.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456970, + "recordedAt": 1668466111, "request": { - "body": "{\n \"shipment\": {\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n },\n \"reference\": \"123\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"options\": {\n \"label_format\": \"PNG\",\n \"invoice_number\": \"123\"\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n },\n \"reference\": \"123\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"options\": {\n \"label_format\": \"PNG\",\n \"invoice_number\": \"123\"\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:29Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:30Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_084391f424af11eda2beac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_85720fad195344148ae2f92f713d02af\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_084391f424af11eda2beac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-08-25T19:49:29Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-08-25T19:49:29Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:29Z\",\n \"currency\": null,\n \"id\": \"cstitem_185ba4ec68c4476e9f49daabf6f2b882\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-08-25T19:49:29Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_3723499118934063ba371cb4620977af\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:29Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:29Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a03b84bfc0324c19a857c923191b6356\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0841cb0724af11edb365ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:30Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_85720fad195344148ae2f92f713d02af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:30Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c9753169c12b4f27801362a91e6499a9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:30Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_85720fad195344148ae2f92f713d02af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:30Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9cb3f8b201e340a9a800f6080d5bbcc0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_85720fad195344148ae2f92f713d02af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:30Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_11c1427e1ae146e883d35e3752dee3d4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:30Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_85720fad195344148ae2f92f713d02af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:30Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3e9f6e547ae84beabe11cf340c95a32e\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0841cb0724af11edb365ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:31Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:31Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:31+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_762fe0e9646e11ed8282ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_ae42d3307ce14c9189488f0aa75f41e8\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:31+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_762fe0e9646e11ed8282ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-11-14T22:48:31Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-11-14T22:48:31Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:31Z\",\n \"currency\": null,\n \"id\": \"cstitem_095f72cc07b947a5bea332d02d67f0bf\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-11-14T22:48:31Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_268e1cf273da42dcacc80aaf60a52864\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:31Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:31Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_15ecd82ea24a4bc1bc34a4f7d45f7fb4\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:31+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_762d6a37646e11ed87b5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ae42d3307ce14c9189488f0aa75f41e8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:31Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bb187e615797476f9454dabfc0287e26\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:31Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ae42d3307ce14c9189488f0aa75f41e8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:31Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_febd8bc2a7f34997ad3a6b0101ca07db\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:31Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ae42d3307ce14c9189488f0aa75f41e8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:31Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ae632c081b0f4a8f8e64494e11cb534a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ae42d3307ce14c9189488f0aa75f41e8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:31Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ff1ef1cc85104840960d2263f2cf9966\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:31+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_762d6a37646e11ed87b5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92346307d249f7ecee6e00093656" + "3a8b2e0b6372c5bee0da50bd0019da1e" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.231614" + "0.959017" ], "etag": [ - "W/\"8633236fbe65495fbc5de83df269d2ab\"" + "W/\"9f128c510a4c4dba6312a7917fe8867f\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_85720fad195344148ae2f92f713d02af" + "/api/v2/shipments/shp_ae42d3307ce14c9189488f0aa75f41e8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1364 + "duration": 1209 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/lowest_smartrate.json b/src/test/cassettes/shipment/lowest_smartrate.json index 636838d6e..8ac7bc1ea 100644 --- a/src/test/cassettes/shipment/lowest_smartrate.json +++ b/src/test/cassettes/shipment/lowest_smartrate.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456958, + "recordedAt": 1668466093, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:18Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:18Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:18+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_017c16b324af11ed8bfdac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_b15a685e22b847928e3b146e43c9358c\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:18+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_017c16b324af11ed8bfdac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:18Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:18Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_300d9bc899f74639b46a9b1ddd42b0f0\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:18+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_017a63d224af11ed8d24ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:18Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b15a685e22b847928e3b146e43c9358c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:18Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_25c3ed36c97847dab0756c0985c9a2d8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:18Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b15a685e22b847928e3b146e43c9358c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:18Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_19a5e37b94aa4d77a8174c7b45b04616\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:18Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b15a685e22b847928e3b146e43c9358c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:18Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_eed3a9d5d4394bdbace26748d5b7fa12\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:18Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b15a685e22b847928e3b146e43c9358c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:18Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_71c4b300e953472baadd887980f471df\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:18+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_017a63d224af11ed8d24ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:12Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:13Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:12+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6aeeee55646e11edbdd7ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_7b6fc279bf8542319e03db8741d45270\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:12+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6aeeee55646e11edbdd7ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:12Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:12Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_cd93f92e7cda475ca7399d24e2aa9c39\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:12+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6aece3f4646e11edbdd5ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:13Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7b6fc279bf8542319e03db8741d45270\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:13Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b3bfb2f75cf04ed4aa05a9828fbf34fc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7b6fc279bf8542319e03db8741d45270\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:13Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a1974e7812d548f0815195e5bff30e5e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:13Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7b6fc279bf8542319e03db8741d45270\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:13Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f66f583352ad4657910c0e489b08116d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:13Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7b6fc279bf8542319e03db8741d45270\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:13Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_faf84d8e74e94eeea37d43b96215dae6\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:12+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6aece3f4646e11edbdd5ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92336307d23ee68bbe0700093264" + "3a8b2e0d6372c5abe0d9eb680019d189" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.748537" + "1.235107" ], "etag": [ - "W/\"d0978c81200d6d0ff6dc8542093ebe4f\"" + "W/\"c6d61fecb99adbe2b5e6d26e070ce513\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_b15a685e22b847928e3b146e43c9358c" + "/api/v2/shipments/shp_7b6fc279bf8542319e03db8741d45270" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 879 + "duration": 1540 }, { - "recordedAt": 1661456959, + "recordedAt": 1668466094, "request": { "body": "", "method": "GET", @@ -108,23 +108,23 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_b15a685e22b847928e3b146e43c9358c/smartrate" + "uri": "https://api.easypost.com/v2/shipments/shp_7b6fc279bf8542319e03db8741d45270/smartrate" }, "response": { - "body": "{\n \"result\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 29.5,\n \"created_at\": \"2022-08-25T19:49:18Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b15a685e22b847928e3b146e43c9358c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 33.55,\n \"updated_at\": \"2022-08-25T19:49:18Z\",\n \"rate\": 29.5,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 4.0\n },\n \"service\": \"Express\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_25c3ed36c97847dab0756c0985c9a2d8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 7.9,\n \"created_at\": \"2022-08-25T19:49:18Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b15a685e22b847928e3b146e43c9358c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.45,\n \"updated_at\": \"2022-08-25T19:49:18Z\",\n \"rate\": 7.9,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 2.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 4.0\n },\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_19a5e37b94aa4d77a8174c7b45b04616\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 5.57,\n \"created_at\": \"2022-08-25T19:49:18Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b15a685e22b847928e3b146e43c9358c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 5.57,\n \"updated_at\": \"2022-08-25T19:49:18Z\",\n \"rate\": 5.57,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 5.0,\n \"percentile_99\": 8.0\n },\n \"service\": \"First\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_eed3a9d5d4394bdbace26748d5b7fa12\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 7.75,\n \"created_at\": \"2022-08-25T19:49:18Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b15a685e22b847928e3b146e43c9358c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 7.75,\n \"updated_at\": \"2022-08-25T19:49:18Z\",\n \"rate\": 7.75,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 4.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 5.0,\n \"percentile_99\": 9.0\n },\n \"service\": \"ParcelSelect\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_71c4b300e953472baadd887980f471df\",\n \"object\": \"Rate\"\n }\n ]\n}", + "body": "{\n \"result\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.0,\n \"created_at\": \"2022-11-14T22:48:13Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7b6fc279bf8542319e03db8741d45270\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 8.0,\n \"updated_at\": \"2022-11-14T22:48:13Z\",\n \"rate\": 8.0,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 6.0,\n \"percentile_99\": 8.0\n },\n \"service\": \"ParcelSelect\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b3bfb2f75cf04ed4aa05a9828fbf34fc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 5.82,\n \"created_at\": \"2022-11-14T22:48:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7b6fc279bf8542319e03db8741d45270\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 5.82,\n \"updated_at\": \"2022-11-14T22:48:13Z\",\n \"rate\": 5.82,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 4.0,\n \"percentile_99\": 5.0\n },\n \"service\": \"First\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a1974e7812d548f0815195e5bff30e5e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 29.75,\n \"created_at\": \"2022-11-14T22:48:13Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7b6fc279bf8542319e03db8741d45270\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 33.85,\n \"updated_at\": \"2022-11-14T22:48:13Z\",\n \"rate\": 29.75,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 5.0\n },\n \"service\": \"Express\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f66f583352ad4657910c0e489b08116d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.15,\n \"created_at\": \"2022-11-14T22:48:13Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7b6fc279bf8542319e03db8741d45270\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.75,\n \"updated_at\": \"2022-11-14T22:48:13Z\",\n \"rate\": 8.15,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 6.0\n },\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_faf84d8e74e94eeea37d43b96215dae6\",\n \"object\": \"Rate\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "2617" + "2618" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92336307d23ef800c557000932b9" + "3a8b2e0b6372c5ade0d9eb6a0019d26c" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.093278" + "0.169638" ], "etag": [ - "W/\"a2193a6843d58acb96e26a514a8cf707\"" + "W/\"53d35660591a7549df4b16a308394871\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +181,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_b15a685e22b847928e3b146e43c9358c/smartrate" + "uri": "https://api.easypost.com/v2/shipments/shp_7b6fc279bf8542319e03db8741d45270/smartrate" }, - "duration": 225 + "duration": 478 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/lowest_smartrate_list.json b/src/test/cassettes/shipment/lowest_smartrate_list.json index 05c36735e..7b9ccd5be 100644 --- a/src/test/cassettes/shipment/lowest_smartrate_list.json +++ b/src/test/cassettes/shipment/lowest_smartrate_list.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456967, + "recordedAt": 1668466108, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:26Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:27Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:26+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_06bd251524af11ed8d26ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_ccbe5b35812b4a818539e2b153160f2c\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:26+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_06bd251524af11ed8d26ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:26Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:26Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_d4e30a20341745b69fc0406670ab3f47\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:26+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_06baf09824af11eda249ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:27Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ccbe5b35812b4a818539e2b153160f2c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:27Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c91f438d1d1343c5b70c710c577292e8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:27Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ccbe5b35812b4a818539e2b153160f2c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:27Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9fa4fea1ff6d4d4b89ce109fef1b7b0d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:27Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ccbe5b35812b4a818539e2b153160f2c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:27Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7748b8758c8443f181d6d8b5a163e386\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:27Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ccbe5b35812b4a818539e2b153160f2c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:27Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f68066cf86284a8e9c3b55f4319312e3\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:26+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_06baf09824af11eda249ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:28Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:28Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_74679b3e646e11ed8756ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_70b5d861f03d442283ccb3343b3a5247\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_74679b3e646e11ed8756ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:28Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:28Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_4131283c78c7414989fdce7c734a6397\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_74655261646e11edab31ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_70b5d861f03d442283ccb3343b3a5247\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:28Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bb86f2c724ab47d4aa754d334173366e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_70b5d861f03d442283ccb3343b3a5247\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:28Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_630186ec9ca546169fa8515cae2c825d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:28Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_70b5d861f03d442283ccb3343b3a5247\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:28Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_afb252d08581453eb68af115a88af16a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:28Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_70b5d861f03d442283ccb3343b3a5247\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:28Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1c0b2324c5754192877f095a3b80e04c\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_74655261646e11edab31ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92356307d246e68a06fe00093584" + "3a8b2e0e6372c5bbe0da50970019d909" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.648480" + "0.688808" ], "etag": [ - "W/\"a3ea2f8789cb67d689123f1ffb4e25d4\"" + "W/\"13f9e71008a0728036d6d865288054a0\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_ccbe5b35812b4a818539e2b153160f2c" + "/api/v2/shipments/shp_70b5d861f03d442283ccb3343b3a5247" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 783 + "duration": 913 }, { - "recordedAt": 1661456967, + "recordedAt": 1668466109, "request": { "body": "", "method": "GET", @@ -108,23 +108,23 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_ccbe5b35812b4a818539e2b153160f2c/smartrate" + "uri": "https://api.easypost.com/v2/shipments/shp_70b5d861f03d442283ccb3343b3a5247/smartrate" }, "response": { - "body": "{\n \"result\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 7.9,\n \"created_at\": \"2022-08-25T19:49:27Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ccbe5b35812b4a818539e2b153160f2c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.45,\n \"updated_at\": \"2022-08-25T19:49:27Z\",\n \"rate\": 7.9,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 2.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 4.0\n },\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c91f438d1d1343c5b70c710c577292e8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 5.57,\n \"created_at\": \"2022-08-25T19:49:27Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ccbe5b35812b4a818539e2b153160f2c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 5.57,\n \"updated_at\": \"2022-08-25T19:49:27Z\",\n \"rate\": 5.57,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 5.0,\n \"percentile_99\": 8.0\n },\n \"service\": \"First\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9fa4fea1ff6d4d4b89ce109fef1b7b0d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 7.75,\n \"created_at\": \"2022-08-25T19:49:27Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ccbe5b35812b4a818539e2b153160f2c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 7.75,\n \"updated_at\": \"2022-08-25T19:49:27Z\",\n \"rate\": 7.75,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 4.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 5.0,\n \"percentile_99\": 9.0\n },\n \"service\": \"ParcelSelect\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7748b8758c8443f181d6d8b5a163e386\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 29.5,\n \"created_at\": \"2022-08-25T19:49:27Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_ccbe5b35812b4a818539e2b153160f2c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 33.55,\n \"updated_at\": \"2022-08-25T19:49:27Z\",\n \"rate\": 29.5,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 4.0\n },\n \"service\": \"Express\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f68066cf86284a8e9c3b55f4319312e3\",\n \"object\": \"Rate\"\n }\n ]\n}", + "body": "{\n \"result\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.15,\n \"created_at\": \"2022-11-14T22:48:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_70b5d861f03d442283ccb3343b3a5247\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.75,\n \"updated_at\": \"2022-11-14T22:48:28Z\",\n \"rate\": 8.15,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 6.0\n },\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bb86f2c724ab47d4aa754d334173366e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 5.82,\n \"created_at\": \"2022-11-14T22:48:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_70b5d861f03d442283ccb3343b3a5247\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 5.82,\n \"updated_at\": \"2022-11-14T22:48:28Z\",\n \"rate\": 5.82,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 4.0,\n \"percentile_99\": 5.0\n },\n \"service\": \"First\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_630186ec9ca546169fa8515cae2c825d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 29.75,\n \"created_at\": \"2022-11-14T22:48:28Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_70b5d861f03d442283ccb3343b3a5247\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 33.85,\n \"updated_at\": \"2022-11-14T22:48:28Z\",\n \"rate\": 29.75,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 5.0\n },\n \"service\": \"Express\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_afb252d08581453eb68af115a88af16a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.0,\n \"created_at\": \"2022-11-14T22:48:28Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_70b5d861f03d442283ccb3343b3a5247\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 8.0,\n \"updated_at\": \"2022-11-14T22:48:28Z\",\n \"rate\": 8.0,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 6.0,\n \"percentile_99\": 8.0\n },\n \"service\": \"ParcelSelect\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1c0b2324c5754192877f095a3b80e04c\",\n \"object\": \"Rate\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "2617" + "2618" ], "expires": [ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92366307d247f7f0ce7b000935d3" + "3a8b2e096372c5bce0da50b80019d95f" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.096102" + "0.107746" ], "etag": [ - "W/\"a8aabb27576b28b3734a717bebf36ef1\"" + "W/\"8108ca202a859e62d11e147e41afd006\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +181,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_ccbe5b35812b4a818539e2b153160f2c/smartrate" + "uri": "https://api.easypost.com/v2/shipments/shp_70b5d861f03d442283ccb3343b3a5247/smartrate" }, - "duration": 235 + "duration": 338 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/one_call_buy_shipment_with_carbon_offset.json b/src/test/cassettes/shipment/one_call_buy_shipment_with_carbon_offset.json index 492e17eea..8beb57b98 100644 --- a/src/test/cassettes/shipment/one_call_buy_shipment_with_carbon_offset.json +++ b/src/test/cassettes/shipment/one_call_buy_shipment_with_carbon_offset.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456953, + "recordedAt": 1668466086, "request": { "body": "{\n \"carbon_offset\": true,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.11000\",\n \"refunded\": false,\n \"type\": \"CarbonOffsetFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:11Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:12Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:12Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:12Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_02bfd56b3da147a0a558e814d5d224b4\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:49:12Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"tracking_code\": \"9400100109361135004629\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzI4OGM1YjM0MWMxMzQzYjVhZTkzMWQ4ODZiZmRiMmMx\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:49:12Z\",\n \"signed_by\": null,\n \"id\": \"trk_288c5b341c1343b5ae931d886bfdb2c1\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fdad873c24ae11ed8b40ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_fdad873c24ae11ed8b40ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:49:12Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/82624815a4d644a782cf12e5923ac15f.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:49:12Z\",\n \"id\": \"pl_b5dbc89e3b6148978c5a6a1ec99f065c\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:49:12Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:11Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:11Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_fce9465e9cfa4aebba2b12b256dbd8a4\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:11+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fdab0d8b24ae11ed9f20ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:11Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:11Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_47611e330d9b40a7af9dcf01c9a5edd5\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:11Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:11Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_02bfd56b3da147a0a558e814d5d224b4\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:11Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:11Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_75e987fb04fa4a549f5816909ab4841c\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:11Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_db36184f4a994a6ba268014ecb4f59af\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:11Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8e34e965c70448b2833c56322a710592\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:49:11+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:49:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_fdab0d8b24ae11ed9f20ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004629\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.11000\",\n \"refunded\": false,\n \"type\": \"CarbonOffsetFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:05Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:06Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:06Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:06Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f9c2388fe00a43069d5b2e5e4b7b7aea\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:48:06Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"tracking_code\": \"9400100106068149680568\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzcwMmMzODEyZDRiYzQ2NTA4N2Y1ZGZhNjE5MDdkNGVj\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:06Z\",\n \"signed_by\": null,\n \"id\": \"trk_702c3812d4bc465087f5dfa61907d4ec\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:05+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_66d2736b646e11eda563ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:05+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_66d2736b646e11eda563ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:06Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/0e3e980478e0406fb363a1d00df3f6d6.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:06Z\",\n \"id\": \"pl_4542e79a993840f39394b48a78fad78c\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:06Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:05Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:05Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c471733cfba1437ea44ba6a5bd6e44f3\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:05+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_66d09934646e11eda562ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:05Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:05Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_528e9428a04d4cb3bb6108f96829591f\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:05Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:05Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e89105103ec74b9da48dc33b4157d788\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:05Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:05Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3b8cff5dc9774de1b52cdf676a916c78\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:05Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5c3681193d1f452ebcdf198ba4410f90\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:05Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f9c2388fe00a43069d5b2e5e4b7b7aea\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:05+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_66d09934646e11eda562ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680568\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92346307d237f7a6c62f0009300c" + "3a8b2e0b6372c5a5e0d9eb450019ce4f" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.364795" + "1.570172" ], "etag": [ - "W/\"a1e6dbc0e957ba94f29868614d5c4deb\"" + "W/\"ba92cbefff489b602f88bb3e26292dc3\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_db36184f4a994a6ba268014ecb4f59af" + "/api/v2/shipments/shp_5c3681193d1f452ebcdf198ba4410f90" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1498 + "duration": 1869 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/refund.json b/src/test/cassettes/shipment/refund.json index 69bdde053..98469eae8 100644 --- a/src/test/cassettes/shipment/refund.json +++ b/src/test/cassettes/shipment/refund.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1667938047, + "recordedAt": 1668466117, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-08T20:07:27Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e6ae2601a7d64b0693ca2d3255485c8a\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-08T20:07:27Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"tracking_code\": \"9400100106068148390079\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzRiZDlmMTBiYTcyZTQzY2ZiOWMzMjE1YThmNjlkODAz\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-08T20:07:27Z\",\n \"signed_by\": null,\n \"id\": \"trk_4bd9f10ba72e43cfb9c3215a8f69d803\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f7232bea5fa011ed8706ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f7232bea5fa011ed8706ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221108/2d4781f5b1cc45889b7b0eb749fcfb5b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-08T20:07:27Z\",\n \"id\": \"pl_82d4a61fb8ed4525b4a19b7d82a968b5\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-08T20:07:26Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_d7179288b1094ab7b38aa141d6e03731\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f72182155fa011ed96c5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_08f67cb78dcb440dadf3b56f4cec19f6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_45cdfaf7fa1342378428b334228f8cd7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_25a46539c69643faa0f7d58fd27174fc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e6ae2601a7d64b0693ca2d3255485c8a\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f72182155fa011ed96c5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068148390079\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:36Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e3b26fc55639411a9b28aa32e646901c\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:48:37Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"tracking_code\": \"9400100106068149680780\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2M3Y2ZkYTAwNGQ0YzQxZjBhZDA5NzFjZjU3N2Y4Mzg0\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"signed_by\": null,\n \"id\": \"trk_c7cfda004d4c41f0ad0971cf577f8384\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:36+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_79b85962646e11edacfeac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:36+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_79b85962646e11edacfeac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:37Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/9e09e5d136974af28e2521526418f3aa.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"id\": \"pl_37a2cd8294fa42a88743a821a0e434fb\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:37Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:36Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:36Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_2703a8089a274592a2630cdd3043103d\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:36+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_79b5eaa7646e11ed83b6ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:37Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_88f1c907fe67463a80ea2c010b1d2ecf\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:37Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0ce5abc3cff840afb90bc0de05a9ec3a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e3b26fc55639411a9b28aa32e646901c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:37Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_0522fa6c343e4857b5d74946ab2ce1fc\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:36+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_79b5eaa7646e11ed83b6ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680780\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,30 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "11514b15636ab6feeca0a0e6000a0a82" + "3a8b2e0f6372c5c4e0da50fa0019dc5e" ], "x-proxied": [ "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", - "intlb2nuq 29913d444b" + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.047028" + "1.118023" ], "etag": [ - "W/\"3de3b7d0f21206d21d54d0768d22dfa6\"" + "W/\"bbe73c5fb6fa723e81d69ba441d3b7d2\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_2c48e2fe4b5d4fcaa44ddb4470102e9c" + "/api/v2/shipments/shp_afd926f7a9494b1b8f02c8446706885e" ], "x-version-label": [ - "easypost-202211081855-6fd945aaa8-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,10 +93,10 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1552 + "duration": 1385 }, { - "recordedAt": 1667938047, + "recordedAt": 1668466118, "request": { "body": "", "method": "POST", @@ -108,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_2c48e2fe4b5d4fcaa44ddb4470102e9c/refund" + "uri": "https://api.easypost.com/v2/shipments/shp_afd926f7a9494b1b8f02c8446706885e/refund" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-08T20:07:27Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e6ae2601a7d64b0693ca2d3255485c8a\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-08T20:07:27Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-08T20:07:27Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-09T08:44:27Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"tracking_code\": \"9400100106068148390079\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzRiZDlmMTBiYTcyZTQzY2ZiOWMzMjE1YThmNjlkODAz\",\n \"est_delivery_date\": \"2022-11-08T20:07:27Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-08T20:07:27Z\",\n \"signed_by\": null,\n \"id\": \"trk_4bd9f10ba72e43cfb9c3215a8f69d803\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f7232bea5fa011ed8706ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f7232bea5fa011ed8706ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221108/2d4781f5b1cc45889b7b0eb749fcfb5b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-08T20:07:27Z\",\n \"id\": \"pl_82d4a61fb8ed4525b4a19b7d82a968b5\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-08T20:07:26Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_d7179288b1094ab7b38aa141d6e03731\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": \"submitted\",\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f72182155fa011ed96c5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_08f67cb78dcb440dadf3b56f4cec19f6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_45cdfaf7fa1342378428b334228f8cd7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_25a46539c69643faa0f7d58fd27174fc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-08T20:07:26Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2c48e2fe4b5d4fcaa44ddb4470102e9c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-08T20:07:26Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e6ae2601a7d64b0693ca2d3255485c8a\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-08T20:07:26+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-08T20:07:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f72182155fa011ed96c5ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068148390079\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:36Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:38Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e3b26fc55639411a9b28aa32e646901c\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:48:38Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:48:38Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:25:38Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"tracking_code\": \"9400100106068149680780\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2M3Y2ZkYTAwNGQ0YzQxZjBhZDA5NzFjZjU3N2Y4Mzg0\",\n \"est_delivery_date\": \"2022-11-14T22:48:38Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:38Z\",\n \"signed_by\": null,\n \"id\": \"trk_c7cfda004d4c41f0ad0971cf577f8384\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:36+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_79b85962646e11edacfeac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:36+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_79b85962646e11edacfeac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:37Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/9e09e5d136974af28e2521526418f3aa.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"id\": \"pl_37a2cd8294fa42a88743a821a0e434fb\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:37Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:36Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:36Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_2703a8089a274592a2630cdd3043103d\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": \"submitted\",\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:36+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_79b5eaa7646e11ed83b6ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:37Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_88f1c907fe67463a80ea2c010b1d2ecf\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:37Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0ce5abc3cff840afb90bc0de05a9ec3a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e3b26fc55639411a9b28aa32e646901c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:37Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_afd926f7a9494b1b8f02c8446706885e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:37Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_0522fa6c343e4857b5d74946ab2ce1fc\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:36+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_79b5eaa7646e11ed83b6ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680780\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,7 +124,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -144,6 +144,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -151,26 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "cd054f39636ab6ffec7b56bc000a61c8" + "3a8b2e0f6372c5c6e0da50fc0019dd19" ], "x-proxied": [ - "extlb2nuq 29913d444b", + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.169179" + "0.174567" ], "etag": [ - "W/\"8d1ad433097b39f0199ab6f9acc67ce7\"" + "W/\"4e37deab58ddf478a9d26087e4b3213a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202211081855-6fd945aaa8-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,8 +184,8 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/shipments/shp_2c48e2fe4b5d4fcaa44ddb4470102e9c/refund" + "uri": "https://api.easypost.com/v2/shipments/shp_afd926f7a9494b1b8f02c8446706885e/refund" }, - "duration": 352 + "duration": 395 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/regenerate_rates.json b/src/test/cassettes/shipment/regenerate_rates.json index 5ff3f2241..b969064a1 100644 --- a/src/test/cassettes/shipment/regenerate_rates.json +++ b/src/test/cassettes/shipment/regenerate_rates.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456981, + "recordedAt": 1668466123, "request": { - "body": "{\n \"shipment\": {\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n },\n \"reference\": \"123\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"options\": {\n \"label_format\": \"PNG\",\n \"invoice_number\": \"123\"\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n },\n \"reference\": \"123\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"options\": {\n \"label_format\": \"PNG\",\n \"invoice_number\": \"123\"\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:40Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:41Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:40+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0ea507e924af11edac46ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_84be9d3907844c25b47a9590b85d651c\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:40+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0ea507e924af11edac46ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-08-25T19:49:40Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-08-25T19:49:40Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:40Z\",\n \"currency\": null,\n \"id\": \"cstitem_be958f646b5b485c9c794e1bf32bf935\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-08-25T19:49:40Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_552e490d383f4500b105149c80325498\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:40Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:40Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_25e53a893d984e3590c6a80f06eac099\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:40+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0ea3087a24af11ed93b8ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:40Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84be9d3907844c25b47a9590b85d651c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:40Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_0fb2c4199a424c378b1fbfc7938d6a99\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:40Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84be9d3907844c25b47a9590b85d651c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:40Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_65717f6072804795b2a52501fa2a3747\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84be9d3907844c25b47a9590b85d651c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:40Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_08e3258478694630bd6af5eab693ceb2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84be9d3907844c25b47a9590b85d651c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:41Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a9bf2ba5e17f48bb88ad4b87e168d4c7\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:40+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0ea3087a24af11ed93b8ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:42Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:43Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7cd15cb2646e11edae0aac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6f12a37586e4400a83d5dd0e780d8049\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7cd15cb2646e11edae0aac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-11-14T22:48:42Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-11-14T22:48:42Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:42Z\",\n \"currency\": null,\n \"id\": \"cstitem_ddb81906d5204d9099ce29579ae56171\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-11-14T22:48:42Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_952e4434da5a48b3a37d218e05ff7fd5\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:42Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:42Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_5ad58f18498f413d801ce1d02a262b65\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7ccf2b14646e11edae09ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:42Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6f12a37586e4400a83d5dd0e780d8049\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:42Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c8c62d71fff840429a423e142faffda2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:42Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6f12a37586e4400a83d5dd0e780d8049\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:42Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a348a5f5779c4d10b703db1aa41989f2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:42Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6f12a37586e4400a83d5dd0e780d8049\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:42Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_db764837c03e4507b70cfd46025f5243\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:43Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6f12a37586e4400a83d5dd0e780d8049\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:43Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_31f6232a8a594c9fbadcf7f261e3eab4\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:42+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7ccf2b14646e11edae09ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92306307d254f7eea07900093a64" + "3a8b2e0a6372c5cae0da511a0019decf" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.871945" + "0.899860" ], "etag": [ - "W/\"4e69c4d9e4ccb57d8980706bfd3f327d\"" + "W/\"fe9445412b2105c89bb62dd747481d59\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_84be9d3907844c25b47a9590b85d651c" + "/api/v2/shipments/shp_6f12a37586e4400a83d5dd0e780d8049" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1003 + "duration": 1139 }, { - "recordedAt": 1661456982, + "recordedAt": 1668466124, "request": { "body": "{\n \"carbon_offset\": false\n}", "method": "POST", @@ -111,10 +111,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_84be9d3907844c25b47a9590b85d651c/rerate" + "uri": "https://api.easypost.com/v2/shipments/shp_6f12a37586e4400a83d5dd0e780d8049/rerate" }, "response": { - "body": "{\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:42Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84be9d3907844c25b47a9590b85d651c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:42Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_5060a57374374c80b7f6908e31148391\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:42Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84be9d3907844c25b47a9590b85d651c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:42Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_501748f697f945be890b8fdfded34bfa\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:42Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84be9d3907844c25b47a9590b85d651c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:42Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_663699bc63474149a7fe2bbe75cd43e9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:42Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84be9d3907844c25b47a9590b85d651c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:42Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_69d039cee0ed4da6b633def20b76e3ef\",\n \"object\": \"Rate\"\n }\n ]\n}", + "body": "{\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:44Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6f12a37586e4400a83d5dd0e780d8049\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:44Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bf42939c8ede49918117783a8a771e09\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:44Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6f12a37586e4400a83d5dd0e780d8049\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:44Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cca27e3468bf47b3a5a895f20d1bd7cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6f12a37586e4400a83d5dd0e780d8049\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:44Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_470a8ffd2ae843ae895c77165125f388\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:44Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6f12a37586e4400a83d5dd0e780d8049\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:44Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_9eff832852a646f1b822c8f0aa3f6ed3\",\n \"object\": \"Rate\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +127,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,26 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92306307d255f7cc101400093ae7" + "3a8b2e0d6372c5cbe0da511c0019df38" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.730580" + "1.021622" ], "etag": [ - "W/\"88a1f5ac5e30eff4d2714adccc0492d3\"" + "W/\"a8cc50adccbfb5a17d5ac832a37153bd\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,9 +184,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_84be9d3907844c25b47a9590b85d651c/rerate" + "uri": "https://api.easypost.com/v2/shipments/shp_6f12a37586e4400a83d5dd0e780d8049/rerate" }, - "duration": 866 + "duration": 1325 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/regenerate_rates_with_carbon_offset.json b/src/test/cassettes/shipment/regenerate_rates_with_carbon_offset.json index 15bfff711..8ec1f1c57 100644 --- a/src/test/cassettes/shipment/regenerate_rates_with_carbon_offset.json +++ b/src/test/cassettes/shipment/regenerate_rates_with_carbon_offset.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456922, + "recordedAt": 1668466099, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.57000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:48:41Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:48:41Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:48:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:41Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_95ecb50906744975874582e042aef558\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-08-25T19:48:42Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"tracking_code\": \"9400100109361135004551\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzY2MTdiMzgxNjZkZTRjMWQ5YTlmMjNjNDEyN2VlNjhi\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:48:42Z\",\n \"signed_by\": null,\n \"id\": \"trk_6617b38166de4c1d9a9f23c4127ee68b\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:48:41+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:48:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_eb72d72f24ae11ed89cdac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:48:41+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:48:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_eb72d72f24ae11ed89cdac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-08-25T19:48:41Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20220825/33deb1268b1e41cca84a100bb1c6a307.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-08-25T19:48:41Z\",\n \"id\": \"pl_bb071df987c04a6f94833f92a48f47c4\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-08-25T19:48:41Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:48:41Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:48:41Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_b7a19166938f4fb095f897a3ee4e4a5d\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:48:41+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:48:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_eb71448324ae11ed89c7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:48:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:41Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6addf1c0572840e096b2f39e0bb27a24\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:48:41Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:41Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_265d3f764bb3479fa896782517936e7e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:48:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:41Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_95ecb50906744975874582e042aef558\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:48:41Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:41Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_78a9b2df4b9a40ad907195f459e94b90\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-08-25T19:48:41+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-08-25T19:48:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_eb71448324ae11ed89c7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100109361135004551\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:18Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:19Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:18Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8dd1ea8d658c4ebfb003967fa93c88ec\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:18Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_464ac3f138ab4ce9b49a183c947756c6\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:48:19Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_8dd1ea8d658c4ebfb003967fa93c88ec\",\n \"tracking_code\": \"9400100106068149680667\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzY5OTQ3MTg2ZjZmMDRlNWVhODczMWZiMTA2YmFmYWQ5\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:19Z\",\n \"signed_by\": null,\n \"id\": \"trk_69947186f6f04e5ea8731fb106bafad9\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:18+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6eab29b0646e11edbf69ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_8dd1ea8d658c4ebfb003967fa93c88ec\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:18+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6eab29b0646e11edbf69ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:18Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/29f1db44ec244891b39a5b03e3538b59.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:19Z\",\n \"id\": \"pl_042cdca5323c4a02839fb593f57d6f62\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:18Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:18Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:18Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_cfb6b9d2b44e44108105f2dbc11fec18\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:18+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6ea899b5646e11edbe86ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:18Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8dd1ea8d658c4ebfb003967fa93c88ec\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:18Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_73379cd90c3442df91471ebce7cec846\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:18Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8dd1ea8d658c4ebfb003967fa93c88ec\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:18Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7acbe0e9cf0b4ecb916a1da874991a97\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:18Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8dd1ea8d658c4ebfb003967fa93c88ec\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:18Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_464ac3f138ab4ce9b49a183c947756c6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:18Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8dd1ea8d658c4ebfb003967fa93c88ec\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:18Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_bbe05376dd30441d9a0edb64d5ca108c\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:18+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6ea899b5646e11edbe86ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680667\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d219f7deb1bc0009444a" + "3a8b2e0e6372c5b2e0d9eb880019d4dd" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.022700" + "0.986788" ], "etag": [ - "W/\"838945685a573aa92a8700d5966ce0c1\"" + "W/\"010c311a4d43f19ab477804e9228224b\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_bc50933c1c7b49a9b17c1f2d099f43b1" + "/api/v2/shipments/shp_8dd1ea8d658c4ebfb003967fa93c88ec" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1180 + "duration": 1225 }, { - "recordedAt": 1661456923, + "recordedAt": 1668466100, "request": { "body": "{\n \"carbon_offset\": true\n}", "method": "POST", @@ -111,10 +111,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_bc50933c1c7b49a9b17c1f2d099f43b1/rerate" + "uri": "https://api.easypost.com/v2/shipments/shp_8dd1ea8d658c4ebfb003967fa93c88ec/rerate" }, "response": { - "body": "{\n \"rates\": [\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:48:42Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:42Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c400543df8344de78ee52e66ce6bd5e5\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:48:42Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:42Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_67c9d68bd99846879eaa7df9c74089a5\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:48:42Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:42Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1e75604f94b042eeae622a4222ef8802\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:48:42Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bc50933c1c7b49a9b17c1f2d099f43b1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:48:42Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3c619340429945bdbc507075cab3011d\",\n \"object\": \"Rate\"\n }\n ]\n}", + "body": "{\n \"rates\": [\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:19Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8dd1ea8d658c4ebfb003967fa93c88ec\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:19Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b447b6943b0048dbaced06d2dd89598a\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:19Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8dd1ea8d658c4ebfb003967fa93c88ec\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:19Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b54852e1147a4da68ad080176857dbdb\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:19Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8dd1ea8d658c4ebfb003967fa93c88ec\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:19Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b8f71ea442934afbb070a93076e4e5e5\",\n \"object\": \"Rate\"\n },\n {\n \"carbon_offset\": {\n \"price\": \"0.11\",\n \"currency\": \"USD\",\n \"grams\": 36.0,\n \"object\": \"CarbonOffset\"\n },\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:19Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8dd1ea8d658c4ebfb003967fa93c88ec\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:19Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0feaf0b7312b4cd6866f138115cdcf59\",\n \"object\": \"Rate\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +127,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,27 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "4cb7bec66307d21ae68983a50007bb4d" + "3a8b2e0c6372c5b3e0d9eb8b0019d56a" ], "x-proxied": [ - "extlb4wdc 9ce216bfac", - "intlb2wdc 6aa9972c1e", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.464719" + "0.374485" ], "etag": [ - "W/\"aebcc200c904a36a4eff28a17d97406b\"" + "W/\"7136812053d6dff937bbd8322666d8f2\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -184,9 +184,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_bc50933c1c7b49a9b17c1f2d099f43b1/rerate" + "uri": "https://api.easypost.com/v2/shipments/shp_8dd1ea8d658c4ebfb003967fa93c88ec/rerate" }, - "duration": 770 + "duration": 621 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/retrieve.json b/src/test/cassettes/shipment/retrieve.json index b666cc55c..34875fdfc 100644 --- a/src/test/cassettes/shipment/retrieve.json +++ b/src/test/cassettes/shipment/retrieve.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456968, + "recordedAt": 1668466110, "request": { - "body": "{\n \"shipment\": {\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n },\n \"reference\": \"123\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"options\": {\n \"label_format\": \"PNG\",\n \"invoice_number\": \"123\"\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"hs_tariff_number\": \"654321\",\n \"value\": 23.25,\n \"origin_country\": \"US\"\n }\n ],\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"contents_type\": \"merchandise\"\n },\n \"reference\": \"123\",\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"options\": {\n \"label_format\": \"PNG\",\n \"invoice_number\": \"123\"\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0779dc4724af11ed8f36ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_697966dec9124f97b112b46b0e8fc303\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0779dc4724af11ed8f36ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"currency\": null,\n \"id\": \"cstitem_b4e86ecda2f34fd0a48236a15f716b42\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_177282a683ce431f859bd0f64eb1e32a\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_2eadd863e05a47c38c272319c24e3d18\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0776d1da24af11edb31aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_697966dec9124f97b112b46b0e8fc303\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_475b9eed286b44d99c2e75635748dc7f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_697966dec9124f97b112b46b0e8fc303\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3e22ef77126748528636af1e6fcbc477\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_697966dec9124f97b112b46b0e8fc303\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e2c855339bd24e2bbe17920cd3edb42f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_697966dec9124f97b112b46b0e8fc303\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_01e024ed74e34ad4827cda3f2266f7c7\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0776d1da24af11edb31aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:29Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:30Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_753e9df9646e11ed8131ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_60dbb09d68394f97a19fde19378a3cef\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_753e9df9646e11ed8131ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-11-14T22:48:29Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-11-14T22:48:29Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:29Z\",\n \"currency\": null,\n \"id\": \"cstitem_b8439281a1f046aba880ddd87aa21a3c\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-11-14T22:48:29Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_d6f014fd456c40c8842c761e1f2e5be0\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:29Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:29Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_545680e1aeb14116bf08fc8184862f51\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_753c04e5646e11ed812eac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:30Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_60dbb09d68394f97a19fde19378a3cef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:30Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4c911727ffd346a593c0b43793bd777d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:30Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_60dbb09d68394f97a19fde19378a3cef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:30Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_d8b8217083664302a8583a4957f83796\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:30Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_60dbb09d68394f97a19fde19378a3cef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:30Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_36f9032c124a474b9f37dbc63dd3898a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_60dbb09d68394f97a19fde19378a3cef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:30Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1b7ed00d96d04dd5b2cf3c22c9f273db\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_753c04e5646e11ed812eac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92326307d248f8001c56000935eb" + "3a8b2e086372c5bde0da50ba0019d989" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.747345" + "0.672719" ], "etag": [ - "W/\"f0d64e50e63b748bcac4b513dfd982e1\"" + "W/\"77be8d8953adf38b15fd1888dc6ddd9e\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_697966dec9124f97b112b46b0e8fc303" + "/api/v2/shipments/shp_60dbb09d68394f97a19fde19378a3cef" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 885 + "duration": 955 }, { - "recordedAt": 1661456969, + "recordedAt": 1668466110, "request": { "body": "", "method": "GET", @@ -108,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_697966dec9124f97b112b46b0e8fc303" + "uri": "https://api.easypost.com/v2/shipments/shp_60dbb09d68394f97a19fde19378a3cef" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0779dc4724af11ed8f36ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_697966dec9124f97b112b46b0e8fc303\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0779dc4724af11ed8f36ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"currency\": null,\n \"id\": \"cstitem_b4e86ecda2f34fd0a48236a15f716b42\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_177282a683ce431f859bd0f64eb1e32a\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_2eadd863e05a47c38c272319c24e3d18\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0776d1da24af11edb31aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_697966dec9124f97b112b46b0e8fc303\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_475b9eed286b44d99c2e75635748dc7f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_697966dec9124f97b112b46b0e8fc303\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3e22ef77126748528636af1e6fcbc477\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_697966dec9124f97b112b46b0e8fc303\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e2c855339bd24e2bbe17920cd3edb42f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_697966dec9124f97b112b46b0e8fc303\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:28Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_01e024ed74e34ad4827cda3f2266f7c7\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0776d1da24af11edb31aac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:29Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:30Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"label_format\": \"PNG\",\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n },\n \"invoice_number\": \"123\"\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_753e9df9646e11ed8131ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_60dbb09d68394f97a19fde19378a3cef\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_753e9df9646e11ed8131ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": {\n \"restriction_type\": \"none\",\n \"created_at\": \"2022-11-14T22:48:29Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2022-11-14T22:48:29Z\",\n \"description\": \"Sweet shirts\",\n \"weight\": 11.0,\n \"printed_commodity_identifier\": null,\n \"origin_country\": \"US\",\n \"manufacturer\": null,\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:29Z\",\n \"currency\": null,\n \"id\": \"cstitem_b8439281a1f046aba880ddd87aa21a3c\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2022-11-14T22:48:29Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_d6f014fd456c40c8842c761e1f2e5be0\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n },\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:29Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:29Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_545680e1aeb14116bf08fc8184862f51\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_753c04e5646e11ed812eac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:30Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_60dbb09d68394f97a19fde19378a3cef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:30Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4c911727ffd346a593c0b43793bd777d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:30Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_60dbb09d68394f97a19fde19378a3cef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:30Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_d8b8217083664302a8583a4957f83796\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:30Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_60dbb09d68394f97a19fde19378a3cef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:30Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_36f9032c124a474b9f37dbc63dd3898a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_60dbb09d68394f97a19fde19378a3cef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:30Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1b7ed00d96d04dd5b2cf3c22c9f273db\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_753c04e5646e11ed812eac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,7 +124,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92316307d249f7cc193b00093633" + "3a8b2e086372c5bee0da50bb0019d9ec" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.066331" + "0.135843" ], "etag": [ - "W/\"f0d64e50e63b748bcac4b513dfd982e1\"" + "W/\"77be8d8953adf38b15fd1888dc6ddd9e\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +181,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_697966dec9124f97b112b46b0e8fc303" + "uri": "https://api.easypost.com/v2/shipments/shp_60dbb09d68394f97a19fde19378a3cef" }, - "duration": 200 + "duration": 486 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/smart_rate.json b/src/test/cassettes/shipment/smart_rate.json index 162f2f305..4a10a6e7e 100644 --- a/src/test/cassettes/shipment/smart_rate.json +++ b/src/test/cassettes/shipment/smart_rate.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456963, + "recordedAt": 1668466104, "request": { - "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:49:22Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:49:23Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0460910424af11edb20fac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_29396c48f45f433b9f0e0c1b4f8e84f7\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:49:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0460910424af11edb20fac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:49:22Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-08-25T19:49:22Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_8c04d53aaa9e4723a24b53aad9c33936\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045eb84f24af11ed8e39ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2022-08-25T19:49:23Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29396c48f45f433b9f0e0c1b4f8e84f7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"7.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:23Z\",\n \"rate\": \"7.75\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8055c0ebcafc4f0db47ca89f74d90e6a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.57\",\n \"created_at\": \"2022-08-25T19:49:23Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29396c48f45f433b9f0e0c1b4f8e84f7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.57\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:23Z\",\n \"rate\": \"5.57\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d1155dc878a144fba26eb94ae8ac57b7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.90\",\n \"created_at\": \"2022-08-25T19:49:23Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29396c48f45f433b9f0e0c1b4f8e84f7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:23Z\",\n \"rate\": \"7.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b7a0dcbc50be4d1f94546f324f4d368a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.50\",\n \"created_at\": \"2022-08-25T19:49:23Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29396c48f45f433b9f0e0c1b4f8e84f7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.55\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:49:23Z\",\n \"rate\": \"29.50\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f26de18d67aa45c5932ea7219a0fe912\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-08-25T19:49:22+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:49:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_045eb84f24af11ed8e39ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:23Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:24Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:23+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:23+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_71941224646e11ed809bac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_2fa71872669c446991ebd66765842cc1\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:23+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:23+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_71941224646e11ed809bac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:23Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:23Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_1fa4c145649a4409845b2ca4f2911f69\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:23+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:23+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7191c30a646e11ed8698ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:24Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2fa71872669c446991ebd66765842cc1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:24Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c0a40456d87d403885587fe0a16b57da\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:24Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2fa71872669c446991ebd66765842cc1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:24Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d07bba599b20426bb22ac5471eef9447\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:24Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2fa71872669c446991ebd66765842cc1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:24Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62b2fe9ca9e64c4a8b66a5e5d98ced96\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:24Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2fa71872669c446991ebd66765842cc1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:24Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_360518154d3e43e4afffd7eb07d10331\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:23+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:23+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7191c30a646e11ed8698ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a92306307d242f7a64b1300093423" + "3a8b2e0c6372c5b7e0da50790019d704" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.777745" + "0.825735" ], "etag": [ - "W/\"f30cbb381e39ddaa3962cb6248a08ecb\"" + "W/\"268210d9fc5f91516a7ccfee65c05288\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_29396c48f45f433b9f0e0c1b4f8e84f7" + "/api/v2/shipments/shp_2fa71872669c446991ebd66765842cc1" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 914 + "duration": 1160 }, { - "recordedAt": 1661456963, + "recordedAt": 1668466104, "request": { "body": "", "method": "GET", @@ -108,23 +108,23 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_29396c48f45f433b9f0e0c1b4f8e84f7/smartrate" + "uri": "https://api.easypost.com/v2/shipments/shp_2fa71872669c446991ebd66765842cc1/smartrate" }, "response": { - "body": "{\n \"result\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 7.75,\n \"created_at\": \"2022-08-25T19:49:23Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29396c48f45f433b9f0e0c1b4f8e84f7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 7.75,\n \"updated_at\": \"2022-08-25T19:49:23Z\",\n \"rate\": 7.75,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 4.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 5.0,\n \"percentile_99\": 9.0\n },\n \"service\": \"ParcelSelect\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8055c0ebcafc4f0db47ca89f74d90e6a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 5.57,\n \"created_at\": \"2022-08-25T19:49:23Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29396c48f45f433b9f0e0c1b4f8e84f7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 5.57,\n \"updated_at\": \"2022-08-25T19:49:23Z\",\n \"rate\": 5.57,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 5.0,\n \"percentile_99\": 8.0\n },\n \"service\": \"First\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d1155dc878a144fba26eb94ae8ac57b7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 7.9,\n \"created_at\": \"2022-08-25T19:49:23Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29396c48f45f433b9f0e0c1b4f8e84f7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.45,\n \"updated_at\": \"2022-08-25T19:49:23Z\",\n \"rate\": 7.9,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 2.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 4.0\n },\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b7a0dcbc50be4d1f94546f324f4d368a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 29.5,\n \"created_at\": \"2022-08-25T19:49:23Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_29396c48f45f433b9f0e0c1b4f8e84f7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 33.55,\n \"updated_at\": \"2022-08-25T19:49:23Z\",\n \"rate\": 29.5,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 4.0\n },\n \"service\": \"Express\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f26de18d67aa45c5932ea7219a0fe912\",\n \"object\": \"Rate\"\n }\n ]\n}", + "body": "{\n \"result\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.0,\n \"created_at\": \"2022-11-14T22:48:24Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2fa71872669c446991ebd66765842cc1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 8.0,\n \"updated_at\": \"2022-11-14T22:48:24Z\",\n \"rate\": 8.0,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 6.0,\n \"percentile_99\": 8.0\n },\n \"service\": \"ParcelSelect\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c0a40456d87d403885587fe0a16b57da\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.15,\n \"created_at\": \"2022-11-14T22:48:24Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2fa71872669c446991ebd66765842cc1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.75,\n \"updated_at\": \"2022-11-14T22:48:24Z\",\n \"rate\": 8.15,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 6.0\n },\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d07bba599b20426bb22ac5471eef9447\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 5.82,\n \"created_at\": \"2022-11-14T22:48:24Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2fa71872669c446991ebd66765842cc1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 5.82,\n \"updated_at\": \"2022-11-14T22:48:24Z\",\n \"rate\": 5.82,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 4.0,\n \"percentile_99\": 5.0\n },\n \"service\": \"First\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62b2fe9ca9e64c4a8b66a5e5d98ced96\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 29.75,\n \"created_at\": \"2022-11-14T22:48:24Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2fa71872669c446991ebd66765842cc1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 33.85,\n \"updated_at\": \"2022-11-14T22:48:24Z\",\n \"rate\": 29.75,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 5.0\n },\n \"service\": \"Express\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_360518154d3e43e4afffd7eb07d10331\",\n \"object\": \"Rate\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "2617" + "2618" ], "expires": [ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -144,6 +144,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -151,26 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "b57a922f6307d243f801347400093481" + "3a8b2e096372c5b8e0da507a0019d782" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.071810" + "0.071571" ], "etag": [ - "W/\"339b033631f0f06727225303c758547e\"" + "W/\"434891ee965c4ecd42c01d2da3a1593b\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +184,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_29396c48f45f433b9f0e0c1b4f8e84f7/smartrate" + "uri": "https://api.easypost.com/v2/shipments/shp_2fa71872669c446991ebd66765842cc1/smartrate" }, - "duration": 199 + "duration": 379 } ] \ No newline at end of file diff --git a/src/test/cassettes/thread/thread_order_creation.json b/src/test/cassettes/thread/thread_order_creation.json index 2e0015217..efd6da61e 100644 --- a/src/test/cassettes/thread/thread_order_creation.json +++ b/src/test/cassettes/thread/thread_order_creation.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456545, + "recordedAt": 1668466084, "request": { "body": "{\n \"order\": {\n \"to_address\": {\n \"zip\": \"64153\",\n \"city\": \"Kansas City\",\n \"phone\": \"REDACTED\",\n \"company\": \"Airport Shipping\",\n \"street1\": \"601 Brasilia Avenue\",\n \"state\": \"MO\"\n },\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.8,\n \"width\": 8.3,\n \"weight\": 10.0,\n \"height\": 6.0\n }\n }\n ],\n \"from_address\": {\n \"zip\": \"94107\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"EasyPost\",\n \"street1\": \"164 Townsend St\",\n \"street2\": \"Unit 1\",\n \"state\": \"CA\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/orders" }, "response": { - "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"64153\",\n \"country\": \"US\",\n \"city\": \"Kansas City\",\n \"created_at\": \"2022-08-25T19:42:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"Airport Shipping\",\n \"street1\": \"601 Brasilia Avenue\",\n \"id\": \"adr_0afdb78d24ae11ed86e3ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"MO\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.61\",\n \"created_at\": null,\n \"delivery_days\": 6.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2b4c34d734df439ca4c01103b664ca9e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.61\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.61\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 6.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d2472013628745d9bf09c262cbfd2741\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"9.16\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2b4c34d734df439ca4c01103b664ca9e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"9.16\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_44fdab8e22bf4986a653e972eda1dcf3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"4.83\",\n \"created_at\": null,\n \"delivery_days\": 4.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2b4c34d734df439ca4c01103b664ca9e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.15\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"4.83\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 4.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b34ab819a566447fbd68dc07fc018ddb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"39.30\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2b4c34d734df439ca4c01103b664ca9e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"45.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"39.30\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_44c1a94675d14d4db921198f442163a6\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-08-25T19:42:24Z\",\n \"to_address\": {\n \"zip\": \"64153\",\n \"country\": \"US\",\n \"city\": \"Kansas City\",\n \"created_at\": \"2022-08-25T19:42:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"Airport Shipping\",\n \"street1\": \"601 Brasilia Avenue\",\n \"id\": \"adr_0afdb78d24ae11ed86e3ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"MO\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-08-25T19:42:24Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 7.0,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:24Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"EasyPost\",\n \"company\": null,\n \"street1\": \"164 Townsend St\",\n \"id\": \"adr_0b0048bd24ae11ed98fcac1f6bc7b362\",\n \"street2\": \"Unit 1\",\n \"state\": \"CA\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"id\": \"shp_2b4c34d734df439ca4c01103b664ca9e\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"EasyPost\",\n \"company\": null,\n \"street1\": \"164 Townsend St\",\n \"id\": \"adr_0b0048bd24ae11ed98fcac1f6bc7b362\",\n \"street2\": \"Unit 1\",\n \"state\": \"CA\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-08-25T19:42:24Z\",\n \"predefined_package\": null,\n \"length\": 10.8,\n \"width\": 8.3,\n \"created_at\": \"2022-08-25T19:42:24Z\",\n \"weight\": 10.0,\n \"id\": \"prcl_07b5aa2261c7477c990f5f5b19c9c560\",\n \"object\": \"Parcel\",\n \"height\": 6.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"64153\",\n \"country\": \"US\",\n \"city\": \"Kansas City\",\n \"created_at\": \"2022-08-25T19:42:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"Airport Shipping\",\n \"street1\": \"601 Brasilia Avenue\",\n \"id\": \"adr_0afdb78d24ae11ed86e3ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"MO\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.61\",\n \"created_at\": \"2022-08-25T19:42:25Z\",\n \"delivery_days\": 6.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2b4c34d734df439ca4c01103b664ca9e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.61\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:25Z\",\n \"rate\": \"8.61\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 6.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d2472013628745d9bf09c262cbfd2741\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"9.16\",\n \"created_at\": \"2022-08-25T19:42:25Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2b4c34d734df439ca4c01103b664ca9e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:25Z\",\n \"rate\": \"9.16\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_44fdab8e22bf4986a653e972eda1dcf3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"4.83\",\n \"created_at\": \"2022-08-25T19:42:25Z\",\n \"delivery_days\": 4.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2b4c34d734df439ca4c01103b664ca9e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.15\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:25Z\",\n \"rate\": \"4.83\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 4.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b34ab819a566447fbd68dc07fc018ddb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"39.30\",\n \"created_at\": \"2022-08-25T19:42:25Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2b4c34d734df439ca4c01103b664ca9e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"45.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-08-25T19:42:25Z\",\n \"rate\": \"39.30\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_44c1a94675d14d4db921198f442163a6\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"64153\",\n \"country\": \"US\",\n \"city\": \"Kansas City\",\n \"created_at\": \"2022-08-25T19:42:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"Airport Shipping\",\n \"street1\": \"601 Brasilia Avenue\",\n \"id\": \"adr_0afdb78d24ae11ed86e3ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"MO\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_e57f4f08fecf4133875ac7deb0fb2b50\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:25Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"EasyPost\",\n \"company\": null,\n \"street1\": \"164 Townsend St\",\n \"id\": \"adr_0b0048bd24ae11ed98fcac1f6bc7b362\",\n \"street2\": \"Unit 1\",\n \"state\": \"CA\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_e57f4f08fecf4133875ac7deb0fb2b50\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-08-25T19:42:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-08-25T19:42:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"EasyPost\",\n \"company\": null,\n \"street1\": \"164 Townsend St\",\n \"id\": \"adr_0b0048bd24ae11ed98fcac1f6bc7b362\",\n \"street2\": \"Unit 1\",\n \"state\": \"CA\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"64153\",\n \"country\": \"US\",\n \"city\": \"Kansas City\",\n \"created_at\": \"2022-11-14T22:48:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"Airport Shipping\",\n \"street1\": \"601 Brasilia Avenue\",\n \"id\": \"adr_66100616646e11edbbc4ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"MO\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"40.10\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_928814c5fc384d3c84be8f32da018c9a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"46.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"40.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_1cd69290714b402c8fe5ab90b55a816c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"9.01\",\n \"created_at\": null,\n \"delivery_days\": 6.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_928814c5fc384d3c84be8f32da018c9a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.01\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"9.01\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 6.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d3c9064a333747d0b7f006b3c6aca3a4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"9.96\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_928814c5fc384d3c84be8f32da018c9a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"11.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"9.96\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_eae79d6e56c84523b3a5b7e135bdf4d6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.23\",\n \"created_at\": null,\n \"delivery_days\": 4.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_928814c5fc384d3c84be8f32da018c9a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.23\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 4.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5b48f8d06635447fb9dbaa552066256b\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-14T22:48:04Z\",\n \"to_address\": {\n \"zip\": \"64153\",\n \"country\": \"US\",\n \"city\": \"Kansas City\",\n \"created_at\": \"2022-11-14T22:48:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"Airport Shipping\",\n \"street1\": \"601 Brasilia Avenue\",\n \"id\": \"adr_66100616646e11edbbc4ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"MO\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:04Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 7.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:04Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"EasyPost\",\n \"company\": null,\n \"street1\": \"164 Townsend St\",\n \"id\": \"adr_661148b2646e11edbaeaac1f6bc72124\",\n \"street2\": \"Unit 1\",\n \"state\": \"CA\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"id\": \"shp_928814c5fc384d3c84be8f32da018c9a\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"EasyPost\",\n \"company\": null,\n \"street1\": \"164 Townsend St\",\n \"id\": \"adr_661148b2646e11edbaeaac1f6bc72124\",\n \"street2\": \"Unit 1\",\n \"state\": \"CA\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:04Z\",\n \"predefined_package\": null,\n \"length\": 10.8,\n \"width\": 8.3,\n \"created_at\": \"2022-11-14T22:48:04Z\",\n \"weight\": 10.0,\n \"id\": \"prcl_f6b9d83ddfd04e4789460496c1069b1c\",\n \"object\": \"Parcel\",\n \"height\": 6.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"64153\",\n \"country\": \"US\",\n \"city\": \"Kansas City\",\n \"created_at\": \"2022-11-14T22:48:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"Airport Shipping\",\n \"street1\": \"601 Brasilia Avenue\",\n \"id\": \"adr_66100616646e11edbbc4ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"MO\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"40.10\",\n \"created_at\": \"2022-11-14T22:48:04Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_928814c5fc384d3c84be8f32da018c9a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"46.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:04Z\",\n \"rate\": \"40.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_1cd69290714b402c8fe5ab90b55a816c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"9.01\",\n \"created_at\": \"2022-11-14T22:48:04Z\",\n \"delivery_days\": 6.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_928814c5fc384d3c84be8f32da018c9a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.01\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:04Z\",\n \"rate\": \"9.01\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 6.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d3c9064a333747d0b7f006b3c6aca3a4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"9.96\",\n \"created_at\": \"2022-11-14T22:48:04Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_928814c5fc384d3c84be8f32da018c9a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"11.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:04Z\",\n \"rate\": \"9.96\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_eae79d6e56c84523b3a5b7e135bdf4d6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.23\",\n \"created_at\": \"2022-11-14T22:48:04Z\",\n \"delivery_days\": 4.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_928814c5fc384d3c84be8f32da018c9a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:04Z\",\n \"rate\": \"5.23\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 4.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5b48f8d06635447fb9dbaa552066256b\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"64153\",\n \"country\": \"US\",\n \"city\": \"Kansas City\",\n \"created_at\": \"2022-11-14T22:48:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"Airport Shipping\",\n \"street1\": \"601 Brasilia Avenue\",\n \"id\": \"adr_66100616646e11edbbc4ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"MO\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_66a16e160c484f4f8238f68b4e23f256\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:04Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"EasyPost\",\n \"company\": null,\n \"street1\": \"164 Townsend St\",\n \"id\": \"adr_661148b2646e11edbaeaac1f6bc72124\",\n \"street2\": \"Unit 1\",\n \"state\": \"CA\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_66a16e160c484f4f8238f68b4e23f256\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:03+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"EasyPost\",\n \"company\": null,\n \"street1\": \"164 Townsend St\",\n \"id\": \"adr_661148b2646e11edbaeaac1f6bc72124\",\n \"street2\": \"Unit 1\",\n \"state\": \"CA\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d0a0f7f1d13400088e1f" + "3a8b2e0a6372c5a3e0d9eb430019cd7f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.714492" + "0.945139" ], "etag": [ - "W/\"d7d537be93aeaf61699c085da37d954c\"" + "W/\"cd227c75da20f0dfafdc948323272230\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/orders/order_e57f4f08fecf4133875ac7deb0fb2b50" + "/api/v2/orders/order_66a16e160c484f4f8238f68b4e23f256" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/orders" }, - "duration": 850 + "duration": 1170 } ] \ No newline at end of file diff --git a/src/test/cassettes/tracker/all.json b/src/test/cassettes/tracker/all.json index ec7e8b5ee..cbae3115d 100644 --- a/src/test/cassettes/tracker/all.json +++ b/src/test/cassettes/tracker/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456538, + "recordedAt": 1668466076, "request": { "body": "", "method": "GET", @@ -15,7 +15,7 @@ "uri": "https://api.easypost.com/v2/trackers?page_size\u003d5" }, "response": { - "body": "{\n \"trackers\": [\n {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:42:13Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:42:13Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:19:13Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_0ed929e6fd454e5bb53ef14f2c747987\",\n \"tracking_code\": \"9400100109361135003714\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzUxM2IwYjg5ZjU0YzQ3NDI5NDA2Y2I0NGQwMzNkNzg3\",\n \"est_delivery_date\": \"2022-08-25T19:42:13Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:13Z\",\n \"signed_by\": null,\n \"id\": \"trk_513b0b89f54c47429406cb44d033d787\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:42:08Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:42:08Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:19:08Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_7bfca42f81524e1cacc2ef16747b63b7\",\n \"tracking_code\": \"9400100109361135003684\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzJiN2JlZGI5NzY2NTRjZmJhNTA0OTdkOTNjN2UyMTMz\",\n \"est_delivery_date\": \"2022-08-25T19:42:08Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:08Z\",\n \"signed_by\": null,\n \"id\": \"trk_2b7bedb976654cfba50497d93c7e2133\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:42:02Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:42:02Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:19:02Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_60e2aa0066f84451b44e1be3b2b4ee76\",\n \"tracking_code\": \"9400100109361135003677\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2U1NjA0ZmY2NTY5ZjRhZWI5ZjI5ZDBlMGMzOWI3OGU4\",\n \"est_delivery_date\": \"2022-08-25T19:42:02Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:02Z\",\n \"signed_by\": null,\n \"id\": \"trk_e5604ff6569f4aeb9f29d0e0c39b78e8\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:42:00Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:42:00Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:19:00Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_2986d2a65f3b4ae6a64979187e182a37\",\n \"tracking_code\": \"9400100109361135003660\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzc4OTBlYmM5MGM4NzQ3NTdiMDY3OGI0ZTM4YzU2ZmM5\",\n \"est_delivery_date\": \"2022-08-25T19:42:00Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:00Z\",\n \"signed_by\": null,\n \"id\": \"trk_7890ebc90c874757b0678b4e38c56fc9\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:41:57Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:41:57Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:18:57Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_86551c2f67f0417fb61b5e259af11b05\",\n \"tracking_code\": \"9400100109361135003653\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzNlYzU1YjhmNWM1MTRjZTRhMDc4ZjUzMzMxODYxZjhi\",\n \"est_delivery_date\": \"2022-08-25T19:41:57Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:41:57Z\",\n \"signed_by\": null,\n \"id\": \"trk_3ec55b8f5c514ce4a078f53331861f8b\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n }\n ],\n \"has_more\": true\n}", + "body": "{\n \"trackers\": [\n {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:51Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:51Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:51Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"tracking_code\": \"9400100106068149680445\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzYyMGRlZDA1NDY1MjQzNmRiYzE1Zjc5Yzc5ZTNjYWJl\",\n \"est_delivery_date\": \"2022-11-14T22:47:51Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"signed_by\": null,\n \"id\": \"trk_620ded054652436dbc15f79c79e3cabe\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:45Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:45Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:45Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_2cf3f3cd27074f1dbfb6f745de8eb688\",\n \"tracking_code\": \"9400100106068149680391\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzc1NjllZDA5Yzg1YjRhYzdiMTA3NDA3MzdhOGI5ZTA5\",\n \"est_delivery_date\": \"2022-11-14T22:47:45Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:45Z\",\n \"signed_by\": null,\n \"id\": \"trk_7569ed09c85b4ac7b10740737a8b9e09\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:40Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:40Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:40Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_6ff1e0a455174c50b369bfaaeff147d9\",\n \"tracking_code\": \"9400100106068149680360\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzZkZGEzY2JmNWQ0ZDRkYTg5MDZhZDAyYzRjYmMzNmEx\",\n \"est_delivery_date\": \"2022-11-14T22:47:40Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:40Z\",\n \"signed_by\": null,\n \"id\": \"trk_6dda3cbf5d4d4da8906ad02c4cbc36a1\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:37Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:37Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:37Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_a1a17651bd6648f5a602302c45f0ded4\",\n \"tracking_code\": \"9400100106068149680339\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzIyZWUxMDExOGIwMDRkNDdiODY5MzEwYmM2ODk0YzZj\",\n \"est_delivery_date\": \"2022-11-14T22:47:37Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:37Z\",\n \"signed_by\": null,\n \"id\": \"trk_22ee10118b004d47b869310bc6894c6c\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:35Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:35Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:35Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_6fef95012a3f454cb3d7e2adc1b49534\",\n \"tracking_code\": \"9400100106068149680308\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzNjNzVhNzBiYzBiZjQ2NGM5ZGIyYzdjYTE0OGRjMDJh\",\n \"est_delivery_date\": \"2022-11-14T22:47:35Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:35Z\",\n \"signed_by\": null,\n \"id\": \"trk_3c75a70bc0bf464c9db2c7ca148dc02a\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n }\n ],\n \"has_more\": true\n}", "httpVersion": null, "headers": { "null": [ @@ -28,7 +28,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,26 +55,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d09af7b6a18f00088acc" + "3a8b2e0f6372c59ce0d9eadf0019ca14" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.129180" + "0.106216" ], "etag": [ - "W/\"2488a98ab83156fba4df1e0cbb956dc2\"" + "W/\"ce371696fa0105199cb7410bd90b9ef4\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +85,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/trackers?page_size\u003d5" }, - "duration": 262 + "duration": 377 } ] \ No newline at end of file diff --git a/src/test/cassettes/tracker/create.json b/src/test/cassettes/tracker/create.json index 9b85eb003..a63ad1613 100644 --- a/src/test/cassettes/tracker/create.json +++ b/src/test/cassettes/tracker/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456539, + "recordedAt": 1668466078, "request": { "body": "{\n \"tracker\": {\n \"carrier\": \"USPS\",\n \"tracking_code\": \"EZ1000000001\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/trackers" }, "response": { - "body": "{\n \"fees\": [\n {\n \"amount\": \"0.02000\",\n \"refunded\": false,\n \"type\": \"TrackerFee\",\n \"charged\": false,\n \"object\": \"Fee\"\n }\n ],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:42:19Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:42:19Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:19:19Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": null,\n \"tracking_code\": \"EZ1000000001\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzJhMjQ0ODVjZDI2OTQ4NjE5YWI2Y2I2NTE3YjYzNTBl\",\n \"est_delivery_date\": \"2022-08-25T19:42:19Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:19Z\",\n \"signed_by\": null,\n \"id\": \"trk_2a24485cd26948619ab6cb6517b6350e\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n}", + "body": "{\n \"fees\": [\n {\n \"amount\": \"0.02000\",\n \"refunded\": false,\n \"type\": \"TrackerFee\",\n \"charged\": false,\n \"object\": \"Fee\"\n }\n ],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:58Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:58Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:58Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": null,\n \"tracking_code\": \"EZ1000000001\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzhkNDY4YjUzYzcxZDQ4YThhNGNiYmZkN2MwYzgwNjUx\",\n \"est_delivery_date\": \"2022-11-14T22:47:58Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:58Z\",\n \"signed_by\": null,\n \"id\": \"trk_8d468b53c71d48a8a4cbbfd7c0c80651\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,9 +51,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -61,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d09bf7cda91a00088b85" + "3a8b2e0d6372c59ee0d9eae60019cacd" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.133904" + "0.152430" ], "etag": [ - "W/\"8fc2234e73ba319c1f6503570c70ada6\"" + "W/\"1a9b25280c418bf30176eaddfd01d54f\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/trackers/trk_2a24485cd26948619ab6cb6517b6350e" + "/api/v2/trackers/trk_8d468b53c71d48a8a4cbbfd7c0c80651" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,9 +91,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/trackers" }, - "duration": 264 + "duration": 459 } ] \ No newline at end of file diff --git a/src/test/cassettes/tracker/create_list.json b/src/test/cassettes/tracker/create_list.json index d86942b23..bf77b4018 100644 --- a/src/test/cassettes/tracker/create_list.json +++ b/src/test/cassettes/tracker/create_list.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456539, + "recordedAt": 1668466077, "request": { "body": "{\n \"trackers\": {\n \"0\": {\n \"tracking_code\": \"EZ1000000001\"\n },\n \"1\": {\n \"tracking_code\": \"EZ1000000002\"\n },\n \"2\": {\n \"tracking_code\": \"EZ1000000003\"\n }\n }\n}", "method": "POST", @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,17 +58,18 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d09bf7dd1d3b00088b60" + "3a8b2e086372c59de0d9eae40019caa7" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.036207" + "0.040167" ], "etag": [ "W/\"44136fa355b3678a1146ad16f7e8649e\"" @@ -77,7 +78,7 @@ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +88,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/trackers/create_list" }, - "duration": 171 + "duration": 259 } ] \ No newline at end of file diff --git a/src/test/cassettes/tracker/retrieve.json b/src/test/cassettes/tracker/retrieve.json index 7ed4bdd59..3360f7725 100644 --- a/src/test/cassettes/tracker/retrieve.json +++ b/src/test/cassettes/tracker/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456538, + "recordedAt": 1668466077, "request": { "body": "{\n \"tracker\": {\n \"carrier\": \"USPS\",\n \"tracking_code\": \"EZ1000000001\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/trackers" }, "response": { - "body": "{\n \"fees\": [\n {\n \"amount\": \"0.02000\",\n \"refunded\": false,\n \"type\": \"TrackerFee\",\n \"charged\": false,\n \"object\": \"Fee\"\n }\n ],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:42:18Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:42:18Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:19:18Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": null,\n \"tracking_code\": \"EZ1000000001\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2YyOWYxOWIwMzgwNzQ0NWU5MjAxMmJlZmU2ZDdlNTYx\",\n \"est_delivery_date\": \"2022-08-25T19:42:18Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-08-25T19:42:18Z\",\n \"signed_by\": null,\n \"id\": \"trk_f29f19b03807445e92012befe6d7e561\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n}", + "body": "{\n \"fees\": [\n {\n \"amount\": \"0.02000\",\n \"refunded\": false,\n \"type\": \"TrackerFee\",\n \"charged\": false,\n \"object\": \"Fee\"\n }\n ],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:57Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:57Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:57Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": null,\n \"tracking_code\": \"EZ1000000001\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzQxM2YyZmQ3NGIxZjRiYTk4NDgxZDVhYjUwMjQ4NTAx\",\n \"est_delivery_date\": \"2022-11-14T22:47:57Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:57Z\",\n \"signed_by\": null,\n \"id\": \"trk_413f2fd74b1f4ba98481d5ab50248501\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,29 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d09af7dfc57900088b09" + "3a8b2e0b6372c59ce0d9eae10019ca50" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.126759" + "0.138850" ], "etag": [ - "W/\"a4ae381ba0bf929fa2cae15353fd83d4\"" + "W/\"f19a76efec53fb7f184917b66dc6a84e\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/trackers/trk_f29f19b03807445e92012befe6d7e561" + "/api/v2/trackers/trk_413f2fd74b1f4ba98481d5ab50248501" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/trackers" }, - "duration": 282 + "duration": 364 }, { - "recordedAt": 1661456539, + "recordedAt": 1668466077, "request": { "body": "", "method": "GET", @@ -108,10 +108,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/trackers/trk_f29f19b03807445e92012befe6d7e561" + "uri": "https://api.easypost.com/v2/trackers/trk_413f2fd74b1f4ba98481d5ab50248501" }, "response": { - "body": "{\n \"fees\": [\n {\n \"amount\": \"0.02000\",\n \"refunded\": false,\n \"type\": \"TrackerFee\",\n \"charged\": false,\n \"object\": \"Fee\"\n }\n ],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-08-25T19:42:18Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-25T19:42:18Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-07-26T08:19:18Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": null,\n \"tracking_code\": \"EZ1000000001\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2YyOWYxOWIwMzgwNzQ0NWU5MjAxMmJlZmU2ZDdlNTYx\",\n \"est_delivery_date\": \"2022-08-25T19:42:18Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-08-25T19:42:18Z\",\n \"signed_by\": null,\n \"id\": \"trk_f29f19b03807445e92012befe6d7e561\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n}", + "body": "{\n \"fees\": [\n {\n \"amount\": \"0.02000\",\n \"refunded\": false,\n \"type\": \"TrackerFee\",\n \"charged\": false,\n \"object\": \"Fee\"\n }\n ],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:47:57Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:47:57Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:24:57Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": null,\n \"tracking_code\": \"EZ1000000001\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzQxM2YyZmQ3NGIxZjRiYTk4NDgxZDVhYjUwMjQ4NTAx\",\n \"est_delivery_date\": \"2022-11-14T22:47:57Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:57Z\",\n \"signed_by\": null,\n \"id\": \"trk_413f2fd74b1f4ba98481d5ab50248501\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n}", "httpVersion": null, "headers": { "null": [ @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d09af7b95f5100088b24" + "3a8b2e0f6372c59de0d9eae20019ca7b" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.096229" + "0.060806" ], "etag": [ - "W/\"d05a341c7d76fbcab82eefce6e781d63\"" + "W/\"b616394f630e6ce48197f3de39a4da97\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +181,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/trackers/trk_f29f19b03807445e92012befe6d7e561" + "uri": "https://api.easypost.com/v2/trackers/trk_413f2fd74b1f4ba98481d5ab50248501" }, - "duration": 231 + "duration": 322 } ] \ No newline at end of file diff --git a/src/test/cassettes/user/all_api_keys.json b/src/test/cassettes/user/all_api_keys.json index 94320ada3..b7a85b947 100644 --- a/src/test/cassettes/user/all_api_keys.json +++ b/src/test/cassettes/user/all_api_keys.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456587, + "recordedAt": 1668466140, "request": { "body": "", "method": "GET", @@ -28,7 +28,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,17 +55,18 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d0cbf7ca7c190008a484" + "3a8b2e0b6372c5dce0da54f70019e6b0" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.032449" + "0.039322" ], "etag": [ "W/\"c6f992e570e1e8addfa1357defd149fb\"" @@ -74,7 +75,7 @@ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +85,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/api_keys" }, - "duration": 69 + "duration": 300 } ] \ No newline at end of file diff --git a/src/test/cassettes/user/api_keys.json b/src/test/cassettes/user/api_keys.json index 63ad79c19..4aefd0a7d 100644 --- a/src/test/cassettes/user/api_keys.json +++ b/src/test/cassettes/user/api_keys.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456586, + "recordedAt": 1668466139, "request": { "body": "{\n \"user\": {\n \"name\": \"Test User\"\n }\n}", "method": "POST", @@ -18,20 +18,20 @@ "uri": "https://api.easypost.com/v2/users" }, "response": { - "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-08-25T19:43:06Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_4ff450caf3d447ff89279ada248b76ec\",\n \"api_keys\": [],\n \"object\": \"User\"\n}", + "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-11-14T22:48:58Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_edad352975a444d8971df32cba6c0f2d\",\n \"api_keys\": [],\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "634" + "664" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d0caf7efbd9c0008a3b9" + "3a8b2e086372c5dae0da54dd0019e5b3" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.797932" + "0.753583" ], "etag": [ - "W/\"2501f329dc6ca090e92f55f4273dfc03\"" + "W/\"9320cd97d64105241d331970c0424bda\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 956 + "duration": 998 }, { - "recordedAt": 1661456587, + "recordedAt": 1668466139, "request": { "body": "", "method": "GET", @@ -108,7 +108,7 @@ "uri": "https://api.easypost.com/v2/api_keys" }, "response": { - "body": "{\n \"children\": [\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_feab33e9b65e4ba3b41cc1f1f2b27bea\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_9c2cfcd11c45495f97b563699c4daac9\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_87ed7e2a4bce4b29b6e7c6ed94ee0874\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_beb2c23c5213451b904a5beace546adb\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_55e9a3b9e8004a9bb3b45b3fe2f1a8a6\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_3b76061e957d44aaa049bf5ee4d62da3\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_1e05fb2bcceb4b82a3fbfa69c7165013\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_fb517924e7cb466f9ed66ee68d8c686d\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_d4f25bb02aee43aa8dc9708776b52c55\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_a38e08dec5e54022a174a6004725c224\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_b10ab76178f4463988d37f6bb5895dcb\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_0be0589de73b4266b62e1741ab05ed12\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_80ed82f2bbeb4264bc81c647dd85d629\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_a7850ea1ba4845c0bfade0b871f0b0d8\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_4ff450caf3d447ff89279ada248b76ec\"\n }\n ],\n \"keys\": [],\n \"id\": \"user_04ad194774a54f6c97d1385715721091\"\n}", + "body": "{\n \"children\": [\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_feab33e9b65e4ba3b41cc1f1f2b27bea\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_9c2cfcd11c45495f97b563699c4daac9\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_87ed7e2a4bce4b29b6e7c6ed94ee0874\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_beb2c23c5213451b904a5beace546adb\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_55e9a3b9e8004a9bb3b45b3fe2f1a8a6\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_3b76061e957d44aaa049bf5ee4d62da3\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_1e05fb2bcceb4b82a3fbfa69c7165013\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_fb517924e7cb466f9ed66ee68d8c686d\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_d4f25bb02aee43aa8dc9708776b52c55\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_a38e08dec5e54022a174a6004725c224\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_b10ab76178f4463988d37f6bb5895dcb\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_0be0589de73b4266b62e1741ab05ed12\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_80ed82f2bbeb4264bc81c647dd85d629\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_a7850ea1ba4845c0bfade0b871f0b0d8\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_edad352975a444d8971df32cba6c0f2d\"\n }\n ],\n \"keys\": [],\n \"id\": \"user_04ad194774a54f6c97d1385715721091\"\n}", "httpVersion": null, "headers": { "null": [ @@ -121,7 +121,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -148,26 +148,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d0cbf7ee18de0008a425" + "3a8b2e086372c5dbe0da54de0019e64c" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.092333" + "0.043075" ], "etag": [ - "W/\"7913de4869c074f93f2a7e85c3d5c7bf\"" + "W/\"d6d6585b75dadbbe9919fe2b98fef326\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +178,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/api_keys" }, - "duration": 222 + "duration": 258 }, { - "recordedAt": 1661456587, + "recordedAt": 1668466139, "request": { "body": "", "method": "GET", @@ -195,23 +195,23 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_4ff450caf3d447ff89279ada248b76ec" + "uri": "https://api.easypost.com/v2/users/user_edad352975a444d8971df32cba6c0f2d" }, "response": { - "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-08-25T19:43:06Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_4ff450caf3d447ff89279ada248b76ec\",\n \"object\": \"User\"\n}", + "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-11-14T22:48:58Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_edad352975a444d8971df32cba6c0f2d\",\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "227" + "257" ], "expires": [ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -231,9 +231,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -241,26 +238,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d0cbf7df2d1e0008a443" + "3a8b2e0f6372c5dbe0da54f60019e664" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.035699" + "0.044535" ], "etag": [ - "W/\"2ab073d79aada42b1fe030ec6996b0b9\"" + "W/\"2564bdf11f491c0656ae96012cf7807d\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -270,13 +268,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_4ff450caf3d447ff89279ada248b76ec" + "uri": "https://api.easypost.com/v2/users/user_edad352975a444d8971df32cba6c0f2d" }, - "duration": 161 + "duration": 268 }, { - "recordedAt": 1661456587, + "recordedAt": 1668466140, "request": { "body": "", "method": "DELETE", @@ -288,7 +285,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_4ff450caf3d447ff89279ada248b76ec" + "uri": "https://api.easypost.com/v2/users/user_edad352975a444d8971df32cba6c0f2d" }, "response": { "body": "", @@ -301,7 +298,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -328,20 +325,21 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d0cbf7ca7c190008a456" + "3a8b2e0b6372c5dbe0da54f70019e67c" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.185161" + "0.133462" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -351,9 +349,8 @@ "code": 204, "message": "No Content" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_4ff450caf3d447ff89279ada248b76ec" + "uri": "https://api.easypost.com/v2/users/user_edad352975a444d8971df32cba6c0f2d" }, - "duration": 310 + "duration": 424 } ] \ No newline at end of file diff --git a/src/test/cassettes/user/create.json b/src/test/cassettes/user/create.json index 95903688b..466f7ba2b 100644 --- a/src/test/cassettes/user/create.json +++ b/src/test/cassettes/user/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456589, + "recordedAt": 1668466142, "request": { "body": "{\n \"user\": {\n \"name\": \"Test User\"\n }\n}", "method": "POST", @@ -18,20 +18,20 @@ "uri": "https://api.easypost.com/v2/users" }, "response": { - "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-08-25T19:43:09Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_7c7dac760e4f419faa2ee42bc2c2905f\",\n \"api_keys\": [],\n \"object\": \"User\"\n}", + "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-11-14T22:49:02Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_24d79088bfd34dc1bb68286f5d9e8ecf\",\n \"api_keys\": [],\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "634" + "664" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,6 +51,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -58,26 +61,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d0ccf7dfc9560008a511" + "3a8b2e0f6372c5dde0da54fb0019e741" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.703509" + "0.730052" ], "etag": [ - "W/\"e07f33aac60da53e8368b4920efa77d1\"" + "W/\"e5fd0d01d820a9dad293879c3d62ca96\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +91,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 833 + "duration": 945 }, { - "recordedAt": 1661456589, + "recordedAt": 1668466142, "request": { "body": "", "method": "GET", @@ -105,23 +108,23 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_7c7dac760e4f419faa2ee42bc2c2905f" + "uri": "https://api.easypost.com/v2/users/user_24d79088bfd34dc1bb68286f5d9e8ecf" }, "response": { - "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-08-25T19:43:09Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_7c7dac760e4f419faa2ee42bc2c2905f\",\n \"object\": \"User\"\n}", + "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-11-14T22:49:02Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_24d79088bfd34dc1bb68286f5d9e8ecf\",\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "227" + "257" ], "expires": [ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -148,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d0cdf800c13a0008a58d" + "3a8b2e0a6372c5dee0da55170019e78a" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.120696" + "0.035639" ], "etag": [ - "W/\"8bb764c5f8e58511288fc75e1688e85e\"" + "W/\"8de3a061009af53ffe5cd21554963ad2\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +181,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_7c7dac760e4f419faa2ee42bc2c2905f" + "uri": "https://api.easypost.com/v2/users/user_24d79088bfd34dc1bb68286f5d9e8ecf" }, - "duration": 252 + "duration": 258 }, { - "recordedAt": 1661456590, + "recordedAt": 1668466143, "request": { "body": "", "method": "DELETE", @@ -195,7 +198,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_7c7dac760e4f419faa2ee42bc2c2905f" + "uri": "https://api.easypost.com/v2/users/user_24d79088bfd34dc1bb68286f5d9e8ecf" }, "response": { "body": "", @@ -208,7 +211,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -235,20 +238,21 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d0cee68cd1800008a5b0" + "3a8b2e096372c5dee0da55180019e7a3" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.118173" + "0.133349" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -258,9 +262,8 @@ "code": 204, "message": "No Content" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_7c7dac760e4f419faa2ee42bc2c2905f" + "uri": "https://api.easypost.com/v2/users/user_24d79088bfd34dc1bb68286f5d9e8ecf" }, - "duration": 427 + "duration": 396 } ] \ No newline at end of file diff --git a/src/test/cassettes/user/delete.json b/src/test/cassettes/user/delete.json index 6362a96a4..f1afbaf26 100644 --- a/src/test/cassettes/user/delete.json +++ b/src/test/cassettes/user/delete.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456591, + "recordedAt": 1668466144, "request": { "body": "{\n \"user\": {\n \"name\": \"Test User\"\n }\n}", "method": "POST", @@ -18,20 +18,20 @@ "uri": "https://api.easypost.com/v2/users" }, "response": { - "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-08-25T19:43:10Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_c7e290a08e454feb9e093d1283a8bb2d\",\n \"api_keys\": [],\n \"object\": \"User\"\n}", + "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-11-14T22:49:03Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_9d97568ae2da403ba2958cf0a6d219c9\",\n \"api_keys\": [],\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "634" + "664" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d0cef7db7cbd0008a5f1" + "3a8b2e086372c5dfe0da55190019e7c3" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.753074" + "0.836469" ], "etag": [ - "W/\"eb40c89b723a084b9c6b0bc789f891d6\"" + "W/\"c0ca9c0eea45c33404d263aa10032a1f\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 875 + "duration": 1100 }, { - "recordedAt": 1661456591, + "recordedAt": 1668466144, "request": { "body": "", "method": "DELETE", @@ -105,7 +105,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_c7e290a08e454feb9e093d1283a8bb2d" + "uri": "https://api.easypost.com/v2/users/user_9d97568ae2da403ba2958cf0a6d219c9" }, "response": { "body": "", @@ -118,7 +118,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -145,20 +145,21 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d0cff7bb984f0008a669" + "3a8b2e0a6372c5e0e0da551a0019e82d" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.119947" + "0.135840" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -168,13 +169,12 @@ "code": 204, "message": "No Content" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_c7e290a08e454feb9e093d1283a8bb2d" + "uri": "https://api.easypost.com/v2/users/user_9d97568ae2da403ba2958cf0a6d219c9" }, - "duration": 246 + "duration": 374 }, { - "recordedAt": 1661456591, + "recordedAt": 1668466145, "request": { "body": "", "method": "GET", @@ -186,10 +186,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_c7e290a08e454feb9e093d1283a8bb2d" + "uri": "https://api.easypost.com/v2/users/user_9d97568ae2da403ba2958cf0a6d219c9" }, "response": { - "body": null, + "body": "{\n \"error\": {\n \"code\": \"NOT_FOUND\",\n \"message\": \"The requested resource could not be found.\",\n \"errors\": []\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -229,23 +229,24 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d0cff7bb984f0008a677" + "3a8b2e0a6372c5e0e0da551a0019e83e" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.042449" + "0.043196" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -255,9 +256,8 @@ "code": 404, "message": "Not Found" }, - "errors": "{\n \"error\": {\n \"code\": \"NOT_FOUND\",\n \"message\": \"The requested resource could not be found.\",\n \"errors\": []\n }\n}", - "uri": "https://api.easypost.com/v2/users/user_c7e290a08e454feb9e093d1283a8bb2d" + "uri": "https://api.easypost.com/v2/users/user_9d97568ae2da403ba2958cf0a6d219c9" }, - "duration": 77 + "duration": 213 } ] \ No newline at end of file diff --git a/src/test/cassettes/user/retrieve.json b/src/test/cassettes/user/retrieve.json index c3d66e653..2760b947d 100644 --- a/src/test/cassettes/user/retrieve.json +++ b/src/test/cassettes/user/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456588, + "recordedAt": 1668466141, "request": { "body": "", "method": "GET", @@ -15,20 +15,20 @@ "uri": "https://api.easypost.com/v2/users" }, "response": { - "body": "{\n \"recharge_amount\": \"100.00\",\n \"verified\": true,\n \"created_at\": \"2022-02-02T20:31:53Z\",\n \"secondary_recharge_amount\": \"100.00\",\n \"cc_fee_rate\": \"0.0325\",\n \"recharge_threshold\": \"0.00\",\n \"balance\": \"0.00000\",\n \"default_insurance_amount\": \"50.00\",\n \"children\": [\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-17T23:24:17Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_feab33e9b65e4ba3b41cc1f1f2b27bea\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T19:50:54Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_9c2cfcd11c45495f97b563699c4daac9\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T19:54:03Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_87ed7e2a4bce4b29b6e7c6ed94ee0874\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T20:02:02Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_beb2c23c5213451b904a5beace546adb\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T20:03:54Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_55e9a3b9e8004a9bb3b45b3fe2f1a8a6\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:36:45Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_3b76061e957d44aaa049bf5ee4d62da3\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:36:47Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_1e05fb2bcceb4b82a3fbfa69c7165013\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:38:31Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_fb517924e7cb466f9ed66ee68d8c686d\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:38:32Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_d4f25bb02aee43aa8dc9708776b52c55\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:55:14Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_a38e08dec5e54022a174a6004725c224\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:55:17Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_b10ab76178f4463988d37f6bb5895dcb\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-02T19:52:57Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_0be0589de73b4266b62e1741ab05ed12\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-16T20:17:13Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_80ed82f2bbeb4264bc81c647dd85d629\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-16T20:17:16Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_a7850ea1ba4845c0bfade0b871f0b0d8\",\n \"object\": \"User\"\n }\n ],\n \"parent_id\": null,\n \"has_billing_method\": false,\n \"name\": \"EasyPost Java Client Library Tests\",\n \"insurance_fee_rate\": \"0.005\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"dev+easypost-java@easypost.com\",\n \"object\": \"User\"\n}", + "body": "{\n \"recharge_amount\": \"100.00\",\n \"verified\": true,\n \"created_at\": \"2022-02-02T20:31:53Z\",\n \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": \"100.00\",\n \"cc_fee_rate\": \"0.0325\",\n \"recharge_threshold\": \"0.00\",\n \"balance\": \"0.00000\",\n \"default_insurance_amount\": \"50.00\",\n \"children\": [\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-17T23:24:17Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_feab33e9b65e4ba3b41cc1f1f2b27bea\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T19:50:54Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_9c2cfcd11c45495f97b563699c4daac9\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T19:54:03Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_87ed7e2a4bce4b29b6e7c6ed94ee0874\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T20:02:02Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_beb2c23c5213451b904a5beace546adb\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T20:03:54Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_55e9a3b9e8004a9bb3b45b3fe2f1a8a6\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:36:45Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_3b76061e957d44aaa049bf5ee4d62da3\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:36:47Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_1e05fb2bcceb4b82a3fbfa69c7165013\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:38:31Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_fb517924e7cb466f9ed66ee68d8c686d\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:38:32Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_d4f25bb02aee43aa8dc9708776b52c55\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:55:14Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_a38e08dec5e54022a174a6004725c224\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:55:17Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_b10ab76178f4463988d37f6bb5895dcb\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-02T19:52:57Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_0be0589de73b4266b62e1741ab05ed12\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-16T20:17:13Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_80ed82f2bbeb4264bc81c647dd85d629\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-16T20:17:16Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_a7850ea1ba4845c0bfade0b871f0b0d8\",\n \"object\": \"User\"\n }\n ],\n \"parent_id\": null,\n \"has_billing_method\": false,\n \"name\": \"EasyPost Java Client Library Tests\",\n \"insurance_fee_rate\": \"0.005\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"dev+easypost-java@easypost.com\",\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "3737" + "4187" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,26 +55,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d0ccf7dc76d00008a49b" + "3a8b2e0c6372c5dce0da54f80019e6d3" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.162689" + "0.269536" ], "etag": [ - "W/\"a942726b062008f60decc3bee1bca0e2\"" + "W/\"55e92a7e5a5cb86f801e5b4aa4a73532\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,13 +85,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 300 + "duration": 477 }, { - "recordedAt": 1661456588, + "recordedAt": 1668466141, "request": { "body": "", "method": "GET", @@ -105,20 +105,20 @@ "uri": "https://api.easypost.com/v2/users/user_04ad194774a54f6c97d1385715721091" }, "response": { - "body": "{\n \"recharge_amount\": \"100.00\",\n \"verified\": true,\n \"created_at\": \"2022-02-02T20:31:53Z\",\n \"secondary_recharge_amount\": \"100.00\",\n \"cc_fee_rate\": \"0.0325\",\n \"recharge_threshold\": \"0.00\",\n \"balance\": \"0.00000\",\n \"default_insurance_amount\": \"50.00\",\n \"children\": [\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-17T23:24:17Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_feab33e9b65e4ba3b41cc1f1f2b27bea\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T19:50:54Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_9c2cfcd11c45495f97b563699c4daac9\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T19:54:03Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_87ed7e2a4bce4b29b6e7c6ed94ee0874\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T20:02:02Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_beb2c23c5213451b904a5beace546adb\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T20:03:54Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_55e9a3b9e8004a9bb3b45b3fe2f1a8a6\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:36:45Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_3b76061e957d44aaa049bf5ee4d62da3\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:36:47Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_1e05fb2bcceb4b82a3fbfa69c7165013\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:38:31Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_fb517924e7cb466f9ed66ee68d8c686d\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:38:32Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_d4f25bb02aee43aa8dc9708776b52c55\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:55:14Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_a38e08dec5e54022a174a6004725c224\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:55:17Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_b10ab76178f4463988d37f6bb5895dcb\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-02T19:52:57Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_0be0589de73b4266b62e1741ab05ed12\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-16T20:17:13Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_80ed82f2bbeb4264bc81c647dd85d629\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-16T20:17:16Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_a7850ea1ba4845c0bfade0b871f0b0d8\",\n \"object\": \"User\"\n }\n ],\n \"parent_id\": null,\n \"has_billing_method\": false,\n \"name\": \"EasyPost Java Client Library Tests\",\n \"insurance_fee_rate\": \"0.005\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"dev+easypost-java@easypost.com\",\n \"object\": \"User\"\n}", + "body": "{\n \"recharge_amount\": \"100.00\",\n \"verified\": true,\n \"created_at\": \"2022-02-02T20:31:53Z\",\n \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": \"100.00\",\n \"cc_fee_rate\": \"0.0325\",\n \"recharge_threshold\": \"0.00\",\n \"balance\": \"0.00000\",\n \"default_insurance_amount\": \"50.00\",\n \"children\": [\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-17T23:24:17Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_feab33e9b65e4ba3b41cc1f1f2b27bea\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T19:50:54Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_9c2cfcd11c45495f97b563699c4daac9\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T19:54:03Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_87ed7e2a4bce4b29b6e7c6ed94ee0874\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T20:02:02Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_beb2c23c5213451b904a5beace546adb\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T20:03:54Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_55e9a3b9e8004a9bb3b45b3fe2f1a8a6\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:36:45Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_3b76061e957d44aaa049bf5ee4d62da3\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:36:47Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_1e05fb2bcceb4b82a3fbfa69c7165013\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:38:31Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_fb517924e7cb466f9ed66ee68d8c686d\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:38:32Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_d4f25bb02aee43aa8dc9708776b52c55\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:55:14Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_a38e08dec5e54022a174a6004725c224\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:55:17Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_b10ab76178f4463988d37f6bb5895dcb\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-02T19:52:57Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_0be0589de73b4266b62e1741ab05ed12\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-16T20:17:13Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_80ed82f2bbeb4264bc81c647dd85d629\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-16T20:17:16Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_a7850ea1ba4845c0bfade0b871f0b0d8\",\n \"object\": \"User\"\n }\n ],\n \"parent_id\": null,\n \"has_billing_method\": false,\n \"name\": \"EasyPost Java Client Library Tests\",\n \"insurance_fee_rate\": \"0.005\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"dev+easypost-java@easypost.com\",\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "3737" + "4187" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -145,26 +145,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d0ccf7b8cdce0008a4cb" + "3a8b2e0d6372c5dde0da54f90019e714" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.161176" + "0.267079" ], "etag": [ - "W/\"a942726b062008f60decc3bee1bca0e2\"" + "W/\"55e92a7e5a5cb86f801e5b4aa4a73532\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -174,9 +175,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/users/user_04ad194774a54f6c97d1385715721091" }, - "duration": 284 + "duration": 484 } ] \ No newline at end of file diff --git a/src/test/cassettes/user/retrieve_me.json b/src/test/cassettes/user/retrieve_me.json index 1b220cee6..722830f46 100644 --- a/src/test/cassettes/user/retrieve_me.json +++ b/src/test/cassettes/user/retrieve_me.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456593, + "recordedAt": 1668466147, "request": { "body": "", "method": "GET", @@ -15,14 +15,14 @@ "uri": "https://api.easypost.com/v2/users" }, "response": { - "body": "{\n \"recharge_amount\": \"100.00\",\n \"verified\": true,\n \"created_at\": \"2022-02-02T20:31:53Z\",\n \"secondary_recharge_amount\": \"100.00\",\n \"cc_fee_rate\": \"0.0325\",\n \"recharge_threshold\": \"0.00\",\n \"balance\": \"0.00000\",\n \"default_insurance_amount\": \"50.00\",\n \"children\": [\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-17T23:24:17Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_feab33e9b65e4ba3b41cc1f1f2b27bea\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T19:50:54Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_9c2cfcd11c45495f97b563699c4daac9\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T19:54:03Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_87ed7e2a4bce4b29b6e7c6ed94ee0874\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T20:02:02Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_beb2c23c5213451b904a5beace546adb\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T20:03:54Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_55e9a3b9e8004a9bb3b45b3fe2f1a8a6\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:36:45Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_3b76061e957d44aaa049bf5ee4d62da3\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:36:47Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_1e05fb2bcceb4b82a3fbfa69c7165013\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:38:31Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_fb517924e7cb466f9ed66ee68d8c686d\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:38:32Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_d4f25bb02aee43aa8dc9708776b52c55\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:55:14Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_a38e08dec5e54022a174a6004725c224\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:55:17Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_b10ab76178f4463988d37f6bb5895dcb\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-02T19:52:57Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_0be0589de73b4266b62e1741ab05ed12\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-16T20:17:13Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_80ed82f2bbeb4264bc81c647dd85d629\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-16T20:17:16Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_a7850ea1ba4845c0bfade0b871f0b0d8\",\n \"object\": \"User\"\n }\n ],\n \"parent_id\": null,\n \"has_billing_method\": false,\n \"name\": \"EasyPost Java Client Library Tests\",\n \"insurance_fee_rate\": \"0.005\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"dev+easypost-java@easypost.com\",\n \"object\": \"User\"\n}", + "body": "{\n \"recharge_amount\": \"100.00\",\n \"verified\": true,\n \"created_at\": \"2022-02-02T20:31:53Z\",\n \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": \"100.00\",\n \"cc_fee_rate\": \"0.0325\",\n \"recharge_threshold\": \"0.00\",\n \"balance\": \"0.00000\",\n \"default_insurance_amount\": \"50.00\",\n \"children\": [\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-17T23:24:17Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_feab33e9b65e4ba3b41cc1f1f2b27bea\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T19:50:54Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_9c2cfcd11c45495f97b563699c4daac9\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T19:54:03Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_87ed7e2a4bce4b29b6e7c6ed94ee0874\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T20:02:02Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_beb2c23c5213451b904a5beace546adb\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-02-22T20:03:54Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_55e9a3b9e8004a9bb3b45b3fe2f1a8a6\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:36:45Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_3b76061e957d44aaa049bf5ee4d62da3\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:36:47Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_1e05fb2bcceb4b82a3fbfa69c7165013\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:38:31Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_fb517924e7cb466f9ed66ee68d8c686d\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:38:32Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_d4f25bb02aee43aa8dc9708776b52c55\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:55:14Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_a38e08dec5e54022a174a6004725c224\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-05-26T19:55:17Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_b10ab76178f4463988d37f6bb5895dcb\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-02T19:52:57Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_0be0589de73b4266b62e1741ab05ed12\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-16T20:17:13Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_80ed82f2bbeb4264bc81c647dd85d629\",\n \"object\": \"User\"\n },\n {\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-06-16T20:17:16Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_a7850ea1ba4845c0bfade0b871f0b0d8\",\n \"object\": \"User\"\n }\n ],\n \"parent_id\": null,\n \"has_billing_method\": false,\n \"name\": \"EasyPost Java Client Library Tests\",\n \"insurance_fee_rate\": \"0.005\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"dev+easypost-java@easypost.com\",\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "3737" + "4187" ], "expires": [ "0" @@ -55,26 +55,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d0d1f7dd938e0008a782" + "3a8b2e0a6372c5e3e0da55200019e919" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.297852" + "0.165559" ], "etag": [ - "W/\"a942726b062008f60decc3bee1bca0e2\"" + "W/\"55e92a7e5a5cb86f801e5b4aa4a73532\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +85,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 332 + "duration": 406 } ] \ No newline at end of file diff --git a/src/test/cassettes/user/update.json b/src/test/cassettes/user/update.json index 4506e115f..fb0f693be 100644 --- a/src/test/cassettes/user/update.json +++ b/src/test/cassettes/user/update.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456592, + "recordedAt": 1668466146, "request": { "body": "{\n \"user\": {\n \"name\": \"Test User\"\n }\n}", "method": "POST", @@ -18,20 +18,20 @@ "uri": "https://api.easypost.com/v2/users" }, "response": { - "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-08-25T19:43:12Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_735628b0573649c3a19e9ffccad57043\",\n \"api_keys\": [],\n \"object\": \"User\"\n}", + "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-11-14T22:49:05Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_f494d78d673a413ab7bc66e8eaf95590\",\n \"api_keys\": [],\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "634" + "664" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d0cff7ee18180008a69b" + "3a8b2e0c6372c5e1e0da551c0019e85e" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.777642" + "0.859308" ], "etag": [ - "W/\"a4bb176d97de3687e5fb03836705c2fb\"" + "W/\"d02643705857af731124902f305b8ff5\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 916 + "duration": 1080 }, { - "recordedAt": 1661456593, + "recordedAt": 1668466146, "request": { "body": "{\n \"user\": {\n \"name\": \"New Name\"\n }\n}", "method": "PUT", @@ -108,23 +108,23 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/users/user_735628b0573649c3a19e9ffccad57043" + "uri": "https://api.easypost.com/v2/users/user_f494d78d673a413ab7bc66e8eaf95590" }, "response": { - "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"New Name\",\n \"verified\": true,\n \"created_at\": \"2022-08-25T19:43:12Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_735628b0573649c3a19e9ffccad57043\",\n \"object\": \"User\"\n}", + "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"New Name\",\n \"verified\": true,\n \"created_at\": \"2022-11-14T22:49:05Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_f494d78d673a413ab7bc66e8eaf95590\",\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "226" + "256" ], "expires": [ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d0d0f7a8fc740008a72c" + "3a8b2e0a6372c5e2e0da551e0019e8bc" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.131631" + "0.146590" ], "etag": [ - "W/\"f5412648f869d962649e15c882b61b5e\"" + "W/\"17b155c038644767e5b012c1bdcc650a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,13 +181,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_735628b0573649c3a19e9ffccad57043" + "uri": "https://api.easypost.com/v2/users/user_f494d78d673a413ab7bc66e8eaf95590" }, - "duration": 262 + "duration": 448 }, { - "recordedAt": 1661456593, + "recordedAt": 1668466147, "request": { "body": "", "method": "GET", @@ -198,23 +198,23 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_735628b0573649c3a19e9ffccad57043" + "uri": "https://api.easypost.com/v2/users/user_f494d78d673a413ab7bc66e8eaf95590" }, "response": { - "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"New Name\",\n \"verified\": true,\n \"created_at\": \"2022-08-25T19:43:12Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_735628b0573649c3a19e9ffccad57043\",\n \"object\": \"User\"\n}", + "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"New Name\",\n \"verified\": true,\n \"created_at\": \"2022-11-14T22:49:05Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_f494d78d673a413ab7bc66e8eaf95590\",\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "226" + "256" ], "expires": [ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -241,26 +241,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d0d1e68c281e0008a74d" + "3a8b2e0e6372c5e2e0da551f0019e8db" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.034989" + "0.036680" ], "etag": [ - "W/\"f5412648f869d962649e15c882b61b5e\"" + "W/\"17b155c038644767e5b012c1bdcc650a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -270,13 +271,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_735628b0573649c3a19e9ffccad57043" + "uri": "https://api.easypost.com/v2/users/user_f494d78d673a413ab7bc66e8eaf95590" }, - "duration": 152 + "duration": 249 }, { - "recordedAt": 1661456593, + "recordedAt": 1668466147, "request": { "body": "", "method": "DELETE", @@ -288,7 +288,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_735628b0573649c3a19e9ffccad57043" + "uri": "https://api.easypost.com/v2/users/user_f494d78d673a413ab7bc66e8eaf95590" }, "response": { "body": "", @@ -301,7 +301,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -328,20 +328,21 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3a6307d0d1f7dd938e0008a774" + "3a8b2e0a6372c5e3e0da55200019e8fd" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.123041" + "0.137185" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -351,9 +352,8 @@ "code": 204, "message": "No Content" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_735628b0573649c3a19e9ffccad57043" + "uri": "https://api.easypost.com/v2/users/user_f494d78d673a413ab7bc66e8eaf95590" }, - "duration": 251 + "duration": 376 } ] \ No newline at end of file diff --git a/src/test/cassettes/user/update_brand.json b/src/test/cassettes/user/update_brand.json index 71b77fc92..745cd9970 100644 --- a/src/test/cassettes/user/update_brand.json +++ b/src/test/cassettes/user/update_brand.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456585, + "recordedAt": 1668466136, "request": { "body": "{\n \"user\": {\n \"name\": \"Test User\"\n }\n}", "method": "POST", @@ -18,20 +18,20 @@ "uri": "https://api.easypost.com/v2/users" }, "response": { - "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-08-25T19:43:04Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_56f078bb71ab4511bc410f278902cfd9\",\n \"api_keys\": [],\n \"object\": \"User\"\n}", + "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-11-14T22:48:56Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_62c84163f6964efd8f3cc81cdd93f44f\",\n \"api_keys\": [],\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "634" + "664" ], "expires": [ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,9 +51,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -61,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d0c8f7dd97f00008a2ca" + "3a8b2e0a6372c5d7e0da54bd0019e4d5" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.775498" + "0.739451" ], "etag": [ - "W/\"6ec43dffa53b80925b7eb34841b68f24\"" + "W/\"b1959633464af1d91cc6d7a5c725be61\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 938 + "duration": 1027 }, { - "recordedAt": 1661456585, + "recordedAt": 1668466137, "request": { "body": "{\n \"brand\": {\n \"color\": \"#123456\"\n }\n}", "method": "PUT", @@ -111,23 +108,23 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/users/user_56f078bb71ab4511bc410f278902cfd9/brand" + "uri": "https://api.easypost.com/v2/users/user_62c84163f6964efd8f3cc81cdd93f44f/brand" }, "response": { - "body": "{\n \"ad\": null,\n \"color\": \"#123456\",\n \"background_color\": null,\n \"user_id\": \"user_56f078bb71ab4511bc410f278902cfd9\",\n \"logo_href\": \"https://www.easypost.com\",\n \"name\": \"EasyPost\",\n \"logo\": \"https://assets.easypost.com/assets/images/branding/easypost-primary-logo-7a2cf535f2.svg\",\n \"theme\": \"theme1\",\n \"id\": \"brd_e242d6d1023346bfb1552379610e4e87\",\n \"ad_href\": null,\n \"object\": \"Brand\"\n}", + "body": "{\n \"ad\": null,\n \"color\": \"#123456\",\n \"background_color\": null,\n \"user_id\": \"user_62c84163f6964efd8f3cc81cdd93f44f\",\n \"logo_href\": \"https://www.easypost.com\",\n \"name\": \"EasyPost\",\n \"logo\": \"https://assets.easypost.com/assets/images/branding/easypost-primary-logo.7324aa54b64b34d6cd70ca5ba4d1842d.svg\",\n \"theme\": \"theme1\",\n \"id\": \"brd_b83973cb7d6a4c98907127d4ca973f47\",\n \"ad_href\": null,\n \"object\": \"Brand\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "350" + "372" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d0c9f80031190008a344" + "3a8b2e086372c5d9e0da54d90019e550" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.044488" + "0.082932" ], "etag": [ - "W/\"ee6040d491237233b9335d03baa7bfae\"" + "W/\"58aadff522e11900a93a8623d9bc9c46\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,13 +181,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_56f078bb71ab4511bc410f278902cfd9/brand" + "uri": "https://api.easypost.com/v2/users/user_62c84163f6964efd8f3cc81cdd93f44f/brand" }, - "duration": 170 + "duration": 308 }, { - "recordedAt": 1661456585, + "recordedAt": 1668466137, "request": { "body": "", "method": "GET", @@ -201,23 +198,23 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_56f078bb71ab4511bc410f278902cfd9" + "uri": "https://api.easypost.com/v2/users/user_62c84163f6964efd8f3cc81cdd93f44f" }, "response": { - "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-08-25T19:43:04Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_56f078bb71ab4511bc410f278902cfd9\",\n \"object\": \"User\"\n}", + "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2022-11-14T22:48:56Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_62c84163f6964efd8f3cc81cdd93f44f\",\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "227" + "257" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -244,26 +241,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c386307d0c9f7cc21dc0008a372" + "3a8b2e0e6372c5d9e0da54db0019e571" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.038159" + "0.044760" ], "etag": [ - "W/\"ff1f258c54d2408e94f005b2f056aad2\"" + "W/\"bfa7ae60006720854688c69daa7db5e0\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -273,13 +271,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_56f078bb71ab4511bc410f278902cfd9" + "uri": "https://api.easypost.com/v2/users/user_62c84163f6964efd8f3cc81cdd93f44f" }, - "duration": 172 + "duration": 264 }, { - "recordedAt": 1661456585, + "recordedAt": 1668466138, "request": { "body": "", "method": "DELETE", @@ -291,7 +288,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_56f078bb71ab4511bc410f278902cfd9" + "uri": "https://api.easypost.com/v2/users/user_62c84163f6964efd8f3cc81cdd93f44f" }, "response": { "body": "", @@ -304,7 +301,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -331,20 +328,21 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d0c9f7db624f0008a38d" + "3a8b2e0c6372c5d9e0da54dc0019e585" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.121399" + "0.214693" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -354,9 +352,8 @@ "code": 204, "message": "No Content" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_56f078bb71ab4511bc410f278902cfd9" + "uri": "https://api.easypost.com/v2/users/user_62c84163f6964efd8f3cc81cdd93f44f" }, - "duration": 247 + "duration": 509 } ] \ No newline at end of file diff --git a/src/test/cassettes/webhook/all.json b/src/test/cassettes/webhook/all.json index 92e3d55ac..7ad73b3b2 100644 --- a/src/test/cassettes/webhook/all.json +++ b/src/test/cassettes/webhook/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456500, + "recordedAt": 1668466035, "request": { "body": "", "method": "GET", @@ -12,7 +12,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks?" + "uri": "https://api.easypost.com/v2/webhooks" }, "response": { "body": "{\n \"webhooks\": []\n}", @@ -28,7 +28,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -48,9 +48,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -58,17 +55,18 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d074f7dec19c0008779f" + "3a8b2e0f6372c573e0d9e6a20019b6d3" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.022597" + "0.025261" ], "etag": [ "W/\"d03ff1e2df7ad33907b2086ec5f9e0a9\"" @@ -77,7 +75,7 @@ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +85,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks?" + "uri": "https://api.easypost.com/v2/webhooks" }, - "duration": 144 + "duration": 271 } ] \ No newline at end of file diff --git a/src/test/cassettes/webhook/create.json b/src/test/cassettes/webhook/create.json index af9898260..c18dae076 100644 --- a/src/test/cassettes/webhook/create.json +++ b/src/test/cassettes/webhook/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456501, + "recordedAt": 1668466037, "request": { "body": "{\n \"webhook\": {\n \"url\": \"http://example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/webhooks" }, "response": { - "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-08-25T19:41:42Z\",\n \"id\": \"hook_f184a3b624ad11edb37143b422952c06\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", + "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-11-14T22:47:18Z\",\n \"id\": \"hook_4a8e83c8646e11ed88b96b678b0f9393\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d075f7dc7b980008788a" + "3a8b2e0b6372c575e0d9e6c10019b77f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.177325" + "0.161124" ], "etag": [ - "W/\"1def22b7375f7ecefcc54f9fc5dd6956\"" + "W/\"5c89937ab99a7445a9f06f630688136a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/webhooks" }, - "duration": 322 + "duration": 382 }, { - "recordedAt": 1661456502, + "recordedAt": 1668466038, "request": { "body": "", "method": "GET", @@ -105,10 +105,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f184a3b624ad11edb37143b422952c06" + "uri": "https://api.easypost.com/v2/webhooks/hook_4a8e83c8646e11ed88b96b678b0f9393" }, "response": { - "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-08-25T19:41:42Z\",\n \"id\": \"hook_f184a3b624ad11edb37143b422952c06\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", + "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-11-14T22:47:18Z\",\n \"id\": \"hook_4a8e83c8646e11ed88b96b678b0f9393\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", "httpVersion": null, "headers": { "null": [ @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d076f7b9e338000878cd" + "3a8b2e086372c576e0d9e6c20019b7a7" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.029727" + "0.023763" ], "etag": [ - "W/\"1def22b7375f7ecefcc54f9fc5dd6956\"" + "W/\"5c89937ab99a7445a9f06f630688136a\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,13 +181,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f184a3b624ad11edb37143b422952c06" + "uri": "https://api.easypost.com/v2/webhooks/hook_4a8e83c8646e11ed88b96b678b0f9393" }, - "duration": 155 + "duration": 276 }, { - "recordedAt": 1661456502, + "recordedAt": 1668466038, "request": { "body": "", "method": "DELETE", @@ -198,7 +198,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f184a3b624ad11edb37143b422952c06" + "uri": "https://api.easypost.com/v2/webhooks/hook_4a8e83c8646e11ed88b96b678b0f9393" }, "response": { "body": "{}", @@ -214,7 +214,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -241,17 +241,18 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c396307d076f7b7ca71000878e4" + "3a8b2e096372c576e0d9e6c30019b7c2" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.335443" + "0.418993" ], "etag": [ "W/\"44136fa355b3678a1146ad16f7e8649e\"" @@ -260,7 +261,7 @@ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -270,9 +271,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f184a3b624ad11edb37143b422952c06" + "uri": "https://api.easypost.com/v2/webhooks/hook_4a8e83c8646e11ed88b96b678b0f9393" }, - "duration": 575 + "duration": 667 } ] \ No newline at end of file diff --git a/src/test/cassettes/webhook/delete.json b/src/test/cassettes/webhook/delete.json index e8593df82..6317c48a3 100644 --- a/src/test/cassettes/webhook/delete.json +++ b/src/test/cassettes/webhook/delete.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456503, + "recordedAt": 1668466039, "request": { "body": "{\n \"webhook\": {\n \"url\": \"http://example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/webhooks" }, "response": { - "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-08-25T19:41:43Z\",\n \"id\": \"hook_f24c6dc424ad11eda3fb69a139fb4483\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", + "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-11-14T22:47:19Z\",\n \"id\": \"hook_4b738af4646e11ed8af24f4569113660\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d077f7bba13900087946" + "3a8b2e0a6372c577e0d9e6c50019b806" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.189921" + "0.197753" ], "etag": [ - "W/\"a73dec9f54509a4e633899e335f236f4\"" + "W/\"2fb74ee94261a29d9774040d78f595d1\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/webhooks" }, - "duration": 324 + "duration": 492 }, { - "recordedAt": 1661456503, + "recordedAt": 1668466039, "request": { "body": "", "method": "GET", @@ -105,10 +105,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f24c6dc424ad11eda3fb69a139fb4483" + "uri": "https://api.easypost.com/v2/webhooks/hook_4b738af4646e11ed8af24f4569113660" }, "response": { - "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-08-25T19:41:43Z\",\n \"id\": \"hook_f24c6dc424ad11eda3fb69a139fb4483\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", + "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-11-14T22:47:19Z\",\n \"id\": \"hook_4b738af4646e11ed8af24f4569113660\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", "httpVersion": null, "headers": { "null": [ @@ -121,7 +121,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -148,26 +148,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d077f8014a1c0008798c" + "3a8b2e0e6372c577e0d9e6c60019b83c" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.025068" + "0.027191" ], "etag": [ - "W/\"a73dec9f54509a4e633899e335f236f4\"" + "W/\"2fb74ee94261a29d9774040d78f595d1\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +178,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f24c6dc424ad11eda3fb69a139fb4483" + "uri": "https://api.easypost.com/v2/webhooks/hook_4b738af4646e11ed8af24f4569113660" }, - "duration": 166 + "duration": 278 }, { - "recordedAt": 1661456503, + "recordedAt": 1668466040, "request": { "body": "", "method": "DELETE", @@ -195,7 +195,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f24c6dc424ad11eda3fb69a139fb4483" + "uri": "https://api.easypost.com/v2/webhooks/hook_4b738af4646e11ed8af24f4569113660" }, "response": { "body": "{}", @@ -238,17 +238,18 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3d6307d077f7cc907500087998" + "3a8b2e096372c578e0d9e6c70019b856" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.338496" + "0.334176" ], "etag": [ "W/\"44136fa355b3678a1146ad16f7e8649e\"" @@ -257,7 +258,7 @@ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -267,9 +268,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f24c6dc424ad11eda3fb69a139fb4483" + "uri": "https://api.easypost.com/v2/webhooks/hook_4b738af4646e11ed8af24f4569113660" }, - "duration": 462 + "duration": 585 } ] \ No newline at end of file diff --git a/src/test/cassettes/webhook/retrieve.json b/src/test/cassettes/webhook/retrieve.json index 5345fff9c..06b6c52e5 100644 --- a/src/test/cassettes/webhook/retrieve.json +++ b/src/test/cassettes/webhook/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456500, + "recordedAt": 1668466036, "request": { "body": "{\n \"webhook\": {\n \"url\": \"http://example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/webhooks" }, "response": { - "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-08-25T19:41:41Z\",\n \"id\": \"hook_f0baa43024ad11eda05f11aa38ece04b\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", + "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-11-14T22:47:16Z\",\n \"id\": \"hook_498f9db8646e11eda6b871c24343c415\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3b6307d074f7ba9519000877cb" + "3a8b2e0a6372c574e0d9e6a50019b6f0" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.136465" + "0.171882" ], "etag": [ - "W/\"be1b8066b9517edd677d856e9934eaf0\"" + "W/\"90d9891b70d93c265b241afa4fd46ad6\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/webhooks" }, - "duration": 280 + "duration": 401 }, { - "recordedAt": 1661456500, + "recordedAt": 1668466036, "request": { "body": "", "method": "GET", @@ -105,10 +105,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f0baa43024ad11eda05f11aa38ece04b" + "uri": "https://api.easypost.com/v2/webhooks/hook_498f9db8646e11eda6b871c24343c415" }, "response": { - "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-08-25T19:41:41Z\",\n \"id\": \"hook_f0baa43024ad11eda05f11aa38ece04b\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", + "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-11-14T22:47:16Z\",\n \"id\": \"hook_498f9db8646e11eda6b871c24343c415\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", "httpVersion": null, "headers": { "null": [ @@ -121,7 +121,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -148,26 +148,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d074f7b7d79700087812" + "3a8b2e0d6372c574e0d9e6a70019b72c" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.026068" + "0.024173" ], "etag": [ - "W/\"be1b8066b9517edd677d856e9934eaf0\"" + "W/\"90d9891b70d93c265b241afa4fd46ad6\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +178,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f0baa43024ad11eda05f11aa38ece04b" + "uri": "https://api.easypost.com/v2/webhooks/hook_498f9db8646e11eda6b871c24343c415" }, - "duration": 155 + "duration": 252 }, { - "recordedAt": 1661456501, + "recordedAt": 1668466037, "request": { "body": "", "method": "DELETE", @@ -195,7 +195,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f0baa43024ad11eda05f11aa38ece04b" + "uri": "https://api.easypost.com/v2/webhooks/hook_498f9db8646e11eda6b871c24343c415" }, "response": { "body": "{}", @@ -211,7 +211,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -238,17 +238,18 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3f6307d075f7edfb360008783b" + "3a8b2e0f6372c574e0d9e6bf0019b742" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.293311" + "0.402586" ], "etag": [ "W/\"44136fa355b3678a1146ad16f7e8649e\"" @@ -257,7 +258,7 @@ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -267,9 +268,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f0baa43024ad11eda05f11aa38ece04b" + "uri": "https://api.easypost.com/v2/webhooks/hook_498f9db8646e11eda6b871c24343c415" }, - "duration": 425 + "duration": 626 } ] \ No newline at end of file diff --git a/src/test/cassettes/webhook/update.json b/src/test/cassettes/webhook/update.json index 49d7ed8ab..77aff1096 100644 --- a/src/test/cassettes/webhook/update.json +++ b/src/test/cassettes/webhook/update.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456504, + "recordedAt": 1668466041, "request": { "body": "{\n \"webhook\": {\n \"url\": \"http://example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/webhooks" }, "response": { - "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-08-25T19:41:44Z\",\n \"id\": \"hook_f307913a24ad11ed868c03cbdb318f09\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", + "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-11-14T22:47:21Z\",\n \"id\": \"hook_4c5d4e0a646e11edbc703321fe587622\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb2nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,26 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3e6307d078e688ff7e000879e0" + "3a8b2e0c6372c578e0d9e6e00019b88f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.162779" + "0.171623" ], "etag": [ - "W/\"e08820888dc36b690385bf7fbc7572fb\"" + "W/\"b5028913ede400a45633fbd5ca9e7cc6\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +88,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/webhooks" }, - "duration": 301 + "duration": 507 }, { - "recordedAt": 1661456505, + "recordedAt": 1668466042, "request": { "body": "{\n \"webhook\": {}\n}", "method": "PUT", @@ -108,10 +108,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f307913a24ad11ed868c03cbdb318f09" + "uri": "https://api.easypost.com/v2/webhooks/hook_4c5d4e0a646e11edbc703321fe587622" }, "response": { - "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-08-25T19:41:44Z\",\n \"id\": \"hook_f307913a24ad11ed868c03cbdb318f09\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", + "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-11-14T22:47:21Z\",\n \"id\": \"hook_4c5d4e0a646e11edbc703321fe587622\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", "httpVersion": null, "headers": { "null": [ @@ -151,26 +151,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d078f7b73dca00087a23" + "3a8b2e0e6372c579e0d9e6e20019b8c2" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.452775" + "0.601204" ], "etag": [ - "W/\"e08820888dc36b690385bf7fbc7572fb\"" + "W/\"b5028913ede400a45633fbd5ca9e7cc6\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,13 +181,12 @@ "code": 201, "message": "Created" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f307913a24ad11ed868c03cbdb318f09" + "uri": "https://api.easypost.com/v2/webhooks/hook_4c5d4e0a646e11edbc703321fe587622" }, - "duration": 590 + "duration": 927 }, { - "recordedAt": 1661456505, + "recordedAt": 1668466042, "request": { "body": "", "method": "GET", @@ -198,10 +198,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f307913a24ad11ed868c03cbdb318f09" + "uri": "https://api.easypost.com/v2/webhooks/hook_4c5d4e0a646e11edbc703321fe587622" }, "response": { - "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-08-25T19:41:44Z\",\n \"id\": \"hook_f307913a24ad11ed868c03cbdb318f09\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", + "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2022-11-14T22:47:21Z\",\n \"id\": \"hook_4c5d4e0a646e11edbc703321fe587622\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", "httpVersion": null, "headers": { "null": [ @@ -214,7 +214,7 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb8nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -241,26 +241,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d079f7a9055800087a77" + "3a8b2e0e6372c57ae0d9e6e60019b91a" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.025438" + "0.025644" ], "etag": [ - "W/\"e08820888dc36b690385bf7fbc7572fb\"" + "W/\"b5028913ede400a45633fbd5ca9e7cc6\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -270,13 +271,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f307913a24ad11ed868c03cbdb318f09" + "uri": "https://api.easypost.com/v2/webhooks/hook_4c5d4e0a646e11edbc703321fe587622" }, - "duration": 153 + "duration": 252 }, { - "recordedAt": 1661456505, + "recordedAt": 1668466043, "request": { "body": "", "method": "DELETE", @@ -288,7 +288,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f307913a24ad11ed868c03cbdb318f09" + "uri": "https://api.easypost.com/v2/webhooks/hook_4c5d4e0a646e11edbc703321fe587622" }, "response": { "body": "{}", @@ -304,7 +304,7 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -324,9 +324,6 @@ "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], "x-content-type-options": [ "nosniff" ], @@ -334,17 +331,18 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "07323c3c6307d079e68d5a6a00087a8c" + "3a8b2e086372c57ae0d9e6e70019b935" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.317772" + "0.393469" ], "etag": [ "W/\"44136fa355b3678a1146ad16f7e8649e\"" @@ -353,7 +351,7 @@ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202211142148-00c0334849-master" ], "cache-control": [ "private, no-cache, no-store" @@ -363,9 +361,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f307913a24ad11ed868c03cbdb318f09" + "uri": "https://api.easypost.com/v2/webhooks/hook_4c5d4e0a646e11edbc703321fe587622" }, - "duration": 486 + "duration": 608 } ] \ No newline at end of file diff --git a/src/test/java/com/easypost/AddressTest.java b/src/test/java/com/easypost/AddressTest.java index cdd5295c1..43881268d 100644 --- a/src/test/java/com/easypost/AddressTest.java +++ b/src/test/java/com/easypost/AddressTest.java @@ -3,6 +3,7 @@ import com.easypost.exception.EasyPostException; import com.easypost.model.Address; import com.easypost.model.AddressCollection; + import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -36,8 +37,8 @@ public static void setup() throws EasyPostException { * @return basic Address object * @throws EasyPostException */ - public static Address createBasicAddress() throws EasyPostException { - return Address.create(Fixtures.caAddress1()); + public Address createBasicAddress() throws EasyPostException { + return vcr.client.address.create(Fixtures.caAddress1()); } /** @@ -70,7 +71,7 @@ public void testCreateVerify() throws EasyPostException { Map addressData = Fixtures.incorrectAddress(); addressData.put("verify", true); - Address address = Address.create(addressData); + Address address = vcr.client.address.create(addressData); assertInstanceOf(Address.class, address); assertTrue(address.getId().startsWith("adr_")); @@ -89,7 +90,7 @@ public void testCreateVerifyStrict() throws EasyPostException { Map addressData = Fixtures.caAddress1(); addressData.put("verify_strict", true); - Address address = Address.create(addressData); + Address address = vcr.client.address.create(addressData); assertInstanceOf(Address.class, address); assertTrue(address.getId().startsWith("adr_")); @@ -112,7 +113,7 @@ public void testCreateVerifyArray() throws EasyPostException { verificationList.add(true); addressData.put("verify", verificationList); - Address address = Address.create(addressData); + Address address = vcr.client.address.create(addressData); assertInstanceOf(Address.class, address); assertTrue(address.getId().startsWith("adr_")); @@ -129,7 +130,7 @@ public void testRetrieve() throws EasyPostException { vcr.setUpTest("retrieve"); Address address = createBasicAddress(); - Address retrievedAddress = Address.retrieve(address.getId()); + Address retrievedAddress = vcr.client.address.retrieve(address.getId()); assertInstanceOf(Address.class, retrievedAddress); assertTrue(address.equals(retrievedAddress)); @@ -147,7 +148,7 @@ public void testAll() throws EasyPostException { Map params = new HashMap<>(); params.put("page_size", Fixtures.pageSize()); - AddressCollection addresses = Address.all(params); + AddressCollection addresses = vcr.client.address.all(params); List
      addressesList = addresses.getAddresses(); @@ -169,7 +170,7 @@ public void testCreateAndVerify() throws EasyPostException { Map addressData = Fixtures.caAddress1(); - Address address = Address.createAndVerify(addressData); + Address address = vcr.client.address.createAndVerify(addressData); assertInstanceOf(Address.class, address); assertTrue(address.getId().startsWith("adr_")); @@ -187,7 +188,7 @@ public void testVerify() throws EasyPostException { Address address = createBasicAddress(); - Address verifiedAddress = address.verify(); + Address verifiedAddress = vcr.client.address.verify(address.getId()); assertInstanceOf(Address.class, address); assertTrue(verifiedAddress.getId().startsWith("adr_")); @@ -203,7 +204,7 @@ public void testVerify() throws EasyPostException { public void testInvalidAddressCreation() throws EasyPostException { vcr.setUpTest("error_address_creation"); EasyPostException exception = assertThrows(EasyPostException.class, - () -> Address.createAndVerify(null)); + () -> vcr.client.address.createAndVerify(null)); assertEquals("PARAMETER.REQUIRED", exception.getCode()); assertEquals(422, exception.getStatusCode()); diff --git a/src/test/java/com/easypost/BatchTest.java b/src/test/java/com/easypost/BatchTest.java index d08ff4143..0c21e5a3c 100644 --- a/src/test/java/com/easypost/BatchTest.java +++ b/src/test/java/com/easypost/BatchTest.java @@ -58,7 +58,7 @@ private static Batch createBasicBatch() throws EasyPostException { shipments.add(Fixtures.basicShipment()); params.put("shipments", shipments); - return Batch.create(params); + return vcr.client.batch.create(params); } /** @@ -72,7 +72,7 @@ public void testRetrieve() throws EasyPostException { Batch batch = createBasicBatch(); - Batch retrievedBatch = Batch.retrieve(batch.getId()); + Batch retrievedBatch = vcr.client.batch.retrieve(batch.getId()); assertInstanceOf(Batch.class, batch); // Must compare IDs since elements of batch (i.e. status) may be different @@ -91,7 +91,7 @@ public void testAll() throws EasyPostException { Map params = new HashMap<>(); params.put("page_size", Fixtures.pageSize()); - BatchCollection batches = Batch.all(params); + BatchCollection batches = vcr.client.batch.all(params); List batchesList = batches.getBatches(); @@ -116,7 +116,7 @@ public void testCreateAndBuy() throws EasyPostException { params.put("shipments", shipmentData); - Batch batch = Batch.createAndBuy(params); + Batch batch = vcr.client.batch.createAndBuy(params); assertInstanceOf(Batch.class, batch); assertTrue(batch.getId().startsWith("batch_")); @@ -134,7 +134,7 @@ public void testBuy() throws EasyPostException { Batch batch = createOneCallBuyBatch(); - batch = batch.buy(); + batch = vcr.client.batch.buy(batch.getId()); assertInstanceOf(Batch.class, batch); assertEquals(1, batch.getNumShipments().intValue()); @@ -147,7 +147,7 @@ private static Batch createOneCallBuyBatch() throws EasyPostException { shipments.add(Fixtures.oneCallBuyShipment()); params.put("shipments", shipments); - return Batch.create(params); + return vcr.client.batch.create(params); } /** @@ -160,13 +160,13 @@ public void testCreateScanForm() throws EasyPostException, InterruptedException vcr.setUpTest("create_scanform"); Batch batch = createOneCallBuyBatch(); - batch = batch.buy(); + batch = vcr.client.batch.buy(batch.getId()); if (vcr.isRecording()) { Thread.sleep(10000); // Wait enough time for processing } - Batch batchWithScanForm = batch.createScanForm(); + Batch batchWithScanForm = vcr.client.batch.createScanForm(batch.getId()); // We can't assert anything meaningful here // because the scanform gets queued for generation and may not be immediately available @@ -182,9 +182,9 @@ public void testCreateScanForm() throws EasyPostException, InterruptedException public void testAddRemoveShipment() throws EasyPostException { vcr.setUpTest("add_remove_shipment"); - Shipment shipment = Shipment.create(Fixtures.oneCallBuyShipment()); + Shipment shipment = vcr.client.shipment.create(Fixtures.oneCallBuyShipment()); - Batch batch = Batch.create(); + Batch batch = vcr.client.batch.create(); List shipmentData = new ArrayList<>(); Map params = new HashMap<>(); @@ -192,11 +192,11 @@ public void testAddRemoveShipment() throws EasyPostException { shipmentData.add(shipment); params.put("shipments", shipmentData); - Batch batchWithAddedShipment = batch.addShipments(params); + Batch batchWithAddedShipment = vcr.client.batch.addShipments(batch.getId(), params); assertEquals(1, batchWithAddedShipment.getNumShipments().intValue()); - Batch batchWithoutShipment = batch.removeShipments(params); + Batch batchWithoutShipment = vcr.client.batch.removeShipments(batch.getId(), params); assertEquals(0, batchWithoutShipment.getNumShipments().intValue()); } @@ -212,7 +212,7 @@ public void testLabel() throws EasyPostException, InterruptedException { Batch batch = createOneCallBuyBatch(); - batch = batch.buy(); + batch = vcr.client.batch.buy(batch.getId()); if (vcr.isRecording()) { Thread.sleep(10000); // Wait enough time for processing @@ -221,7 +221,7 @@ public void testLabel() throws EasyPostException, InterruptedException { Map params = new HashMap<>(); params.put("file_format", "ZPL"); - Batch batchWithLabel = batch.label(params); + Batch batchWithLabel = vcr.client.batch.label(batch.getId(), params); // We can't assert anything meaningful here // because the label gets queued for generation and may not be immediately available diff --git a/src/test/java/com/easypost/BillingTest.java b/src/test/java/com/easypost/BillingTest.java index 1038f8c6d..07f8f4458 100644 --- a/src/test/java/com/easypost/BillingTest.java +++ b/src/test/java/com/easypost/BillingTest.java @@ -1,7 +1,6 @@ package com.easypost; import com.easypost.exception.EasyPostException; -import com.easypost.model.Billing; import com.easypost.model.PaymentMethod; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Disabled; @@ -33,7 +32,7 @@ public static void setup() throws EasyPostException { public void testDeletePaymentMethod() throws EasyPostException { vcr.setUpTest("delete_payment_method"); - assertDoesNotThrow(() -> Billing.deletePaymentMethod(PaymentMethod.Priority.PRIMARY)); + assertDoesNotThrow(() -> vcr.client.billing.deletePaymentMethod(PaymentMethod.Priority.PRIMARY)); } /** @@ -46,7 +45,7 @@ public void testDeletePaymentMethod() throws EasyPostException { public void testFundWallet() throws EasyPostException { vcr.setUpTest("fund_wallet"); - assertDoesNotThrow(() -> Billing.fundWallet("2000", PaymentMethod.Priority.PRIMARY)); + assertDoesNotThrow(() -> vcr.client.billing.fundWallet("2000", PaymentMethod.Priority.PRIMARY)); } /** @@ -59,7 +58,7 @@ public void testFundWallet() throws EasyPostException { public void testRetrievePaymentMethods() throws EasyPostException { vcr.setUpTest("retrieve_payment_methods"); - PaymentMethod paymentMethods = Billing.retrievePaymentMethods(); + PaymentMethod paymentMethods = vcr.client.billing.retrievePaymentMethods(); assertNotNull(paymentMethods.getPrimaryPaymentMethodObject()); assertNotNull(paymentMethods.getSecondaryPaymentMethodObject()); diff --git a/src/test/java/com/easypost/CarrierAccountTest.java b/src/test/java/com/easypost/CarrierAccountTest.java index f0bd4c371..1706919c0 100644 --- a/src/test/java/com/easypost/CarrierAccountTest.java +++ b/src/test/java/com/easypost/CarrierAccountTest.java @@ -38,8 +38,8 @@ public static void setup() throws EasyPostException { public void cleanup() { if (testCarrierAccountId != null) { try { - CarrierAccount carrierAccount = CarrierAccount.retrieve(testCarrierAccountId); - carrierAccount.delete(); + CarrierAccount carrierAccount = vcr.client.carrierAccount.retrieve(testCarrierAccountId); + vcr.client.carrierAccount.delete(carrierAccount.getId()); testCarrierAccountId = null; } catch (Exception e) { // in case we try to delete something that's already been deleted @@ -64,7 +64,7 @@ public void testCreate() throws EasyPostException { } private static CarrierAccount createBasicCarrierAccount() throws EasyPostException { - CarrierAccount carrierAccount = CarrierAccount.create(Fixtures.basicCarrierAccount()); + CarrierAccount carrierAccount = vcr.client.carrierAccount.create(Fixtures.basicCarrierAccount()); testCarrierAccountId = carrierAccount.getId(); // trigger deletion after test return carrierAccount; } @@ -80,7 +80,7 @@ public void testRetrieve() throws EasyPostException { CarrierAccount carrierAccount = createBasicCarrierAccount(); - CarrierAccount retrieveCarrierAccount = CarrierAccount.retrieve(carrierAccount.getId()); + CarrierAccount retrieveCarrierAccount = vcr.client.carrierAccount.retrieve(carrierAccount.getId()); assertInstanceOf(CarrierAccount.class, retrieveCarrierAccount); assertTrue(retrieveCarrierAccount.getId().startsWith("ca_")); @@ -96,7 +96,7 @@ public void testRetrieve() throws EasyPostException { public void testAll() throws EasyPostException { vcr.setUpTest("all"); - List carrierAccounts = CarrierAccount.all(); + List carrierAccounts = vcr.client.carrierAccount.all(); assertTrue(carrierAccounts.stream().allMatch(carrier -> carrier instanceof CarrierAccount)); } @@ -117,7 +117,7 @@ public void testUpdate() throws EasyPostException { Map updateParams = new HashMap<>(); updateParams.put("description", testDescription); - CarrierAccount updatedCarrierAccount = carrierAccount.update(updateParams); + CarrierAccount updatedCarrierAccount = vcr.client.carrierAccount.update(updateParams, carrierAccount.getId()); assertInstanceOf(CarrierAccount.class, carrierAccount); assertTrue(updatedCarrierAccount.getId().startsWith("ca_")); @@ -135,7 +135,7 @@ public void testDelete() throws EasyPostException { CarrierAccount carrierAccount = createBasicCarrierAccount(); - assertDoesNotThrow(() -> carrierAccount.delete()); + assertDoesNotThrow(() -> vcr.client.carrierAccount.delete(carrierAccount.getId())); } /** @@ -147,7 +147,7 @@ public void testDelete() throws EasyPostException { public void testTypes() throws EasyPostException { vcr.setUpTest("types"); - List types = CarrierType.all(); + List types = vcr.client.carrierType.all(); assertInstanceOf(List.class, types); assertTrue(types.stream().allMatch(type -> type instanceof CarrierType)); diff --git a/src/test/java/com/easypost/CustomsInfoTest.java b/src/test/java/com/easypost/CustomsInfoTest.java index 383f4b042..8fb25bb69 100644 --- a/src/test/java/com/easypost/CustomsInfoTest.java +++ b/src/test/java/com/easypost/CustomsInfoTest.java @@ -22,6 +22,15 @@ public static void setup() throws EasyPostException { vcr = new TestUtils.VCR("customs_info", TestUtils.ApiKey.TEST); } + /** + * Create a customs info object. + * + * @return CustomsInfo object. + */ + private static CustomsInfo createBasicCustomsInfo() throws EasyPostException { + return vcr.client.customsInfo.create(Fixtures.basicCustomsInfo()); + } + /** * Test creating a CustomsInfo. * @@ -38,15 +47,6 @@ public void testCreate() throws EasyPostException { assertEquals("NOEEI 30.37(a)", customsInfo.getEelPfc()); } - /** - * Create a customs info object. - * - * @return CustomsInfo object. - */ - private static CustomsInfo createBasicCustomsInfo() throws EasyPostException { - return CustomsInfo.create(Fixtures.basicCustomsInfo()); - } - /** * Test retrieving a CustomsInfo. * @@ -58,7 +58,7 @@ public void testRetrieve() throws EasyPostException { CustomsInfo customsInfo = createBasicCustomsInfo(); - CustomsInfo retrievedCustomsInfo = CustomsInfo.retrieve(customsInfo.getId()); + CustomsInfo retrievedCustomsInfo = vcr.client.customsInfo.retrieve(customsInfo.getId()); assertInstanceOf(CustomsInfo.class, retrievedCustomsInfo); assertTrue(customsInfo.equals(retrievedCustomsInfo)); diff --git a/src/test/java/com/easypost/CustomsItemTest.java b/src/test/java/com/easypost/CustomsItemTest.java index b0ddfc0a2..a308d2e02 100644 --- a/src/test/java/com/easypost/CustomsItemTest.java +++ b/src/test/java/com/easypost/CustomsItemTest.java @@ -22,6 +22,15 @@ public static void setup() throws EasyPostException { vcr = new TestUtils.VCR("customs_item", TestUtils.ApiKey.TEST); } + /** + * Create a customs item. + * + * @return CustomsItem object. + */ + private static CustomsItem createBasicCustomsItem() throws EasyPostException { + return vcr.client.customsItem.create(Fixtures.basicCustomsItem()); + } + /** * Test creating a CustomsItem. * @@ -38,15 +47,6 @@ public void testCreate() throws EasyPostException { assertEquals(23.25, customsItem.getValue(), 0.01); } - /** - * Create a customs item. - * - * @return CustomsItem object. - */ - private static CustomsItem createBasicCustomsItem() throws EasyPostException { - return CustomsItem.create(Fixtures.basicCustomsItem()); - } - /** * Test retrieving a CustomsItem. * @@ -58,7 +58,7 @@ public void testRetrieve() throws EasyPostException { CustomsItem customsItem = createBasicCustomsItem(); - CustomsItem retrieveCustomsItem = CustomsItem.retrieve(customsItem.getId()); + CustomsItem retrieveCustomsItem = vcr.client.customsItem.retrieve(customsItem.getId()); assertInstanceOf(CustomsItem.class, customsItem); assertTrue(customsItem.equals(retrieveCustomsItem)); diff --git a/src/test/java/com/easypost/EasyPostTest.java b/src/test/java/com/easypost/EasyPostTest.java index 3bb1305cb..d510baaf6 100644 --- a/src/test/java/com/easypost/EasyPostTest.java +++ b/src/test/java/com/easypost/EasyPostTest.java @@ -3,49 +3,69 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import com.easypost.http.Requestor; +import com.easypost.exception.General.MissingParameterError; +import com.easypost.service.EasyPostClient; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; public final class EasyPostTest { private static TestUtils.VCR vcr; /** * Set up the testing environment for this file. + * + * @throws MissingParameterError */ @BeforeAll - public static void setup() { + public static void setup() throws MissingParameterError { vcr = new TestUtils.VCR("client", TestUtils.ApiKey.TEST); } /** * Test connection timeout getter and setter. + * + * @throws MissingParameterError */ @Test - public void testConnectionTimeout() { + public void testConnectionTimeout() throws MissingParameterError { + EasyPostClient client = new EasyPostClient("fake_api_key", 1); - int testTimeout = 1; - - Requestor.setConnectTimeoutMilliseconds(testTimeout); - - assertEquals(1, Requestor.getConnectTimeoutMilliseconds()); - - // We have to set the connection timeout back to default to avoid other unit tests getting timeout. - Requestor.setConnectTimeoutMilliseconds(30000); + assertEquals(1, client.getConnectionTimeoutMilliseconds()); } /** * Test read timeout getter and setter. + * + * @throws MissingParameterError */ @Test - public void testRequestTimeout() { - int testTimeout = 1; + public void testRequestTimeout() throws MissingParameterError { + EasyPostClient client = new EasyPostClient("fake_api_key", 1, 10); - Requestor.setReadTimeoutMilliseconds(testTimeout); + assertEquals(10, client.getReadTimeoutMilliseconds()); + } + + /** + * Test setting API base. + * + * @throws MissingParameterError + */ + @Test + public void testApiBase() throws MissingParameterError { + EasyPostClient client = new EasyPostClient("fake_api_key", "https://api.easypostExample.com"); - assertEquals(1, Requestor.getReadTimeoutMilliseconds()); + assertEquals("https://api.easypostExample.com", client.getApiBase()); + } - // We have to set the connection timeout back to default to avoid other unit tests getting timeout. - Requestor.setReadTimeoutMilliseconds(60000); + /** + * Test create EasyPostClient with invalid API key. + * + * @throws MissingParameterError + */ + @Test + public void testCreateEasyPostClientWithInvalidKey() throws MissingParameterError { + assertThrows(MissingParameterError.class, () -> new EasyPostClient(null)); + assertThrows(MissingParameterError.class, () -> new EasyPostClient(null)); } } diff --git a/src/test/java/com/easypost/EndShipperTest.java b/src/test/java/com/easypost/EndShipperTest.java index 4f04d3fc7..aedbbb789 100644 --- a/src/test/java/com/easypost/EndShipperTest.java +++ b/src/test/java/com/easypost/EndShipperTest.java @@ -28,6 +28,15 @@ public static void setup() throws EasyPostException { vcr = new TestUtils.VCR("end_shipper", TestUtils.ApiKey.TEST); } + /** + * Create an EndShipper. + * + * @return EndShipper object. + */ + private static EndShipper createEndShipper() throws EasyPostException { + return vcr.client.endShipper.create(Fixtures.caAddress1()); + } + /** * Test creating an EndShipper object. * @@ -44,15 +53,6 @@ public void testCreate() throws EasyPostException { assertEquals("388 TOWNSEND ST APT 20", endShipper.getStreet1()); } - /** - * Create an EndShipper. - * - * @return EndShipper object. - */ - private static EndShipper createEndShipper() throws EasyPostException { - return EndShipper.create(Fixtures.caAddress1()); - } - /** * Test retrieving an EndShipper object. * @@ -64,7 +64,7 @@ public void testRetrieve() throws EasyPostException { EndShipper endShipper = createEndShipper(); - EndShipper retrievedEndShipper = EndShipper.retrieve(endShipper.getId()); + EndShipper retrievedEndShipper = vcr.client.endShipper.retrieve(endShipper.getId()); assertInstanceOf(EndShipper.class, retrievedEndShipper); assertEquals(endShipper.getStreet1(), retrievedEndShipper.getStreet1()); @@ -82,7 +82,7 @@ public void testAll() throws EasyPostException { Map params = new HashMap<>(); params.put("page_size", Fixtures.pageSize()); - EndShipperCollection endShipperCollection = EndShipper.all(params); + EndShipperCollection endShipperCollection = vcr.client.endShipper.all(params); List endShippers = endShipperCollection.getEndShippers(); @@ -115,7 +115,7 @@ public void testUpdate() throws EasyPostException { updateParams.put("phone", "9999999999"); updateParams.put("email", "test@example.com"); - EndShipper updatedEndShipper = endShipper.update(updateParams); + EndShipper updatedEndShipper = vcr.client.endShipper.update(updateParams, endShipper.getId()); assertInstanceOf(EndShipper.class, updatedEndShipper); assertTrue(updatedEndShipper.getId().startsWith("es_")); diff --git a/src/test/java/com/easypost/ErrorTest.java b/src/test/java/com/easypost/ErrorTest.java index ce81bd1f3..eee1d8944 100644 --- a/src/test/java/com/easypost/ErrorTest.java +++ b/src/test/java/com/easypost/ErrorTest.java @@ -6,6 +6,7 @@ import com.easypost.exception.API.ServiceUnavailablError; import com.easypost.exception.API.UnauthorizedError; import com.easypost.exception.API.UnknownApiError; +import com.easypost.exception.General.MissingParameterError; import com.easypost.http.Requestor; import com.easypost.exception.API.PaymentError; import com.easypost.exception.API.RateLimitError; @@ -16,7 +17,6 @@ import com.easypost.exception.API.GatewayTimeoutError; import com.easypost.exception.API.InternalServerError; import com.easypost.exception.API.InvalidRequestError; -import com.easypost.model.Shipment; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -32,11 +32,12 @@ public final class ErrorTest extends Requestor { /** * Set up the testing environment for this file. + * @throws MissingParameterError * * @throws EasyPostException when the request fails. */ @BeforeAll - public static void setup() { + public static void setup() throws MissingParameterError { vcr = new TestUtils.VCR("error", TestUtils.ApiKey.TEST); } @@ -49,7 +50,7 @@ public static void setup() { public void testError() throws EasyPostException { vcr.setUpTest("error"); - EasyPostException exception = assertThrows(InvalidRequestError.class, () -> Shipment.create(null)); + EasyPostException exception = assertThrows(InvalidRequestError.class, () -> vcr.client.shipment.create(null)); assertEquals(422, exception.getStatusCode()); assertEquals("PARAMETER.REQUIRED", exception.getCode()); diff --git a/src/test/java/com/easypost/EventTest.java b/src/test/java/com/easypost/EventTest.java index 5b5ee7c4c..06c06bddc 100644 --- a/src/test/java/com/easypost/EventTest.java +++ b/src/test/java/com/easypost/EventTest.java @@ -54,7 +54,7 @@ public void testAll() throws EasyPostException { private static EventCollection getBasicEventCollection() throws EasyPostException { Map params = new HashMap<>(); params.put("page_size", Fixtures.pageSize()); - return Event.all(params); + return vcr.client.event.all(params); } /** @@ -70,7 +70,7 @@ public void testRetrieve() throws EasyPostException { List events = eventCollection.getEvents(); Event event = events.get(0); - Event retrievedEvent = Event.retrieve(event.getId()); + Event retrievedEvent = vcr.client.event.retrieve(event.getId()); assertInstanceOf(Event.class, retrievedEvent); // Must compare IDs since can't do whole-object comparisons currently diff --git a/src/test/java/com/easypost/Fixtures.java b/src/test/java/com/easypost/Fixtures.java index 2142bfafb..3e28546c6 100644 --- a/src/test/java/com/easypost/Fixtures.java +++ b/src/test/java/com/easypost/Fixtures.java @@ -231,7 +231,7 @@ public static HashMap basicPickup() { If you need to re-record cassettes, increment the date below and ensure it is one day in the future, USPS only does "next-day" pickups including Saturday but not Sunday or Holidays. */ - String pickupDate = "2022-11-01"; + String pickupDate = "2022-12-01"; fixture.put("min_datetime", pickupDate); fixture.put("max_datetime", pickupDate); diff --git a/src/test/java/com/easypost/InsuranceTest.java b/src/test/java/com/easypost/InsuranceTest.java index 9cbf5a88d..3ede697b2 100644 --- a/src/test/java/com/easypost/InsuranceTest.java +++ b/src/test/java/com/easypost/InsuranceTest.java @@ -29,6 +29,20 @@ public static void setup() throws EasyPostException { vcr = new TestUtils.VCR("insurance", TestUtils.ApiKey.TEST); } + /** + * Create insurance object. + * + * @return Insurance object + */ + private static Insurance createBasicInsurance() throws EasyPostException { + Shipment shipment = vcr.client.shipment.create(Fixtures.oneCallBuyShipment()); + + HashMap params = Fixtures.basicInsurance(); + params.put("tracking_code", shipment.getTrackingCode()); + + return vcr.client.insurance.create(params); + } + /** * Test creating an insurance object. * @@ -45,20 +59,6 @@ public void testCreate() throws EasyPostException { assertEquals("100.00000", insurance.getAmount()); } - /** - * Create insurance object. - * - * @return Insurance object - */ - private static Insurance createBasicInsurance() throws EasyPostException { - Shipment shipment = Shipment.create(Fixtures.oneCallBuyShipment()); - - HashMap params = Fixtures.basicInsurance(); - params.put("tracking_code", shipment.getTrackingCode()); - - return Insurance.create(params); - } - /** * Test retrieving an insurance object. * @@ -70,7 +70,7 @@ public void testRetrieve() throws EasyPostException { Insurance insurance = createBasicInsurance(); - Insurance retrievedInsurance = Insurance.retrieve(insurance.getId()); + Insurance retrievedInsurance = vcr.client.insurance.retrieve(insurance.getId()); assertInstanceOf(Insurance.class, insurance); // Must compare IDs since can't do whole-object comparisons currently @@ -89,7 +89,7 @@ public void testAll() throws EasyPostException { Map params = new HashMap<>(); params.put("page_size", Fixtures.pageSize()); - InsuranceCollection insuranceCollection = Insurance.all(params); + InsuranceCollection insuranceCollection = vcr.client.insurance.all(params); List insurances = insuranceCollection.getInsurances(); diff --git a/src/test/java/com/easypost/OrderTest.java b/src/test/java/com/easypost/OrderTest.java index e51d3a343..a7b7c6af6 100644 --- a/src/test/java/com/easypost/OrderTest.java +++ b/src/test/java/com/easypost/OrderTest.java @@ -32,6 +32,15 @@ public static void setup() throws EasyPostException { vcr = new TestUtils.VCR("order", TestUtils.ApiKey.TEST); } + /** + * Create an order. + * + * @return Order object + */ + private static Order createBasicOrder() throws EasyPostException { + return vcr.client.order.create(Fixtures.basicOrder()); + } + /** * Test creating an Order. * @@ -48,15 +57,6 @@ public void testCreate() throws EasyPostException { assertNotNull(order.getRates()); } - /** - * Create an order. - * - * @return Order object - */ - private static Order createBasicOrder() throws EasyPostException { - return Order.create(Fixtures.basicOrder()); - } - /** * Test retrieving an Order. * @@ -68,7 +68,7 @@ public void testRetrieve() throws EasyPostException { Order order = createBasicOrder(); - Order retrievedOrder = Order.retrieve(order.getId()); + Order retrievedOrder = vcr.client.order.retrieve(order.getId()); assertInstanceOf(Order.class, retrievedOrder); // Must compare IDs since other elements of objects may be different @@ -101,7 +101,7 @@ public void testGetRates() throws EasyPostException { * @throws EasyPostException when the request fails. */ @Test - public void testBuy() throws EasyPostException { + public void testBuy() throws EasyPostException, InterruptedException { vcr.setUpTest("buy"); Order order = createBasicOrder(); @@ -110,9 +110,9 @@ public void testBuy() throws EasyPostException { params.put("carrier", Fixtures.usps()); params.put("service", Fixtures.uspsService()); - order.buy(params); + Order boughtOrder = vcr.client.order.buy(order.getId(), params); - List shipments = order.getShipments(); + List shipments = boughtOrder.getShipments(); assertInstanceOf(Order.class, order); for (Shipment shipment : shipments) { @@ -132,22 +132,22 @@ public void testLowestRate() throws EasyPostException { Order order = createBasicOrder(); // Test lowest rate with no filters - Rate lowestRate = order.lowestRate(); + Rate lowestRate = vcr.client.order.lowestRate(order); assertEquals("First", lowestRate.getService()); - assertEquals(5.57, lowestRate.getRate(), 0.01); + assertEquals(5.82, lowestRate.getRate(), 0.01); assertEquals("USPS", lowestRate.getCarrier()); // Test lowest rate with service filter (this rate is higher than the lowest but should filter) List services = new ArrayList<>(Arrays.asList("Priority")); - Rate lowestRateService = order.lowestRate(null, services); + Rate lowestRateService = vcr.client.order.lowestRate(null, services, order); assertEquals("Priority", lowestRateService.getService()); - assertEquals(7.90, lowestRateService.getRate(), 0.01); + assertEquals(8.15, lowestRateService.getRate(), 0.01); assertEquals("USPS", lowestRateService.getCarrier()); // Test lowest rate with carrier filter (should error due to bad carrier) List carriers = new ArrayList<>(Arrays.asList("BAD CARRIER")); assertThrows(EasyPostException.class, () -> { - order.lowestRate(carriers, null); + vcr.client.order.lowestRate(carriers, null, order); }); } } diff --git a/src/test/java/com/easypost/ParcelTest.java b/src/test/java/com/easypost/ParcelTest.java index 2678f3b32..8ffcab73e 100644 --- a/src/test/java/com/easypost/ParcelTest.java +++ b/src/test/java/com/easypost/ParcelTest.java @@ -44,7 +44,7 @@ public void testCreate() throws EasyPostException { * @return Parcel object */ private static Parcel createBasicParcel() throws EasyPostException { - return Parcel.create(Fixtures.basicParcel()); + return vcr.client.parcel.create(Fixtures.basicParcel()); } /** @@ -58,7 +58,7 @@ public void testRetrieve() throws EasyPostException { Parcel parcel = createBasicParcel(); - Parcel retrievedParcel = Parcel.retrieve(parcel.getId()); + Parcel retrievedParcel = vcr.client.parcel.retrieve(parcel.getId()); assertInstanceOf(Parcel.class, retrievedParcel); assertTrue(parcel.equals(retrievedParcel)); diff --git a/src/test/java/com/easypost/PickupTest.java b/src/test/java/com/easypost/PickupTest.java index bd26f29d4..1f0af2a5d 100644 --- a/src/test/java/com/easypost/PickupTest.java +++ b/src/test/java/com/easypost/PickupTest.java @@ -33,6 +33,20 @@ public static void setup() throws EasyPostException { vcr = new TestUtils.VCR("pickup", TestUtils.ApiKey.TEST); } + /** + * Create a pickup. + * + * @return Pickup object + */ + private static Pickup createBasicPickup() throws EasyPostException { + Shipment shipment = vcr.client.shipment.create(Fixtures.oneCallBuyShipment()); + + Map pickupData = Fixtures.basicPickup(); + pickupData.put("shipment", shipment); + + return vcr.client.pickup.create(pickupData); + } + /** * Test creating a pickup. * @@ -46,21 +60,7 @@ public void testCreate() throws EasyPostException { assertInstanceOf(Pickup.class, pickup); assertTrue(pickup.getId().startsWith("pickup_")); - assertNotNull(pickup.getPickupRates()); - } - - /** - * Create a pickup. - * - * @return Pickup object - */ - private static Pickup createBasicPickup() throws EasyPostException { - Shipment shipment = Shipment.create(Fixtures.oneCallBuyShipment()); - - Map pickupData = Fixtures.basicPickup(); - pickupData.put("shipment", shipment); - - return Pickup.create(pickupData); + assertNotNull(pickup.getPickoutRates()); } /** @@ -74,7 +74,7 @@ public void testRetrieve() throws EasyPostException { Pickup pickup = createBasicPickup(); - Pickup retrievedPickup = Pickup.retrieve(pickup.getId()); + Pickup retrievedPickup = vcr.client.pickup.retrieve(pickup.getId()); assertInstanceOf(Pickup.class, retrievedPickup); assertTrue(pickup.equals(retrievedPickup)); @@ -95,7 +95,7 @@ public void testBuy() throws EasyPostException, InterruptedException { params.put("carrier", Fixtures.usps()); params.put("service", Fixtures.pickupService()); - Pickup boughtPickup = pickup.buy(params); + Pickup boughtPickup = vcr.client.pickup.buy(pickup.getId(), params); assertInstanceOf(Pickup.class, boughtPickup); assertTrue(boughtPickup.getId().startsWith("pickup_")); @@ -117,9 +117,9 @@ public void testCancel() throws EasyPostException, InterruptedException { Map params = new HashMap<>(); params.put("carrier", Fixtures.usps()); params.put("service", Fixtures.pickupService()); - Pickup boughtPickup = pickup.buy(params); + Pickup boughtPickup = vcr.client.pickup.buy(pickup.getId(), params); - Pickup cancelledPickup = boughtPickup.cancel(); + Pickup cancelledPickup = vcr.client.pickup.cancel(boughtPickup.getId()); assertInstanceOf(Pickup.class, cancelledPickup); assertTrue(cancelledPickup.getId().startsWith("pickup_")); @@ -138,7 +138,7 @@ public void testLowestRate() throws EasyPostException { Pickup pickup = createBasicPickup(); // Test lowest rate with no filters - PickupRate lowestRate = pickup.lowestRate(); + PickupRate lowestRate = vcr.client.pickup.lowestRate(pickup); assertEquals("NextDay", lowestRate.getService()); assertEquals(0.00, lowestRate.getRate(), 0.01); assertEquals("USPS", lowestRate.getCarrier()); @@ -146,13 +146,13 @@ public void testLowestRate() throws EasyPostException { // Test lowest rate with service filter (should error due to bad service) List services = new ArrayList<>(Arrays.asList("BAD SERVICE")); assertThrows(EasyPostException.class, () -> { - pickup.lowestRate(null, services); + vcr.client.pickup.lowestRate(null, services, pickup); }); // Test lowest rate with carrier filter (should error due to bad carrier) List carriers = new ArrayList<>(Arrays.asList("BAD CARRIER")); assertThrows(EasyPostException.class, () -> { - pickup.lowestRate(carriers, null); + vcr.client.pickup.lowestRate(carriers, null, pickup); }); } } diff --git a/src/test/java/com/easypost/RateTest.java b/src/test/java/com/easypost/RateTest.java index dfa729558..782eb6ce3 100644 --- a/src/test/java/com/easypost/RateTest.java +++ b/src/test/java/com/easypost/RateTest.java @@ -31,10 +31,10 @@ public static void setup() throws EasyPostException { public void testRetrieve() throws EasyPostException { vcr.setUpTest("retrieve"); - Shipment shipment = Shipment.create(Fixtures.basicShipment()); + Shipment shipment = vcr.client.shipment.create(Fixtures.basicShipment()); Rate rate = shipment.getRates().get(0); - Rate retrievedRate = Rate.retrieve(rate.getId()); + Rate retrievedRate = vcr.client.rate.retrieve(rate.getId()); assertInstanceOf(Rate.class, rate); assertTrue(rate.equals(retrievedRate)); diff --git a/src/test/java/com/easypost/ReferralTest.java b/src/test/java/com/easypost/ReferralTest.java index ca63ba364..c358cb820 100644 --- a/src/test/java/com/easypost/ReferralTest.java +++ b/src/test/java/com/easypost/ReferralTest.java @@ -42,7 +42,7 @@ private static String referralUserKey() { * @return Referral object */ private static ReferralCustomer createReferral() throws EasyPostException { - return ReferralCustomer.create(Fixtures.referralUser()); + return vcr.client.referralCustomer.create(Fixtures.referralUser()); } /** @@ -72,7 +72,7 @@ public void testUpdate() throws EasyPostException { ReferralCustomer referralUser = createReferral(); - assertDoesNotThrow(() -> ReferralCustomer.updateEmail("email@example.com", referralUser.getId())); + assertDoesNotThrow(() -> vcr.client.referralCustomer.updateEmail("email@example.com", referralUser.getId())); } /** @@ -87,7 +87,7 @@ public void testAll() throws EasyPostException { Map params = new HashMap(); params.put("page_size", Fixtures.pageSize()); - ReferralCustomerCollection referralCustomerCollection = ReferralCustomer.all(params); + ReferralCustomerCollection referralCustomerCollection = vcr.client.referralCustomer.all(params); List referralUsers = referralCustomerCollection.getReferralCustomers(); @@ -107,11 +107,11 @@ public void testReferralAddCreditCard() throws Exception { vcr.setUpTest("referral_add_credit_card"); Map creditCardDetails = Fixtures.creditCardDetails(); - PaymentMethodObject creditCard = - ReferralCustomer.addCreditCardToUser(referralUserKey(), (String) creditCardDetails.get("number"), - Integer.parseInt((String) creditCardDetails.get("expiration_month")), - Integer.parseInt((String) creditCardDetails.get("expiration_year")), - (String) creditCardDetails.get("cvc"), PaymentMethod.Priority.PRIMARY); + PaymentMethodObject creditCard = vcr.client.referralCustomer.addCreditCardToUser(referralUserKey(), + (String) creditCardDetails.get("number"), + Integer.parseInt((String) creditCardDetails.get("expiration_month")), + Integer.parseInt((String) creditCardDetails.get("expiration_year")), + (String) creditCardDetails.get("cvc"), PaymentMethod.Priority.PRIMARY); assertInstanceOf(PaymentMethodObject.class, creditCard); assertTrue(creditCard.getId().startsWith("card_")); diff --git a/src/test/java/com/easypost/RefundTest.java b/src/test/java/com/easypost/RefundTest.java index 24c8a13e4..fff5e7ff3 100644 --- a/src/test/java/com/easypost/RefundTest.java +++ b/src/test/java/com/easypost/RefundTest.java @@ -54,16 +54,16 @@ public void testCreate() throws EasyPostException { * @return List of Refund objects */ private static List createBasicRefundList() throws EasyPostException { - Shipment shipment = Shipment.create(Fixtures.oneCallBuyShipment()); + Shipment shipment = vcr.client.shipment.create(Fixtures.oneCallBuyShipment()); // We need to retrieve the shipment so that the tracking_code has time to populate - Shipment retrievedShipment = Shipment.retrieve(shipment.getId()); + Shipment retrievedShipment = vcr.client.shipment.retrieve(shipment.getId()); Map params = new HashMap<>(); params.put("carrier", Fixtures.usps()); params.put("tracking_codes", retrievedShipment.getTrackingCode()); - return Refund.create(params); + return vcr.client.refund.create(params); } /** @@ -78,7 +78,7 @@ public void testAll() throws EasyPostException { Map params = new HashMap<>(); params.put("page_size", Fixtures.pageSize()); - RefundCollection refundCollection = Refund.all(params); + RefundCollection refundCollection = vcr.client.refund.all(params); List refunds = refundCollection.getRefunds(); @@ -99,7 +99,7 @@ public void testRetrieve() throws EasyPostException { List refunds = createBasicRefundList(); Refund refund = refunds.get(0); - Refund retrievedRefund = Refund.retrieve(refund.getId()); + Refund retrievedRefund = vcr.client.refund.retrieve(refund.getId()); assertInstanceOf(Refund.class, retrievedRefund); assertTrue(refund.equals(retrievedRefund)); diff --git a/src/test/java/com/easypost/ReportTest.java b/src/test/java/com/easypost/ReportTest.java index 3919ef960..2ace607fa 100644 --- a/src/test/java/com/easypost/ReportTest.java +++ b/src/test/java/com/easypost/ReportTest.java @@ -31,33 +31,47 @@ public static void setup() throws EasyPostException { } /** - * Test creating a report. + * Create a report. * - * @throws EasyPostException when the request fails. + * @return Report object */ - @Test - public void testCreateReport() throws EasyPostException { - vcr.setUpTest("create_report"); + private static Report createBasicReport() throws EasyPostException { + Map reportParams = new HashMap<>(); - Report report = createBasicReport(); + reportParams.put("start_date", Fixtures.reportDate()); + reportParams.put("end_date", Fixtures.reportDate()); + reportParams.put("type", Fixtures.reportType()); - assertInstanceOf(Report.class, report); - assertTrue(report.getId().startsWith("shprep_")); + return vcr.client.report.create(reportParams); } /** - * Create a report. + * Create a advanced report. * + * @param parameters Map of parameters for create a advanced report. * @return Report object */ - private static Report createBasicReport() throws EasyPostException { - Map reportParams = new HashMap<>(); + private static Report createAdvancedReport(Map parameters) throws EasyPostException { + parameters.put("start_date", Fixtures.reportDate()); + parameters.put("end_date", Fixtures.reportDate()); + parameters.put("type", Fixtures.reportType()); - reportParams.put("start_date", Fixtures.reportDate()); - reportParams.put("end_date", Fixtures.reportDate()); - reportParams.put("type", Fixtures.reportType()); + return vcr.client.report.create(parameters); + } + + /** + * Test creating a report. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateReport() throws EasyPostException { + vcr.setUpTest("create_report"); - return Report.create(reportParams); + Report report = createBasicReport(); + + assertInstanceOf(Report.class, report); + assertTrue(report.getId().startsWith("shprep_")); } /** @@ -79,22 +93,16 @@ public void testCreateReportWithAdditionalColumns() throws EasyPostException { Report reportWithColumns = createAdvancedReport(reportWithAdditionalColumnsParams); // verify parameters by checking VCR cassette for correct URL - // Some reports take a long time to generate, so we won't be able to consistently pull the report + // Some reports take a long time to generate, so we won't be able to + // consistently pull the report // There's unfortunately no way to check if the columns // were included in the final report without parsing the CSV - // so we assume, if we haven't gotten an error by this point, we've made the API calls correctly + // so we assume, if we haven't gotten an error by this point, we've made the API + // calls correctly // any failure at this point is a server-side issue assertInstanceOf(Report.class, reportWithColumns); } - private static Report createAdvancedReport(Map parameters) throws EasyPostException { - parameters.put("start_date", Fixtures.reportDate()); - parameters.put("end_date", Fixtures.reportDate()); - parameters.put("type", Fixtures.reportType()); - - return Report.create(parameters); - } - /** * Test creating a report with columns. * @@ -113,10 +121,12 @@ public void testCreateReportWithColumns() throws EasyPostException { Report reportWithColumns = createAdvancedReport(reportWithAdditionalColumnsParams); // verify parameters by checking VCR cassette for correct URL - // Some reports take a long time to generate, so we won't be able to consistently pull the report + // Some reports take a long time to generate, so we won't be able to + // consistently pull the report // There's unfortunately no way to check if the columns // were included in the final report without parsing the CSV - // so we assume, if we haven't gotten an error by this point, we've made the API calls correctly + // so we assume, if we haven't gotten an error by this point, we've made the API + // calls correctly // any failure at this point is a server-side issue assertInstanceOf(Report.class, reportWithColumns); } @@ -132,7 +142,7 @@ public void testRetrieveReport() throws EasyPostException { Report report = createBasicReport(); - Report retrievedReport = Report.retrieve(report.getId()); + Report retrievedReport = vcr.client.report.retrieve(report.getId()); assertInstanceOf(Report.class, retrievedReport); assertEquals(report.getStartDate(), retrievedReport.getStartDate()); @@ -153,7 +163,7 @@ public void testAll() throws EasyPostException { params.put("type", Fixtures.reportType()); params.put("page_size", Fixtures.pageSize()); - ReportCollection reports = Report.all(params); + ReportCollection reports = vcr.client.report.all(params); List reportsList = reports.getReports(); @@ -175,9 +185,10 @@ public void testCreateNoType() throws EasyPostException { params.put("type", "test"); // should throw EasyPostException, - // but might throw NullPointerException due to a bug in the VCR grabbing response content, + // but might throw NullPointerException due to a bug in the VCR grabbing + // response content, // so we'll just check fo a generic exception - assertThrows(Exception.class, () -> Report.create(params)); + assertThrows(Exception.class, () -> vcr.client.report.create(params)); } /** @@ -193,8 +204,9 @@ public void testAllNoType() throws EasyPostException { params.put("type", "test"); // should throw EasyPostException, - // but might throw NullPointerException due to a bug in the VCR grabbing response content, + // but might throw NullPointerException due to a bug in the VCR grabbing + // response content, // so we'll just check fo a generic exception - assertThrows(Exception.class, () -> Report.all(params)); + assertThrows(Exception.class, () -> vcr.client.report.all(params)); } } diff --git a/src/test/java/com/easypost/ScanFormTest.java b/src/test/java/com/easypost/ScanFormTest.java index f0453b27b..2e6f49bd2 100644 --- a/src/test/java/com/easypost/ScanFormTest.java +++ b/src/test/java/com/easypost/ScanFormTest.java @@ -50,7 +50,7 @@ public void testCreate() throws EasyPostException { * @return ScanForm object */ private static ScanForm getBasicScanForm() throws EasyPostException { - Shipment shipment = Shipment.create(Fixtures.oneCallBuyShipment()); + Shipment shipment = vcr.client.shipment.create(Fixtures.oneCallBuyShipment()); List shipments = new ArrayList<>(); shipments.add(shipment); @@ -58,7 +58,7 @@ private static ScanForm getBasicScanForm() throws EasyPostException { Map params = new HashMap<>(); params.put("shipments", shipments); - ScanForm scanForm = ScanForm.create(params); + ScanForm scanForm = vcr.client.scanform.create(params); return scanForm; } @@ -73,7 +73,7 @@ public void testRetrieve() throws EasyPostException { ScanForm scanForm = getBasicScanForm(); - ScanForm retrievedScanForm = ScanForm.retrieve(scanForm.getId()); + ScanForm retrievedScanForm = vcr.client.scanform.retrieve(scanForm.getId()); assertInstanceOf(ScanForm.class, retrievedScanForm); assertTrue(scanForm.equals(retrievedScanForm)); @@ -91,7 +91,7 @@ public void testAll() throws EasyPostException { Map params = new HashMap<>(); params.put("page_size", Fixtures.pageSize()); - ScanFormCollection scanForms = ScanForm.all(params); + ScanFormCollection scanForms = vcr.client.scanform.all(params); List scanFormsList = scanForms.getScanForms(); assertTrue(scanFormsList.size() <= Fixtures.pageSize()); diff --git a/src/test/java/com/easypost/ShipmentTest.java b/src/test/java/com/easypost/ShipmentTest.java index cf78c5aba..43de56cfb 100644 --- a/src/test/java/com/easypost/ShipmentTest.java +++ b/src/test/java/com/easypost/ShipmentTest.java @@ -67,7 +67,7 @@ public void testCreate() throws EasyPostException { * @return Shipment object */ private static Shipment createFullShipment() throws EasyPostException { - return Shipment.create(Fixtures.fullShipment()); + return vcr.client.shipment.create(Fixtures.fullShipment()); } /** @@ -81,7 +81,7 @@ public void testRetrieve() throws EasyPostException { Shipment shipment = createFullShipment(); - Shipment retrievedShipment = Shipment.retrieve(shipment.getId()); + Shipment retrievedShipment = vcr.client.shipment.retrieve(shipment.getId()); assertInstanceOf(Shipment.class, retrievedShipment); assertTrue(shipment.equals(retrievedShipment)); @@ -99,7 +99,7 @@ public void testAll() throws EasyPostException { Map params = new HashMap(); params.put("page_size", Fixtures.pageSize()); - ShipmentCollection shipmentCollection = Shipment.all(params); + ShipmentCollection shipmentCollection = vcr.client.shipment.all(params); List shipments = shipmentCollection.getShipments(); @@ -119,7 +119,7 @@ public void testBuy() throws EasyPostException { Shipment shipment = createBasicShipment(); - Shipment boughtShipment = shipment.buy(shipment.lowestRate()); + Shipment boughtShipment = vcr.client.shipment.buy(shipment.getId(), shipment.lowestRate()); assertNotNull(boughtShipment.getPostageLabel()); } @@ -130,7 +130,7 @@ public void testBuy() throws EasyPostException { * @return Shipment object */ private static Shipment createBasicShipment() throws EasyPostException { - return Shipment.create(Fixtures.basicShipment()); + return vcr.client.shipment.create(Fixtures.basicShipment()); } /** @@ -144,7 +144,7 @@ public void testRegenerateRates() throws EasyPostException { Shipment shipment = createFullShipment(); - Shipment shipmentWithNewRates = shipment.newRates(); + Shipment shipmentWithNewRates = vcr.client.shipment.newRates(shipment.getId()); List rates = shipmentWithNewRates.getRates(); @@ -169,7 +169,7 @@ public void testConvertLabel() throws EasyPostException { Map params = new HashMap<>(); params.put("file_format", "ZPL"); - Shipment shipmentWithLabel = shipment.label(params); + Shipment shipmentWithLabel = vcr.client.shipment.label(params, shipment.getId()); assertNotNull(shipmentWithLabel.getPostageLabel().getLabelZplUrl()); } @@ -180,7 +180,7 @@ public void testConvertLabel() throws EasyPostException { * @return Shipment object */ private static Shipment createOneCallBuyShipment() throws EasyPostException { - return Shipment.create(Fixtures.oneCallBuyShipment()); + return vcr.client.shipment.create(Fixtures.oneCallBuyShipment()); } /** @@ -205,9 +205,9 @@ public void testInsure() throws EasyPostException { Map insuranceData = new HashMap<>(); insuranceData.put("amount", "100"); - Shipment shipment = Shipment.create(shipmentData); + Shipment shipment = vcr.client.shipment.create(shipmentData); - Shipment shipmentWithInsurance = shipment.insure(insuranceData); + Shipment shipmentWithInsurance = vcr.client.shipment.insure(insuranceData, shipment.getId()); assertEquals("100.00", shipmentWithInsurance.getInsurance()); } @@ -229,7 +229,7 @@ public void testRefund() throws EasyPostException { Shipment shipment = createOneCallBuyShipment(); - Shipment refundedShipment = shipment.refund(); + Shipment refundedShipment = vcr.client.shipment.refund(shipment.getId()); assertEquals("submitted", refundedShipment.getRefundStatus()); } @@ -248,7 +248,7 @@ public void testSmartRate() throws EasyPostException { assertNotNull(shipment.getRates()); Rate rate = shipment.getRates().get(0); - List smartRates = shipment.smartrates(); + List smartRates = vcr.client.shipment.smartrates(shipment.getId()); assertInstanceOf(List.class, smartRates); Smartrate smartRate = smartRates.get(0); @@ -282,7 +282,7 @@ public void testCreateEmptyObjects() throws EasyPostException { shipmentData.put("tax_identifiers", null); shipmentData.put("reference", ""); - Shipment shipment = Shipment.create(shipmentData); + Shipment shipment = vcr.client.shipment.create(shipmentData); assertInstanceOf(Shipment.class, shipment); assertTrue(shipment.getId().startsWith("shp_")); @@ -308,7 +308,7 @@ public void testCreateTaxIdentifiers() throws EasyPostException { taxIdentifiers.add(Fixtures.taxIdentifier()); shipmentData.put("tax_identifiers", taxIdentifiers); - Shipment shipmentWithTaxIdentifiers = Shipment.create(shipmentData); + Shipment shipmentWithTaxIdentifiers = vcr.client.shipment.create(shipmentData); assertInstanceOf(Shipment.class, shipmentWithTaxIdentifiers); assertTrue(shipmentWithTaxIdentifiers.getId().startsWith("shp_")); @@ -327,16 +327,18 @@ public void testCreateTaxIdentifiers() throws EasyPostException { public void testCreateWithIds() throws EasyPostException { vcr.setUpTest("create_with_ids"); - Address fromAddress = Address.create(Fixtures.caAddress1()); - Address toAddress = Address.create(Fixtures.caAddress1()); - Parcel parcel = Parcel.create(Fixtures.basicParcel()); + Address fromAddress = vcr.client.address.create(Fixtures.caAddress1()); + Address toAddress = vcr.client.address.create(Fixtures.caAddress1()); + Parcel parcel = vcr.client.parcel.create(Fixtures.basicParcel()); Map shipmentData = Fixtures.basicShipment(); - shipmentData.put("from_address", Collections.singletonMap("id", fromAddress.getId())); - shipmentData.put("to_address", Collections.singletonMap("id", toAddress.getId())); + shipmentData.put("from_address", Collections.singletonMap("id", + fromAddress.getId())); + shipmentData.put("to_address", Collections.singletonMap("id", + toAddress.getId())); shipmentData.put("parcel", Collections.singletonMap("id", parcel.getId())); - Shipment shipment = Shipment.create(shipmentData); + Shipment shipment = vcr.client.shipment.create(shipmentData); assertInstanceOf(Shipment.class, shipment); assertTrue(shipment.getId().startsWith("shp_")); @@ -360,7 +362,7 @@ public void testLowestRate() throws EasyPostException { // Test lowest rate with no filters Rate lowestRate = shipment.lowestRate(); assertEquals("First", lowestRate.getService()); - assertEquals(5.57, lowestRate.getRate(), 0.01); + assertEquals(5.82, lowestRate.getRate(), 0.01); assertEquals("USPS", lowestRate.getCarrier()); // Test lowest rate with service filter (this rate is higher than the lowest but @@ -368,13 +370,13 @@ public void testLowestRate() throws EasyPostException { List service = new ArrayList<>(Arrays.asList("Priority")); Rate lowestRateService = shipment.lowestRate(null, service); assertEquals("Priority", lowestRateService.getService()); - assertEquals(7.90, lowestRateService.getRate(), 0.01); + assertEquals(8.15, lowestRateService.getRate(), 0.01); assertEquals("USPS", lowestRateService.getCarrier()); // Test lowest rate with carrier filter (should error due to bad carrier) List carrier = new ArrayList<>(Arrays.asList("BAD CARRIER")); assertThrows(EasyPostException.class, () -> { - shipment.lowestRate(null, carrier); + shipment.lowestRate(carrier, null); }); } @@ -388,17 +390,18 @@ public void testInstanceLowestSmartRate() throws EasyPostException { vcr.setUpTest("lowest_smartrate"); Shipment shipment = createBasicShipment(); - Smartrate lowestSmartRateFilters = shipment.lowestSmartRate(2, SmartrateAccuracy.Percentile90); + Smartrate lowestSmartRateFilters = vcr.client.shipment.lowestSmartRate(shipment.getId(), 2, + SmartrateAccuracy.Percentile90); // Test lowest smartrate with valid filters - assertEquals("First", lowestSmartRateFilters.getService()); - assertEquals(5.57, lowestSmartRateFilters.getRate(), 0.01); + assertEquals("Priority", lowestSmartRateFilters.getService()); + assertEquals(8.15, lowestSmartRateFilters.getRate(), 0.01); assertEquals("USPS", lowestSmartRateFilters.getCarrier()); // Test lowest smartrate with invalid filters (should error due to strict // delivery days) assertThrows(EasyPostException.class, () -> { - shipment.lowestSmartRate(0, SmartrateAccuracy.Percentile90); + vcr.client.shipment.lowestSmartRate(shipment.getId(), 0, SmartrateAccuracy.Percentile90); }); } @@ -412,18 +415,19 @@ public void testStaticLowestSmartRates() throws EasyPostException { vcr.setUpTest("lowest_smartrate_list"); Shipment shipment = createBasicShipment(); - List smartrates = shipment.smartrates(); + List smartrates = vcr.client.shipment.smartrates(shipment.getId()); // Test lowest smartrate with valid filters - Smartrate lowestSmartRate = Shipment.findLowestSmartrate(smartrates, 2, SmartrateAccuracy.Percentile90); - assertEquals("First", lowestSmartRate.getService()); - assertEquals(5.57, lowestSmartRate.getRate(), 0.01); + Smartrate lowestSmartRate = vcr.client.shipment.findLowestSmartrate(smartrates, 2, + SmartrateAccuracy.Percentile90); + assertEquals("Priority", lowestSmartRate.getService()); + assertEquals(8.15, lowestSmartRate.getRate(), 0.01); assertEquals("USPS", lowestSmartRate.getCarrier()); // Test lowest smartrate with invalid filters (should error due to strict // delivery days) assertThrows(EasyPostException.class, () -> { - Shipment.findLowestSmartrate(smartrates, 0, SmartrateAccuracy.Percentile90); + vcr.client.shipment.findLowestSmartrate(smartrates, 0, SmartrateAccuracy.Percentile90); }); } @@ -439,11 +443,12 @@ public void testGenerateForm() throws EasyPostException { Shipment shipment = createOneCallBuyShipment(); String formType = "return_packing_slip"; - shipment.generateForm(formType, Fixtures.rmaFormOptions()); + Shipment shipmentWithForm = vcr.client.shipment.generateForm(formType, Fixtures.rmaFormOptions(), + shipment.getId()); - assertTrue(shipment.getForms().size() > 0); + assertTrue(shipmentWithForm.getForms().size() > 0); - Form form = shipment.getForms().get(0); + Form form = shipmentWithForm.getForms().get(0); assertEquals(formType, form.getFormType()); assertTrue(form.getFormUrl() != null); @@ -458,7 +463,7 @@ public void testGenerateForm() throws EasyPostException { public void testCreateShipmentWithCarbonOffset() throws EasyPostException { vcr.setUpTest("create_shipment_with_carbon_offset"); - Shipment shipment = Shipment.create(Fixtures.basicShipment(), true); + Shipment shipment = vcr.client.shipment.create(Fixtures.basicShipment(), true); assertInstanceOf(Shipment.class, shipment); @@ -479,11 +484,9 @@ public void testCreateShipmentWithCarbonOffset() throws EasyPostException { public void testBuyShipmentWithCarbonOffset() throws EasyPostException { vcr.setUpTest("buy_shipment_with_carbon_offset"); - Shipment shipment = Shipment.create(Fixtures.fullShipment()); + Shipment shipment = vcr.client.shipment.create(Fixtures.fullShipment()); - Rate rate = shipment.lowestRate(); - - Shipment boughtShipment = shipment.buy(rate, true); + Shipment boughtShipment = vcr.client.shipment.buy(shipment.getId(), shipment.lowestRate(), true); assertInstanceOf(Shipment.class, shipment); @@ -509,7 +512,7 @@ public void testBuyShipmentWithCarbonOffset() throws EasyPostException { public void testOneCallBuyShipmentWithCarbonOffset() throws EasyPostException { vcr.setUpTest("one_call_buy_shipment_with_carbon_offset"); - Shipment shipment = Shipment.create(Fixtures.oneCallBuyShipment(), true); + Shipment shipment = vcr.client.shipment.create(Fixtures.oneCallBuyShipment(), true); assertInstanceOf(Shipment.class, shipment); @@ -535,10 +538,10 @@ public void testOneCallBuyShipmentWithCarbonOffset() throws EasyPostException { public void testRegenerateRatesWithCarbonOffset() throws EasyPostException { vcr.setUpTest("regenerate_rates_with_carbon_offset"); - Shipment shipment = Shipment.create(Fixtures.oneCallBuyShipment()); + Shipment shipment = vcr.client.shipment.create(Fixtures.oneCallBuyShipment()); List baseRates = shipment.getRates(); - Shipment shipmentWithNewRatesWithCarbon = shipment.newRates(true); + Shipment shipmentWithNewRatesWithCarbon = vcr.client.shipment.newRates(shipment.getId(), true); List newCarbonRates = shipmentWithNewRatesWithCarbon.getRates(); Rate baseRate = baseRates.get(0); @@ -557,11 +560,10 @@ public void testRegenerateRatesWithCarbonOffset() throws EasyPostException { public void testBuyShipmentWithEndShipperId() throws EasyPostException { vcr.setUpTest("buy_shipment_with_end_shipper_id"); - EndShipper endShipper = EndShipper.create(Fixtures.caAddress1()); + EndShipper endShipper = vcr.client.endShipper.create(Fixtures.caAddress1()); - Shipment shipment = Shipment.create(Fixtures.basicShipment()); - Rate rate = shipment.lowestRate(); - Shipment boughtShipment = shipment.buy(rate, endShipper.getId()); + Shipment shipment = vcr.client.shipment.create(Fixtures.basicShipment()); + Shipment boughtShipment = vcr.client.shipment.buy(shipment.getId(), shipment.lowestRate(), endShipper.getId()); assertNotNull(boughtShipment.getPostageLabel()); } diff --git a/src/test/java/com/easypost/TestUtils.java b/src/test/java/com/easypost/TestUtils.java index 709b84e97..24e55fe7f 100644 --- a/src/test/java/com/easypost/TestUtils.java +++ b/src/test/java/com/easypost/TestUtils.java @@ -8,6 +8,8 @@ import com.easypost.easyvcr.MatchRules; import com.easypost.easyvcr.Mode; import com.easypost.easyvcr.TimeFrame; +import com.easypost.exception.General.MissingParameterError; +import com.easypost.service.EasyPostClient; import java.io.File; import java.io.IOException; @@ -128,10 +130,9 @@ public static String getApiKey(ApiKey apiKey) { public static final class VCR { private final com.easypost.easyvcr.VCR vcr; - - private final String apiKey; - private String testCassettesFolder; + private String apiKey; + EasyPostClient client; /** * Get whether the VCR is recording. @@ -142,12 +143,21 @@ public boolean isRecording() { return vcr.getMode() == Mode.Record; } + /** + * Constructor. + * @throws MissingParameterError + */ + public VCR() throws MissingParameterError { + this(null, ApiKey.TEST); + } + /** * Constructor. * * @param testCassettesFolder The folder where the cassettes will be stored. + * @throws MissingParameterError */ - public VCR(String testCassettesFolder) { + public VCR(String testCassettesFolder) throws MissingParameterError { this(testCassettesFolder, ApiKey.TEST); } @@ -156,18 +166,30 @@ public VCR(String testCassettesFolder) { * * @param testCassettesFolder The folder where the cassettes will be stored. * @param apiKey The API key to use. + * @throws MissingParameterError */ - public VCR(String testCassettesFolder, ApiKey apiKey) { + public VCR(String testCassettesFolder, ApiKey apiKey) throws MissingParameterError { this(testCassettesFolder, getApiKey(apiKey)); } + /** + * Constructor. + * + * @param apiKey The API key to use. + * @throws MissingParameterError + */ + public VCR(ApiKey apiKey) throws MissingParameterError { + this(null, apiKey); + } + /** * Constructor. * * @param testCassettesFolder The folder where the cassettes will be stored. * @param apiKey The API key to use. + * @throws MissingParameterError */ - public VCR(String testCassettesFolder, String apiKey) { + public VCR(String testCassettesFolder, String apiKey) throws MissingParameterError { AdvancedSettings advancedSettings = new AdvancedSettings(); advancedSettings.matchRules = new MatchRules().byMethod().byFullUrl() .byBody(BODY_ELEMENTS_TO_IGNORE_ON_MATCH); @@ -180,7 +202,7 @@ public VCR(String testCassettesFolder, String apiKey) { vcr = new com.easypost.easyvcr.VCR(advancedSettings); this.apiKey = apiKey; - + this.client = new EasyPostClient(apiKey); this.testCassettesFolder = Paths.get(getSourceFileDirectory(), CASSETTES_PATH) .toString(); // create the "cassettes" folder @@ -196,29 +218,14 @@ public VCR(String testCassettesFolder, String apiKey) { } } - /** - * Constructor. - * - * @param apiKey The API key to use. - */ - public VCR(ApiKey apiKey) { - this(null, apiKey); - } - - /** - * Constructor. - */ - public VCR() { - this(null, ApiKey.TEST); - } - /** * Set up the VCR for a unit test. * * @param cassetteName The name of the cassette to use. + * @throws MissingParameterError */ - public void setUpTest(String cassetteName) { - setUpTest(cassetteName, null); + public void setUpTest(String cassetteName) throws MissingParameterError { + setUpTest(cassetteName, ""); } /** @@ -226,11 +233,12 @@ public void setUpTest(String cassetteName) { * * @param cassetteName The name of the cassette to use. * @param overrideApiKey The API key to use. + * @throws MissingParameterError */ - public void setUpTest(String cassetteName, String overrideApiKey) { + public void setUpTest(String cassetteName, String overrideApiKey) throws MissingParameterError { // override api key if needed - EasyPost.apiKey = overrideApiKey != null ? overrideApiKey : apiKey; - + client = new EasyPostClient(overrideApiKey.isEmpty() ? this.apiKey : overrideApiKey); + // set up cassette Cassette cassette = new Cassette(testCassettesFolder, cassetteName); diff --git a/src/test/java/com/easypost/ThreadTest.java b/src/test/java/com/easypost/ThreadTest.java index 77e7e548b..bd31c0b68 100644 --- a/src/test/java/com/easypost/ThreadTest.java +++ b/src/test/java/com/easypost/ThreadTest.java @@ -1,10 +1,15 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.http.Constant; import com.easypost.model.Order; +import com.easypost.service.EasyPostClient; + import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -22,7 +27,7 @@ public final class ThreadTest { * @throws EasyPostException when the request fails. */ @BeforeAll - public static void setUp() { + public static void setUp() throws EasyPostException { vcr = new TestUtils.VCR("thread", TestUtils.ApiKey.TEST); defaultFromAddress.put("name", "EasyPost"); @@ -112,7 +117,8 @@ public void run() { for (int i = 0; i < this.orders.size(); i++) { System.out.format("Thread %s: starting order creation...%n", Thread.currentThread().getName()); - Order order = Order.create(this.orders.get(i)); + EasyPostClient client = new EasyPostClient(System.getenv("EASYPOST_TEST_API_KEY")); + Order order = client.order.create(this.orders.get(i)); // save order id to database or buy now System.out.format("Thread %s: created order %s%n", Thread.currentThread().getName(), order.getId()); @@ -122,5 +128,23 @@ public void run() { } } } + + /** + * Test create multiple EasyPostClient with different API keys. + * @throws EasyPostException + */ + @Test + public void testMultipleClients() throws EasyPostException { + EasyPostClient clientOne = new EasyPostClient("fake_api_key_1", 22222, 33333); + EasyPostClient clientTwo = new EasyPostClient("fake_api_key_2", 55555); + + assertEquals("fake_api_key_1", clientOne.getApiKey()); + assertEquals(22222, clientOne.getConnectionTimeoutMilliseconds()); + assertEquals(33333, clientOne.getReadTimeoutMilliseconds()); + + assertEquals("fake_api_key_2", clientTwo.getApiKey()); + assertEquals(55555, clientTwo.getConnectionTimeoutMilliseconds()); + assertEquals(Constant.DEFAULT_READ_TIMEOUT_MILLISECONDS, clientTwo.getReadTimeoutMilliseconds()); + } } diff --git a/src/test/java/com/easypost/TrackerTest.java b/src/test/java/com/easypost/TrackerTest.java index 0371b2c58..635d116f7 100644 --- a/src/test/java/com/easypost/TrackerTest.java +++ b/src/test/java/com/easypost/TrackerTest.java @@ -55,7 +55,7 @@ private static Tracker createBasicTracker() throws EasyPostException { params.put("carrier", Fixtures.usps()); params.put("tracking_code", "EZ1000000001"); - return Tracker.create(params); + return vcr.client.tracker.create(params); } /** @@ -69,7 +69,7 @@ public void testRetrieve() throws EasyPostException { Tracker tracker = createBasicTracker(); - Tracker retrievedTracker = Tracker.retrieve(tracker.getId()); + Tracker retrievedTracker = vcr.client.tracker.retrieve(tracker.getId()); assertInstanceOf(Tracker.class, tracker); assertTrue(retrievedTracker.getId().startsWith("trk_")); @@ -88,7 +88,7 @@ public void testAll() throws EasyPostException { Map params = new HashMap<>(); params.put("page_size", Fixtures.pageSize()); - TrackerCollection trackers = Tracker.all(params); + TrackerCollection trackers = vcr.client.tracker.all(params); List trackersList = trackers.getTrackers(); @@ -120,6 +120,6 @@ public void testCreateList() throws EasyPostException { params.put(String.valueOf(i), tracker); } - assertDoesNotThrow(() -> Tracker.createList(params)); + assertDoesNotThrow(() -> vcr.client.tracker.createList(params)); } } diff --git a/src/test/java/com/easypost/UserTest.java b/src/test/java/com/easypost/UserTest.java index 3bc612834..da49b55f1 100644 --- a/src/test/java/com/easypost/UserTest.java +++ b/src/test/java/com/easypost/UserTest.java @@ -40,8 +40,8 @@ public static void setUp() throws EasyPostException { public void cleanup() { if (testUserId != null) { try { - User user = User.retrieve(testUserId); - user.delete(); + User user = vcr.client.user.retrieve(testUserId); + vcr.client.user.delete(user.getId()); testUserId = null; } catch (Exception e) { // in case we try to delete something that's already been deleted @@ -73,7 +73,7 @@ public void testCreate() throws EasyPostException { private static User createUser() throws EasyPostException { Map params = new HashMap<>(); params.put("name", "Test User"); - User user = User.create(params); + User user = vcr.client.user.create(params); testUserId = user.getId(); // trigger deletion after test return user; } @@ -91,7 +91,7 @@ public void testRetrieve() throws EasyPostException { String userId = authenticatedUser.getId(); - User user = User.retrieve(userId); + User user = vcr.client.user.retrieve(userId); assertInstanceOf(User.class, user); assertTrue(user.getId().startsWith("user_")); @@ -104,7 +104,7 @@ public void testRetrieve() throws EasyPostException { * @return User object */ private static User retrieveMe() throws EasyPostException { - return User.retrieveMe(); + return vcr.client.user.retrieveMe(); } /** @@ -116,7 +116,7 @@ private static User retrieveMe() throws EasyPostException { public void testRetrieveMe() throws EasyPostException { vcr.setUpTest("retrieve_me"); - User user = User.retrieveMe(); + User user = vcr.client.user.retrieveMe(); assertInstanceOf(User.class, user); assertTrue(user.getId().startsWith("user_")); @@ -138,7 +138,7 @@ public void testUpdate() throws EasyPostException { params.put("name", testName); - User updatedUser = user.update(params); + User updatedUser = vcr.client.user.update(user.getId(), params); assertInstanceOf(User.class, updatedUser); assertTrue(updatedUser.getId().startsWith("user_")); @@ -156,7 +156,7 @@ public void testDelete() throws EasyPostException { User user = createUser(); - assertDoesNotThrow(() -> user.delete()); + assertDoesNotThrow(() -> vcr.client.user.delete(user.getId())); } /** @@ -168,7 +168,7 @@ public void testDelete() throws EasyPostException { public void testAllApiKeys() throws EasyPostException { vcr.setUpTest("all_api_keys"); - ApiKeys apikeys = ApiKeys.all(); + ApiKeys apikeys = vcr.client.apikeys.all(); assertInstanceOf(ApiKeys.class, apikeys); } @@ -184,7 +184,7 @@ public void testApiKeys() throws EasyPostException { User user = createUser(); - List apiKeys = user.apiKeys(); + List apiKeys = vcr.client.user.apiKeys(user.getId()); assertNotNull(apiKeys); } @@ -204,7 +204,7 @@ public void testUpdateBrand() throws EasyPostException { Map params = new HashMap<>(); params.put("color", color); - Brand brand = user.updateBrand(params); + Brand brand = vcr.client.user.updateBrand(user.getId(), params); assertInstanceOf(Brand.class, brand); assertTrue(brand.getId().startsWith("brd_")); diff --git a/src/test/java/com/easypost/WebhookTest.java b/src/test/java/com/easypost/WebhookTest.java index 01b645e90..7016af509 100644 --- a/src/test/java/com/easypost/WebhookTest.java +++ b/src/test/java/com/easypost/WebhookTest.java @@ -42,8 +42,8 @@ public static void setup() throws EasyPostException { public void cleanup() { if (testWebhookId != null) { try { - Webhook webhook = Webhook.retrieve(testWebhookId); - webhook.delete(); + Webhook webhook = vcr.client.webhook.retrieve(testWebhookId); + vcr.client.webhook.delete(webhook.getId()); testWebhookId = null; } catch (Exception e) { // in case we try to delete something that's already been deleted @@ -76,7 +76,7 @@ private static Webhook createBasicWebhook() throws EasyPostException { Map params = new HashMap<>(); params.put("url", Fixtures.webhookUrl()); - Webhook webhook = Webhook.create(params); + Webhook webhook = vcr.client.webhook.create(params); testWebhookId = webhook.getId(); // trigger deletion after test return webhook; } @@ -92,7 +92,7 @@ public void testRetrieve() throws EasyPostException { Webhook webhook = createBasicWebhook(); - Webhook retrievedWebhook = Webhook.retrieve(webhook.getId()); + Webhook retrievedWebhook = vcr.client.webhook.retrieve(webhook.getId()); assertInstanceOf(Webhook.class, retrievedWebhook); assertTrue(webhook.equals(retrievedWebhook)); @@ -107,7 +107,7 @@ public void testRetrieve() throws EasyPostException { public void testAll() throws EasyPostException { vcr.setUpTest("all"); - WebhookCollection webhooks = Webhook.all(); + WebhookCollection webhooks = vcr.client.webhook.all(); List webhooksList = webhooks.getWebhooks(); @@ -125,7 +125,7 @@ public void testUpdate() throws EasyPostException { Webhook webhook = createBasicWebhook(); - webhook.update(); + vcr.client.webhook.update(webhook.getId()); assertInstanceOf(Webhook.class, webhook); } @@ -140,9 +140,9 @@ public void testDelete() throws EasyPostException { vcr.setUpTest("delete"); Webhook webhook = createBasicWebhook(); - Webhook retrievedWebhook = Webhook.retrieve(webhook.getId()); + Webhook retrievedWebhook = vcr.client.webhook.retrieve(webhook.getId()); - assertDoesNotThrow(() -> retrievedWebhook.delete()); + assertDoesNotThrow(() -> vcr.client.webhook.delete(retrievedWebhook.getId())); testWebhookId = null; // need to disable post-test deletion for test to work } @@ -162,7 +162,7 @@ public void testValidateWebhook() throws EasyPostException { } }; - Event event = Webhook.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); + Event event = vcr.client.webhook.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); assertEquals("batch.created", event.getDescription()); assertEquals("batch_123...", event.getResult().get("id")); @@ -181,7 +181,7 @@ public void testValidateWebhookInvalidSecret() { }; assertThrows(EasyPostException.class, () -> { - Webhook.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); + vcr.client.webhook.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); }); } @@ -198,7 +198,7 @@ public void testValidateWebhookMissingSecret() { }; assertThrows(EasyPostException.class, () -> { - Webhook.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); + vcr.client.webhook.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); }); } } diff --git a/style_suppressions.xml b/style_suppressions.xml index ac994b1d0..79d5c5f5f 100644 --- a/style_suppressions.xml +++ b/style_suppressions.xml @@ -1,22 +1,26 @@ - + - - - - - - - - - - + + + + + + + + + + + + + + From b4bee41b143022f96e44a11f4de17a16efd6ca41 Mon Sep 17 00:00:00 2001 From: jchen293 Date: Wed, 16 Nov 2022 16:27:06 -0500 Subject: [PATCH 022/208] Remove Credit Card classes, use Lombok for getters and remove all setters (#206) --- CHANGELOG.md | 13 +- pom.xml | 6 + src/main/java/com/easypost/model/Address.java | 93 +--- .../com/easypost/model/AddressCollection.java | 38 +- .../com/easypost/model/AddressDetail.java | 57 +- .../easypost/model/AddressVerification.java | 56 +- .../easypost/model/AddressVerifications.java | 39 +- .../easypost/model/AddressVerifyResponse.java | 39 +- src/main/java/com/easypost/model/ApiKey.java | 22 +- src/main/java/com/easypost/model/ApiKeys.java | 38 +- .../java/com/easypost/model/BaseAddress.java | 183 +----- .../com/easypost/model/BaseCreditCard.java | 125 ----- .../java/com/easypost/model/BaseUser.java | 308 +---------- src/main/java/com/easypost/model/Batch.java | 128 +---- .../com/easypost/model/BatchCollection.java | 38 +- .../java/com/easypost/model/BatchStatus.java | 75 +-- src/main/java/com/easypost/model/Brand.java | 165 +----- .../java/com/easypost/model/CarbonOffset.java | 39 +- .../com/easypost/model/CarrierAccount.java | 182 +----- .../com/easypost/model/CarrierDetail.java | 165 +----- .../java/com/easypost/model/CarrierType.java | 74 +-- .../java/com/easypost/model/CustomsInfo.java | 182 +----- .../java/com/easypost/model/CustomsItem.java | 147 +---- .../com/easypost/model/EasyPostResource.java | 66 +-- .../easypost/model/EndShipperCollection.java | 38 +- src/main/java/com/easypost/model/Error.java | 88 +-- src/main/java/com/easypost/model/Event.java | 90 +-- .../com/easypost/model/EventCollection.java | 38 +- .../java/com/easypost/model/EventData.java | 38 +- src/main/java/com/easypost/model/Fee.java | 75 +-- src/main/java/com/easypost/model/Field.java | 67 +-- src/main/java/com/easypost/model/Fields.java | 71 +-- src/main/java/com/easypost/model/Form.java | 57 +- .../java/com/easypost/model/Insurance.java | 200 +------ .../easypost/model/InsuranceCollection.java | 38 +- src/main/java/com/easypost/model/Order.java | 237 +------- .../com/easypost/model/OrderCollection.java | 38 +- src/main/java/com/easypost/model/Parcel.java | 93 +--- .../com/easypost/model/PaymentMethod.java | 66 +-- .../easypost/model/PaymentMethodObject.java | 93 +--- src/main/java/com/easypost/model/Pickup.java | 200 +------ .../com/easypost/model/PickupCollection.java | 38 +- .../java/com/easypost/model/PickupRate.java | 21 +- .../java/com/easypost/model/PostageLabel.java | 363 +----------- .../easypost/model/PrimaryPaymentMethod.java | 10 - src/main/java/com/easypost/model/Rate.java | 291 +--------- .../com/easypost/model/ReferralCustomer.java | 21 +- .../model/ReferralCustomerCollection.java | 41 +- src/main/java/com/easypost/model/Refund.java | 93 +--- .../com/easypost/model/RefundCollection.java | 38 +- src/main/java/com/easypost/model/Report.java | 110 +--- .../com/easypost/model/ReportCollection.java | 38 +- .../java/com/easypost/model/ScanForm.java | 164 +----- .../easypost/model/ScanFormCollection.java | 38 +- .../model/SecondaryPaymentMethod.java | 10 - .../java/com/easypost/model/Shipment.java | 523 +----------------- .../easypost/model/ShipmentCollection.java | 38 +- .../com/easypost/model/ShipmentMessage.java | 76 +-- .../com/easypost/model/ShipmentOptions.java | 39 +- .../java/com/easypost/model/Smartrate.java | 12 +- .../com/easypost/model/SmartrateAccuracy.java | 12 +- .../com/easypost/model/TaxIdentifier.java | 75 +-- .../com/easypost/model/TimeInTransit.java | 143 +---- src/main/java/com/easypost/model/Tracker.java | 201 +------ .../com/easypost/model/TrackerCollection.java | 39 +- .../com/easypost/model/TrackingDetail.java | 94 +--- .../com/easypost/model/TrackingLocation.java | 75 +-- src/main/java/com/easypost/model/Webhook.java | 39 +- .../com/easypost/model/WebhookCollection.java | 21 +- .../com/easypost/service/BillingService.java | 4 +- .../com/easypost/service/EasyPostClient.java | 2 +- .../com/easypost/service/PickupService.java | 2 +- src/test/java/com/easypost/BillingTest.java | 4 +- src/test/java/com/easypost/PickupTest.java | 2 +- src/test/java/com/easypost/ThreadTest.java | 1 - 75 files changed, 204 insertions(+), 6279 deletions(-) delete mode 100644 src/main/java/com/easypost/model/BaseCreditCard.java delete mode 100644 src/main/java/com/easypost/model/PrimaryPaymentMethod.java delete mode 100644 src/main/java/com/easypost/model/SecondaryPaymentMethod.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b503e5c6..758d25bd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,9 @@ - Initialize a `EasyPostClient` object with an API key, connection and readtime milliseconds are optional, otherwise it will be set to default. - All methods (i.e. `create`, `retrieve`, retrieve `all` of a resource) exist in services, accessed via property of the client - E.g. Static method -> `Shipment shipment = client.address.create(params)` - - E.g. Instance method -> `Shipment boughtShipment = client.shipment.buy(lowestRate, shipmentID)` + - E.g. Instance method -> `Shipment boughtShipment = client.shipment.buy(shipmentID, lowestRate)` - All functions are now taking object ID instead of an object, which means the functions are returning the response value directly instead of updating the current object - - E.g. `Shipment boughtShipment = client.shipment.buy(lowestRate, shipmentID)` + - E.g. `Shipment boughtShipment = client.shipment.buy(shipmentID, lowestRate)` - Improves error exception handling - Specific error types for each category of error - API error message may be an array rather than a string. Arrays will be concatenated (by comma) and returned as a string. @@ -26,7 +26,14 @@ - Changes the type `result` of Event from `EasyPostResource` to `Map` - AppEngine default timeout is now the same as connection timeout - Removes invalid function `User.create()` since creating a child-user requires a name -- Removes deprecated class `CreditCard`, please use alternative `Billing` class +- Removes deprecated class `CreditCard` and its associated classes `PrimaryPaymentMethod`, `SecondaryPaymentMethod`, and `BaseCreditCard`, please use alternative `Billing` class +- Removes all the setters of each object +- Setters are now available via lombok and aren't explicitly in the code anymore +- Change the type `hasMore` in ReferralCustomerCollection from `boolean` to `Boolean` +- Rename some getters + - Pickup class: `getPickoutRates()` -> `getPickupRates()` + - PaymentMethod class: `getPrimaryPaymentMethodObject()` -> `getPrimaryPaymentMethod()` + - PaymentMethod class: `getSecondaryPaymentMethodObject()` -> `getSecondaryPaymentMethod()` ## v5.10.0 (2022-09-21) diff --git a/pom.xml b/pom.xml index a1f482404..c5775bde4 100644 --- a/pom.xml +++ b/pom.xml @@ -69,6 +69,12 @@ httpclient 4.5.13 + + org.projectlombok + lombok + 1.18.24 + provided + diff --git a/src/main/java/com/easypost/model/Address.java b/src/main/java/com/easypost/model/Address.java index 5f0077833..8fe810e50 100644 --- a/src/main/java/com/easypost/model/Address.java +++ b/src/main/java/com/easypost/model/Address.java @@ -1,99 +1,12 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class Address extends BaseAddress { private String message; private String carrierFacility; private String federalTaxId; private Boolean residential; private AddressVerifications verifications; - - /** - * Get carrier facility for address. - * - * @return address carrier facility - */ - public String getCarrierFacility() { - return carrierFacility; - } - - /** - * Set carrier facility for address. - * - * @param carrierFacility address carrier facility - */ - public void setCarrierFacility(final String carrierFacility) { - this.carrierFacility = carrierFacility; - } - - /** - * Get federal tax id of address. - * - * @return address federal tax id - */ - public String getFederalTaxId() { - return federalTaxId; - } - - /** - * Set federal tax id of address. - * - * @param federalTaxId address federal tax id - */ - public void setFederalTaxId(final String federalTaxId) { - this.federalTaxId = federalTaxId; - } - - /** - * Get address message. - * - * @return address message - */ - public String getMessage() { - return message; - } - - /** - * Set address message. - * - * @param message address message - */ - public void setMessage(final String message) { - this.message = message; - } - - /** - * Get whether address is residential. - * - * @return whether address is residential - */ - public Boolean getResidential() { - return residential; - } - - /** - * Set whether address is residential. - * - * @param residential whether address is residential - */ - public void setResidential(final Boolean residential) { - this.residential = residential; - } - - /** - * Get verifications for address. - * - * @return address verifications - */ - public AddressVerifications getVerifications() { - return verifications; - } - - /** - * Set verifications for address. - * - * @param verifications address verifications - */ - public void setVerifications(final AddressVerifications verifications) { - this.verifications = verifications; - } } diff --git a/src/main/java/com/easypost/model/AddressCollection.java b/src/main/java/com/easypost/model/AddressCollection.java index 996fdceea..8a6151c75 100644 --- a/src/main/java/com/easypost/model/AddressCollection.java +++ b/src/main/java/com/easypost/model/AddressCollection.java @@ -1,44 +1,10 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class AddressCollection extends EasyPostResource { private List
      addresses; private Boolean hasMore; - - /** - * Get a list of addresses. - * - * @return List of Address objects - */ - public List
      getAddresses() { - return addresses; - } - - /** - * Set a list of addresses. - * - * @param addresses List of Address objects - */ - public void setAddresses(final List
      addresses) { - this.addresses = addresses; - } - - /** - * Get whether there are more addresses to retrieve. - * - * @return whether there are more addresses to retrieve - */ - public Boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more addresses to retrieve. - * - * @param hasMore Boolean whether there are more addresses to retrieve - */ - public void setHasMore(final Boolean hasMore) { - this.hasMore = hasMore; - } } diff --git a/src/main/java/com/easypost/model/AddressDetail.java b/src/main/java/com/easypost/model/AddressDetail.java index f250f3d73..42bc84cd2 100644 --- a/src/main/java/com/easypost/model/AddressDetail.java +++ b/src/main/java/com/easypost/model/AddressDetail.java @@ -1,61 +1,10 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class AddressDetail { private Float latitude; private Float longitude; private String timeZone; - - /** - * Get latitude of the address. - * - * @return latitude of the address. - */ - public Float getLatitude() { - return latitude; - } - - /** - * Set latitude of the address. - * - * @param latitude latitude of the address. - */ - public void setLatitude(final Float latitude) { - this.latitude = latitude; - } - - /** - * Get longitude of the address. - * - * @return longitude of the address. - */ - public Float getLongitude() { - return longitude; - } - - /** - * Set longitude of the address. - * - * @param longitude longitude of the address. - */ - public void setLongitude(final Float longitude) { - this.longitude = longitude; - } - - /** - * Get time zone of the address. - * - * @return time zone of the address. - */ - public String getTimeZone() { - return timeZone; - } - - /** - * Set time zone of the address. - * - * @param timeZone time zone of the address. - */ - public void setCode(final String timeZone) { - this.timeZone = timeZone; - } } diff --git a/src/main/java/com/easypost/model/AddressVerification.java b/src/main/java/com/easypost/model/AddressVerification.java index 8209cd220..0cce1cf66 100644 --- a/src/main/java/com/easypost/model/AddressVerification.java +++ b/src/main/java/com/easypost/model/AddressVerification.java @@ -1,63 +1,11 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class AddressVerification { private Boolean success; private List errors; private AddressDetail details; - - /** - * Get the address detail object. - * - * @return AddressDetail object - */ - public AddressDetail getAddressDetail() { - return details; - } - - /** - * Set the address detail object. - * - * @param details AddressDetail object - */ - public void setAddressDetail(final AddressDetail details) { - this.details = details; - } - - /** - * Get the list of errors that occurred during the address verification. - * - * @return list of Error objects - */ - public List getErrors() { - return errors; - } - - /** - * Set the list of errors that occurred during the address verification. - * - * @param errors list of Error objects - */ - public void setErrors(final List errors) { - this.errors = errors; - } - - /** - * Get whether the address verification was successful. - * - * @return true if the address was successfully verified - */ - public Boolean getSuccess() { - return success; - } - - /** - * Set whether the address verification was successful. - * - * @param success true if the address was successfully verified - */ - public void setSuccess(final Boolean success) { - this.success = success; - } } diff --git a/src/main/java/com/easypost/model/AddressVerifications.java b/src/main/java/com/easypost/model/AddressVerifications.java index 02fee79ca..728cb772e 100644 --- a/src/main/java/com/easypost/model/AddressVerifications.java +++ b/src/main/java/com/easypost/model/AddressVerifications.java @@ -1,42 +1,9 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public class AddressVerifications extends EasyPostResource { private AddressVerification zip4; private AddressVerification delivery; - - /** - * Get the delivery of the AddressVerifications. - * - * @return Delivery of the AddressVerifications. - */ - public AddressVerification getDelivery() { - return delivery; - } - - /** - * Set the delivery of the AddressVerification. - * - * @param delivery Delivery of the AddressVerification. - */ - public void setDelivery(final AddressVerification delivery) { - this.delivery = delivery; - } - - /** - * Get the zip4 of the AddressVerification. - * - * @return Zip4 of the AddressVerification. - */ - public AddressVerification getZip4() { - return zip4; - } - - /** - * Set the zip4 of the AddressVerification. - * - * @param zip4 Zip4 of the AddressVerification. - */ - public void setZip4(final AddressVerification zip4) { - this.zip4 = zip4; - } } diff --git a/src/main/java/com/easypost/model/AddressVerifyResponse.java b/src/main/java/com/easypost/model/AddressVerifyResponse.java index f587992f0..ecae424c8 100644 --- a/src/main/java/com/easypost/model/AddressVerifyResponse.java +++ b/src/main/java/com/easypost/model/AddressVerifyResponse.java @@ -1,42 +1,9 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public class AddressVerifyResponse { private Address address; private String message; - - /** - * Get the Address object. - * - * @return Address - */ - public Address getAddress() { - return address; - } - - /** - * Set the Address object. - * - * @param address Address - */ - public void setAddress(final Address address) { - this.address = address; - } - - /** - * Get the message. - * - * @return message - */ - public String getMessage() { - return message; - } - - /** - * Set the message. - * - * @param message message - */ - public void setMessage(final String message) { - this.message = message; - } } diff --git a/src/main/java/com/easypost/model/ApiKey.java b/src/main/java/com/easypost/model/ApiKey.java index fa0bf8b67..9377f38d1 100644 --- a/src/main/java/com/easypost/model/ApiKey.java +++ b/src/main/java/com/easypost/model/ApiKey.java @@ -1,24 +1,8 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class ApiKey extends EasyPostResource { private String key; - - /** - * Get the API key. - * - * @return API key - */ - public String getKey() { - return key; - } - - /** - * Set the API key. - * - * @param key API key - */ - public void setKey(final String key) { - this.key = key; - } } - diff --git a/src/main/java/com/easypost/model/ApiKeys.java b/src/main/java/com/easypost/model/ApiKeys.java index efffcf39d..d5da4da0c 100644 --- a/src/main/java/com/easypost/model/ApiKeys.java +++ b/src/main/java/com/easypost/model/ApiKeys.java @@ -1,44 +1,10 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class ApiKeys extends EasyPostResource { private List keys; private List children; - - /** - * Get a list of API keys for a given parent key. - * - * @return List of ApiKeys objects. - */ - public List getChildren() { - return children; - } - - /** - * Set a list of API keys for a given parent key. - * - * @param children List of ApiKeys objects. - */ - public void setChildren(final List children) { - this.children = children; - } - - /** - * Get a list of API keys. - * - * @return List of ApiKey objects. - */ - public List getKeys() { - return keys; - } - - /** - * Set list of API keys. - * - * @param keys List of ApiKey objects. - */ - public void setKeys(final List keys) { - this.keys = keys; - } } diff --git a/src/main/java/com/easypost/model/BaseAddress.java b/src/main/java/com/easypost/model/BaseAddress.java index 98a337636..9c387d4ef 100644 --- a/src/main/java/com/easypost/model/BaseAddress.java +++ b/src/main/java/com/easypost/model/BaseAddress.java @@ -1,5 +1,8 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public class BaseAddress extends EasyPostResource { private String name; private String company; @@ -11,184 +14,4 @@ public class BaseAddress extends EasyPostResource { private String country; private String phone; private String email; - - /** - * Get city of address. - * - * @return address city - */ - public String getCity() { - return city; - } - - /** - * Set city of address. - * - * @param city address city - */ - public void setCity(final String city) { - this.city = city; - } - - /** - * Get company of Address. - * - * @return Address company - */ - public String getCompany() { - return company; - } - - /** - * Set company of Address. - * - * @param company Address company - */ - public void setCompany(final String company) { - this.company = company; - } - - /** - * Get country of Address. - * - * @return Address country - */ - public String getCountry() { - return country; - } - - /** - * Set country of Address. - * - * @param country Address country - */ - public void setCountry(final String country) { - this.country = country; - } - - /** - * Get email of Address. - * - * @return Address email - */ - public String getEmail() { - return email; - } - - /** - * Set email of Address. - * - * @param email Address email - */ - public void setEmail(final String email) { - this.email = email; - } - - /** - * Get name of Address. - * - * @return Address name - */ - public String getName() { - return name; - } - - /** - * Set name of Address. - * - * @param name Address name - */ - public void setName(final String name) { - this.name = name; - } - - /** - * Get phone number of Address. - * - * @return Address phone number - */ - public String getPhone() { - return phone; - } - - /** - * Set phone number of Address. - * - * @param phone Address phone number - */ - public void setPhone(final String phone) { - this.phone = phone; - } - - /** - * Get state of Address. - * - * @return Address state - */ - public String getState() { - return state; - } - - /** - * Set state of Address. - * - * @param state Address state - */ - public void setState(final String state) { - this.state = state; - } - - /** - * Get first line of Address street. - * - * @return first line of Address street - */ - public String getStreet1() { - return street1; - } - - /** - * Set first line of Address street. - * - * @param street1 first line of Address street - */ - public void setStreet1(final String street1) { - this.street1 = street1; - } - - /** - * Get second line of Address street. - * - * @return second line of Address street - */ - public String getStreet2() { - return street2; - } - - /** - * Set second line of Address street. - * - * @param street2 second line of Address street - */ - public void setStreet2(final String street2) { - this.street2 = street2; - } - - /** - * Get zip code of Address. - * - * @return Address zip code - */ - public String getZip() { - return zip; - } - - /** - * Set zip code of Address. - * - * @param zip Address zip code - */ - public void setZip(final String zip) { - this.zip = zip; - } } diff --git a/src/main/java/com/easypost/model/BaseCreditCard.java b/src/main/java/com/easypost/model/BaseCreditCard.java deleted file mode 100644 index dee2f370a..000000000 --- a/src/main/java/com/easypost/model/BaseCreditCard.java +++ /dev/null @@ -1,125 +0,0 @@ -package com.easypost.model; - -/** - * BaseCreditCard is a model class that represents the base of any credit card. - * - * @deprecated Use {@link com.easypost.model.PaymentMethodObject} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ -@Deprecated -public class BaseCreditCard extends EasyPostResource { - private String object; - private String name; - private String last4; - private String expMonth; - private String expYear; - private String brand; - - /** - * Get the brand of this CreditCard object. - * - * @return the brand of this CreditCard. - */ - public String getBrand() { - return brand; - } - - /** - * Set the brand of this CreditCard object. - * - * @param brand the brand of this CreditCard. - */ - public void setBrand(String brand) { - this.brand = brand; - } - - /** - * Get the expMonth of this CreditCard object. - * - * @return the expMonth of this CreditCard. - */ - public String getExpMonth() { - return expMonth; - } - - /** - * Set the expMonth of this CreditCard object. - * - * @param expMonth the expMonth of this CreditCard. - */ - public void setExpMonth(String expMonth) { - this.expMonth = expMonth; - } - - /** - * Get the expYear of this CreditCard object. - * - * @return the expYear of this CreditCard. - */ - public String getExpYear() { - return expYear; - } - - /** - * Set the expYear of this CreditCard object. - * - * @param expYear the expYear of this CreditCard. - */ - public void setExpYear(String expYear) { - this.expYear = expYear; - } - - /** - * Get the last 4 digits of this CreditCard object. - * - * @return the last 4 digits of this CreditCard. - */ - public String getLast4() { - return last4; - } - - /** - * Set the last 4 digits of this CreditCard object. - * - * @param last4 the last 4 digits of this CreditCard. - */ - public void setLast4(String last4) { - this.last4 = last4; - } - - /** - * Get the name of this CreditCard object. - * - * @return the name of this CreditCard. - */ - public String getName() { - return name; - } - - /** - * Set the name of this CreditCard object. - * - * @param name the name of this CreditCard. - */ - public void setName(String name) { - this.name = name; - } - - /** - * Get the object of this CreditCard object. - * - * @return the object of this CreditCard. - */ - public String getObject() { - return object; - } - - /** - * Set the object of this CreditCard object. - * - * @param object the object of this CreditCard. - */ - public void setObject(String object) { - this.object = object; - } -} diff --git a/src/main/java/com/easypost/model/BaseUser.java b/src/main/java/com/easypost/model/BaseUser.java index 17ddc138c..1b621eede 100644 --- a/src/main/java/com/easypost/model/BaseUser.java +++ b/src/main/java/com/easypost/model/BaseUser.java @@ -1,7 +1,9 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public class BaseUser extends EasyPostResource { private String name; private String email; @@ -20,310 +22,4 @@ public class BaseUser extends EasyPostResource { private String insuranceFeeRate; private String insuranceFeeMinimum; private List children; - - /** - * Get the balance of the User. - * - * @return the balance of the User. - */ - public String getBalance() { - return balance; - } - - /** - * Set the balance of the User. - * - * @param balance the balance of the User. - */ - public void setBalance(final String balance) { - this.balance = balance; - } - - /** - * Get the cc fee rate of the User. - * - * @return the cc fee rate of the User. - */ - public String getCcFeeRate() { - return ccFeeRate; - } - - /** - * Set the cc fee rate of the User. - * - * @param ccFeeRate the cc fee rate of the User. - */ - public void setCcFeeRate(String ccFeeRate) { - this.ccFeeRate = ccFeeRate; - } - - /** - * Get the children of the User. - * - * @return List of User objects. - */ - public List getChildren() { - return children; - } - - /** - * Set the children of the User. - * - * @param children List of User objects. - */ - public void setChildren(final List children) { - this.children = children; - } - - /** - * Get the default insurance amount of the User. - * - * @return the default insurance amount of the User. - */ - public String getDefaultInsuranceAmount() { - return defaultInsuranceAmount; - } - - /** - * Set the default insurance amount of the User. - * - * @param defaultInsuranceAmount the default insurance amount of the User. - */ - public void setDefaultInsuranceAmount(String defaultInsuranceAmount) { - this.defaultInsuranceAmount = defaultInsuranceAmount; - } - - /** - * Get the email of the User. - * - * @return the email of the User. - */ - public String getEmail() { - return email; - } - - /** - * Set the email of the User. - * - * @param email the email of the User. - */ - public void setEmail(final String email) { - this.email = email; - } - - /** - * Get the has billing method of the User. - * - * @return the has billing method of the User. - */ - public boolean getHasBillingMethod() { - return hasBillingMethod; - } - - /** - * Set the has billing method of the User. - * - * @param hasBillingMethod the has billing method of the User. - */ - public void setHasBillingMethod(boolean hasBillingMethod) { - this.hasBillingMethod = hasBillingMethod; - } - - /** - * Get the insurance fee minimum of the User. - * - * @return the insurance fee minimum of the User. - */ - public String getInsuranceFeeMinimum() { - return insuranceFeeMinimum; - } - - /** - * Set the insurance fee minimum of the User. - * - * @param insuranceFeeMinimum the insurance fee minimum of the User. - */ - public void setInsuranceFeeMinimum(String insuranceFeeMinimum) { - this.insuranceFeeMinimum = insuranceFeeMinimum; - } - - /** - * Get the insurance fee rate of the User. - * - * @return the insurance fee rate of the User. - */ - public String getInsuranceFeeRate() { - return insuranceFeeRate; - } - - /** - * Set the insurance fee rate of the User. - * - * @param insuranceFeeRate the insurance fee rate of the User. - */ - public void setInsuranceFeeRate(String insuranceFeeRate) { - this.insuranceFeeRate = insuranceFeeRate; - } - - /** - * Get the name of the User. - * - * @return the name of the User. - */ - public String getName() { - return name; - } - - /** - * Set the name of the User. - * - * @param name the name of the User. - */ - public void setName(final String name) { - this.name = name; - } - - /** - * Get the object of the User. - * - * @return the object of the User. - */ - public String getObject() { - return object; - } - - /** - * Set the object of the User. - * - * @param object the object of the User. - */ - public void setObject(String object) { - this.object = object; - } - - /** - * Get the parent ID of the User. - * - * @return the parent ID of the User. - */ - public String getParentId() { - return parentId; - } - - /** - * Set the parent ID of the User. - * - * @param parentId the parent ID of the User. - */ - public void setParentId(String parentId) { - this.parentId = parentId; - } - - /** - * Get the phone number of the User. - * - * @return the phone number of the User. - */ - public String getPhoneNumber() { - return phoneNumber; - } - - /** - * Set the phone number of the User. - * - * @param phoneNumber the phone number of the User. - */ - public void setPhoneNumber(final String phoneNumber) { - this.phoneNumber = phoneNumber; - } - - /** - * Get the price per shipment of the User. - * - * @return the price per shipment of the User. - */ - public String getPricePerShipment() { - return pricePerShipment; - } - - /** - * Set the price per shipment of the User. - * - * @param pricePerShipment the price per shipment of the User. - */ - public void setPricePerShipment(String pricePerShipment) { - this.pricePerShipment = pricePerShipment; - } - - /** - * Get the recharge amount of the User. - * - * @return the recharge amount of the User. - */ - public String getRechargeAmount() { - return rechargeAmount; - } - - /** - * Set the recharge amount of the User. - * - * @param rechargeAmount the recharge amount of the User. - */ - public void setRechargeAmount(final String rechargeAmount) { - this.rechargeAmount = rechargeAmount; - } - - /** - * Get the recharge threshold of the User. - * - * @return the recharge threshold of the User. - */ - public String getRechargeThreshold() { - return rechargeThreshold; - } - - /** - * Set the recharge threshold of the User. - * - * @param rechargeThreshold the recharge threshold of the User. - */ - public void setRechargeThreshold(final String rechargeThreshold) { - this.rechargeThreshold = rechargeThreshold; - } - - /** - * Get the secondary recharge amount of the User. - * - * @return the secondary recharge amount of the User. - */ - public String getSecondaryRechargeAmount() { - return secondaryRechargeAmount; - } - - /** - * Set the secondary recharge amount of the User. - * - * @param secondaryRechargeAmount the secondary recharge amount of the User. - */ - public void setSecondaryRechargeAmount(final String secondaryRechargeAmount) { - this.secondaryRechargeAmount = secondaryRechargeAmount; - } - - /** - * Get the verified of the User. - * - * @return the verified of the User. - */ - public boolean getVerified() { - return verified; - } - - /** - * Set the verified of the User. - * - * @param verified the verified of the User. - */ - public void setVerified(boolean verified) { - this.verified = verified; - } } diff --git a/src/main/java/com/easypost/model/Batch.java b/src/main/java/com/easypost/model/Batch.java index bac037235..9c810fb57 100644 --- a/src/main/java/com/easypost/model/Batch.java +++ b/src/main/java/com/easypost/model/Batch.java @@ -1,7 +1,9 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class Batch extends EasyPostResource { private String state; private BatchStatus status; @@ -10,130 +12,4 @@ public final class Batch extends EasyPostResource { private String labelUrl; private ScanForm scanForm; private String reference; - - /** - * Get status of this batch. - * - * @return status of this batch. - */ - public BatchStatus getBatchStatus() { - return status; - } - - /** - * Set status of this batch. - * - * @param status status of this batch. - */ - public void setBatchStatus(final BatchStatus status) { - this.status = status; - } - - /** - * Get number of shipments in this batch. - * - * @return number of shipments in this batch. - */ - public Number getNumShipments() { - return numShipments; - } - - /** - * Set number of shipments in this batch. - * - * @param numShipments number of shipments in this batch. - */ - public void setNumShipments(final Number numShipments) { - this.numShipments = numShipments; - } - - /** - * Get reference of this batch. - * - * @return reference of this batch. - */ - public String getReference() { - return reference; - } - - /** - * Set reference of this batch. - * - * @param reference reference of this batch. - */ - public void setReference(final String reference) { - this.reference = reference; - } - - /** - * Get scan form of this batch. - * - * @return ScanForm object. - */ - public ScanForm getScanForm() { - return scanForm; - } - - /** - * Set scan form of this batch. - * - * @param scanForm ScanForm object. - */ - public void setScanForm(final ScanForm scanForm) { - this.scanForm = scanForm; - } - - /** - * Get state of this batch. - * - * @return state of this batch. - */ - public String getState() { - return state; - } - - /** - * Set state of this batch. - * - * @param state state of this batch. - */ - public void setState(final String state) { - this.state = state; - } - - /** - * Get label URL of this batch. - * - * @return Label URL of this batch.x - */ - public String getLabelUrl() { - return labelUrl; - } - - /** - * Set label url of this batch. - * - * @param labelUrl Label URL of this batch. - */ - public void setLabelUrl(final String labelUrl) { - this.labelUrl = labelUrl; - } - - /** - * Get shipments in this batch. - * - * @return list of Shipment objects. - */ - public List getShipments() { - return shipments; - } - - /** - * Set shipments in this batch. - * - * @param shipments list of Shipment objects. - */ - public void setShipments(final List shipments) { - this.shipments = shipments; - } } diff --git a/src/main/java/com/easypost/model/BatchCollection.java b/src/main/java/com/easypost/model/BatchCollection.java index 238e06846..1e04f2247 100644 --- a/src/main/java/com/easypost/model/BatchCollection.java +++ b/src/main/java/com/easypost/model/BatchCollection.java @@ -1,44 +1,10 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class BatchCollection extends EasyPostResource { private List batches; private Boolean hasMore; - - /** - * Get a list of batches. - * - * @return List of Batch objects. - */ - public List getBatches() { - return batches; - } - - /** - * Set a list of batches. - * - * @param batches List of Batch objects. - */ - public void setBatches(final List batches) { - this.batches = batches; - } - - /** - * Get whether there are more batches to retrieve. - * - * @return true if there are more batches to retrieve, false otherwise. - */ - public Boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more batches to retrieve. - * - * @param hasMore true if there are more batches to retrieve, false otherwise. - */ - public void setHasMore(final Boolean hasMore) { - this.hasMore = hasMore; - } } diff --git a/src/main/java/com/easypost/model/BatchStatus.java b/src/main/java/com/easypost/model/BatchStatus.java index 731bd9831..4cbea4d3b 100644 --- a/src/main/java/com/easypost/model/BatchStatus.java +++ b/src/main/java/com/easypost/model/BatchStatus.java @@ -1,80 +1,11 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class BatchStatus { private int created; private int creationFailed; private int postagePurchased; private int postagePurchaseFailed; - - /** - * Get the number of batches created. - * - * @return the number of batches created. - */ - public int getCreated() { - return created; - } - - /** - * Set the number of batches created. - * - * @param created the number of batches created. - */ - public void setCreated(final int created) { - this.created = created; - } - - /** - * Get the number of batches that failed to be created. - * - * @return the number of batches that failed to be created. - */ - public int getCreationFailed() { - return creationFailed; - } - - /** - * Set the number of batches that failed to be created. - * - * @param creationFailed the number of batches that failed to be created. - */ - public void setCreationFailed(final int creationFailed) { - this.creationFailed = creationFailed; - } - - /** - * Get the number of postage purchases that failed. - * - * @return the number of postage purchases that failed. - */ - public int getPostagePurchaseFailed() { - return postagePurchaseFailed; - } - - /** - * Set the number of postage purchases that failed. - * - * @param postagePurchaseFailed the number of postage purchases that failed. - */ - public void setPostagePurchaseFailed(final int postagePurchaseFailed) { - this.postagePurchaseFailed = postagePurchaseFailed; - } - - /** - * Get the number of postage purchases. - * - * @return the number of postage purchases. - */ - public int getPostagePurchased() { - return postagePurchased; - } - - /** - * Set the number of postage purchases. - * - * @param postagePurchased the number of postage purchases. - */ - public void setPostagePurchased(final int postagePurchased) { - this.postagePurchased = postagePurchased; - } } diff --git a/src/main/java/com/easypost/model/Brand.java b/src/main/java/com/easypost/model/Brand.java index ebd0b9185..1b2525770 100644 --- a/src/main/java/com/easypost/model/Brand.java +++ b/src/main/java/com/easypost/model/Brand.java @@ -1,5 +1,8 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public class Brand extends EasyPostResource { private String backgroundColor; private String color; @@ -10,166 +13,4 @@ public class Brand extends EasyPostResource { private String name; private String userID; private String theme; - - /** - * Get the ad of the Brand. - * - * @return the ad of the Brand. - */ - public String getAd() { - return this.ad; - } - - /** - * Set the ad of the Brand. - * - * @param ad the ad of the Brand. - */ - public void setAd(String ad) { - this.ad = ad; - } - - /** - * Get the ad href of the Brand. - * - * @return the ad href of the Brand. - */ - public String getAdHref() { - return this.adHref; - } - - /** - * Set the ad href of the Brand. - * - * @param adHref the ad href of the Brand. - */ - public void setAdHref(String adHref) { - this.adHref = adHref; - } - - /** - * Get the background of the Brand. - * - * @return the background of the Brand. - */ - public String getBackgroundColor() { - return backgroundColor; - } - - /** - * Set the background of the Brand. - * - * @param backgroundColor the background of the Brand. - */ - public void setBackgroundColor(String backgroundColor) { - this.backgroundColor = backgroundColor; - } - - /** - * Get the color of the Brand. - * - * @return the color of the Brand. - */ - public String getColor() { - return this.color; - } - - /** - * Set the color of the Brand. - * - * @param color the color of the Brand. - */ - public void setColor(String color) { - this.color = color; - } - - /** - * Get the logo of the Brand. - * - * @return the logo of the Brand. - */ - public String getLogo() { - return this.logo; - } - - /** - * Set the logo of the Brand. - * - * @param logo the logo of the Brand. - */ - public void setLogo(String logo) { - this.logo = logo; - } - - /** - * Get the logo href of the Brand. - * - * @return the logo href of the Brand. - */ - public String getLogoHref() { - return this.logoHref; - } - - /** - * Set the logo href of the Brand. - * - * @param logoHref the logo href of the Brand. - */ - public void setLogoHref(String logoHref) { - this.logoHref = logoHref; - } - - /** - * Get the name of the User. - * - * @return the name of the User. - */ - public String getName() { - return this.name; - } - - /** - * Set the name of the User. - * - * @param name the name of the User. - */ - public void setName(String name) { - this.name = name; - } - - /** - * Get the theme of the Brand. - * - * @return the theme of the Brand. - */ - public String getTheme() { - return this.theme; - } - - /** - * Set the theme of the Brand. - * - * @param theme the theme of the Brand. - */ - public void setTheme(String theme) { - this.theme = theme; - } - - /** - * Get the user ID of the Brand. - * - * @return the user ID of the Brand. - */ - public String getUserID() { - return this.userID; - } - - /** - * Set the user ID of the Brand. - * - * @param userID the user ID of the Brand. - */ - public void setUserID(String userID) { - this.userID = userID; - } } diff --git a/src/main/java/com/easypost/model/CarbonOffset.java b/src/main/java/com/easypost/model/CarbonOffset.java index 909bf3559..28967f865 100644 --- a/src/main/java/com/easypost/model/CarbonOffset.java +++ b/src/main/java/com/easypost/model/CarbonOffset.java @@ -1,44 +1,11 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class CarbonOffset extends EasyPostResource { private String currency; private int grams; private String price; private String object; - - /** - * Get the currency of the provided price. Currently always USD. - * - * @return the currency of the provided price. Currently always USD. - */ - public String getCurrency() { - return currency; - } - - /** - * Get the amount of carbon grams emitted by the shipment. - * - * @return the amount of carbon grams emitted by the shipment. - */ - public int getGrams() { - return grams; - } - - /** - * Get the price to offset the number of carbon grams. - * - * @return the price to offset the number of carbon grams. - */ - public String getPrice() { - return price; - } - - /** - * Get the type of this object. - * - * @return the type of this object. - */ - public String getObject() { - return object; - } } diff --git a/src/main/java/com/easypost/model/CarrierAccount.java b/src/main/java/com/easypost/model/CarrierAccount.java index 53593af80..6d5b00c74 100644 --- a/src/main/java/com/easypost/model/CarrierAccount.java +++ b/src/main/java/com/easypost/model/CarrierAccount.java @@ -1,7 +1,9 @@ package com.easypost.model; import java.util.Map; +import lombok.Getter; +@Getter public final class CarrierAccount extends EasyPostResource { private String object; private String type; @@ -13,184 +15,4 @@ public final class CarrierAccount extends EasyPostResource { private String billingType; private Map credentials; private Map testCredentials; - - /** - * Get billing type of the carrier account. - * - * @return billing type of the carrier account. - */ - public String getBillingType() { - return billingType; - } - - /** - * Set billing type of the carrier account. - * - * @param billingType billing type of the carrier account. - */ - public void setBillingType(final String billingType) { - this.billingType = billingType; - } - - /** - * Get credentials of the carrier account. - * - * @return credentials of the carrier account. - */ - public Map getCredentials() { - return credentials; - } - - /** - * Set credentials of the carrier account. - * - * @param credentials credentials of the carrier account. - */ - public void setCredentials(final Map credentials) { - this.credentials = credentials; - } - - /** - * Get description of the carrier account. - * - * @return description of the carrier account. - */ - public String getDescription() { - return description; - } - - /** - * Set description of the carrier account. - * - * @param description description of the carrier account. - */ - public void setDescription(final String description) { - this.description = description; - } - - /** - * Get readable name of the carrier account. - * - * @return readable name of the carrier account. - */ - public String getReadable() { - return readable; - } - - /** - * Set readable name of the carrier account. - * - * @param readable readable name of the carrier account. - */ - public void setReadable(final String readable) { - this.readable = readable; - } - - /** - * Get reference of the carrier account. - * - * @return reference of the carrier account. - */ - public String getReference() { - return reference; - } - - /** - * Set reference of the carrier account. - * - * @param reference reference of the carrier account. - */ - public void setReference(final String reference) { - this.reference = reference; - } - - /** - * Get object type of the carrier account. - * - * @return object type of the carrier account. - */ - public String getObject() { - return object; - } - - /** - * Set object type of the carrier account. - * - * @param object object type of the carrier account. - */ - public void setObject(String object) { - this.object = object; - } - - /** - * Get type of the carrier account. - * - * @return type of the carrier account. - */ - public String getType() { - return type; - } - - /** - * Set type of the carrier account. - * - * @param type type of the carrier account. - */ - public void setType(String type) { - this.type = type; - } - - /** - * Get fields of the carrier account. - * - * @return fields of the carrier account. - */ - public Fields getFields() { - return fields; - } - - /** - * Set fields of the carrier account. - * - * @param fields fields of the carrier account. - */ - public void setFields(Fields fields) { - this.fields = fields; - } - - /** - * Get whether the carrier account is a clone. - * - * @return True if carrier account is a clone, false otherwise. - */ - public boolean isClone() { - return clone; - } - - /** - * Set whether the carrier account is a clone. - * - * @param clone True if carrier account is a clone, false otherwise. - */ - public void setClone(boolean clone) { - this.clone = clone; - } - - /** - * Get test credentials of the carrier account. - * - * @return test credentials of the carrier account. - */ - public Map getTestCredentials() { - return testCredentials; - } - - /** - * Set test credentials of the carrier account. - * - * @param testCredentials test credentials of the carrier account. - */ - public void setTestCredentials(Map testCredentials) { - this.testCredentials = testCredentials; - } } diff --git a/src/main/java/com/easypost/model/CarrierDetail.java b/src/main/java/com/easypost/model/CarrierDetail.java index d29928eaa..33096275c 100644 --- a/src/main/java/com/easypost/model/CarrierDetail.java +++ b/src/main/java/com/easypost/model/CarrierDetail.java @@ -1,5 +1,8 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class CarrierDetail { private String service; private String containerType; @@ -10,166 +13,4 @@ public final class CarrierDetail { private String guaranteedDeliveryDate; private String alternateIdentifier; private String initialDeliveryAttempt; - - /** - * Get alternate identifier. - * - * @return alternate identifier - */ - public String getAlternateIdentifier() { - return alternateIdentifier; - } - - /** - * Set alternate identifier. - * - * @param alternateIdentifier alternate identifier - */ - public void setAlternateIdentifier(final String alternateIdentifier) { - this.alternateIdentifier = alternateIdentifier; - } - - /** - * Get carrier container type. - * - * @return carrier container type - */ - public String getContainerType() { - return containerType; - } - - /** - * Set carrier container type. - * - * @param containerType carrier container type - */ - public void setContainerType(final String containerType) { - this.containerType = containerType; - } - - /** - * Get destination location. - * - * @return destination location - */ - public String getDestinationLocation() { - return destinationLocation; - } - - /** - * Set destination location. - * - * @param destinationLocation destination location - */ - public void setDestinationLocation(final String destinationLocation) { - this.destinationLocation = destinationLocation; - } - - /** - * Get the estimated delivery date in local time. - * - * @return estimated delivery date in local time - */ - public String getEstDeliveryDateLocal() { - return estDeliveryDateLocal; - } - - /** - * Set the estimated delivery date in local time. - * - * @param estDeliveryDateLocal estimated delivery date in local time - */ - public void setEstDeliveryDateLocal(final String estDeliveryDateLocal) { - this.estDeliveryDateLocal = estDeliveryDateLocal; - } - - /** - * Get the estimated delivery time in local time. - * - * @return estimated delivery time in local time - */ - public String getEstDeliveryTimeLocal() { - return estDeliveryTimeLocal; - } - - /** - * Set the estimated delivery time in local time. - * - * @param estDeliveryTimeLocal estimated delivery time in local time - */ - public void setEstDeliveryTimeLocal(final String estDeliveryTimeLocal) { - this.estDeliveryTimeLocal = estDeliveryTimeLocal; - } - - /** - * Get the guaranteed delivery date. - * - * @return guaranteed delivery date - */ - public String getGuaranteedDeliveryDate() { - return guaranteedDeliveryDate; - } - - /** - * Set the guaranteed delivery date. - * - * @param guaranteedDeliveryDate guaranteed delivery date - */ - public void setGuaranteedDeliveryDate(final String guaranteedDeliveryDate) { - this.guaranteedDeliveryDate = guaranteedDeliveryDate; - } - - /** - * Get initial delivery attempt. - * - * @return initial delivery attempt - */ - public String getInitialDeliveryAttempt() { - return initialDeliveryAttempt; - } - - /** - * Set initial delivery attempt. - * - * @param initialDeliveryAttempt initial delivery attempt - */ - public void setInitialDeliveryAttempt(final String initialDeliveryAttempt) { - this.initialDeliveryAttempt = initialDeliveryAttempt; - } - - /** - * Get origin location. - * - * @return origin location - */ - public String getOriginLocation() { - return originLocation; - } - - /** - * Set origin location. - * - * @param originLocation origin location - */ - public void setOriginLocation(final String originLocation) { - this.originLocation = originLocation; - } - - /** - * Get carrier service. - * - * @return carrier service - */ - public String getService() { - return service; - } - - /** - * Set carrier service. - * - * @param service carrier service - */ - public void setService(final String service) { - this.service = service; - } } diff --git a/src/main/java/com/easypost/model/CarrierType.java b/src/main/java/com/easypost/model/CarrierType.java index ffc5c85c2..45b5ac89c 100644 --- a/src/main/java/com/easypost/model/CarrierType.java +++ b/src/main/java/com/easypost/model/CarrierType.java @@ -1,82 +1,12 @@ package com.easypost.model; import java.util.Map; +import lombok.Getter; +@Getter public final class CarrierType extends EasyPostResource { private String type; private String readable; private String logo; private Map fields; - - /** - * Get the fields of the carrier. - * - * @return fields from a carrier. - */ - public Map getFields() { - return fields; - } - - /** - * Set the fields of carrier. - * - * @param fields fields for a carrier. - */ - public void setFields(final Map fields) { - this.fields = fields; - } - - /** - * Get the logo of the carrier. - * - * @return logo of a carrier. - */ - public String getLogo() { - return logo; - } - - /** - * Set the logo of carrier. - * - * @param logo logo of a carrier. - */ - public void setLogo(final String logo) { - this.logo = logo; - } - - /** - * Get the readable name of the carrier. - * - * @return return readable name of the carrier. - */ - public String getReadable() { - return readable; - } - - /** - * Set the readable name of the carrier. - * - * @param readable readable name of the carrier. - */ - public void setReadable(final String readable) { - this.readable = readable; - } - - /** - * Get the type of the carrier. - * - * @return type of a carrier. - */ - public String getType() { - return type; - } - - /** - * Set the type of carrier. - * - * @param type type of a carrier. - */ - public void setType(final String type) { - this.type = type; - } } diff --git a/src/main/java/com/easypost/model/CustomsInfo.java b/src/main/java/com/easypost/model/CustomsInfo.java index 0a6bd41cd..79f8f5a88 100644 --- a/src/main/java/com/easypost/model/CustomsInfo.java +++ b/src/main/java/com/easypost/model/CustomsInfo.java @@ -1,7 +1,9 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class CustomsInfo extends EasyPostResource { private String contentsType; private String contentsExplanation; @@ -13,184 +15,4 @@ public final class CustomsInfo extends EasyPostResource { private List customsItems; private String eelPfc; private String declaration; - - /** - * Get an explanation of this CustomsInfo's contents. - * - * @return the explanation of this CustomsInfo's contents. - */ - public String getContentsExplanation() { - return contentsExplanation; - } - - /** - * Set an explanation of this CustomsInfo's contents. - * - * @param contentsExplanation the explanation of this CustomsInfo's contents. - */ - public void setContentsExplanation(final String contentsExplanation) { - this.contentsExplanation = contentsExplanation; - } - - /** - * Get this CustomsInfo's contents type. - * - * @return the contents type of this CustomsInfo. - */ - public String getContentsType() { - return contentsType; - } - - /** - * Set this CustomsInfo's contents type. - * - * @param contentsType the contents type of this CustomsInfo. - */ - public void setContentsType(final String contentsType) { - this.contentsType = contentsType; - } - - /** - * Get whether this CustomsInfo is certified by customs. - * - * @return true if this CustomsInfo is certified by customs. - */ - public boolean getCustomsCertify() { - return customsCertify; - } - - /** - * Set whether this CustomsInfo is certified by customs. - * - * @param customsCertify true if this CustomsInfo is certified by customs. - */ - public void setCustomsCertify(final boolean customsCertify) { - this.customsCertify = customsCertify; - } - - /** - * Get this CustomsInfo's customs items. - * - * @return the customs items of this CustomsInfo. - */ - public List getCustomsItems() { - return customsItems; - } - - /** - * Set this CustomsInfo's customs items. - * - * @param customsItems the customs items of this CustomsInfo. - */ - public void setCustomsItems(final List customsItems) { - this.customsItems = customsItems; - } - - /** - * Get this CustomsInfo's signer. - * - * @return the signer of this CustomsInfo. - */ - public String getCustomsSigner() { - return customsSigner; - } - - /** - * Set this CustomsInfo's signer. - * - * @param customsSigner the signer of this CustomsInfo. - */ - public void setCustomsSigner(final String customsSigner) { - this.customsSigner = customsSigner; - } - - /** - * Get this CustomsInfo's declaration. - * - * @return the declaration of this CustomsInfo. - */ - public String getDeclaration() { - return declaration; - } - - /** - * Set this CustomsInfo's declaration. - * - * @param declaration the declaration of this CustomsInfo. - */ - public void setDeclaration(String declaration) { - this.declaration = declaration; - } - - /** - * Get this CustomsInfo's EEL or PFC. - * - * @return the EEL or PFC of this CustomsInfo. - */ - public String getEelPfc() { - return eelPfc; - } - - /** - * Set this CustomsInfo's EEL or PFC. - * - * @param eelPfc the EEL or PFC of this CustomsInfo. - */ - public void setEelPfc(String eelPfc) { - this.eelPfc = eelPfc; - } - - /** - * Get the non-delivery option of this CustomsInfo. - * - * @return the non-delivery option of this CustomsInfo. - */ - public String getNonDeliveryOption() { - return nonDeliveryOption; - } - - /** - * Set this CustomsInfo's non-delivery option. - * - * @param nonDeliveryOption the non-delivery option of this CustomsInfo. - */ - public void setNonDeliveryOption(final String nonDeliveryOption) { - this.nonDeliveryOption = nonDeliveryOption; - } - - /** - * Get this CustomsInfo's restriction comments. - * - * @return the restriction comments of this CustomsInfo. - */ - public String getRestrictionComments() { - return restrictionComments; - } - - /** - * Set this CustomsInfo's restriction comments. - * - * @param restrictionComments the restriction comments of this CustomsInfo. - */ - public void setRestrictionComments(final String restrictionComments) { - this.restrictionComments = restrictionComments; - } - - /** - * Get this CustomsInfo's restriction type. - * - * @return the restriction type of this CustomsInfo. - */ - public String getRestrictionType() { - return restrictionType; - } - - /** - * Set this CustomsInfo's restriction type. - * - * @param restrictionType the restriction type of this CustomsInfo. - */ - public void setRestrictionType(final String restrictionType) { - this.restrictionType = restrictionType; - } } diff --git a/src/main/java/com/easypost/model/CustomsItem.java b/src/main/java/com/easypost/model/CustomsItem.java index 70e5c2cca..a0308becb 100644 --- a/src/main/java/com/easypost/model/CustomsItem.java +++ b/src/main/java/com/easypost/model/CustomsItem.java @@ -1,5 +1,8 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class CustomsItem extends EasyPostResource { private String description; private String hsTariffNumber; @@ -9,148 +12,4 @@ public final class CustomsItem extends EasyPostResource { private Float weight; private String code; private String currency; - - /** - * Get this CustomsItem's code. - * - * @return the code of this CustomsItem. - */ - public String getCode() { - return code; - } - - /** - * Set this CustomsItem's code. - * - * @param code the code of this CustomsItem. - */ - public void setCode(final String code) { - this.code = code; - } - - /** - * Get this CustomsItem's currency. - * - * @return the currency of this CustomsItem. - */ - public String getCurrency() { - return currency; - } - - /** - * Set this CustomsItem's currency. - * - * @param currency the currency of this CustomsItem. - */ - public void setCurrency(final String currency) { - this.currency = currency; - } - - /** - * Get this CustomsItem's description. - * - * @return the description of this CustomsItem. - */ - public String getDescription() { - return description; - } - - /** - * Set this CustomsItem's description. - * - * @param description the description of this CustomsItem. - */ - public void setDescription(final String description) { - this.description = description; - } - - /** - * Get this CustomsItem's HS Tariff Number. - * - * @return the HS Tariff Number of this CustomsItem. - */ - public String getHsTariffNumber() { - return hsTariffNumber; - } - - /** - * Set this CustomsItem's HS Tariff Number. - * - * @param hsTariffNumber the HS Tariff Number of this CustomsItem. - */ - public void setHsTariffNumber(final String hsTariffNumber) { - this.hsTariffNumber = hsTariffNumber; - } - - /** - * Get this CustomsItem's origin country. - * - * @return the origin country of this CustomsItem. - */ - public String getOriginCountry() { - return originCountry; - } - - /** - * Set this CustomsItem's origin country. - * - * @param originCountry the origin country of this CustomsItem. - */ - public void setOriginCountry(final String originCountry) { - this.originCountry = originCountry; - } - - /** - * Get this CustomsItem's quantity. - * - * @return the quantity of this CustomsItem. - */ - public int getQuantity() { - return quantity; - } - - /** - * Set this CustomsItem's quantity. - * - * @param quantity the quantity of this CustomsItem. - */ - public void setQuantity(final int quantity) { - this.quantity = quantity; - } - - /** - * Get this CustomsItem's value. - * - * @return the value of this CustomsItem. - */ - public Float getValue() { - return value; - } - - /** - * Set this CustomsItem's value. - * - * @param value the value of this CustomsItem. - */ - public void setValue(final Float value) { - this.value = value; - } - - /** - * Get this CustomsItem's weight. - * - * @return the weight of this CustomsItem. - */ - public Float getWeight() { - return weight; - } - - /** - * Set this CustomsItem's weight. - * - * @param weight the weight of this CustomsItem. - */ - public void setWeight(final Float weight) { - this.weight = weight; - } } diff --git a/src/main/java/com/easypost/model/EasyPostResource.java b/src/main/java/com/easypost/model/EasyPostResource.java index 64cdd4fd6..f2eb1b2f0 100644 --- a/src/main/java/com/easypost/model/EasyPostResource.java +++ b/src/main/java/com/easypost/model/EasyPostResource.java @@ -13,77 +13,15 @@ import java.util.Date; import com.easypost.http.Constant; +import lombok.Getter; +@Getter public abstract class EasyPostResource { private String id; private String mode; private Date createdAt; private Date updatedAt; - /** - * @return the Date this object was created - */ - public Date getCreatedAt() { - return createdAt; - } - - /** - * Set the Date this object was created. - * - * @param createdAt the Date this object was created - */ - public void setCreatedAt(final Date createdAt) { - this.createdAt = createdAt; - } - - /** - * @return the ID of this object - */ - public String getId() { - return id; - } - - /** - * Set the ID of this object. - * - * @param id the ID of this object - */ - public void setId(final String id) { - this.id = id; - } - - /** - * @return the API mode used to create this object - */ - public String getMode() { - return mode; - } - - /** - * Set the API mode used to create this object. - * - * @param mode the Mode of this object - */ - public void setMode(final String mode) { - this.mode = mode; - } - - /** - * @return the Date this object was last updated - */ - public Date getUpdatedAt() { - return updatedAt; - } - - /** - * Set the Date this object was last updated. - * - * @param updatedAt the Date this object was last updated - */ - public void setUpdatedAt(final Date updatedAt) { - this.updatedAt = updatedAt; - } - /** * Returns a string representation of the object. * diff --git a/src/main/java/com/easypost/model/EndShipperCollection.java b/src/main/java/com/easypost/model/EndShipperCollection.java index c252af835..5f0329076 100644 --- a/src/main/java/com/easypost/model/EndShipperCollection.java +++ b/src/main/java/com/easypost/model/EndShipperCollection.java @@ -1,44 +1,10 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public class EndShipperCollection { private List endShippers; private Boolean hasMore; - - /** - * Get a list of EndShippers. - * - * @return List of EndShipper objects - */ - public List getEndShippers() { - return endShippers; - } - - /** - * Set a list of EndShippers. - * - * @param addresses List of EndShipper objects - */ - public void setEndShippers(final List addresses) { - this.endShippers = addresses; - } - - /** - * Get whether there are more EndShippers to retrieve. - * - * @return whether there are more EndShippers to retrieve - */ - public Boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more EndShippers to retrieve. - * - * @param hasMore Boolean whether there are more EndShippers to retrieve - */ - public void setHasMore(final Boolean hasMore) { - this.hasMore = hasMore; - } } diff --git a/src/main/java/com/easypost/model/Error.java b/src/main/java/com/easypost/model/Error.java index 53994417c..8f1ee3efc 100644 --- a/src/main/java/com/easypost/model/Error.java +++ b/src/main/java/com/easypost/model/Error.java @@ -1,7 +1,9 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class Error { private String message; private String code; @@ -10,92 +12,20 @@ public final class Error { private String field; /** - * Get the field of the error. + * Set the message of this error object. * - * @return field + * @param message The error message. */ - public String getField() { - return field; - } - - /** - * Set the field of the error. - * - * @param field field - */ - public void setField(final String field) { - this.field = field; - } - - /** - * Get the suggestion of the error. - * - * @return suggestion - */ - public String getSuggestion() { - return suggestion; - } - - /** - * Set the suggestion of the error. - * - * @param suggestion suggestion - */ - public void setSuggestion(final String suggestion) { - this.suggestion = suggestion; - } - - /** - * Get the errors from an Error object. - * - * @return errors - */ - public List getErrors() { - return errors; - } - - /** - * Set the errors for an Error object. - * - * @param errors errors - */ - public void setErrors(List errors) { - this.errors = errors; - } - - /** - * Get the error code. - * - * @return code - */ - public String getCode() { - return code; + void setMessage(final String message) { + this.message = message; } /** - * Set the error code. + * Set the code of this error object. * - * @param code code + * @param code The error code. */ - public void setCode(final String code) { + void setCode(final String code) { this.code = code; } - - /** - * Get the error message. - * - * @return message - */ - public String getMessage() { - return message; - } - - /** - * Set the error message. - * - * @param message message - */ - public void setMessage(final String message) { - this.message = message; - } } diff --git a/src/main/java/com/easypost/model/Event.java b/src/main/java/com/easypost/model/Event.java index 1bee2744a..da1eba7f0 100644 --- a/src/main/java/com/easypost/model/Event.java +++ b/src/main/java/com/easypost/model/Event.java @@ -2,99 +2,13 @@ import java.util.List; import java.util.Map; +import lombok.Getter; +@Getter public final class Event extends EasyPostResource { private String description; private Map result; private Map previousAttributes; private List pendingUrls; private List completedUrls; - - /** - * Get the description of this Event. - * - * @return Event's description - */ - public String getDescription() { - return description; - } - - /** - * Set the description of this Event. - * - * @param description Event's description - */ - public void setDescription(final String description) { - this.description = description; - } - - /** - * Get the previous attributes of this Event. - * - * @return Event's previous attributes - */ - public Map getPreviousAttributes() { - return previousAttributes; - } - - /** - * Set the previous attributes of this Event. - * - * @param previousAttributes Event's previous attributes - */ - public void setPreviousAttributes(final Map previousAttributes) { - this.previousAttributes = previousAttributes; - } - - /** - * Get the result of this Event. - * - * @return Event's result - */ - public Map getResult() { - return result; - } - - /** - * Set the result of this Event. - * - * @param result Event's result - */ - public void setResult(final Map result) { - this.result = result; - } - - /** - * Get the pendingUrls of this Event. - * - * @return Event's pendingUrls - */ - public List getPendingUrls() { - return this.pendingUrls; - } - - /** - * - * @param pendingUrls pendingUrls of this Event - */ - public void setPendingUrls(List pendingUrls) { - this.pendingUrls = pendingUrls; - } - - /** - * Get the completedUrls of this Event. - * - * @return Event's completedUrls - */ - public List getCompletedUrls() { - return this.completedUrls; - } - - /** - * - * @param completedUrls pendingUrls of this Event - */ - public void setCompletedUrls(List completedUrls) { - this.completedUrls = completedUrls; - } } diff --git a/src/main/java/com/easypost/model/EventCollection.java b/src/main/java/com/easypost/model/EventCollection.java index 28ba705f0..9c55f6d2a 100644 --- a/src/main/java/com/easypost/model/EventCollection.java +++ b/src/main/java/com/easypost/model/EventCollection.java @@ -1,44 +1,10 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class EventCollection extends EasyPostResource { private List events; private Boolean hasMore; - - /** - * Get a list of events. - * - * @return List of Event objects. - */ - public List getEvents() { - return events; - } - - /** - * Set a list of events. - * - * @param events List of Event objects. - */ - public void setEvents(final List events) { - this.events = events; - } - - /** - * Get whether there are more events to retrieve. - * - * @return whether there are more events to retrieve. - */ - public Boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more events to retrieve. - * - * @param hasMore whether there are more events to retrieve. - */ - public void setHasMore(final Boolean hasMore) { - this.hasMore = hasMore; - } } diff --git a/src/main/java/com/easypost/model/EventData.java b/src/main/java/com/easypost/model/EventData.java index db06da1fd..19c7e8662 100644 --- a/src/main/java/com/easypost/model/EventData.java +++ b/src/main/java/com/easypost/model/EventData.java @@ -1,44 +1,10 @@ package com.easypost.model; import java.util.Map; +import lombok.Getter; +@Getter public final class EventData extends EasyPostResource { private Map previousAttributes; private EasyPostResource object; - - /** - * Get the object of this EventData. - * - * @return EasyPostResource object - */ - public EasyPostResource getObject() { - return object; - } - - /** - * Set the object of this EventData. - * - * @param object EasyPostResource object - */ - public void setObject(final EasyPostResource object) { - this.object = object; - } - - /** - * Get the previous attributes of this EventData. - * - * @return Map of previous attributes - */ - public Map getPreviousAttributes() { - return previousAttributes; - } - - /** - * Set the previous attributes of this EventData. - * - * @param previousAttributes Map of previous attributes - */ - public void setPreviousAttributes(final Map previousAttributes) { - this.previousAttributes = previousAttributes; - } } diff --git a/src/main/java/com/easypost/model/Fee.java b/src/main/java/com/easypost/model/Fee.java index fd60b629f..5c5e9bb07 100644 --- a/src/main/java/com/easypost/model/Fee.java +++ b/src/main/java/com/easypost/model/Fee.java @@ -1,80 +1,11 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class Fee { private String type; private float amount; private Boolean charged; private Boolean refunded; - - /** - * Get Fee amount. - * - * @return amount - */ - public float getAmount() { - return amount; - } - - /** - * Set Fee amount. - * - * @param amount amount - */ - public void setAmount(final float amount) { - this.amount = amount; - } - - /** - * Get whether the fee is charged. - * - * @return true if the fee is charged - */ - public Boolean getCharged() { - return charged; - } - - /** - * Set whether the fee is charged. - * - * @param charged true if the fee is charged - */ - public void setCharged(final Boolean charged) { - this.charged = charged; - } - - /** - * Check if the fee is refunded. - * - * @return true if the fee is refunded - */ - public Boolean getRefunded() { - return refunded; - } - - /** - * Set whether the fee is refunded. - * - * @param refunded true if the fee is refunded - */ - public void setRefunded(final Boolean refunded) { - this.refunded = refunded; - } - - /** - * Get Fee type. - * - * @return type - */ - public String getType() { - return type; - } - - /** - * Set Fee type. - * - * @param type type - */ - public void setType(final String type) { - this.type = type; - } } diff --git a/src/main/java/com/easypost/model/Field.java b/src/main/java/com/easypost/model/Field.java index ab5a0c9bf..e344409ef 100644 --- a/src/main/java/com/easypost/model/Field.java +++ b/src/main/java/com/easypost/model/Field.java @@ -1,72 +1,11 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public class Field extends EasyPostResource { private String key; private String visibility; private String label; private String value; - - /** - * Get the key of this field. - * @return the key of this field. - */ - public String getKey() { - return key; - } - - /** - * Set the key of this field. - * @param key the key of this field. - */ - public void setKey(String key) { - this.key = key; - } - - /** - * Get the visibility of this field. - * @return the visibility of this field. - */ - public String getVisibility() { - return visibility; - } - - /** - * Set the visibility of this field. - * @param visibility the visibility of this field. - */ - public void setVisibility(String visibility) { - this.visibility = visibility; - } - - /** - * Get the label of this field. - * @return the label of this field. - */ - public String getLabel() { - return label; - } - - /** - * Set the label of this field. - * @param label the label of this field. - */ - public void setLabel(String label) { - this.label = label; - } - - /** - * Get the value of this field. - * @return the value of this field. - */ - public String getValue() { - return value; - } - - /** - * Set the value of this field. - * @param value the value of this field. - */ - public void setValue(String value) { - this.value = value; - } } diff --git a/src/main/java/com/easypost/model/Fields.java b/src/main/java/com/easypost/model/Fields.java index c2cee2dac..c9521e5df 100644 --- a/src/main/java/com/easypost/model/Fields.java +++ b/src/main/java/com/easypost/model/Fields.java @@ -1,72 +1,7 @@ package com.easypost.model; -public class Fields extends EasyPostResource { - private Field credentials; - private Field testCredentials; - private boolean autoLink; - private boolean customWorkflow; - - /** - * Get the credentials for this Fields object. - * @return the credentials for this Fields object. - */ - public Field getCredentials() { - return credentials; - } - - /** - * Set the credentials for this Fields object. - * @param credentials the credentials for this Fields object. - */ - public void setCredentials(Field credentials) { - this.credentials = credentials; - } - - /** - * Get the test credentials for this Fields object. - * @return the test credentials for this Fields object. - */ - public Field getTestCredentials() { - return testCredentials; - } - - /** - * Set the test credentials for this Fields object. - * @param testCredentials the test credentials for this Fields object. - */ - public void setTestCredentials(Field testCredentials) { - this.testCredentials = testCredentials; - } +import lombok.Getter; - /** - * Get whether this Fields object is auto-linked. - * @return true if this Fields object is auto-linked, false otherwise. - */ - public boolean isAutoLink() { - return autoLink; - } - - /** - * Set whether this Fields object is auto-linked. - * @param autoLink true if this Fields object is auto-linked, false otherwise. - */ - public void setAutoLink(boolean autoLink) { - this.autoLink = autoLink; - } - - /** - * Get whether this Fields object is a custom workflow. - * @return true if this Fields object is a custom workflow, false otherwise. - */ - public boolean isCustomWorkflow() { - return customWorkflow; - } - - /** - * Set whether this Fields object is a custom workflow. - * @param customWorkflow true if this Fields object is a custom workflow, false otherwise. - */ - public void setCustomWorkflow(boolean customWorkflow) { - this.customWorkflow = customWorkflow; - } +@Getter +public class Fields extends EasyPostResource { } diff --git a/src/main/java/com/easypost/model/Form.java b/src/main/java/com/easypost/model/Form.java index 4408b81b0..54937b540 100644 --- a/src/main/java/com/easypost/model/Form.java +++ b/src/main/java/com/easypost/model/Form.java @@ -1,61 +1,10 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class Form extends EasyPostResource { private String formType; private String formUrl; private Boolean submittedElectronically; - - /** - * Get the form type of the Form. - * - * @return the form type of the Form. - */ - public String getFormType() { - return formType; - } - - /** - * Set the form type of the Form. - * - * @param formType the form type of the Form. - */ - public void setFormType(final String formType) { - this.formType = formType; - } - - /** - * Get the form url of the Form. - * - * @return the form url of the Form. - */ - public String getFormUrl() { - return formUrl; - } - - /** - * Set the form url of the Form. - * - * @param formUrl the form url of the Form. - */ - public void setFormUrl(final String formUrl) { - this.formUrl = formUrl; - } - - /** - * Get whether the Form is submitted electronically. - * - * @return whether the Form is submitted electronically. - */ - public Boolean getSubmittedElectronically() { - return submittedElectronically; - } - - /** - * Set whether the Form is submitted electronically. - * - * @param submittedElectronically if the Form is submitted electronically. - */ - public void setSubmittedElectronically(final Boolean submittedElectronically) { - this.submittedElectronically = submittedElectronically; - } } diff --git a/src/main/java/com/easypost/model/Insurance.java b/src/main/java/com/easypost/model/Insurance.java index d55d8eefe..b55637508 100644 --- a/src/main/java/com/easypost/model/Insurance.java +++ b/src/main/java/com/easypost/model/Insurance.java @@ -1,7 +1,9 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class Insurance extends EasyPostResource { private String reference; private Address toAddress; @@ -14,202 +16,4 @@ public final class Insurance extends EasyPostResource { private String shipmentId; private String amount; private List messages; - - /** - * Get the amount of this Insurance. - * - * @return the amount of the Insurance - */ - public String getAmount() { - return amount; - } - - /** - * Set the amount of this Insurance. - * - * @param amount the amount of the Insurance - */ - public void setAmount(final String amount) { - this.amount = amount; - } - - /** - * Get the from address of this Insurance. - * - * @return the from address of the Insurance - */ - public Address getFromAddress() { - return fromAddress; - } - - /** - * Set the from address of this Insurance. - * - * @param fromAddress the from address of the Insurance - */ - public void setFromAddress(final Address fromAddress) { - this.fromAddress = fromAddress; - } - - /** - * Get the messages of this Insurance. - * - * @return list of messages of the Insurance - */ - public List getMessages() { - return messages; - } - - /** - * Set the messages of this Insurance. - * - * @param messages list of messages of the Insurance - */ - public void setMessages(final List messages) { - this.messages = messages; - } - - /** - * Get the provider of this Insurance. - * - * @return the provider of the Insurance - */ - public String getProvider() { - return provider; - } - - /** - * Set the provider of this Insurance. - * - * @param provider the provider of the Insurance - */ - public void setProvider(final String provider) { - this.provider = provider; - } - - /** - * Get the provider ID of this Insurance. - * - * @return the provider ID of the Insurance - */ - public String getProviderId() { - return providerId; - } - - /** - * Set the provider ID of this Insurance. - * - * @param providerId the provider ID of the Insurance - */ - public void setProviderId(final String providerId) { - this.providerId = providerId; - } - - /** - * Get the reference of this Insurance. - * - * @return the reference of the Insurance - */ - public String getReference() { - return reference; - } - - /** - * Set the reference of this Insurance. - * - * @param reference the reference of the Insurance - */ - public void setReference(final String reference) { - this.reference = reference; - } - - /** - * Get the to address of this Insurance. - * - * @return the to address of the Insurance - */ - public Address getToAddress() { - return toAddress; - } - - /** - * Set the to address of this Insurance. - * - * @param toAddress the to address of the Insurance - */ - public void setToAddress(final Address toAddress) { - this.toAddress = toAddress; - } - - /** - * Get the tracker of this Insurance. - * - * @return Tracker object - */ - public Tracker getTracker() { - return tracker; - } - - /** - * Set the tracker of this Insurance. - * - * @param tracker Tracker object - */ - public void setTracker(final Tracker tracker) { - this.tracker = tracker; - } - - /** - * Get the shipment ID of this Insurance. - * - * @return the shipment ID of the Insurance - */ - public String getShipmentId() { - return shipmentId; - } - - /** - * Get the status of this Insurance. - * - * @return the status of the Insurance - */ - public String getStatus() { - return status; - } - - /** - * Get the tracking code of this Insurance. - * - * @return the tracking code of the Insurance - */ - public String getTrackingCode() { - return trackingCode; - } - - /** - * Set the tracking code of this Insurance. - * - * @param trackingCode the tracking code of the Insurance - */ - public void setTrackingCode(final String trackingCode) { - this.trackingCode = trackingCode; - } - - /** - * Set the status of this Insurance. - * - * @param status the status of the Insurance - */ - public void setStatus(final String status) { - this.status = status; - } - - /** - * Set the shipment ID of this Insurance. - * - * @param shipmentId the shipment ID of the Insurance - */ - public void setShipmentId(final String shipmentId) { - this.shipmentId = shipmentId; - } } diff --git a/src/main/java/com/easypost/model/InsuranceCollection.java b/src/main/java/com/easypost/model/InsuranceCollection.java index 8e051460f..4b60cbb71 100644 --- a/src/main/java/com/easypost/model/InsuranceCollection.java +++ b/src/main/java/com/easypost/model/InsuranceCollection.java @@ -1,44 +1,10 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class InsuranceCollection extends EasyPostResource { private List insurances; private Boolean hasMore; - - /** - * Get whether there are more insurances. - * - * @return true if there are more insurances. - */ - public Boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more insurances. - * - * @param hasMore true if there are more insurances. - */ - public void setHasMore(final Boolean hasMore) { - this.hasMore = hasMore; - } - - /** - * Get the list of insurances. - * - * @return List of Insurance objects. - */ - public List getInsurances() { - return insurances; - } - - /** - * Set the list of insurances. - * - * @param insurances List of Insurance objects. - */ - public void setInsurances(final List insurances) { - this.insurances = insurances; - } } diff --git a/src/main/java/com/easypost/model/Order.java b/src/main/java/com/easypost/model/Order.java index dc8e7bf7a..ef57854c2 100644 --- a/src/main/java/com/easypost/model/Order.java +++ b/src/main/java/com/easypost/model/Order.java @@ -3,6 +3,9 @@ import java.util.List; import java.util.Map; +import lombok.Getter; + +@Getter public final class Order extends EasyPostResource { private String service; private String reference; @@ -17,238 +20,4 @@ public final class Order extends EasyPostResource { private Map options; private List messages; private List carrierAccounts; - - /** - * Get the buyer address of the Order. - * - * @return the buyer address of the Order. - */ - public Address getBuyerAddress() { - return buyerAddress; - } - - /** - * Set the buyer address of the Order. - * - * @param buyerAddress the buyer address of the Order. - */ - public void setBuyerAddress(final Address buyerAddress) { - this.buyerAddress = buyerAddress; - } - - /** - * Get the list of carrier accounts of the Order. - * - * @return List of CarrierAccount object. - */ - public List getCarrierAccounts() { - return carrierAccounts; - } - - /** - * Set the carrier accounts of the Order. - * - * @param carrierAccounts List of CarrierAccount objects - */ - public void setCarrierAccounts(List carrierAccounts) { - this.carrierAccounts = carrierAccounts; - } - - /** - * Get the customs info of the Order. - * - * @return CustomsInfo object. - */ - public CustomsInfo getCustomsInfo() { - return customsInfo; - } - - /** - * Set the customs info of the Order. - * - * @param customsInfo CustomsInfo object. - */ - public void setCustomsInfo(final CustomsInfo customsInfo) { - this.customsInfo = customsInfo; - } - - /** - * Get the from address of the Order. - * - * @return the from address of the Order. - */ - public Address getFromAddress() { - return fromAddress; - } - - /** - * Set the from address of the Order. - * - * @param fromAddress the from address of the Order. - */ - public void setFromAddress(final Address fromAddress) { - this.fromAddress = fromAddress; - } - - /** - * Get whether the order is a return. - * - * @return true if the order is a return. - */ - public Boolean getIsReturn() { - return isReturn; - } - - /** - * Set whether the order is a return. - * - * @param isReturn true if the order is a return. - */ - public void setIsReturn(final Boolean isReturn) { - this.isReturn = isReturn; - } - - /** - * Get the messages of the Order. - * - * @return List of ShipmentMessage objects. - */ - public List getMessages() { - return messages; - } - - /** - * Set the messages of the Order. - * - * @param messages List of ShipmentMessage objects. - */ - public void setMessages(final List messages) { - this.messages = messages; - } - - /** - * Get the options of the Order. - * - * @return map of options. - */ - public Map getOptions() { - return options; - } - - /** - * Set the options of the Order. - * - * @param options map of options. - */ - public void setOptions(final Map options) { - this.options = options; - } - - /** - * Get the rates of the Order. - * - * @return List of Rate objects. - */ - public List getRates() { - return rates; - } - - /** - * Set the rates of the Order. - * - * @param rates List of Rate objects. - */ - public void setRates(final List rates) { - this.rates = rates; - } - - /** - * Get the reference of the Order. - * - * @return the reference of the Order. - */ - public String getReference() { - return reference; - } - - /** - * Set the reference of the Order. - * - * @param reference the reference of the Order. - */ - public void setReference(final String reference) { - this.reference = reference; - } - - /** - * Get the return address of the Order. - * - * @return the return address of the Order. - */ - public Address getReturnAddress() { - return returnAddress; - } - - /** - * Set the return address of the Order. - * - * @param returnAddress the return address of the Order. - */ - public void setReturnAddress(final Address returnAddress) { - this.returnAddress = returnAddress; - } - - /** - * Get the service of the Order. - * - * @return the service of the Order. - */ - public String getService() { - return service; - } - - /** - * Set the service of the Order. - * - * @param service the service of the Order. - */ - public void setService(final String service) { - this.service = service; - } - - /** - * Get the to address of the Order. - * - * @return the to address of the Order. - */ - public Address getToAddress() { - return toAddress; - } - - /** - * Set the to address of the Order. - * - * @param toAddress the to address of the Order. - */ - public void setToAddress(final Address toAddress) { - this.toAddress = toAddress; - } - - /** - * Get the shipments of the Order. - * - * @return List of Shipment objects. - */ - public List getShipments() { - return shipments; - } - - /** - * Set the shipments of the Order. - * - * @param shipments List of Shipment objects. - */ - public void setShipments(final List shipments) { - this.shipments = shipments; - } } diff --git a/src/main/java/com/easypost/model/OrderCollection.java b/src/main/java/com/easypost/model/OrderCollection.java index 2d0a7f99c..aeb0fb27f 100644 --- a/src/main/java/com/easypost/model/OrderCollection.java +++ b/src/main/java/com/easypost/model/OrderCollection.java @@ -1,44 +1,10 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class OrderCollection extends EasyPostResource { private List orders; private Boolean hasMore; - - /** - * Get whether there are more orders to retrieve. - * - * @return true if there are more orders to retrieve, false otherwise. - */ - public Boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more orders to retrieve. - * - * @param hasMore true if there are more orders to retrieve, false otherwise. - */ - public void setHasMore(final Boolean hasMore) { - this.hasMore = hasMore; - } - - /** - * Get a list of orders. - * - * @return List of Order objects. - */ - public List getOrders() { - return orders; - } - - /** - * Set a list of orders. - * - * @param orders List of Order objects. - */ - public void setOrders(final List orders) { - this.orders = orders; - } } diff --git a/src/main/java/com/easypost/model/Parcel.java b/src/main/java/com/easypost/model/Parcel.java index 5343ddd9b..732dffe49 100644 --- a/src/main/java/com/easypost/model/Parcel.java +++ b/src/main/java/com/easypost/model/Parcel.java @@ -1,99 +1,12 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class Parcel extends EasyPostResource { private String predefinedPackage; private Float weight; private Float length; private Float width; private Float height; - - /** - * Get the height of this Parcel. - * - * @return the height of this Parcel. - */ - public Float getHeight() { - return height; - } - - /** - * Set the height of this Parcel. - * - * @param height the height of this Parcel. - */ - public void setHeight(final Float height) { - this.height = height; - } - - /** - * Get the length of this Parcel. - * - * @return the length of this Parcel. - */ - public Float getLength() { - return length; - } - - /** - * Set the length of this Parcel. - * - * @param length the length of this Parcel. - */ - public void setLength(final Float length) { - this.length = length; - } - - /** - * Get the predefined package of this Parcel. - * - * @return the predefined package of this Parcel. - */ - public String getPredefinedPackage() { - return predefinedPackage; - } - - /** - * Set the predefined package of this Parcel. - * - * @param predefinedPackage the predefined package of this Parcel. - */ - public void setPredefinedPackage(final String predefinedPackage) { - this.predefinedPackage = predefinedPackage; - } - - /** - * Get the weight of this Parcel. - * - * @return the weight of this Parcel. - */ - public Float getWeight() { - return weight; - } - - /** - * Set the weight of this Parcel. - * - * @param weight the weight of this Parcel. - */ - public void setWeight(final Float weight) { - this.weight = weight; - } - - /** - * Get the width of this Parcel. - * - * @return the width of this Parcel. - */ - public Float getWidth() { - return width; - } - - /** - * Set the width of this Parcel. - * - * @param width the width of this Parcel. - */ - public void setWidth(final Float width) { - this.width = width; - } } diff --git a/src/main/java/com/easypost/model/PaymentMethod.java b/src/main/java/com/easypost/model/PaymentMethod.java index 4661faa67..1d2e8d7ae 100644 --- a/src/main/java/com/easypost/model/PaymentMethod.java +++ b/src/main/java/com/easypost/model/PaymentMethod.java @@ -1,5 +1,8 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public class PaymentMethod extends EasyPostResource { public enum Priority { @@ -10,67 +13,4 @@ public enum Priority { private String object; private PaymentMethodObject primaryPaymentMethod; private PaymentMethodObject secondaryPaymentMethod; - - /** - * Get the PrimaryPaymentMethod of this PaymentMethod object. - * - * @return the PrimaryPaymentMethod of this PaymentMethod. - * @deprecated Use {@link #getPrimaryPaymentMethodObject()} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public PrimaryPaymentMethod getPrimaryPaymentMethod() { - PrimaryPaymentMethod primaryPaymentMethod = new PrimaryPaymentMethod(); - primaryPaymentMethod.setId(this.primaryPaymentMethod.getId()); - primaryPaymentMethod.setObject(this.primaryPaymentMethod.getObject()); - primaryPaymentMethod.setBrand(this.primaryPaymentMethod.getBrand()); - primaryPaymentMethod.setExpMonth(String.valueOf(this.primaryPaymentMethod.getExpMonth())); - primaryPaymentMethod.setExpYear(String.valueOf(this.primaryPaymentMethod.getExpYear())); - return primaryPaymentMethod; - } - - /** - * Get the SecondaryPaymentMethod of this PaymentMethod object. - * - * @return the SecondaryPaymentMethod of this PaymentMethod. - * @deprecated Use {@link #getSecondaryPaymentMethodObject()} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public SecondaryPaymentMethod getSecondaryPaymentMethod() { - SecondaryPaymentMethod secondaryPaymentMethod = new SecondaryPaymentMethod(); - secondaryPaymentMethod.setId(this.secondaryPaymentMethod.getId()); - secondaryPaymentMethod.setObject(this.secondaryPaymentMethod.getObject()); - secondaryPaymentMethod.setBrand(this.secondaryPaymentMethod.getBrand()); - secondaryPaymentMethod.setExpMonth(String.valueOf(this.secondaryPaymentMethod.getExpMonth())); - secondaryPaymentMethod.setExpYear(String.valueOf(this.secondaryPaymentMethod.getExpYear())); - return secondaryPaymentMethod; - } - - /** - * Get the object of this PaymentMethod object. - * - * @return the object of this PaymentMethod. - */ - public String getObject() { - return object; - } - - /** - * Get the primary payment method of this PaymentMethod object. - * - * @return a PaymentMethodObject representing the primary payment method. - */ - public PaymentMethodObject getPrimaryPaymentMethodObject() { - return primaryPaymentMethod; - } - - /** - * Get the secondary payment method of this PaymentMethod object. - * - * @return a PaymentMethodObject representing the secondary payment method. - */ - public PaymentMethodObject getSecondaryPaymentMethodObject() { - return secondaryPaymentMethod; - } } diff --git a/src/main/java/com/easypost/model/PaymentMethodObject.java b/src/main/java/com/easypost/model/PaymentMethodObject.java index df0f8e598..c4b41e4d6 100644 --- a/src/main/java/com/easypost/model/PaymentMethodObject.java +++ b/src/main/java/com/easypost/model/PaymentMethodObject.java @@ -1,5 +1,8 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public class PaymentMethodObject extends EasyPostResource { public enum PaymentMethodType { @@ -48,96 +51,6 @@ String getEndpoint() { // bank_account private boolean verified; - /** - * Get the bank name of this PaymentMethodObject object. - * - * @return the bank name of this PaymentMethodObject. - */ - public String getBankName() { - return bankName; - } - - /** - * Get the brand of this PaymentMethodObject object. - * - * @return the brand of this PaymentMethodObject. - */ - public String getBrand() { - return brand; - } - - /** - * Get the country of this PaymentMethodObject object. - * - * @return the country of this PaymentMethodObject. - */ - public String getCountry() { - return country; - } - - /** - * Get when this PaymentMethodObject object was disabled. - * - * @return when this PaymentMethodObject was disabled. - */ - public String getDisabledAt() { - return disabledAt; - } - - /** - * Get the expMonth of this PaymentMethodObject object. - * - * @return the expMonth of this PaymentMethodObject. - */ - public int getExpMonth() { - return expMonth; - } - - /** - * Get the expYear of this PaymentMethodObject object. - * - * @return the expYear of this PaymentMethodObject. - */ - public int getExpYear() { - return expYear; - } - - /** - * Get the last 4 digits of this PaymentMethodObject object. - * - * @return the last 4 digits of this PaymentMethodObject. - */ - public String getLast4() { - return last4; - } - - /** - * Get the name of this PaymentMethodObject object. - * - * @return the name of this PaymentMethodObject. - */ - public String getName() { - return name; - } - - /** - * Get the object of this PaymentMethodObject object. - * - * @return the object of this PaymentMethodObject. - */ - public String getObject() { - return object; - } - - /** - * Get whether this PaymentMethodObject object is verified. - * - * @return true if this PaymentMethodObject is verified, false otherwise. - */ - public boolean isVerified() { - return verified; - } - /** * Get the type of this PaymentMethodObject object. * diff --git a/src/main/java/com/easypost/model/Pickup.java b/src/main/java/com/easypost/model/Pickup.java index 92d7c7de1..b1f0c103b 100644 --- a/src/main/java/com/easypost/model/Pickup.java +++ b/src/main/java/com/easypost/model/Pickup.java @@ -2,7 +2,9 @@ import java.util.Date; import java.util.List; +import lombok.Getter; +@Getter public final class Pickup extends EasyPostResource { private String status; private String reference; @@ -15,202 +17,4 @@ public final class Pickup extends EasyPostResource { private Address address; private List carrierAccounts; private List pickupRates; - - /** - * Get the address of this Pickup. - * - * @return Address object. - */ - public Address getAddress() { - return address; - } - - /** - * Set the address of this Pickup. - * - * @param address Address object. - */ - public void setAddress(final Address address) { - this.address = address; - } - - /** - * Get the carrier accounts of this Pickup. - * - * @return List of CarrierAccount objects. - */ - public List getCarrierAccounts() { - return carrierAccounts; - } - - /** - * Set the carrier accounts of this Pickup. - * - * @param carrierAccounts List of CarrierAccount objects. - */ - public void setCarrierAccounts(final List carrierAccounts) { - this.carrierAccounts = carrierAccounts; - } - - /** - * Get the confirmation of this Pickup. - * - * @return the confirmation of this Pickup. - */ - public String getConfirmation() { - return confirmation; - } - - /** - * Set the confirmation of this Pickup. - * - * @param confirmation the confirmation of this Pickup. - */ - public void setConfirmation(final String confirmation) { - this.confirmation = confirmation; - } - - /** - * Get instructions for the pickup. - * - * @return instructions for the pickup. - */ - public String getInstructions() { - return instructions; - } - - /** - * Set instructions for the pickup. - * - * @param instructions instructions for the pickup. - */ - public void setInstructions(final String instructions) { - this.instructions = instructions; - } - - /** - * Get whether the address is an account address. - * - * @return whether the address is an account address. - */ - public Boolean getIsAccountAddress() { - return isAccountAddress; - } - - /** - * Set whether the address is an account address. - * - * @param isAccountAddress if the address is an account address. - */ - public void setIsAccountAddress(final Boolean isAccountAddress) { - this.isAccountAddress = isAccountAddress; - } - - /** - * Get the latest date of this Pickup. - * - * @return the latest date of this Pickup. - */ - public Date getMaxDatetime() { - return maxDatetime; - } - - /** - * Set the latest date of this Pickup. - * - * @param maxDatetime the latest date of this Pickup. - */ - public void setMaxDatetime(final Date maxDatetime) { - this.maxDatetime = maxDatetime; - } - - /** - * Get the messages of this Pickup. - * - * @return List of ShipmentMessages objects. - */ - public List getMessages() { - return messages; - } - - /** - * Set the messages of this Pickup. - * - * @param messages List of ShipmentMessages objects. - */ - public void setMessages(final List messages) { - this.messages = messages; - } - - /** - * Get the earliest date of this Pickup. - * - * @return the earliest date of this Pickup. - */ - public Date getMinDatetime() { - return minDatetime; - } - - /** - * Set the earliest date of this Pickup. - * - * @param minDatetime the earliest date of this Pickup. - */ - public void setMinDatetime(final Date minDatetime) { - this.minDatetime = minDatetime; - } - - /** - * Get the reference of this Pickup. - * - * @return the reference of this Pickup. - */ - public String getReference() { - return reference; - } - - /** - * Set the reference of this Pickup. - * - * @param reference the reference of this Pickup. - */ - public void setReference(final String reference) { - this.reference = reference; - } - - /** - * Get the status of this Pickup. - * - * @return the status of this Pickup. - */ - public String getStatus() { - return status; - } - - /** - * Set the status of this Pickup. - * - * @param status the status of this Pickup. - */ - public void setStatus(final String status) { - this.status = status; - } - - /** - * Get the pickupRates of this Pickup. - * - * @return the pickupRates of this Pickup. - */ - public List getPickoutRates() { - return pickupRates; - } - - /** - * Set the pickupRates of this Pickup. - * - * @param pickupRates the pickupRates of this Pickup. - */ - public void setPickupRates(final List pickupRates) { - this.pickupRates = pickupRates; - } } diff --git a/src/main/java/com/easypost/model/PickupCollection.java b/src/main/java/com/easypost/model/PickupCollection.java index 542d54df5..03a77e58a 100644 --- a/src/main/java/com/easypost/model/PickupCollection.java +++ b/src/main/java/com/easypost/model/PickupCollection.java @@ -1,44 +1,10 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class PickupCollection extends EasyPostResource { private List pickups; private Boolean hasMore; - - /** - * Get whether there are more Pickup objects to retrieve. - * - * @return whether there are more Pickup objects to retrieve. - */ - public Boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more Pickup objects to retrieve. - * - * @param hasMore whether there are more Pickup objects to retrieve. - */ - public void setHasMore(final Boolean hasMore) { - this.hasMore = hasMore; - } - - /** - * Get this PickupCollection's Pickup objects. - * - * @return List of Pickup objects. - */ - public List getPickups() { - return pickups; - } - - /** - * Set this PickupCollection's Pickup objects. - * - * @param pickups List of Pickup objects. - */ - public void setPickups(final List pickups) { - this.pickups = pickups; - } } diff --git a/src/main/java/com/easypost/model/PickupRate.java b/src/main/java/com/easypost/model/PickupRate.java index 234f19e62..8b0adefaf 100644 --- a/src/main/java/com/easypost/model/PickupRate.java +++ b/src/main/java/com/easypost/model/PickupRate.java @@ -1,23 +1,8 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class PickupRate extends Rate { private String pickupId; - - /** - * Get the ID of this Pickup. - * - * @return the ID of this Pickup. - */ - public String getPickupID() { - return pickupId; - } - - /** - * Set the ID of this Pickup. - * - * @param pickupId the ID of this Pickup. - */ - public void setPickupID(String pickupId) { - this.pickupId = pickupId; - } } diff --git a/src/main/java/com/easypost/model/PostageLabel.java b/src/main/java/com/easypost/model/PostageLabel.java index 99adc252e..27ec33790 100644 --- a/src/main/java/com/easypost/model/PostageLabel.java +++ b/src/main/java/com/easypost/model/PostageLabel.java @@ -1,5 +1,8 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class PostageLabel extends EasyPostResource { private int dateAdvance; private String integratedForm; @@ -21,364 +24,4 @@ public final class PostageLabel extends EasyPostResource { private String labelZplType; private String labelZplUrl; private String labelZplFileType; - - /** - * Get the date advance of this PostageLabel. - * - * @return Date advance of this PostageLabel. - */ - public int getDateAdvance() { - return dateAdvance; - } - - /** - * Set the date advance of this PostageLabel. - * - * @param dateAdvance Date advance of this PostageLabel. - */ - public void setDateAdvance(final int dateAdvance) { - this.dateAdvance = dateAdvance; - } - - /** - * Get the EPL2 type of this PostageLabel. - * - * @return EPL2 type of this PostageLabel. - */ - public String getEpl2LabelType() { - return labelEpl2Type; - } - - /** - * Get the URL of this PostageLabel. - * - * @return URL of this PostageLabel. - */ - public String getLabelUrl() { - return labelUrl; - } - - /** - * Set the URL of this PostageLabel. - * - * @param labelUrl URL of this PostageLabel. - */ - public void setLabelUrl(final String labelUrl) { - this.labelUrl = labelUrl; - } - - /** - * Get the integrated form of this PostageLabel. - * - * @return Integrated form of this PostageLabel. - */ - public String getIntegratedForm() { - return integratedForm; - } - - /** - * Set the integrated form of this PostageLabel. - * - * @param integratedForm Integrated form of this PostageLabel. - */ - public void setIntegratedForm(final String integratedForm) { - this.integratedForm = integratedForm; - } - - /** - * Get the EPL2 file type of this PostageLabel. - * - * @return EPL2 file type of this PostageLabel. - */ - public String getLabelEpl2FileType() { - return labelEpl2FileType; - } - - /** - * Set the EPL2 file type of this PostageLabel. - * - * @param labelEpl2FileType EPL2 file type of this PostageLabel. - */ - public void setLabelEpl2FileType(final String labelEpl2FileType) { - this.labelEpl2FileType = labelEpl2FileType; - } - - /** - * Get the EPL2 size of this PostageLabel. - * - * @return EPL2 size of this PostageLabel. - */ - public String getLabelEpl2Size() { - return labelEpl2Size; - } - - /** - * Set the EPL2 size of this PostageLabel. - * - * @param labelEpl2Size EPL2 size of this PostageLabel. - */ - public void setLabelEpl2Size(final String labelEpl2Size) { - this.labelEpl2Size = labelEpl2Size; - } - - /** - * Get the EPL2 URL of this PostageLabel. - * - * @return EPL2 URL of this PostageLabel. - */ - public String getLabelEpl2Url() { - return labelEpl2Url; - } - - /** - * Set the EPL2 URL of this PostageLabel. - * - * @param labelEpl2Url EPL2 URL of this PostageLabel. - */ - public void setLabelEpl2Url(final String labelEpl2Url) { - this.labelEpl2Url = labelEpl2Url; - } - - /** - * Get the file of this PostageLabel. - * - * @return File of this PostageLabel. - */ - public String getLabelFile() { - return labelFile; - } - - /** - * Set the file of this PostageLabel. - * - * @param labelFile File of this PostageLabel. - */ - public void setLabelFile(final String labelFile) { - this.labelFile = labelFile; - } - - /** - * Get the file type of this PostageLabel. - * - * @return File type of this PostageLabel. - */ - public String getLabelFileType() { - return labelFileType; - } - - /** - * Set the file type of this PostageLabel. - * - * @param labelFileType File type of this PostageLabel. - */ - public void setLabelFileType(final String labelFileType) { - this.labelFileType = labelFileType; - } - - /** - * Get the PDF file type of this PostageLabel. - * - * @return PDF file type of this PostageLabel. - */ - public String getLabelPdfFileType() { - return labelPdfFileType; - } - - /** - * Set the PDF file type of this PostageLabel. - * - * @param labelPdfFileType PDF file type of this PostageLabel. - */ - public void setLabelPdfFileType(final String labelPdfFileType) { - this.labelPdfFileType = labelPdfFileType; - } - - /** - * Get the PDF size of this PostageLabel. - * - * @return PDF size of this PostageLabel. - */ - public String getLabelPdfSize() { - return labelPdfSize; - } - - /** - * Set the PDF size of this PostageLabel. - * - * @param labelPdfSize PDF size of this PostageLabel. - */ - public void setLabelPdfSize(final String labelPdfSize) { - this.labelPdfSize = labelPdfSize; - } - - /** - * Get the PDF URL of this PostageLabel. - * - * @return PDF URL of this PostageLabel. - */ - public String getLabelPdfUrl() { - return labelPdfUrl; - } - - /** - * Set the PDF URL of this PostageLabel. - * - * @param labelPdfUrl PDF URL of this PostageLabel. - */ - public void setLabelPdfUrl(final String labelPdfUrl) { - this.labelPdfUrl = labelPdfUrl; - } - - /** - * Get the resolution of this PostageLabel. - * - * @return Resolution of this PostageLabel. - */ - public int getLabelResolution() { - return labelResolution; - } - - /** - * Set the resolution of this PostageLabel. - * - * @param labelResolution Resolution of this PostageLabel. - */ - public void setLabelResolution(final int labelResolution) { - this.labelResolution = labelResolution; - } - - /** - * Get the size of this PostageLabel. - * - * @return Size of this PostageLabel. - */ - public String getLabelSize() { - return labelSize; - } - - /** - * Set the size of this PostageLabel. - * - * @param labelSize Size of this PostageLabel. - */ - public void setLabelSize(final String labelSize) { - this.labelSize = labelSize; - } - - /** - * Get the type of this PostageLabel. - * - * @return Type of this PostageLabel. - */ - public String getLabelType() { - return labelType; - } - - /** - * Set the type of this PostageLabel. - * - * @param labelType Type of this PostageLabel. - */ - public void setLabelType(final String labelType) { - this.labelType = labelType; - } - - /** - * Get the ZPL file type of this PostageLabel. - * - * @return ZPL file type of this PostageLabel. - */ - public String getLabelZplFileType() { - return labelZplFileType; - } - - /** - * Set the ZPL file type of this PostageLabel. - * - * @param labelZplFileType ZPL file type of this PostageLabel. - */ - public void setLabelZplFileType(final String labelZplFileType) { - this.labelZplFileType = labelZplFileType; - } - - /** - * Get the ZPL size of this PostageLabel. - * - * @return ZPL size of this PostageLabel. - */ - public String getLabelZplSize() { - return labelZplSize; - } - - /** - * Set the ZPL size of this PostageLabel. - * - * @param labelZplSize ZPL size of this PostageLabel. - */ - public void setLabelZplSize(final String labelZplSize) { - this.labelZplSize = labelZplSize; - } - - /** - * Get the ZPL URL of this PostageLabel. - * - * @return ZPL URL of this PostageLabel. - */ - public String getLabelZplUrl() { - return labelZplUrl; - } - - /** - * Set the ZPL URL of this PostageLabel. - * - * @param labelZplUrl ZPL URL of this PostageLabel. - */ - public void setLabelZplUrl(final String labelZplUrl) { - this.labelZplUrl = labelZplUrl; - } - - /** - * Get the PDF type of this PostageLabel. - * - * @return PDF type of this PostageLabel. - */ - public String getPdfLabelType() { - return labelPdfType; - } - - /** - * Get the ZPL type of this PostageLabel. - * - * @return ZPL type of this PostageLabel. - */ - public String getZplLabelType() { - return labelZplType; - } - - /** - * Set the PDF type of this PostageLabel. - * - * @param labelPdfType PDF type of this PostageLabel. - */ - public void setLabelPdfType(final String labelPdfType) { - this.labelPdfType = labelPdfType; - } - - /** - * Set the EPL2 type of this PostageLabel. - * - * @param labelEpl2Type EPL2 type of this PostageLabel. - */ - public void setLabelEpl2Type(final String labelEpl2Type) { - this.labelEpl2Type = labelEpl2Type; - } - - /** - * Set the ZPL type of this PostageLabel. - * - * @param labelZplType ZPL type of this PostageLabel. - */ - public void setLabelZplType(final String labelZplType) { - this.labelZplType = labelZplType; - } } diff --git a/src/main/java/com/easypost/model/PrimaryPaymentMethod.java b/src/main/java/com/easypost/model/PrimaryPaymentMethod.java deleted file mode 100644 index 2e6ceaed6..000000000 --- a/src/main/java/com/easypost/model/PrimaryPaymentMethod.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.easypost.model; - -/** - * PrimaryPaymentMethod is a model class that represents the primary payment method. - * - * @deprecated Use {@link com.easypost.model.PaymentMethodObject} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ -@Deprecated -public class PrimaryPaymentMethod extends BaseCreditCard {} diff --git a/src/main/java/com/easypost/model/Rate.java b/src/main/java/com/easypost/model/Rate.java index 63375aad7..2bc2497e3 100644 --- a/src/main/java/com/easypost/model/Rate.java +++ b/src/main/java/com/easypost/model/Rate.java @@ -1,5 +1,8 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public class Rate extends EasyPostResource { private String carrier; private String service; @@ -17,292 +20,4 @@ public class Rate extends EasyPostResource { private String carrierAccountId; private String billingType; private CarbonOffset carbonOffset; - - /** - * Get billing type of this rate. - * - * @return billing type of this rate. - */ - public String getBillingType() { - return billingType; - } - - /** - * Set billing type of this rate. - * - * @param billingType billing type of this rate. - */ - public void setBillingType(final String billingType) { - this.billingType = billingType; - } - - /** - * Get the carbon offset of this Rate. - * - * @return Carbon offset of this Rate. - */ - public CarbonOffset getCarbonOffset() { - return carbonOffset; - } - - /** - * Set the carbon offset of this Rate. - * - * @param carbonOffset Carbon offset of this Rate. - */ - public void setCarbonOffset(final CarbonOffset carbonOffset) { - this.carbonOffset = carbonOffset; - } - - /** - * Get the carrier of this Rate. - * - * @return Carrier of this Rate. - */ - public String getCarrier() { - return carrier; - } - - /** - * Set the carrier of this Rate. - * - * @param carrier Carrier of this Rate. - */ - public void setCarrier(final String carrier) { - this.carrier = carrier; - } - - /** - * Get the ID of the carrier account of this Rate. - * - * @return ID of the carrier account of this Rate. - */ - public String getCarrierAccountId() { - return carrierAccountId; - } - - /** - * Set the ID of the carrier account of this Rate. - * - * @param carrierAccountId ID of the carrier account of this Rate. - */ - public void setCarrierAccountId(final String carrierAccountId) { - this.carrierAccountId = carrierAccountId; - } - - /** - * Get the currency of this Rate. - * - * @return Currency of this Rate. - */ - public String getCurrency() { - return currency; - } - - /** - * Set the currency of this Rate. - * - * @param currency Currency of this Rate. - */ - public void setCurrency(final String currency) { - this.currency = currency; - } - - /** - * Get the delivery date of this Rate. - * - * @return Delivery date of this Rate. - */ - public String getDeliveryDate() { - return deliveryDate; - } - - /** - * Set the delivery date of this Rate. - * - * @param deliveryDate Delivery date of this Rate. - */ - public void setDeliveryDate(final String deliveryDate) { - this.deliveryDate = deliveryDate; - } - - /** - * Get whether the delivery date is guaranteed for this Rate. - * - * @return true if the delivery date is guaranteed for this Rate. - */ - public Boolean getDeliveryDateGuaranteed() { - return deliveryDateGuaranteed; - } - - /** - * Set whether the delivery date is guaranteed for this Rate. - * - * @param deliveryDateGuaranteed true if the delivery date is guaranteed for this Rate. - */ - public void setDeliveryDateGuaranteed(final Boolean deliveryDateGuaranteed) { - this.deliveryDateGuaranteed = deliveryDateGuaranteed; - } - - /** - * Get the delivery days of this Rate. - * - * @return Delivery days of this Rate. - */ - public Number getDeliveryDays() { - return deliveryDays; - } - - /** - * Set the delivery days of this Rate. - * - * @param deliveryDays Delivery days of this Rate. - */ - public void setDeliveryDays(final Number deliveryDays) { - this.deliveryDays = deliveryDays; - } - - /** - * Get the estimated delivery days for this Rate. - * - * @return Estimated delivery days for this Rate. - */ - public Number getEstDeliveryDays() { - return estDeliveryDays; - } - - /** - * Set the estimated delivery days for this Rate. - * - * @param estDeliveryDays Estimated delivery days for this Rate. - */ - public void setEstDeliveryDays(final Number estDeliveryDays) { - this.estDeliveryDays = estDeliveryDays; - } - - /** - * Get the ID of the shipment of this Rate. - * - * @return ID of the shipment of this Rate. - */ - public String getShipmentId() { - return shipmentId; - } - - /** - * Set the ID of the shipment of this Rate. - * - * @param shipmentId ID of the shipment of this Rate. - */ - public void setShipmentId(final String shipmentId) { - this.shipmentId = shipmentId; - } - - /** - * Get the list currency of this Rate. - * - * @return List currency of this Rate. - */ - public String getListCurrency() { - return listCurrency; - } - - /** - * Set the list currency of this Rate. - * - * @param listCurrency List currency of this Rate. - */ - public void setListCurrency(final String listCurrency) { - this.listCurrency = listCurrency; - } - - /** - * Get the list rate of this Rate. - * - * @return List rate of this Rate. - */ - public Float getListRate() { - return listRate; - } - - /** - * Set the list rate of this Rate. - * - * @param listRate List rate of this Rate. - */ - public void setListRate(final Float listRate) { - this.listRate = listRate; - } - - /** - * Get the rate of this Rate. - * - * @return Rate of this Rate. - */ - public Float getRate() { - return rate; - } - - /** - * Set the rate of this Rate. - * - * @param rate Rate of this Rate. - */ - public void setRate(final Float rate) { - this.rate = rate; - } - - /** - * Get the retail currency of this Rate. - * - * @return Retail currency of this Rate. - */ - public String getRetailCurrency() { - return retailCurrency; - } - - /** - * Set the retail currency of this Rate. - * - * @param retailCurrency Retail currency of this Rate. - */ - public void setRetailCurrency(final String retailCurrency) { - this.retailCurrency = retailCurrency; - } - - /** - * Get the retail rate of this Rate. - * - * @return Retail rate of this Rate. - */ - public Float getRetailRate() { - return retailRate; - } - - /** - * Set the retail rate of this Rate. - * - * @param retailRate Retail rate of this Rate. - */ - public void setRetailRate(final Float retailRate) { - this.retailRate = retailRate; - } - - /** - * Get the service of this Rate. - * - * @return Service of this Rate. - */ - public String getService() { - return service; - } - - /** - * Set the service of this Rate. - * - * @param service Service of this Rate. - */ - public void setService(final String service) { - this.service = service; - } } diff --git a/src/main/java/com/easypost/model/ReferralCustomer.java b/src/main/java/com/easypost/model/ReferralCustomer.java index ea35b46d8..0bb13c1bf 100644 --- a/src/main/java/com/easypost/model/ReferralCustomer.java +++ b/src/main/java/com/easypost/model/ReferralCustomer.java @@ -2,24 +2,9 @@ import java.util.List; +import lombok.Getter; + +@Getter public class ReferralCustomer extends BaseUser { private List apiKeys; - - /** - * Get the api keys of the Referral user. - * - * @return the api keys of the Referral user. - */ - public List getApiKeys() { - return apiKeys; - } - - /** - * Set the api keys of the Referral user. - * - * @param apiKeys the api keys of the Referral user. - */ - public void setApiKeys(List apiKeys) { - this.apiKeys = apiKeys; - } } diff --git a/src/main/java/com/easypost/model/ReferralCustomerCollection.java b/src/main/java/com/easypost/model/ReferralCustomerCollection.java index 98f02c365..1a61e378c 100644 --- a/src/main/java/com/easypost/model/ReferralCustomerCollection.java +++ b/src/main/java/com/easypost/model/ReferralCustomerCollection.java @@ -2,43 +2,10 @@ import java.util.List; +import lombok.Getter; + +@Getter public final class ReferralCustomerCollection extends EasyPostResource { private List referralCustomers; - private boolean hasMore; - - /** - * Get a list of ReferralCustomers. - * - * @return List of ReferralCustomers objects - */ - public List getReferralCustomers() { - return referralCustomers; - } - - /** - * Set a list of ReferralCustomers. - * - * @param referralCustomers List of ReferralCustomers objects - */ - public void setReferralCustomers(final List referralCustomers) { - this.referralCustomers = referralCustomers; - } - - /** - * Get whether there are more ReferralCustomers to retrieve. - * - * @return whether there are more ReferralCustomers to retrieve - */ - public boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more ReferralCustomers to retrieve. - * - * @param hasMore Boolean whether there are more ReferralCustomers to retrieve - */ - public void setHasMore(final boolean hasMore) { - this.hasMore = hasMore; - } + private Boolean hasMore; } diff --git a/src/main/java/com/easypost/model/Refund.java b/src/main/java/com/easypost/model/Refund.java index 9f7c154d0..841d0bfec 100644 --- a/src/main/java/com/easypost/model/Refund.java +++ b/src/main/java/com/easypost/model/Refund.java @@ -1,99 +1,12 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class Refund extends EasyPostResource { private String trackingCode; private String confirmationNumber; private String status; private String carrier; private String shipmentId; - - /** - * Get refund carrier. - * - * @return refund carrier - */ - public String getCarrier() { - return carrier; - } - - /** - * Set refund carrier. - * - * @param carrier refund carrier - */ - public void setCarrier(final String carrier) { - this.carrier = carrier; - } - - /** - * Get refund confirmation number. - * - * @return refund confirmation number - */ - public String getConfirmationNumber() { - return confirmationNumber; - } - - /** - * Set refund confirmation number. - * - * @param confirmationNumber refund confirmation number - */ - public void setConfirmationNumber(final String confirmationNumber) { - this.confirmationNumber = confirmationNumber; - } - - /** - * Get refund shipment ID. - * - * @return refund shipment ID - */ - public String getShipmentId() { - return shipmentId; - } - - /** - * Get refund status. - * - * @return refund status - */ - public String getStatus() { - return status; - } - - /** - * Get refund tracking code. - * - * @return refund tracking code - */ - public String getTrackingCode() { - return trackingCode; - } - - /** - * Set refund tracking code. - * - * @param trackingCode refund tracking code - */ - public void setTrackingCode(final String trackingCode) { - this.trackingCode = trackingCode; - } - - /** - * Set refund status. - * - * @param status refund status - */ - public void setStatus(final String status) { - this.status = status; - } - - /** - * Set refund shipment ID. - * - * @param shipmentId refund shipment ID - */ - public void setShipmentId(final String shipmentId) { - this.shipmentId = shipmentId; - } } diff --git a/src/main/java/com/easypost/model/RefundCollection.java b/src/main/java/com/easypost/model/RefundCollection.java index 11442cb92..6764c6673 100644 --- a/src/main/java/com/easypost/model/RefundCollection.java +++ b/src/main/java/com/easypost/model/RefundCollection.java @@ -1,44 +1,10 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class RefundCollection extends EasyPostResource { private List refunds; private Boolean hasMore; - - /** - * Get whether there are more Refund objects to retrieve. - * - * @return true if there are more Refund objects to retrieve. - */ - public Boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more Refund objects to retrieve. - * - * @param hasMore true if there are more Refund objects to retrieve. - */ - public void setHasMore(final Boolean hasMore) { - this.hasMore = hasMore; - } - - /** - * Get this RefundCollection's Refund objects. - * - * @return a List of Refund objects. - */ - public List getRefunds() { - return refunds; - } - - /** - * Set this RefundCollection's Refund objects. - * - * @param refunds a List of Refund objects. - */ - public void setRefunds(final List refunds) { - this.refunds = refunds; - } } diff --git a/src/main/java/com/easypost/model/Report.java b/src/main/java/com/easypost/model/Report.java index 920bb0415..bde4fb708 100644 --- a/src/main/java/com/easypost/model/Report.java +++ b/src/main/java/com/easypost/model/Report.java @@ -1,7 +1,9 @@ package com.easypost.model; import java.util.Date; +import lombok.Getter; +@Getter public final class Report extends EasyPostResource { private Date startDate; private Date endDate; @@ -9,112 +11,4 @@ public final class Report extends EasyPostResource { private Boolean includeChildren; private String url; private Date urlExpiresAt; - - /** - * Get the end date of this Report. - * - * @return the end date of this Report. - */ - public Date getEndDate() { - return endDate; - } - - /** - * Set the end date of this Report. - * - * @param endDate the end date of this Report. - */ - public void setEndDate(final Date endDate) { - this.endDate = endDate; - } - - /** - * Get the status of this Report. - * - * @return the status of this Report. - */ - public String getStatus() { - return status; - } - - /** - * Set the status of this Report. - * - * @param status the status of this Report. - */ - public void setStatus(final String status) { - this.status = status; - } - - /** - * Get whether this Report includes children. - * - * @return whether this Report includes children. - */ - public Boolean getIncludeChildren() { - return includeChildren; - } - - /** - * Set whether this Report includes children. - * - * @param includeChildren whether this Report includes children. - */ - public void setIncludeChildren(final Boolean includeChildren) { - this.includeChildren = includeChildren; - } - - /** - * Get the start date of this Report. - * - * @return the start date of this Report. - */ - public Date getStartDate() { - return startDate; - } - - /** - * Set the start date of this Report. - * - * @param startDate the start date of this Report. - */ - public void setStartDate(final Date startDate) { - this.startDate = startDate; - } - - /** - * Get the URL of this Report. - * - * @return the URL of this Report. - */ - public String getUrl() { - return url; - } - - /** - * Set the URL of this Report. - * - * @param url the URL of this Report. - */ - public void setUrl(final String url) { - this.url = url; - } - - /** - * Get when the URL for this Report expires. - * - * @return when the URL for this Report expires. - */ - public Date getUrlExpiresAt() { - return urlExpiresAt; - } - - /** - * Set when the URL for this Report expires. - * - * @param urlExpiresAt when the URL for this Report expires. - */ - public void setUrlExpiresAt(final Date urlExpiresAt) { - this.urlExpiresAt = urlExpiresAt; - } } diff --git a/src/main/java/com/easypost/model/ReportCollection.java b/src/main/java/com/easypost/model/ReportCollection.java index f2d112d58..a53405833 100644 --- a/src/main/java/com/easypost/model/ReportCollection.java +++ b/src/main/java/com/easypost/model/ReportCollection.java @@ -1,44 +1,10 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class ReportCollection extends EasyPostResource { private List reports; private Boolean hasMore; - - /** - * Get whether there are more reports to retrieve. - * - * @return true if there are more reports to retrieve, false otherwise. - */ - public Boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more reports to retrieve. - * - * @param hasMore true if there are more reports to retrieve, false otherwise. - */ - public void setHasMore(final Boolean hasMore) { - this.hasMore = hasMore; - } - - /** - * Get this ReportCollection's Report objects. - * - * @return List of Report objects. - */ - public List getReports() { - return reports; - } - - /** - * Set this ReportCollection's Report objects. - * - * @param reports List of Report objects. - */ - public void setReports(final List reports) { - this.reports = reports; - } } diff --git a/src/main/java/com/easypost/model/ScanForm.java b/src/main/java/com/easypost/model/ScanForm.java index b1d39a054..52ae55cb4 100644 --- a/src/main/java/com/easypost/model/ScanForm.java +++ b/src/main/java/com/easypost/model/ScanForm.java @@ -1,7 +1,9 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public class ScanForm extends EasyPostResource { private String status; private String message; @@ -11,166 +13,4 @@ public class ScanForm extends EasyPostResource { private String formFileType; private String confirmation; private String batchId; - - /** - * Get the batch ID of the ScanForm. - * - * @return the batch ID of the ScanForm. - */ - public String getBatchId() { - return batchId; - } - - /** - * Set the batch ID of the ScanForm. - * - * @param batchId the batch ID of the ScanForm. - */ - public void setBatchId(final String batchId) { - this.batchId = batchId; - } - - /** - * Get the confirmation of the ScanForm. - * - * @return the confirmation of the ScanForm. - */ - public String getConfirmation() { - return confirmation; - } - - /** - * Set the confirmation of the ScanForm. - * - * @param confirmation the confirmation of the ScanForm. - */ - public void setConfirmation(final String confirmation) { - this.confirmation = confirmation; - } - - /** - * Get the from address of the ScanForm. - * - * @return the from address of the ScanForm. - */ - public Address getFromAddress() { - return fromAddress; - } - - /** - * Set the from address of the ScanForm. - * - * @param fromAddress the from address of the ScanForm. - */ - public void setFromAddress(final Address fromAddress) { - this.fromAddress = fromAddress; - } - - /** - * Get the the label URL of the ScanForm. - * - * @return the label URL of the ScanForm. - */ - public String getLabelUrl() { - return this.getFormUrl(); - } - - /** - * Get the status of the ScanForm. - * - * @return the status of the ScanForm. - */ - public String getStatus() { - return status; - } - - /** - * Set the status of the ScanForm. - * - * @param status the status of the ScanForm. - */ - public void setStatus(final String status) { - this.status = status; - } - - /** - * Get the URL for the ScanForm. - * - * @return the URL for the ScanForm. - */ - public String getFormUrl() { - return formUrl; - } - - /** - * Set the URL for the ScanForm. - * - * @param formUrl the URL for the ScanForm. - */ - public void setFormUrl(final String formUrl) { - this.formUrl = formUrl; - } - - /** - * Get the label file type of the ScanForm. - * - * @return the label file type of the ScanForm. - */ - public String getLabelFileType() { - return this.getFormFileType(); - } - - /** - * Get the form file type of the ScanForm. - * - * @return the file type of the ScanForm. - */ - public String getFormFileType() { - return formFileType; - } - - /** - * Get the form file type of the ScanForm. - * - * @param formFileType the file type of the ScanForm. - */ - public void setFormFileType(final String formFileType) { - this.formFileType = formFileType; - } - - /** - * Get the message of the ScanForm. - * - * @return the message of the ScanForm. - */ - public String getMessage() { - return message; - } - - /** - * Set the message of the ScanForm. - * - * @param message the message of the ScanForm. - */ - public void setMessage(final String message) { - this.message = message; - } - - /** - * Get the tracking codes of the ScanForm. - * - * @return the tracking codes of the ScanForm. - */ - public List getTrackingCodes() { - return trackingCodes; - } - - /** - * Set the tracking codes of the ScanForm. - * - * @param trackingCodes the tracking codes of the ScanForm. - */ - public void setTrackingCodes(final List trackingCodes) { - this.trackingCodes = trackingCodes; - } } diff --git a/src/main/java/com/easypost/model/ScanFormCollection.java b/src/main/java/com/easypost/model/ScanFormCollection.java index 5e24e7998..288a2bab9 100644 --- a/src/main/java/com/easypost/model/ScanFormCollection.java +++ b/src/main/java/com/easypost/model/ScanFormCollection.java @@ -1,44 +1,10 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class ScanFormCollection extends EasyPostResource { private List scanForms; private Boolean hasMore; - - /** - * Get whether there are more ScanForms to retrieve. - * - * @return true if there are more ScanForms to retrieve, false otherwise. - */ - public Boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more ScanForms to retrieve. - * - * @param hasMore true if there are more ScanForms to retrieve, false otherwise. - */ - public void setHasMore(final Boolean hasMore) { - this.hasMore = hasMore; - } - - /** - * Get this ScanFormCollection's ScanForm objects. - * - * @return List of ScanForm objects. - */ - public List getScanForms() { - return scanForms; - } - - /** - * Set this ScanFormCollection's ScanForm objects. - * - * @param scanForms List of ScanForm objects. - */ - public void setScanForms(final List scanForms) { - this.scanForms = scanForms; - } } diff --git a/src/main/java/com/easypost/model/SecondaryPaymentMethod.java b/src/main/java/com/easypost/model/SecondaryPaymentMethod.java deleted file mode 100644 index 1ab8c18de..000000000 --- a/src/main/java/com/easypost/model/SecondaryPaymentMethod.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.easypost.model; - -/** - * SecondaryPaymentMethod is a model class that represents the secondary payment method. - * - * @deprecated Use {@link com.easypost.model.PaymentMethodObject} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ -@Deprecated -public class SecondaryPaymentMethod extends BaseCreditCard {} diff --git a/src/main/java/com/easypost/model/Shipment.java b/src/main/java/com/easypost/model/Shipment.java index dcea07c5e..1070dafc9 100644 --- a/src/main/java/com/easypost/model/Shipment.java +++ b/src/main/java/com/easypost/model/Shipment.java @@ -6,6 +6,9 @@ import com.easypost.exception.EasyPostException; import com.easypost.utils.Utilities; +import lombok.Getter; + +@Getter public final class Shipment extends EasyPostResource { private String reference; private Boolean isReturn; @@ -37,526 +40,6 @@ public final class Shipment extends EasyPostResource { private String service; private List fees; - /** - * Get the batch ID of this Shipment. - * - * @return the batch ID of this Shipment. - */ - public String getBatchId() { - return batchId; - } - - /** - * Set the batch ID of this Shipment. - * - * @param batchId the batch ID of this Shipment. - */ - public void setBatchId(final String batchId) { - this.batchId = batchId; - } - - /** - * Get the batch message of this Shipment. - * - * @return the batch message of this Shipment. - */ - public String getBatchMessage() { - return batchMessage; - } - - /** - * Set the batch message of this Shipment. - * - * @param batchMessage the batch message of this Shipment. - */ - public void setBatchMessage(final String batchMessage) { - this.batchMessage = batchMessage; - } - - /** - * Get the batch status of this Shipment. - * - * @return the batch status of this Shipment. - */ - public String getBatchStatus() { - return batchStatus; - } - - /** - * Set the batch status of this Shipment. - * - * @param batchStatus the batch status of this Shipment. - */ - public void setBatchStatus(final String batchStatus) { - this.batchStatus = batchStatus; - } - - /** - * Get the buyer address of this Shipment. - * - * @return Address object - */ - public Address getBuyerAddress() { - return buyerAddress; - } - - /** - * Set the buyer address of this Shipment. - * - * @param buyerAddress the buyer address of this Shipment. - */ - public void setBuyerAddress(final Address buyerAddress) { - this.buyerAddress = buyerAddress; - } - - /** - * Get the carrier accounts of this shipment. - * - * @return List of carrier accounts. - */ - public List getCarrierAccounts() { - return carrierAccounts; - } - - /** - * Set the carrier accounts list. - * - * @param carrierAccounts the list of carrier accounts. - */ - public void setCarrierAccounts(final List carrierAccounts) { - this.carrierAccounts = carrierAccounts; - } - - /** - * Get the customs info of this Shipment. - * - * @return CustomsInfo object - */ - public CustomsInfo getCustomsInfo() { - return customsInfo; - } - - /** - * Set the customs info of this Shipment. - * - * @param customsInfo the customs info of this Shipment. - */ - public void setCustomsInfo(final CustomsInfo customsInfo) { - this.customsInfo = customsInfo; - } - - /** - * Get the forms of this Shipment. - * - * @return List of Form objects - */ - public List
      getForms() { - return forms; - } - - /** - * Set the forms of this Shipment. - * - * @param forms the forms of this Shipment. - */ - public void setForms(final List forms) { - this.forms = forms; - } - - /** - * Get the from address of this Shipment. - * - * @return Address object - */ - public Address getFromAddress() { - return fromAddress; - } - - /** - * Set the from address of this Shipment. - * - * @param fromAddress the from address of this Shipment. - */ - public void setFromAddress(final Address fromAddress) { - this.fromAddress = fromAddress; - } - - /** - * Get the insurance of this Shipment. - * - * @return the insurance of this Shipment. - */ - public String getInsurance() { - return insurance; - } - - /** - * Set the insurance of this Shipment. - * - * @param insurance the insurance of this Shipment. - */ - public void setInsurance(final String insurance) { - this.insurance = insurance; - } - - /** - * Get whether this Shipment is a return shipment. - * - * @return whether this Shipment is a return shipment. - */ - public Boolean getIsReturn() { - return isReturn; - } - - /** - * Set whether this Shipment is a return shipment. - * - * @param isReturn whether this Shipment is a return shipment. - */ - public void setIsReturn(final Boolean isReturn) { - this.isReturn = isReturn; - } - - /** - * Get the messages of this Shipment. - * - * @return List of ShipmentMessage objects - */ - public List getMessages() { - return messages; - } - - /** - * Set the messages of this Shipment. - * - * @param messages the messages of this Shipment. - */ - public void setMessages(final List messages) { - this.messages = messages; - } - - /** - * Get the options of this Shipment. - * - * @return the options of this Shipment. - */ - public Map getOptions() { - return options; - } - - /** - * Set the options of this Shipment. - * - * @param options the options of this Shipment. - */ - public void setOptions(final Map options) { - this.options = options; - } - - /** - * Get the ID of the order of this Shipment. - * - * @return the ID of the order of this Shipment. - */ - public String getOrderId() { - return orderId; - } - - /** - * Set the ID of the order of this Shipment. - * - * @param orderId the ID of the order of this Shipment. - */ - public void setOrderId(final String orderId) { - this.orderId = orderId; - } - - /** - * Get the parcel of this Shipment. - * - * @return Parcel object - */ - public Parcel getParcel() { - return parcel; - } - - /** - * Set the parcel of this Shipment. - * - * @param parcel the parcel of this Shipment. - */ - public void setParcel(final Parcel parcel) { - this.parcel = parcel; - } - - /** - * Get the postage label of this Shipment. - * - * @return PostageLabel object - */ - public PostageLabel getPostageLabel() { - return postageLabel; - } - - /** - * Set the postage label of this Shipment. - * - * @param postageLabel the postage label of this Shipment. - */ - public void setPostageLabel(final PostageLabel postageLabel) { - this.postageLabel = postageLabel; - } - - /** - * Get all rates of this Shipment. - * - * @return List of Rate objects - */ - public List getRates() { - return rates; - } - - /** - * Set all rates of this Shipment. - * - * @param rates the rates of this Shipment. - */ - public void setRates(final List rates) { - this.rates = rates; - } - - /** - * Get the reference of this Shipment. - * - * @return the reference of this Shipment. - */ - public String getReference() { - return reference; - } - - /** - * Set the reference of this Shipment. - * - * @param reference the reference of this Shipment. - */ - public void setReference(final String reference) { - this.reference = reference; - } - - /** - * Get the refund status of this Shipment. - * - * @return the refund status of this Shipment. - */ - public String getRefundStatus() { - return refundStatus; - } - - /** - * Set the refund status of this Shipment. - * - * @param refundStatus the refund status of this Shipment. - */ - public void setRefundStatus(final String refundStatus) { - this.refundStatus = refundStatus; - } - - /** - * Get the return address of this Shipment. - * - * @return Address object - */ - public Address getReturnAddress() { - return returnAddress; - } - - /** - * Set the return address of this Shipment. - * - * @param returnAddress the return address of this Shipment. - */ - public void setReturnAddress(final Address returnAddress) { - this.returnAddress = returnAddress; - } - - /** - * Get the scan form of this Shipment. - * - * @return ScanForm object - */ - public ScanForm getScanForm() { - return scanForm; - } - - /** - * Set the scan form of this Shipment. - * - * @param scanForm the scan form of this Shipment. - */ - public void setScanForm(final ScanForm scanForm) { - this.scanForm = scanForm; - } - - /** - * Get the selected rate of this Shipment. - * - * @return Rate object - */ - public Rate getSelectedRate() { - return selectedRate; - } - - /** - * Set the selected rate of this Shipment. - * - * @param selectedRate the selected rate of this Shipment. - */ - public void setSelectedRate(final Rate selectedRate) { - this.selectedRate = selectedRate; - } - - /** - * Get the service used. - * - * @return the service used. - */ - public String getService() { - return service; - } - - /** - * Set the service used. - * - * @param service the service. - */ - public void setService(final String service) { - this.service = service; - } - - /** - * Get the tax identifiers of this Shipment. - * - * @return List of TaxIdentifier objects - */ - public List getTaxIdentifiers() { - return taxIdentifiers; - } - - /** - * Set the tax identifiers of this Shipment. - * - * @param taxIdentifiers the tax identifiers of this Shipment. - */ - public void setTaxIdentifiers(final List taxIdentifiers) { - this.taxIdentifiers = taxIdentifiers; - } - - /** - * Get the to address of this Shipment. - * - * @return Address object - */ - public Address getToAddress() { - return toAddress; - } - - /** - * Set the to address of this Shipment. - * - * @param toAddress the to address of this Shipment. - */ - public void setToAddress(final Address toAddress) { - this.toAddress = toAddress; - } - - /** - * Get the tracker of this Shipment. - * - * @return Tracker object - */ - public Tracker getTracker() { - return tracker; - } - - /** - * Set the tracker of this Shipment. - * - * @param tracker the tracker of this Shipment. - */ - public void setTracker(final Tracker tracker) { - this.tracker = tracker; - } - - /** - * Get the USPS zone of this Shipment. - * - * @return the USPS zone of this Shipment. - */ - public String getUspsZone() { - return uspsZone; - } - - /** - * Set the USPS zone of this Shipment. - * - * @param uspsZone the USPS zone of this Shipment. - */ - public void setUspsZone(final String uspsZone) { - this.uspsZone = uspsZone; - } - - /** - * @return the Fees associated with this object - */ - public List getFees() { - return fees; - } - - /** - * Set the Fees associated with this object. - * - * @param fees the Fees associated with this object - */ - public void setFees(final List fees) { - this.fees = fees; - } - - /** - * Get the status of this Shipment. - * - * @return the status of this Shipment. - */ - public String getStatus() { - return status; - } - - /** - * Get the tracking code of this Shipment. - * - * @return the tracking code of this Shipment. - */ - public String getTrackingCode() { - return trackingCode; - } - - /** - * Set the tracking code of this Shipment. - * - * @param trackingCode the tracking code of this Shipment. - */ - public void setTrackingCode(final String trackingCode) { - this.trackingCode = trackingCode; - } - - /** - * Set the status of this Shipment. - * - * @param status the status of this Shipment. - */ - public void setStatus(final String status) { - this.status = status; - } - /** * Get the lowest rate for this Shipment. * diff --git a/src/main/java/com/easypost/model/ShipmentCollection.java b/src/main/java/com/easypost/model/ShipmentCollection.java index 60522f5a0..91099cad7 100644 --- a/src/main/java/com/easypost/model/ShipmentCollection.java +++ b/src/main/java/com/easypost/model/ShipmentCollection.java @@ -1,44 +1,10 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class ShipmentCollection extends EasyPostResource { private List shipments; private Boolean hasMore; - - /** - * Get whether there are more Shipment objects to retrieve. - * - * @return true if there are more Shipment objects to retrieve, false otherwise. - */ - public Boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more Shipment objects to retrieve. - * - * @param hasMore true if there are more Shipment objects to retrieve, false otherwise. - */ - public void setHasMore(final Boolean hasMore) { - this.hasMore = hasMore; - } - - /** - * Get this ShipmentCollection's Shipment objects. - * - * @return List of Shipment objects. - */ - public List getShipments() { - return shipments; - } - - /** - * Set this ShipmentCollection's Shipment objects. - * - * @param shipments List of Shipment objects. - */ - public void setShipments(final List shipments) { - this.shipments = shipments; - } } diff --git a/src/main/java/com/easypost/model/ShipmentMessage.java b/src/main/java/com/easypost/model/ShipmentMessage.java index 6eb9d5731..b383ab05b 100644 --- a/src/main/java/com/easypost/model/ShipmentMessage.java +++ b/src/main/java/com/easypost/model/ShipmentMessage.java @@ -1,81 +1,11 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class ShipmentMessage { private String carrier; private String carrierAccountId; private String type; private Object message; - - /** - * Get the carrier associated with this message. - * - * @return the carrier associated with this message. - */ - public String getCarrier() { - return carrier; - } - - /** - * Set the carrier associated with this message. - * - * @param carrier the carrier associated with this message. - */ - public void setCarrier(final String carrier) { - this.carrier = carrier; - } - - /** - * Get the carrier account id associated with this message. - * - * @return the carrier account id associated with this message. - */ - public String getCarrierAccountId() { - return carrierAccountId; - } - - /** - * Set the carrier account id associated with this message. - * - * @param carrierAccountId the carrier account id associated with this message. - */ - - public void setCarrierAccountId(final String carrierAccountId) { - this.carrierAccountId = carrierAccountId; - } - - /** - * Get the contents of this message. - * - * @return the contents of this message. - */ - public Object getMessage() { - return message; - } - - /** - * Set the contents of this message. - * - * @param message the contents of this message. - */ - public void setMessage(final Object message) { - this.message = message; - } - - /** - * Get the type of this message. - * - * @return the type of this message. - */ - public String getType() { - return type; - } - - /** - * Set the type of this message. - * - * @param type the type of this message. - */ - public void setType(final String type) { - this.type = type; - } } diff --git a/src/main/java/com/easypost/model/ShipmentOptions.java b/src/main/java/com/easypost/model/ShipmentOptions.java index 46cd9d55a..b37770bcc 100644 --- a/src/main/java/com/easypost/model/ShipmentOptions.java +++ b/src/main/java/com/easypost/model/ShipmentOptions.java @@ -1,42 +1,9 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class ShipmentOptions { private String smartpostHub; private String smartpostManifest; - - /** - * Get the SmartPost hub of the shipment. - * - * @return the SmartPost hub of the shipment - */ - public String getSmartpostHub() { - return smartpostHub; - } - - /** - * Set the SmartPost hub of the shipment. - * - * @param smartpostHub the SmartPost hub of the shipment - */ - public void setSmartpostHub(final String smartpostHub) { - this.smartpostHub = smartpostHub; - } - - /** - * Get the SmartPost manifest of the shipment. - * - * @return the SmartPost manifest of the shipment - */ - public String getSmartpostManifest() { - return smartpostManifest; - } - - /** - * Set the SmartPost manifest of the shipment. - * - * @param smartpostManifest the SmartPost manifest of the shipment - */ - public void setSmartpostManifest(final String smartpostManifest) { - this.smartpostManifest = smartpostManifest; - } } diff --git a/src/main/java/com/easypost/model/Smartrate.java b/src/main/java/com/easypost/model/Smartrate.java index 04fe1c670..26ce034ed 100644 --- a/src/main/java/com/easypost/model/Smartrate.java +++ b/src/main/java/com/easypost/model/Smartrate.java @@ -1,14 +1,8 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public class Smartrate extends Rate { private TimeInTransit timeInTransit; - - /** - * Get the time in transit for this rate. - * - * @return timeInTransit - */ - public TimeInTransit getTimeInTransit() { - return timeInTransit; - } } diff --git a/src/main/java/com/easypost/model/SmartrateAccuracy.java b/src/main/java/com/easypost/model/SmartrateAccuracy.java index 5f6b944f3..0fad34d27 100644 --- a/src/main/java/com/easypost/model/SmartrateAccuracy.java +++ b/src/main/java/com/easypost/model/SmartrateAccuracy.java @@ -4,6 +4,9 @@ import com.easypost.exception.EasyPostException; import com.easypost.exception.General.InvalidParameterError; +import lombok.Getter; + +@Getter public enum SmartrateAccuracy { Percentile50("percentile_50"), Percentile75("percentile_75"), @@ -24,15 +27,6 @@ public enum SmartrateAccuracy { this.keyName = keyName; } - /** - * Get the internal key name for this enum value. - * - * @return the internal key name - */ - public String getKeyName() { - return keyName; - } - /** * Get the enum value for a given internal key name. * diff --git a/src/main/java/com/easypost/model/TaxIdentifier.java b/src/main/java/com/easypost/model/TaxIdentifier.java index 557505bec..3c9b21a58 100644 --- a/src/main/java/com/easypost/model/TaxIdentifier.java +++ b/src/main/java/com/easypost/model/TaxIdentifier.java @@ -1,80 +1,11 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class TaxIdentifier extends EasyPostResource { private String entity; private String taxId; private String taxIdType; private String issuingCountry; - - /** - * Get the entity associated with this TaxIdentifier. - * - * @return the entity associated with this TaxIdentifier. - */ - public String getEntity() { - return entity; - } - - /** - * Set the entity associated with this TaxIdentifier. - * - * @param entity the entity associated with this TaxIdentifier. - */ - public void setEntity(final String entity) { - this.entity = entity; - } - - /** - * Get the issuing country associated with this TaxIdentifier. - * - * @return the issuing country associated with this TaxIdentifier. - */ - public String getIssuingCountry() { - return issuingCountry; - } - - /** - * Set the issuing country associated with this TaxIdentifier. - * - * @param issuingCountry the issuing country associated with this TaxIdentifier. - */ - public void setIssuingCountry(final String issuingCountry) { - this.issuingCountry = issuingCountry; - } - - /** - * Get the tax ID associated with this TaxIdentifier. - * - * @return the tax ID associated with this TaxIdentifier. - */ - public String getTaxId() { - return taxId; - } - - /** - * Set the tax ID associated with this TaxIdentifier. - * - * @param taxId the tax ID associated with this TaxIdentifier. - */ - public void setTaxId(final String taxId) { - this.taxId = taxId; - } - - /** - * Get the tax ID type associated with this TaxIdentifier. - * - * @return the tax ID type associated with this TaxIdentifier. - */ - public String getTaxIdType() { - return taxIdType; - } - - /** - * Set the tax ID type associated with this TaxIdentifier. - * - * @param taxIdType the tax ID type associated with this TaxIdentifier. - */ - public void setTaxIdType(final String taxIdType) { - this.taxIdType = taxIdType; - } } diff --git a/src/main/java/com/easypost/model/TimeInTransit.java b/src/main/java/com/easypost/model/TimeInTransit.java index ad7e06890..622dd8a7e 100644 --- a/src/main/java/com/easypost/model/TimeInTransit.java +++ b/src/main/java/com/easypost/model/TimeInTransit.java @@ -5,149 +5,26 @@ import com.easypost.exception.General.InvalidParameterError; import com.google.gson.annotations.SerializedName; +import lombok.Getter; + +@Getter public final class TimeInTransit { - @SerializedName ("percentile_50") + @SerializedName("percentile_50") private Integer percentile50; - @SerializedName ("percentile_75") + @SerializedName("percentile_75") private Integer percentile75; - @SerializedName ("percentile_85") + @SerializedName("percentile_85") private Integer percentile85; - @SerializedName ("percentile_90") + @SerializedName("percentile_90") private Integer percentile90; - @SerializedName ("percentile_95") + @SerializedName("percentile_95") private Integer percentile95; - @SerializedName ("percentile_97") + @SerializedName("percentile_97") private Integer percentile97; - @SerializedName ("percentile_99") + @SerializedName("percentile_99") private Integer percentile99; - /** - * Get the 50th percentile of this TimeInTransit. - * - * @return the 50th percentile of this TimeInTransit - */ - public Integer getPercentile50() { - return percentile50; - } - - /** - * Set the 50th percentile of this TimeInTransit. - * - * @param percentile50 the 50th percentile of this TimeInTransit - */ - public void setPercentile50(final Integer percentile50) { - this.percentile50 = percentile50; - } - - /** - * Get the 75th percentile of this TimeInTransit. - * - * @return the 75th percentile of this TimeInTransit - */ - public Integer getPercentile75() { - return percentile75; - } - - /** - * Get the 75th percentile of this TimeInTransit. - * - * @param percentile75 the 75th percentile of this TimeInTransit - */ - public void setPercentile75(final Integer percentile75) { - this.percentile75 = percentile75; - } - - /** - * Get the 85th percentile of this TimeInTransit. - * - * @return the 85th percentile of this TimeInTransit - */ - public Integer getPercentile85() { - return percentile85; - } - - /** - * Get the 85th percentile of this TimeInTransit. - * - * @param percentile85 the 85th percentile of this TimeInTransit - */ - public void setPercentile85(final Integer percentile85) { - this.percentile85 = percentile85; - } - - /** - * Get the 90th percentile of this TimeInTransit. - * - * @return the 90th percentile of this TimeInTransit - */ - public Integer getPercentile90() { - return percentile90; - } - - /** - * Set the 90th percentile of this TimeInTransit. - * - * @param percentile90 the 90th percentile of this TimeInTransit - */ - public void setPercentile90(final Integer percentile90) { - this.percentile90 = percentile90; - } - - /** - * Get the 95th percentile of this TimeInTransit. - * - * @return the 95th percentile of this TimeInTransit - */ - public Integer getPercentile95() { - return percentile95; - } - - /** - * Set the 95th percentile of this TimeInTransit. - * - * @param percentile95 the 95th percentile of this TimeInTransit - */ - public void setPercentile95(final Integer percentile95) { - this.percentile95 = percentile95; - } - - /** - * Get the 97th percentile of this TimeInTransit. - * - * @return the 97th percentile of this TimeInTransit - */ - public Integer getPercentile97() { - return percentile97; - } - - /** - * Set the 97th percentile of this TimeInTransit. - * - * @param percentile97 the 97th percentile of this TimeInTransit - */ - public void setPercentile97(final Integer percentile97) { - this.percentile97 = percentile97; - } - - /** - * Get the 99th percentile of this TimeInTransit. - * - * @return the 99th percentile of this TimeInTransit - */ - public Integer getPercentile99() { - return percentile99; - } - - /** - * Set the 99th percentile of this TimeInTransit. - * - * @param percentile99 the 99th percentile of this TimeInTransit - */ - public void setPercentile99(final Integer percentile99) { - this.percentile99 = percentile99; - } - /** * Get the delivery accuracy of a specific percentile of this TimeInTransit. * diff --git a/src/main/java/com/easypost/model/Tracker.java b/src/main/java/com/easypost/model/Tracker.java index d7357e412..e54d02ce3 100644 --- a/src/main/java/com/easypost/model/Tracker.java +++ b/src/main/java/com/easypost/model/Tracker.java @@ -3,6 +3,9 @@ import java.util.Date; import java.util.List; +import lombok.Getter; + +@Getter public final class Tracker extends EasyPostResource { private String trackingCode; private String status; @@ -15,202 +18,4 @@ public final class Tracker extends EasyPostResource { private CarrierDetail carrierDetail; private String publicUrl; private String statusDetail; - - /** - * Get the carrier of the Tracker. - * - * @return the carrier of the Tracker. - */ - public String getCarrier() { - return carrier; - } - - /** - * Set the carrier of the Tracker. - * - * @param carrier the carrier of the Tracker. - */ - public void setCarrier(final String carrier) { - this.carrier = carrier; - } - - /** - * Get details about the carrier associated with the Tracker. - * - * @return CarrierDetail object. - */ - public CarrierDetail getCarrierDetail() { - return carrierDetail; - } - - /** - * Set details about the carrier associated with the Tracker. - * - * @param carrierDetail details about the carrier associated with the Tracker. - */ - public void setCarrierDetail(final CarrierDetail carrierDetail) { - this.carrierDetail = carrierDetail; - } - - /** - * Get the estimated delivery date of the Tracker. - * - * @return the estimated delivery date of the Tracker. - */ - public Date getEstDeliveryDate() { - return estDeliveryDate; - } - - /** - * Set the estimated delivery date of the Tracker. - * - * @param estDeliveryDate the estimated delivery date of the Tracker. - */ - public void setEstDeliveryDate(final Date estDeliveryDate) { - this.estDeliveryDate = estDeliveryDate; - } - - /** - * Get the ID of the shipment associated with this tracker. - * - * @return the ID of the shipment associated with this tracker. - */ - public String getShipmentId() { - return shipmentId; - } - - /** - * Set the ID of the shipment associated with this tracker. - * - * @param shipmentId the ID of the shipment associated with this tracker. - */ - public void setShipmentId(final String shipmentId) { - this.shipmentId = shipmentId; - } - - /** - * Get the status of the Tracker. - * - * @return the status of the Tracker. - */ - public String getStatus() { - return status; - } - - /** - * Get the tracking code of the Tracker. - * - * @return the tracking code of the Tracker. - */ - public String getTrackingCode() { - return trackingCode; - } - - /** - * Set the tracking code of the Tracker. - * - * @param trackingCode the tracking code of the Tracker. - */ - public void setTrackingCode(final String trackingCode) { - this.trackingCode = trackingCode; - } - - /** - * Get the tracking details of the Tracker. - * - * @return List of TrackingDetail objects. - */ - public List getTrackingDetails() { - return trackingDetails; - } - - /** - * Set the tracking details of the Tracker. - * - * @param trackingDetails List of TrackingDetail objects. - */ - public void setTrackingDetails(final List trackingDetails) { - this.trackingDetails = trackingDetails; - } - - /** - * Set the status of the Tracker. - * - * @param status the status of the Tracker. - */ - public void setStatus(final String status) { - this.status = status; - } - - /** - * Get the public URL of the Tracker. - * - * @return the public URL of the Tracker. - */ - public String getPublicUrl() { - return publicUrl; - } - - /** - * Set the public URL of the Tracker. - * - * @param publicUrl the public URL of the Tracker. - */ - public void setPublicUrl(final String publicUrl) { - this.publicUrl = publicUrl; - } - - /** - * Get who signed for the package associated Tracker. - * - * @return who signed for the package associated Tracker. - */ - public String getSignedBy() { - return signedBy; - } - - /** - * Set who signed for the package associated Tracker. - * - * @param signedBy who signed for the package associated Tracker. - */ - public void setSignedBy(final String signedBy) { - this.signedBy = signedBy; - } - - /** - * Get the status of the Tracker. - * - * @return the status of the Tracker. - */ - public String getStatusDetail() { - return statusDetail; - } - - /** - * Set the status of the Tracker. - * - * @param statusDetail the status of the Tracker. - */ - public void setStatusDetail(final String statusDetail) { - this.statusDetail = statusDetail; - } - - /** - * Get the weight of the Tracker. - * - * @return the weight of the Tracker. - */ - public float getWeight() { - return weight; - } - - /** - * Set the weight of the Tracker. - * - * @param weight the weight of the Tracker. - */ - public void setWeight(final float weight) { - this.weight = weight; - } } diff --git a/src/main/java/com/easypost/model/TrackerCollection.java b/src/main/java/com/easypost/model/TrackerCollection.java index 0f765fcc7..971aa425b 100644 --- a/src/main/java/com/easypost/model/TrackerCollection.java +++ b/src/main/java/com/easypost/model/TrackerCollection.java @@ -2,43 +2,10 @@ import java.util.List; +import lombok.Getter; + +@Getter public final class TrackerCollection extends EasyPostResource { private List trackers; private Boolean hasMore; - - /** - * Get whether there are more Trackers to retrieve. - * - * @return true if there are more Trackers to retrieve, false otherwise. - */ - public Boolean getHasMore() { - return hasMore; - } - - /** - * Set whether there are more Trackers to retrieve. - * - * @param hasMore true if there are more Trackers to retrieve, false otherwise. - */ - public void setHasMore(final Boolean hasMore) { - this.hasMore = hasMore; - } - - /** - * Get this TrackerCollection's Tracker objects. - * - * @return List of Tracker objects. - */ - public List getTrackers() { - return trackers; - } - - /** - * Set this TrackerCollection's Tracker objects. - * - * @param trackers List of Tracker objects. - */ - public void setTrackers(final List trackers) { - this.trackers = trackers; - } } diff --git a/src/main/java/com/easypost/model/TrackingDetail.java b/src/main/java/com/easypost/model/TrackingDetail.java index 83ad37243..bb6bb22f3 100644 --- a/src/main/java/com/easypost/model/TrackingDetail.java +++ b/src/main/java/com/easypost/model/TrackingDetail.java @@ -2,101 +2,13 @@ import java.util.Date; +import lombok.Getter; + +@Getter public final class TrackingDetail { private String status; private String message; private Date datetime; private TrackingLocation trackingLocation; private String statusDetail; - - /** - * Get the datetime of the tracking detail. - * - * @return the datetime of the tracking detail. - */ - public Date getDatetime() { - return datetime; - } - - /** - * Set the datetime of the tracking detail. - * - * @param datetime the datetime of the tracking detail. - */ - public void setDatetime(final Date datetime) { - this.datetime = datetime; - } - - /** - * Get the message of the tracking detail. - * - * @return the message of the tracking detail. - */ - public String getMessage() { - return message; - } - - /** - * Set the message of the tracking detail. - * - * @param message the message of the tracking detail. - */ - public void setMessage(final String message) { - this.message = message; - } - - /** - * Get the status of the tracking detail. - * - * @return the status of the tracking detail. - */ - public String getStatus() { - return status; - } - - /** - * Set the status of the tracking detail. - * - * @param status the status of the tracking detail. - */ - public void setStatus(final String status) { - this.status = status; - } - - /** - * Get the status detail of the tracking detail. - * - * @return the status detail of the tracking detail. - */ - public String getStatusDetail() { - return statusDetail; - } - - /** - * Set the status detail of the tracking detail. - * - * @param statusDetail the status detail of the tracking detail. - */ - public void setStatusDetail(final String statusDetail) { - this.statusDetail = statusDetail; - } - - /** - * Get the tracking location of the tracking detail. - * - * @return TrackingLocation object. - */ - public TrackingLocation getTrackingLocation() { - return trackingLocation; - } - - /** - * Set the tracking location of the tracking detail. - * - * @param location TrackingLocation object. - */ - public void setTrackingLocation(final TrackingLocation location) { - this.trackingLocation = location; - } - } diff --git a/src/main/java/com/easypost/model/TrackingLocation.java b/src/main/java/com/easypost/model/TrackingLocation.java index f80fc1686..dced781d6 100644 --- a/src/main/java/com/easypost/model/TrackingLocation.java +++ b/src/main/java/com/easypost/model/TrackingLocation.java @@ -1,80 +1,11 @@ package com.easypost.model; +import lombok.Getter; + +@Getter public final class TrackingLocation { private String city; private String state; private String country; private String zip; - - /** - * Get the city of the tracking location. - * - * @return the city of the tracking location. - */ - public String getCity() { - return city; - } - - /** - * Set the city of the tracking location. - * - * @param city the city of the tracking location. - */ - public void setCity(final String city) { - this.city = city; - } - - /** - * Get the country of the tracking location. - * - * @return the country of the tracking location. - */ - public String getCountry() { - return country; - } - - /** - * Set the country of the tracking location. - * - * @param country the country of the tracking location. - */ - public void setCountry(final String country) { - this.country = country; - } - - /** - * Get the state of the tracking location. - * - * @return the state of the tracking location. - */ - public String getState() { - return state; - } - - /** - * Set the state of the tracking location. - * - * @param state the state of the tracking location. - */ - public void setState(final String state) { - this.state = state; - } - - /** - * Get the zip code of the tracking location. - * - * @return the zip code of the tracking location. - */ - public String getZip() { - return zip; - } - - /** - * Set the zip code of the tracking location. - * - * @param zip the zip code of the tracking location. - */ - public void setZip(final String zip) { - this.zip = zip; - } } diff --git a/src/main/java/com/easypost/model/Webhook.java b/src/main/java/com/easypost/model/Webhook.java index 78fc8a33f..ddb176940 100644 --- a/src/main/java/com/easypost/model/Webhook.java +++ b/src/main/java/com/easypost/model/Webhook.java @@ -2,43 +2,10 @@ import java.util.Date; +import lombok.Getter; + +@Getter public final class Webhook extends EasyPostResource { private String url; private Date disabledAt; - - /** - * Get the date and time when the webhook was disabled. - * - * @return the date and time when the webhook was disabled - */ - public Date getDisabledAt() { - return disabledAt; - } - - /** - * Set the date and time when the webhook was disabled. - * - * @param disabledAt the date and time when the webhook was disabled - */ - public void setDisabledAt(final Date disabledAt) { - this.disabledAt = disabledAt; - } - - /** - * Get the URL of the webhook. - * - * @return the URL of the webhook - */ - public String getUrl() { - return url; - } - - /** - * Set the URL of the webhook. - * - * @param url the URL of the webhook - */ - public void setUrl(final String url) { - this.url = url; - } } diff --git a/src/main/java/com/easypost/model/WebhookCollection.java b/src/main/java/com/easypost/model/WebhookCollection.java index ce51dbd9d..ff90b2180 100644 --- a/src/main/java/com/easypost/model/WebhookCollection.java +++ b/src/main/java/com/easypost/model/WebhookCollection.java @@ -2,24 +2,9 @@ import java.util.List; +import lombok.Getter; + +@Getter public final class WebhookCollection extends EasyPostResource { private List webhooks; - - /** - * Get this WebhookCollection's Webhook objects. - * - * @return List of Webhook objects. - */ - public List getWebhooks() { - return webhooks; - } - - /** - * Set this WebhookCollection's Webhook objects. - * - * @param webhooks List of Webhook objects. - */ - public void setWebhooks(final List webhooks) { - this.webhooks = webhooks; - } } diff --git a/src/main/java/com/easypost/service/BillingService.java b/src/main/java/com/easypost/service/BillingService.java index 6b4f57e43..4d068f058 100644 --- a/src/main/java/com/easypost/service/BillingService.java +++ b/src/main/java/com/easypost/service/BillingService.java @@ -100,10 +100,10 @@ private PaymentMethodObject getPaymentMethodByPriority(PaymentMethod.Priority pr PaymentMethodObject paymentMethod = null; switch (priority) { case PRIMARY: - paymentMethod = paymentMethods.getPrimaryPaymentMethodObject(); + paymentMethod = paymentMethods.getPrimaryPaymentMethod(); break; case SECONDARY: - paymentMethod = paymentMethods.getSecondaryPaymentMethodObject(); + paymentMethod = paymentMethods.getSecondaryPaymentMethod(); break; default: break; diff --git a/src/main/java/com/easypost/service/EasyPostClient.java b/src/main/java/com/easypost/service/EasyPostClient.java index 119b428b3..df264638e 100644 --- a/src/main/java/com/easypost/service/EasyPostClient.java +++ b/src/main/java/com/easypost/service/EasyPostClient.java @@ -9,7 +9,7 @@ public class EasyPostClient { private final int readTimeoutMilliseconds; private final String apiKey; private final String apiVersion = "v2"; - private String apiBase; + private final String apiBase; public final AddressService address; public final ApiKeyService apikeys; public final BatchService batch; diff --git a/src/main/java/com/easypost/service/PickupService.java b/src/main/java/com/easypost/service/PickupService.java index 50300314c..866f2e6aa 100644 --- a/src/main/java/com/easypost/service/PickupService.java +++ b/src/main/java/com/easypost/service/PickupService.java @@ -167,7 +167,7 @@ public PickupRate lowestRate(final List carriers, final List ser throws EasyPostException { List rates = new ArrayList(); - for (PickupRate rate : pickup.getPickoutRates()) { + for (PickupRate rate : pickup.getPickupRates()) { rates.add((Rate) rate); } diff --git a/src/test/java/com/easypost/BillingTest.java b/src/test/java/com/easypost/BillingTest.java index 07f8f4458..999484f9b 100644 --- a/src/test/java/com/easypost/BillingTest.java +++ b/src/test/java/com/easypost/BillingTest.java @@ -60,7 +60,7 @@ public void testRetrievePaymentMethods() throws EasyPostException { PaymentMethod paymentMethods = vcr.client.billing.retrievePaymentMethods(); - assertNotNull(paymentMethods.getPrimaryPaymentMethodObject()); - assertNotNull(paymentMethods.getSecondaryPaymentMethodObject()); + assertNotNull(paymentMethods.getPrimaryPaymentMethod()); + assertNotNull(paymentMethods.getSecondaryPaymentMethod()); } } diff --git a/src/test/java/com/easypost/PickupTest.java b/src/test/java/com/easypost/PickupTest.java index 1f0af2a5d..605faec4a 100644 --- a/src/test/java/com/easypost/PickupTest.java +++ b/src/test/java/com/easypost/PickupTest.java @@ -60,7 +60,7 @@ public void testCreate() throws EasyPostException { assertInstanceOf(Pickup.class, pickup); assertTrue(pickup.getId().startsWith("pickup_")); - assertNotNull(pickup.getPickoutRates()); + assertNotNull(pickup.getPickupRates()); } /** diff --git a/src/test/java/com/easypost/ThreadTest.java b/src/test/java/com/easypost/ThreadTest.java index bd31c0b68..4570856ba 100644 --- a/src/test/java/com/easypost/ThreadTest.java +++ b/src/test/java/com/easypost/ThreadTest.java @@ -147,4 +147,3 @@ public void testMultipleClients() throws EasyPostException { assertEquals(Constant.DEFAULT_READ_TIMEOUT_MILLISECONDS, clientTwo.getReadTimeoutMilliseconds()); } } - From 0c7d9242a6848090c8d0bf4557b4440665a62387 Mon Sep 17 00:00:00 2001 From: jchen293 Date: Wed, 30 Nov 2022 10:59:22 -0500 Subject: [PATCH 023/208] robust test coverage (#207) --- CHANGELOG.md | 6 +- README.md | 1 + pom.xml | 12 + .../General/InvalidParameterError.java | 2 +- .../com/easypost/http/EasyPostResponse.java | 39 +- .../java/com/easypost/http/Requestor.java | 7 +- src/main/java/com/easypost/model/Order.java | 37 ++ src/main/java/com/easypost/model/Pickup.java | 45 +++ .../com/easypost/service/BatchService.java | 36 -- .../com/easypost/service/EasyPostClient.java | 2 +- .../easypost/service/InsuranceService.java | 25 -- .../com/easypost/service/OrderService.java | 63 --- .../service/PaymentMethodService.java | 3 +- .../com/easypost/service/PickupService.java | 71 ---- .../com/easypost/service/ShipmentService.java | 61 +-- .../java/com/easypost/utils/Cryptography.java | 33 -- .../cassettes/batch/add_remove_shipment.json | 377 ------------------ .../batch/add_remove_shipment_with_list.json | 374 +++++++++++++++++ .../batch/add_remove_shipment_with_map.json | 377 ++++++++++++++++++ .../billing/retrieve_payment_methods.json | 91 +++++ .../order/{buy.json => buy_with_params.json} | 45 +-- src/test/cassettes/order/buy_with_rate.json | 191 +++++++++ src/test/cassettes/order/new_rate.json | 187 +++++++++ src/test/cassettes/payment_method/all.json | 91 +++++ src/test/cassettes/pickup/buy.json | 70 ++-- src/test/cassettes/pickup/buy_with_rate.json | 282 +++++++++++++ .../referral/create_bad_stripe_token.json | 91 +++++ .../referral/referral_add_credit_card.json | 183 +++++++++ ...ipment_with_end_shipper_id_with_rate.json} | 66 +-- ..._end_shipper_id_with_rate_with_params.json | 284 +++++++++++++ .../cassettes/shipment/buy_with_params.json | 191 +++++++++ .../shipment/{buy.json => buy_with_rate.json} | 48 +-- ...rate_form.json => generate_form_with.json} | 50 +-- .../shipment/generate_form_with_option.json | 193 +++++++++ .../shipment/get_lowest_smartrate.json | 187 +++++++++ .../shipment/get_smartrate_list.json | 186 +++++++++ src/test/java/com/easypost/BatchTest.java | 29 +- src/test/java/com/easypost/BillingTest.java | 68 +++- src/test/java/com/easypost/OrderTest.java | 54 ++- .../java/com/easypost/PaymentMethodTest.java | 39 ++ src/test/java/com/easypost/PickupTest.java | 29 +- src/test/java/com/easypost/ReferralTest.java | 21 + src/test/java/com/easypost/ReportTest.java | 16 + src/test/java/com/easypost/ShipmentTest.java | 145 ++++++- src/test/java/com/easypost/UserTest.java | 9 + 45 files changed, 3538 insertions(+), 879 deletions(-) delete mode 100644 src/test/cassettes/batch/add_remove_shipment.json create mode 100644 src/test/cassettes/batch/add_remove_shipment_with_list.json create mode 100644 src/test/cassettes/batch/add_remove_shipment_with_map.json create mode 100644 src/test/cassettes/billing/retrieve_payment_methods.json rename src/test/cassettes/order/{buy.json => buy_with_params.json} (64%) create mode 100644 src/test/cassettes/order/buy_with_rate.json create mode 100644 src/test/cassettes/order/new_rate.json create mode 100644 src/test/cassettes/payment_method/all.json create mode 100644 src/test/cassettes/pickup/buy_with_rate.json create mode 100644 src/test/cassettes/referral/create_bad_stripe_token.json create mode 100644 src/test/cassettes/referral/referral_add_credit_card.json rename src/test/cassettes/shipment/{buy_shipment_with_end_shipper_id.json => buy_shipment_with_end_shipper_id_with_rate.json} (56%) create mode 100644 src/test/cassettes/shipment/buy_shipment_with_end_shipper_id_with_rate_with_params.json create mode 100644 src/test/cassettes/shipment/buy_with_params.json rename src/test/cassettes/shipment/{buy.json => buy_with_rate.json} (60%) rename src/test/cassettes/shipment/{generate_form.json => generate_form_with.json} (60%) create mode 100644 src/test/cassettes/shipment/generate_form_with_option.json create mode 100644 src/test/cassettes/shipment/get_lowest_smartrate.json create mode 100644 src/test/cassettes/shipment/get_smartrate_list.json create mode 100644 src/test/java/com/easypost/PaymentMethodTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 758d25bd0..0be2aa819 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,11 +29,13 @@ - Removes deprecated class `CreditCard` and its associated classes `PrimaryPaymentMethod`, `SecondaryPaymentMethod`, and `BaseCreditCard`, please use alternative `Billing` class - Removes all the setters of each object - Setters are now available via lombok and aren't explicitly in the code anymore -- Change the type `hasMore` in ReferralCustomerCollection from `boolean` to `Boolean` -- Rename some getters +- Changes the type `hasMore` in ReferralCustomerCollection from `boolean` to `Boolean` +- Renames some getters - Pickup class: `getPickoutRates()` -> `getPickupRates()` - PaymentMethod class: `getPrimaryPaymentMethodObject()` -> `getPrimaryPaymentMethod()` - PaymentMethod class: `getSecondaryPaymentMethodObject()` -> `getSecondaryPaymentMethod()` +- Removes the `refresh()` function in all classes, please use `retrieve()` function instead +- Removes invalid functions that allow users to make an API request without providing required parameters ## v5.10.0 (2022-09-21) diff --git a/README.md b/README.md index d9b1ea4e8..2cdd0dd60 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![CI](https://github.com/EasyPost/easypost-java/workflows/CI/badge.svg)](https://github.com/EasyPost/easypost-java/actions?query=workflow%3ACI) [![Maven Central](https://img.shields.io/maven-central/v/com.easypost/easypost-api-client?label=Maven%20Central)](https://search.maven.org/artifact/com.easypost/easypost-api-client) +[![Coverage Status](https://coveralls.io/repos/github/EasyPost/easypost-java/badge.svg?branch=master)](https://coveralls.io/github/EasyPost/easypost-java?branch=master) EasyPost, the simple shipping solution. You can sign up for an account at . diff --git a/pom.xml b/pom.xml index c5775bde4..d89e3f9b0 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,12 @@ + + org.mockito + mockito-inline + 4.6.1 + test + com.google.code.gson gson @@ -121,6 +127,12 @@ org.jacoco jacoco-maven-plugin 0.8.8 + + + + **/model/** + + diff --git a/src/main/java/com/easypost/exception/General/InvalidParameterError.java b/src/main/java/com/easypost/exception/General/InvalidParameterError.java index 85e2fc63e..522a8f1a1 100644 --- a/src/main/java/com/easypost/exception/General/InvalidParameterError.java +++ b/src/main/java/com/easypost/exception/General/InvalidParameterError.java @@ -9,7 +9,7 @@ public class InvalidParameterError extends EasyPostException{ * @param message the exception message */ public InvalidParameterError(final String message) { - super(message); + this(message, null); } /** diff --git a/src/main/java/com/easypost/http/EasyPostResponse.java b/src/main/java/com/easypost/http/EasyPostResponse.java index 3f30834ff..65a84cbf4 100644 --- a/src/main/java/com/easypost/http/EasyPostResponse.java +++ b/src/main/java/com/easypost/http/EasyPostResponse.java @@ -8,46 +8,13 @@ package com.easypost.http; +import lombok.Getter; + +@Getter public class EasyPostResponse { private int responseCode; private String responseBody; - /** - * Get HTTP response body. - * - * @return HTTP response body - */ - public String getResponseBody() { - return responseBody; - } - - /** - * Set HTTP response body. - * - * @param responseBody HTTP response body - */ - public void setResponseBody(final String responseBody) { - this.responseBody = responseBody; - } - - /** - * Get HTTP response code. - * - * @return HTTP response code - */ - public int getResponseCode() { - return responseCode; - } - - /** - * Set HTTP response code. - * - * @param responseCode HTTP response code - */ - public void setResponseCode(final int responseCode) { - this.responseCode = responseCode; - } - /** * Constructor. * diff --git a/src/main/java/com/easypost/http/Requestor.java b/src/main/java/com/easypost/http/Requestor.java index 6bf1d3bb8..85f552238 100644 --- a/src/main/java/com/easypost/http/Requestor.java +++ b/src/main/java/com/easypost/http/Requestor.java @@ -31,6 +31,8 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; +import lombok.Generated; + import javax.net.ssl.HttpsURLConnection; import java.io.IOException; import java.io.InputStream; @@ -81,10 +83,6 @@ static Map generateHeaders(String apiKey) throws MissingParamete convertSpaceToHyphen(System.getProperty("os.arch")), convertSpaceToHyphen(System.getProperties().getProperty("java.vm.name")))); - if (apiKey == null || apiKey.isEmpty()) { - throw new MissingParameterError(Constants.INVALID_API_KEY_TYPE); - } - headers.put("Authorization", String.format("Bearer %s", apiKey)); return headers; @@ -566,6 +564,7 @@ protected static void handleAPIError(String rBody, final int rCode) throws EasyP } } + @Generated // Exclude from the jacoco test coverage private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, String url, final String query, final JsonObject body, final EasyPostClient client) throws EasyPostException { diff --git a/src/main/java/com/easypost/model/Order.java b/src/main/java/com/easypost/model/Order.java index ef57854c2..94d14aa4e 100644 --- a/src/main/java/com/easypost/model/Order.java +++ b/src/main/java/com/easypost/model/Order.java @@ -3,6 +3,9 @@ import java.util.List; import java.util.Map; +import com.easypost.exception.EasyPostException; +import com.easypost.utils.Utilities; + import lombok.Getter; @Getter @@ -20,4 +23,38 @@ public final class Order extends EasyPostResource { private Map options; private List messages; private List carrierAccounts; + + /** + * Get the lowest rate for this Order. + * + * @return Lowest Rate object + * @throws EasyPostException when the request fails. + */ + public Rate lowestRate() throws EasyPostException { + return this.lowestRate(null, null); + } + + /** + * Get the lowest rate for this Order. + * + * @param carriers The carriers to use in the filter. + * @param services The services to use in the filter. + * @return Lowest Rate object + * @throws EasyPostException when the request fails. + */ + public Rate lowestRate(final List carriers, final List services) + throws EasyPostException { + return Utilities.getLowestObjectRate(this.getRates(), carriers, services); + } + + /** + * Get the lowest rate for this order. + * + * @param carriers The carriers to use in the query. + * @return Rate object + * @throws EasyPostException when the request fails. + */ + public Rate lowestRate(final List carriers) throws EasyPostException { + return this.lowestRate(carriers, null); + } } diff --git a/src/main/java/com/easypost/model/Pickup.java b/src/main/java/com/easypost/model/Pickup.java index b1f0c103b..c21dfc664 100644 --- a/src/main/java/com/easypost/model/Pickup.java +++ b/src/main/java/com/easypost/model/Pickup.java @@ -1,7 +1,12 @@ package com.easypost.model; +import java.util.ArrayList; import java.util.Date; import java.util.List; + +import com.easypost.exception.EasyPostException; +import com.easypost.utils.Utilities; + import lombok.Getter; @Getter @@ -17,4 +22,44 @@ public final class Pickup extends EasyPostResource { private Address address; private List carrierAccounts; private List pickupRates; + + /** + * Get the lowest rate for this Pickup. + * + * @return lowest PickupRate object + * @throws EasyPostException when the request fails. + */ + public PickupRate lowestRate() throws EasyPostException { + return this.lowestRate(null, null); + } + + /** + * Get the lowest rate for this Pickup. + * + * @param carriers The carriers to use in the filter. + * @param services The services to use in the filter. + * @return lowest PickupRate object + * @throws EasyPostException when the request fails. + */ + public PickupRate lowestRate(final List carriers, final List services) + throws EasyPostException { + List rates = new ArrayList(); + + for (PickupRate rate : this.getPickupRates()) { + rates.add((Rate) rate); + } + + return (PickupRate) Utilities.getLowestObjectRate(rates, carriers, services); + } + + /** + * Get the lowest rate for this pickup. + * + * @param carriers The carriers to use in the query. + * @return PickupRate object + * @throws EasyPostException when the request fails. + */ + public PickupRate lowestRate(final List carriers) throws EasyPostException { + return this.lowestRate(carriers, null); + } } diff --git a/src/main/java/com/easypost/service/BatchService.java b/src/main/java/com/easypost/service/BatchService.java index 3054e9b88..570dd4f7f 100644 --- a/src/main/java/com/easypost/service/BatchService.java +++ b/src/main/java/com/easypost/service/BatchService.java @@ -87,42 +87,6 @@ public Batch createAndBuy(final Map params) throws EasyPostExcep client); } - /** - * Refresh this Batch object. - * - * @param id The ID of batch. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch refresh(String id) throws EasyPostException { - return this.refresh(id, null); - } - - /** - * Refresh this Batch object. - * - * @param id The ID of batch. - * @param params Map of parameters. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch refresh(final String id, final Map params) throws EasyPostException { - String url = String.format("%s", Utilities.instanceURL(Batch.class, id)); - - return Requestor.request(RequestMethod.GET, url, params, Batch.class, client); - } - - /** - * Label this Batch object. - * - * @param id The ID of batch. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch label(String id) throws EasyPostException { - return this.label(id, null); - } - /** * Label this Batch object. * diff --git a/src/main/java/com/easypost/service/EasyPostClient.java b/src/main/java/com/easypost/service/EasyPostClient.java index df264638e..bcdbd20c3 100644 --- a/src/main/java/com/easypost/service/EasyPostClient.java +++ b/src/main/java/com/easypost/service/EasyPostClient.java @@ -65,7 +65,7 @@ public EasyPostClient(String apiKey, String apiBase) throws MissingParameterErro * @throws MissingParameterError */ public EasyPostClient(String apiKey, int connectTimeoutMilliseconds) throws MissingParameterError { - this(apiKey, connectTimeoutMilliseconds, Constant.DEFAULT_READ_TIMEOUT_MILLISECONDS, Constant.API_BASE); + this(apiKey, connectTimeoutMilliseconds, Constant.API_BASE); } /** diff --git a/src/main/java/com/easypost/service/InsuranceService.java b/src/main/java/com/easypost/service/InsuranceService.java index dd04d34e3..86c483ce4 100644 --- a/src/main/java/com/easypost/service/InsuranceService.java +++ b/src/main/java/com/easypost/service/InsuranceService.java @@ -61,29 +61,4 @@ public InsuranceCollection all(final Map params) return Requestor.request(RequestMethod.GET, Utilities.classURL(Insurance.class), params, InsuranceCollection.class, client); } - - /** - * Refresh this Insurance. - * - * @param id The ID of insurance. - * @return Insurance object - * @throws EasyPostException when the request fails. - */ - public Insurance refresh(final String id) throws EasyPostException { - return this.refresh(id, null); - } - - /** - * Refresh this Insurance. - * - * @param params Map of parameters. - * @param id The ID of insurance. - * @return Insurance object - * @throws EasyPostException when the request fails. - */ - public Insurance refresh(final String id, final Map params) throws EasyPostException { - return Requestor.request(RequestMethod.GET, - String.format("%s", Utilities.instanceURL(Insurance.class, id)), params, Insurance.class, - client); - } } diff --git a/src/main/java/com/easypost/service/OrderService.java b/src/main/java/com/easypost/service/OrderService.java index 6453c8801..282b5b672 100644 --- a/src/main/java/com/easypost/service/OrderService.java +++ b/src/main/java/com/easypost/service/OrderService.java @@ -8,7 +8,6 @@ import com.easypost.utils.Utilities; import java.util.HashMap; -import java.util.List; import java.util.Map; public class OrderService { @@ -49,31 +48,6 @@ public Order retrieve(final String id) throws EasyPostException { return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Order.class, id), null, Order.class, client); } - /** - * Refresh this Order object. - * - * @param id The ID of order. - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public Order refresh(final String id) throws EasyPostException { - return this.refresh(id, null); - } - - /** - * Refresh this Order object. - * - * @param id The ID of order. - * @param params Map of parameters. - * @return Order object. - * @throws EasyPostException when the request fails. - */ - public Order refresh(final String id, final Map params) throws EasyPostException { - return Requestor.request(RequestMethod.GET, - String.format("%s", Utilities.instanceURL(Order.class, id)), params, - Order.class, client); - } - /** * Get new rates for this Order. * @@ -126,41 +100,4 @@ public Order buy(final String id, final Rate rate) throws EasyPostException { return this.buy(id, params); } - - /** - * Get the lowest rate for this Order. - * - * @param order The order object. - * @return Lowest Rate object - * @throws EasyPostException when the request fails. - */ - public Rate lowestRate(final Order order) throws EasyPostException { - return this.lowestRate(null, null, order); - } - - /** - * Get the lowest rate for this Order. - * - * @param carriers The carriers to use in the filter. - * @param services The services to use in the filter. - * @param order The order object. - * @return Lowest Rate object - * @throws EasyPostException when the request fails. - */ - public Rate lowestRate(final List carriers, final List services, final Order order) - throws EasyPostException { - return Utilities.getLowestObjectRate(order.getRates(), carriers, services); - } - - /** - * Get the lowest rate for this order. - * - * @param carriers The carriers to use in the query. - * @param order The order object. - * @return Rate object - * @throws EasyPostException when the request fails. - */ - public Rate lowestRate(final List carriers, final Order order) throws EasyPostException { - return this.lowestRate(carriers, null, order); - } } diff --git a/src/main/java/com/easypost/service/PaymentMethodService.java b/src/main/java/com/easypost/service/PaymentMethodService.java index a9e5832d4..04f464ffe 100644 --- a/src/main/java/com/easypost/service/PaymentMethodService.java +++ b/src/main/java/com/easypost/service/PaymentMethodService.java @@ -6,6 +6,7 @@ import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.PaymentMethod; +import com.easypost.utils.Utilities; public class PaymentMethodService { private final EasyPostClient client; @@ -29,7 +30,7 @@ public class PaymentMethodService { */ @Deprecated public PaymentMethod all() throws EasyPostException { - String url = String.format("%s/%s", client.getApiBase(), "payment_methods"); + String url = Utilities.classURL(PaymentMethod.class); PaymentMethod response = Requestor.request(RequestMethod.GET, url, null, PaymentMethod.class, client); diff --git a/src/main/java/com/easypost/service/PickupService.java b/src/main/java/com/easypost/service/PickupService.java index 866f2e6aa..e7dd396eb 100644 --- a/src/main/java/com/easypost/service/PickupService.java +++ b/src/main/java/com/easypost/service/PickupService.java @@ -5,12 +5,9 @@ import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.Pickup; import com.easypost.model.PickupRate; -import com.easypost.model.Rate; import com.easypost.utils.Utilities; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; public class PickupService { @@ -52,31 +49,6 @@ public Pickup retrieve(final String id) throws EasyPostException { client); } - /** - * Refresh this Pickup. - * - * @param id The ID of pickup. - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup refresh(final String id) throws EasyPostException { - return this.refresh(id, null); - } - - /** - * Refresh this Pickup. - * - * @param params Map of parameters. - * @param id The ID of pickup. - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - public Pickup refresh(final String id, final Map params) throws EasyPostException { - String url = String.format("%s", Utilities.instanceURL(Pickup.class, id)); - - return Requestor.request(RequestMethod.GET, url, params, Pickup.class, client); - } - /** * Buy this Pickup. * @@ -142,47 +114,4 @@ public Pickup cancel(final String id, final Map params) throws E return Requestor.request(RequestMethod.POST, url, params, Pickup.class, client); } - - /** - * Get the lowest rate for this Pickup. - * - * @param pickup The pickup object. - * @return lowest PickupRate object - * @throws EasyPostException when the request fails. - */ - public PickupRate lowestRate(final Pickup pickup) throws EasyPostException { - return this.lowestRate(null, null, pickup); - } - - /** - * Get the lowest rate for this Pickup. - * - * @param carriers The carriers to use in the filter. - * @param services The services to use in the filter. - * @param pickup The pickup object. - * @return lowest PickupRate object - * @throws EasyPostException when the request fails. - */ - public PickupRate lowestRate(final List carriers, final List services, final Pickup pickup) - throws EasyPostException { - List rates = new ArrayList(); - - for (PickupRate rate : pickup.getPickupRates()) { - rates.add((Rate) rate); - } - - return (PickupRate) Utilities.getLowestObjectRate(rates, carriers, services); - } - - /** - * Get the lowest rate for this pickup. - * - * @param carriers The carriers to use in the query. - * @param pickup The pickup object. - * @return PickupRate object - * @throws EasyPostException when the request fails. - */ - public PickupRate lowestRate(final List carriers, final Pickup pickup) throws EasyPostException { - return this.lowestRate(carriers, null, pickup); - } } diff --git a/src/main/java/com/easypost/service/ShipmentService.java b/src/main/java/com/easypost/service/ShipmentService.java index 80b105521..fc06e577e 100644 --- a/src/main/java/com/easypost/service/ShipmentService.java +++ b/src/main/java/com/easypost/service/ShipmentService.java @@ -84,31 +84,6 @@ public ShipmentCollection all(final Map params) ShipmentCollection.class, client); } - /** - * Refresh this Shipment. - * - * @param id The ID of shipment. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment refresh(String id) throws EasyPostException { - return this.refresh(id, null); - } - - /** - * Refresh this Shipment. - * - * @param id The ID of shipment. - * @param params The options for the query. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment refresh(final String id, final Map params) throws EasyPostException { - String url = String.format("%s", Utilities.instanceURL(Shipment.class, id)); - - return Requestor.request(RequestMethod.GET, url, params, Shipment.class, client); - } - /** * Get new rates for this Shipment. * @@ -117,7 +92,7 @@ public Shipment refresh(final String id, final Map params) throw * @throws EasyPostException when the request fails. */ public Shipment newRates(final String id) throws EasyPostException { - return this.newRates(id, new HashMap(), false); + return this.newRates(id, new HashMap()); } /** @@ -176,7 +151,7 @@ public Shipment newRates(final String id, final Map params, fina * Deprecated: v5.5.0 - v7.0.0 */ @Deprecated - public List getSmartrates(final Map params, final String id) + public List getSmartrates(final String id, final Map params) throws EasyPostException { return this.smartrates(id, params); } @@ -218,7 +193,7 @@ public List smartrates(final String id, final Map par * @throws EasyPostException when the request fails. */ public Shipment buy(final String id, final Map params) throws EasyPostException { - return this.buy(id, params, false, null); + return this.buy(id, params, false); } /** @@ -348,17 +323,6 @@ public Shipment refund(final Map params, final String id) throws return Requestor.request(RequestMethod.POST, url, params, Shipment.class, client); } - /** - * Label this Shipment. - * - * @param id The ID of shipment. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment label(final String id) throws EasyPostException { - return this.label(null, id); - } - /** * Label this Shipment. * @@ -367,23 +331,12 @@ public Shipment label(final String id) throws EasyPostException { * @return Shipment object * @throws EasyPostException when the request fails. */ - public Shipment label(final Map params, final String id) throws EasyPostException { + public Shipment label(final String id, final Map params) throws EasyPostException { String url = String.format("%s/label", Utilities.instanceURL(Shipment.class, id)); return Requestor.request(RequestMethod.GET, url, params, Shipment.class, client); } - /** - * Insure this Shipment. - * - * @param id The ID of shipment. - * @return Shipment object - * @throws EasyPostException when the request fails. - */ - public Shipment insure(final String id) throws EasyPostException { - return this.insure(null, id); - } - /** * Insure this Shipment. * @@ -392,7 +345,7 @@ public Shipment insure(final String id) throws EasyPostException { * @return Shipment object * @throws EasyPostException when the request fails. */ - public Shipment insure(final Map params, final String id) throws EasyPostException { + public Shipment insure(final String id, final Map params) throws EasyPostException { String url = String.format("%s/insure", Utilities.instanceURL(Shipment.class, id)); return Requestor.request(RequestMethod.POST, url, params, Shipment.class, client); @@ -447,7 +400,7 @@ public Smartrate lowestSmartRate(final String id, final int deliveryDay, Smartra */ @Deprecated public List getSmartrates(final String id) throws EasyPostException { - return this.smartrates(id, null); + return this.getSmartrates(id, null); } /** @@ -509,7 +462,7 @@ public Smartrate findLowestSmartrate(final List smartrates, int deliv * @throws EasyPostException when the request fails. */ public Shipment generateForm(final String formType, final String id) throws EasyPostException { - return this.generateForm(formType, null, id); + return this.generateForm(formType, new HashMap<>(), id); } /** diff --git a/src/main/java/com/easypost/utils/Cryptography.java b/src/main/java/com/easypost/utils/Cryptography.java index 6f3536c64..5f02c924a 100644 --- a/src/main/java/com/easypost/utils/Cryptography.java +++ b/src/main/java/com/easypost/utils/Cryptography.java @@ -35,15 +35,6 @@ public enum HmacAlgorithm { HmacAlgorithm(String algorithmString) { this.algorithmString = algorithmString; } - - /** - * Get the algorithm string. - * - * @return the algorithm string. - */ - String getAlgorithmString() { - return algorithmString; - } } /** @@ -56,16 +47,6 @@ public static String hexEncodeToString(byte @NotNull [] bytes) { return new String(Hex.encodeHex(bytes)); } - /** - * Hex-encode a byte array to a char array. - * - * @param bytes the byte array to hex-encode. - * @return the hex-encoded byte array char array. - */ - public static char[] hexEncode(byte @NotNull [] bytes) { - return Hex.encodeHex(bytes); - } - /** * Calculate the HMAC-SHA256 hex digest of a string. * @@ -84,20 +65,6 @@ public static String toHMACSHA256HexDigest(byte @NotNull [] data, @NotNull Strin return hexEncodeToString(hmacBytes); } - /** - * Calculate the HMAC-SHA256 hex digest of a string. - * - * @param data Data to calculate hex digest for. - * @param key Key to use in HMAC calculation. - * @param normalizationForm {@link Normalizer.Form} to use when normalizing key. No normalization when null. - * @return Hex digest of data. - */ - public static String toHMACSHA256HexDigest(@NotNull String data, @NotNull String key, - @Nullable Normalizer.Form normalizationForm) { - byte[] dataBytes = data.getBytes(); - return toHMACSHA256HexDigest(dataBytes, key, normalizationForm); - } - /** * Calculate the HMAC hex digest of a string. * diff --git a/src/test/cassettes/batch/add_remove_shipment.json b/src/test/cassettes/batch/add_remove_shipment.json deleted file mode 100644 index f772c6b43..000000000 --- a/src/test/cassettes/batch/add_remove_shipment.json +++ /dev/null @@ -1,377 +0,0 @@ -[ - { - "recordedAt": 1668466004, - "request": { - "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", - "method": "POST", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ], - "Content-Type": [ - "application/json" - ] - }, - "uri": "https://api.easypost.com/v2/shipments" - }, - "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_814bbc80ce204482954888272a8cfca6\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:46:44Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"tracking_code\": \"9400100106068149679883\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE2M2IyZjRkNDA3MzQyZjY5Mzg2ZTI3ODNlZWViMzAz\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:46:44Z\",\n \"signed_by\": null,\n \"id\": \"trk_163b2f4d407342f69386e2783eeeb303\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:43+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_35ea9f52646e11edb964ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:46:43+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:46:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_35ea9f52646e11edb964ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/2b9650af184847579d17ae21d43cbfde.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"id\": \"pl_253a8d199e7d4969a9bf366a95b36b70\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:46:43Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_d3eaec8aef6d4b2ba440a737990dc874\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:46:43+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:46:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_35e7b257646e11edb963ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_87cc9aef74f14145b225fd4663961ef2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fff8fd85aa1e4eb7bbad7c5d5b7e121b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_814bbc80ce204482954888272a8cfca6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:46:43Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:46:43Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e8fc2c9dc970401f94e3c06fb17c0992\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:46:43+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:46:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_35e7b257646e11edb963ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149679883\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 201 Created" - ], - "content-length": [ - "7077" - ], - "expires": [ - "0" - ], - "x-node": [ - "bigweb4nuq" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "x-backend": [ - "easypost" - ], - "x-permitted-cross-domain-policies": [ - "none" - ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" - ], - "pragma": [ - "no-cache" - ], - "x-content-type-options": [ - "nosniff" - ], - "x-xss-protection": [ - "1; mode\u003dblock" - ], - "x-ep-request-uuid": [ - "3a8b2e0b6372c553e0d9e3060019aa9f" - ], - "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb1nuq 29913d444b" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "1.024640" - ], - "etag": [ - "W/\"1c4db4cd4bb10a1453d121ba21735ff1\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "location": [ - "/api/v2/shipments/shp_0e6f2d8250674329bc0eab58d9776276" - ], - "x-version-label": [ - "easypost-202211142148-00c0334849-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "uri": "https://api.easypost.com/v2/shipments" - }, - "duration": 1324 - }, - { - "recordedAt": 1668466004, - "request": { - "body": "{}", - "method": "POST", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ], - "Content-Type": [ - "application/json" - ] - }, - "uri": "https://api.easypost.com/v2/batches" - }, - "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:46:44Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-11-14T22:46:44Z\",\n \"id\": \"batch_18ade8b3ad41449fac99e7c03b72b8e8\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 200 OK" - ], - "content-length": [ - "383" - ], - "expires": [ - "0" - ], - "x-node": [ - "bigweb3nuq" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "x-backend": [ - "easypost" - ], - "x-permitted-cross-domain-policies": [ - "none" - ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" - ], - "pragma": [ - "no-cache" - ], - "x-content-type-options": [ - "nosniff" - ], - "x-xss-protection": [ - "1; mode\u003dblock" - ], - "x-ep-request-uuid": [ - "3a8b2e0b6372c554e0d9e3080019ab1f" - ], - "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb2nuq 29913d444b" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.026402" - ], - "etag": [ - "W/\"6c5181f46d2e4b1e2b671d93c5fed9f7\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202211142148-00c0334849-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "uri": "https://api.easypost.com/v2/batches" - }, - "duration": 248 - }, - { - "recordedAt": 1668466004, - "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_d3eaec8aef6d4b2ba440a737990dc874\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_87cc9aef74f14145b225fd4663961ef2\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_fff8fd85aa1e4eb7bbad7c5d5b7e121b\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_814bbc80ce204482954888272a8cfca6\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_e8fc2c9dc970401f94e3c06fb17c0992\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068149679883\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_35e7b257646e11edb963ac1f6bc7bdc6\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_35ea9f52646e11edb964ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_814bbc80ce204482954888272a8cfca6\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_35e7b257646e11edb963ac1f6bc7bdc6\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:44 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzE2M2IyZjRkNDA3MzQyZjY5Mzg2ZTI3ODNlZWViMzAz\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068149679883\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_163b2f4d407342f69386e2783eeeb303\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:44 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_35ea9f52646e11edb964ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_253a8d199e7d4969a9bf366a95b36b70\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/2b9650af184847579d17ae21d43cbfde.png\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n }\n ]\n}", - "method": "POST", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ], - "Content-Type": [ - "application/json" - ] - }, - "uri": "https://api.easypost.com/v2/batches/batch_18ade8b3ad41449fac99e7c03b72b8e8/add_shipments" - }, - "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:46:44Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"tracking_code\": \"9400100106068149679883\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-14T22:46:44Z\",\n \"id\": \"batch_18ade8b3ad41449fac99e7c03b72b8e8\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 200 OK" - ], - "content-length": [ - "542" - ], - "expires": [ - "0" - ], - "x-node": [ - "bigweb6nuq" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "x-backend": [ - "easypost" - ], - "x-permitted-cross-domain-policies": [ - "none" - ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" - ], - "pragma": [ - "no-cache" - ], - "x-content-type-options": [ - "nosniff" - ], - "x-xss-protection": [ - "1; mode\u003dblock" - ], - "x-ep-request-uuid": [ - "3a8b2e086372c554e0d9e30a0019ab40" - ], - "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb2nuq 29913d444b" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.051258" - ], - "etag": [ - "W/\"57cac23121e01424bacd6a1866932102\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202211142148-00c0334849-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "uri": "https://api.easypost.com/v2/batches/batch_18ade8b3ad41449fac99e7c03b72b8e8/add_shipments" - }, - "duration": 285 - }, - { - "recordedAt": 1668466005, - "request": { - "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_d3eaec8aef6d4b2ba440a737990dc874\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_87cc9aef74f14145b225fd4663961ef2\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_fff8fd85aa1e4eb7bbad7c5d5b7e121b\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_814bbc80ce204482954888272a8cfca6\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_e8fc2c9dc970401f94e3c06fb17c0992\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068149679883\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_35e7b257646e11edb963ac1f6bc7bdc6\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_35ea9f52646e11edb964ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"currency\": \"USD\",\n \"id\": \"rate_814bbc80ce204482954888272a8cfca6\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_35e7b257646e11edb963ac1f6bc7bdc6\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:44 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzE2M2IyZjRkNDA3MzQyZjY5Mzg2ZTI3ODNlZWViMzAz\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068149679883\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_163b2f4d407342f69386e2783eeeb303\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:44 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_35ea9f52646e11edb964ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"id\": \"shp_0e6f2d8250674329bc0eab58d9776276\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 14, 2022, 5:46:43 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_253a8d199e7d4969a9bf366a95b36b70\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/2b9650af184847579d17ae21d43cbfde.png\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:46:43 PM\"\n }\n ]\n}", - "method": "POST", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ], - "Content-Type": [ - "application/json" - ] - }, - "uri": "https://api.easypost.com/v2/batches/batch_18ade8b3ad41449fac99e7c03b72b8e8/remove_shipments" - }, - "response": { - "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-14T22:46:44Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-11-14T22:46:45Z\",\n \"id\": \"batch_18ade8b3ad41449fac99e7c03b72b8e8\",\n \"state\": \"purchased\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 200 OK" - ], - "content-length": [ - "385" - ], - "expires": [ - "0" - ], - "x-node": [ - "bigweb5nuq" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "x-backend": [ - "easypost" - ], - "x-permitted-cross-domain-policies": [ - "none" - ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" - ], - "pragma": [ - "no-cache" - ], - "x-content-type-options": [ - "nosniff" - ], - "x-xss-protection": [ - "1; mode\u003dblock" - ], - "x-ep-request-uuid": [ - "3a8b2e0c6372c555e0d9e61a0019ab62" - ], - "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", - "intlb1nuq 29913d444b" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.069995" - ], - "etag": [ - "W/\"34898a60349aba15fe2bb705e5300b8f\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202211142148-00c0334849-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "uri": "https://api.easypost.com/v2/batches/batch_18ade8b3ad41449fac99e7c03b72b8e8/remove_shipments" - }, - "duration": 386 - } -] \ No newline at end of file diff --git a/src/test/cassettes/batch/add_remove_shipment_with_list.json b/src/test/cassettes/batch/add_remove_shipment_with_list.json new file mode 100644 index 000000000..ae2a020f3 --- /dev/null +++ b/src/test/cassettes/batch/add_remove_shipment_with_list.json @@ -0,0 +1,374 @@ +[ + { + "recordedAt": 1669134137, + "request": { + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "response": { + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T16:22:16Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T16:22:17Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T16:22:17Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T16:22:17Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_90f54a5bbc914d2d8006556d116c93da\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-22T16:22:17Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"tracking_code\": \"9400100106068151902535\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2JiMzM4YTUzOTBmNjRlYTFiNzM5NjdiMjA1M2ZhN2Ez\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-22T16:22:17Z\",\n \"signed_by\": null,\n \"id\": \"trk_bb338a5390f64ea1b73967b2053fa7a3\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T16:22:16+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T16:22:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d46f7f5d6a8111ed9046ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T16:22:16+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T16:22:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d46f7f5d6a8111ed9046ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-22T16:22:17Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/bef39bec7d5f499a9d1b1e4df8680d35.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-22T16:22:17Z\",\n \"id\": \"pl_75b364041d834bad9dcc3fe3af2afab4\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-22T16:22:17Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T16:22:16Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T16:22:16Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_01930b247edb4ba586c6e10c9b8dbb89\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T16:22:16+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-22T16:22:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d46d519d6a8111ed9044ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T16:22:16Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T16:22:16Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c7ae26b88c9849c9a9468d0ad6d37b1d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T16:22:16Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T16:22:16Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_90f54a5bbc914d2d8006556d116c93da\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T16:22:16Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T16:22:16Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3279f61d93fb49998229238586176544\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T16:22:16Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T16:22:16Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d8d9db858c684d878769cf312f700efa\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T16:22:16+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-22T16:22:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d46d519d6a8111ed9044ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151902535\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "7077" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb6nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "816b7d7d637cf738e0eb5520002e5db0" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.169529" + ], + "etag": [ + "W/\"253b7419cd4db8f63749cd075fcd8742\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_7290792a4b9f4dc3baec05a72f71d8d9" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1477 + }, + { + "recordedAt": 1669134138, + "request": { + "body": "{}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/batches" + }, + "response": { + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-22T16:22:18Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-11-22T16:22:18Z\",\n \"id\": \"batch_4a1878408d664bba98eda02592846458\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "383" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb1nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "d96d15b5637cf73ae0eb5539002b0f5d" + ], + "x-proxied": [ + "extlb2nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.035356" + ], + "etag": [ + "W/\"d5ea9025f3d1b71f750166dbe87738d0\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches" + }, + "duration": 309 + }, + { + "recordedAt": 1669134139, + "request": { + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_01930b247edb4ba586c6e10c9b8dbb89\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_c7ae26b88c9849c9a9468d0ad6d37b1d\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_90f54a5bbc914d2d8006556d116c93da\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_3279f61d93fb49998229238586176544\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_d8d9db858c684d878769cf312f700efa\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068151902535\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d46d519d6a8111ed9044ac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d46f7f5d6a8111ed9046ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:17 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_90f54a5bbc914d2d8006556d116c93da\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 22, 2022, 11:22:17 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d46d519d6a8111ed9044ac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:17 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2JiMzM4YTUzOTBmNjRlYTFiNzM5NjdiMjA1M2ZhN2Ez\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068151902535\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_bb338a5390f64ea1b73967b2053fa7a3\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:17 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d46f7f5d6a8111ed9046ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n \"id\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 22, 2022, 11:22:17 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_75b364041d834bad9dcc3fe3af2afab4\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/bef39bec7d5f499a9d1b1e4df8680d35.png\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:17 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:17 AM\"\n }\n ]\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/batches/batch_4a1878408d664bba98eda02592846458/add_shipments" + }, + "response": { + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-22T16:22:18Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"tracking_code\": \"9400100106068151902535\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-22T16:22:18Z\",\n \"id\": \"batch_4a1878408d664bba98eda02592846458\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "542" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb8nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "d96d15b2637cf73be0eb553b002b0fbe" + ], + "x-proxied": [ + "extlb2nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.047570" + ], + "etag": [ + "W/\"0501737f53b13254d0a6417593418112\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches/batch_4a1878408d664bba98eda02592846458/add_shipments" + }, + "duration": 314 + }, + { + "recordedAt": 1669134139, + "request": { + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_01930b247edb4ba586c6e10c9b8dbb89\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_c7ae26b88c9849c9a9468d0ad6d37b1d\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_90f54a5bbc914d2d8006556d116c93da\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_3279f61d93fb49998229238586176544\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_d8d9db858c684d878769cf312f700efa\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068151902535\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d46d519d6a8111ed9044ac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d46f7f5d6a8111ed9046ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:17 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"currency\": \"USD\",\n \"id\": \"rate_90f54a5bbc914d2d8006556d116c93da\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 22, 2022, 11:22:17 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d46d519d6a8111ed9044ac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:17 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2JiMzM4YTUzOTBmNjRlYTFiNzM5NjdiMjA1M2ZhN2Ez\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068151902535\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_bb338a5390f64ea1b73967b2053fa7a3\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:17 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:16 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d46f7f5d6a8111ed9046ac1f6bc72124\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:16 AM\"\n },\n \"id\": \"shp_7290792a4b9f4dc3baec05a72f71d8d9\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 22, 2022, 11:22:17 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_75b364041d834bad9dcc3fe3af2afab4\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/bef39bec7d5f499a9d1b1e4df8680d35.png\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:17 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:17 AM\"\n }\n ]\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/batches/batch_4a1878408d664bba98eda02592846458/remove_shipments" + }, + "response": { + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-22T16:22:18Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-11-22T16:22:19Z\",\n \"id\": \"batch_4a1878408d664bba98eda02592846458\",\n \"state\": \"purchased\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "385" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb6nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "632f8eb6637cf73be0eb553d00278962" + ], + "x-proxied": [ + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.049541" + ], + "etag": [ + "W/\"2e7fb782207ad6fb5f7d064ae125e549\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches/batch_4a1878408d664bba98eda02592846458/remove_shipments" + }, + "duration": 246 + } +] \ No newline at end of file diff --git a/src/test/cassettes/batch/add_remove_shipment_with_map.json b/src/test/cassettes/batch/add_remove_shipment_with_map.json new file mode 100644 index 000000000..b9ef017ad --- /dev/null +++ b/src/test/cassettes/batch/add_remove_shipment_with_map.json @@ -0,0 +1,377 @@ +[ + { + "recordedAt": 1669134131, + "request": { + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "response": { + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T16:22:09Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T16:22:10Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T16:22:10Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T16:22:10Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_79340d880a0e4409a8b736274ad339f9\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-22T16:22:10Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"tracking_code\": \"9400100106068151902498\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzhiMzM3YTc5NTUyOTRlM2RiZTQ0YTBkMzM1NTk4MTU3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-22T16:22:10Z\",\n \"signed_by\": null,\n \"id\": \"trk_8b337a7955294e3dbe44a0d335598157\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T16:22:09+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T16:22:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d06ba9df6a8111edb223ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T16:22:09+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T16:22:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_d06ba9df6a8111edb223ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-22T16:22:10Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/70384888a36a45dea855ec07078fd159.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-22T16:22:10Z\",\n \"id\": \"pl_6979ea1b07594027923c93439fc5ba5c\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-22T16:22:10Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T16:22:09Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T16:22:09Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_57478ef57418449bafd04c36b22ad602\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T16:22:09+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-22T16:22:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d069292b6a8111eda163ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T16:22:09Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T16:22:09Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2c87b1daace2427a8b93532affe58a7c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T16:22:09Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T16:22:09Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_fb1e3d5cb96f4d2082590a7646690390\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T16:22:09Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T16:22:09Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cd6fcb75041948e3a624d2f9599d2f70\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T16:22:09Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T16:22:09Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_79340d880a0e4409a8b736274ad339f9\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T16:22:09+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-22T16:22:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_d069292b6a8111eda163ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151902498\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "7077" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb8nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "632f8eb0637cf731e0eb54fe0027848c" + ], + "x-proxied": [ + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.176574" + ], + "etag": [ + "W/\"907704569d7f5caed3e461ed6274a49e\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_5f993f99935748b4a167929a7958363e" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1384 + }, + { + "recordedAt": 1669134131, + "request": { + "body": "{}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/batches" + }, + "response": { + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-22T16:22:11Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-11-22T16:22:11Z\",\n \"id\": \"batch_febf48ad6d11422f9432556986f8e9b4\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "383" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb8nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "80b871b7637cf733e0eb55000027a8ff" + ], + "x-proxied": [ + "extlb3wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.034397" + ], + "etag": [ + "W/\"d376e56bab37805faf469af2c0a0c5a7\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches" + }, + "duration": 239 + }, + { + "recordedAt": 1669134131, + "request": { + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_57478ef57418449bafd04c36b22ad602\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"currency\": \"USD\",\n \"id\": \"rate_2c87b1daace2427a8b93532affe58a7c\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"currency\": \"USD\",\n \"id\": \"rate_fb1e3d5cb96f4d2082590a7646690390\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"currency\": \"USD\",\n \"id\": \"rate_cd6fcb75041948e3a624d2f9599d2f70\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"currency\": \"USD\",\n \"id\": \"rate_79340d880a0e4409a8b736274ad339f9\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068151902498\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d069292b6a8111eda163ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:10 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d06ba9df6a8111edb223ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:10 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"currency\": \"USD\",\n \"id\": \"rate_79340d880a0e4409a8b736274ad339f9\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 22, 2022, 11:22:10 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d069292b6a8111eda163ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:10 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:10 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzhiMzM3YTc5NTUyOTRlM2RiZTQ0YTBkMzM1NTk4MTU3\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068151902498\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_8b337a7955294e3dbe44a0d335598157\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:10 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d06ba9df6a8111edb223ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n },\n \"id\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 22, 2022, 11:22:10 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_6979ea1b07594027923c93439fc5ba5c\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/70384888a36a45dea855ec07078fd159.png\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:10 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:10 AM\"\n }\n ]\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/batches/batch_febf48ad6d11422f9432556986f8e9b4/add_shipments" + }, + "response": { + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-22T16:22:11Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"tracking_code\": \"9400100106068151902498\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2022-11-22T16:22:11Z\",\n \"id\": \"batch_febf48ad6d11422f9432556986f8e9b4\",\n \"state\": \"created\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 1.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "542" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb12nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "80b871b4637cf733e0eb55190027a926" + ], + "x-proxied": [ + "extlb3wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.048223" + ], + "etag": [ + "W/\"88bca4b674ee9867442677559c5a5e2e\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches/batch_febf48ad6d11422f9432556986f8e9b4/add_shipments" + }, + "duration": 248 + }, + { + "recordedAt": 1669134132, + "request": { + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_57478ef57418449bafd04c36b22ad602\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"currency\": \"USD\",\n \"id\": \"rate_2c87b1daace2427a8b93532affe58a7c\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"currency\": \"USD\",\n \"id\": \"rate_fb1e3d5cb96f4d2082590a7646690390\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"currency\": \"USD\",\n \"id\": \"rate_cd6fcb75041948e3a624d2f9599d2f70\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"currency\": \"USD\",\n \"id\": \"rate_79340d880a0e4409a8b736274ad339f9\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n }\n ],\n \"trackingCode\": \"9400100106068151902498\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d069292b6a8111eda163ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:10 AM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d06ba9df6a8111edb223ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:10 AM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"currency\": \"USD\",\n \"id\": \"rate_79340d880a0e4409a8b736274ad339f9\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 22, 2022, 11:22:10 AM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_d069292b6a8111eda163ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:10 AM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:10 AM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzhiMzM3YTc5NTUyOTRlM2RiZTQ0YTBkMzM1NTk4MTU3\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068151902498\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_8b337a7955294e3dbe44a0d335598157\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:10 AM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 11:22:09 AM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_d06ba9df6a8111edb223ac1f6bc7bdc6\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:09 AM\"\n },\n \"id\": \"shp_5f993f99935748b4a167929a7958363e\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 22, 2022, 11:22:10 AM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_6979ea1b07594027923c93439fc5ba5c\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/70384888a36a45dea855ec07078fd159.png\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:10 AM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 22, 2022, 11:22:10 AM\"\n }\n ]\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/batches/batch_febf48ad6d11422f9432556986f8e9b4/remove_shipments" + }, + "response": { + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2022-11-22T16:22:11Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2022-11-22T16:22:11Z\",\n \"id\": \"batch_febf48ad6d11422f9432556986f8e9b4\",\n \"state\": \"purchased\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "385" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb5nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "80b871bb637cf734e0eb551b0027a95c" + ], + "x-proxied": [ + "extlb3wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.047523" + ], + "etag": [ + "W/\"166900049ca689c0410c4e949e0834cb\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches/batch_febf48ad6d11422f9432556986f8e9b4/remove_shipments" + }, + "duration": 278 + } +] \ No newline at end of file diff --git a/src/test/cassettes/billing/retrieve_payment_methods.json b/src/test/cassettes/billing/retrieve_payment_methods.json new file mode 100644 index 000000000..0cf634b7d --- /dev/null +++ b/src/test/cassettes/billing/retrieve_payment_methods.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1669152965, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/payment_methods" + }, + "response": { + "body": "{\n \"secondary_payment_method\": null,\n \"id\": \"cust_815cb5adf39548fc8ec9ee928cd51a96\",\n \"primary_payment_method\": null,\n \"object\": \"PaymentMethods\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "134" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb6nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "816b7d7e637d40c5e0d9c543005f25a3" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.020511" + ], + "etag": [ + "W/\"a9da3fd4f7563256345830987de33ece\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211222057-6fd042c9a6-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/payment_methods" + }, + "duration": 441 + } +] \ No newline at end of file diff --git a/src/test/cassettes/order/buy.json b/src/test/cassettes/order/buy_with_params.json similarity index 64% rename from src/test/cassettes/order/buy.json rename to src/test/cassettes/order/buy_with_params.json index a6defa547..e3e42f9b2 100644 --- a/src/test/cassettes/order/buy.json +++ b/src/test/cassettes/order/buy_with_params.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1668466070, + "recordedAt": 1669137866, "request": { "body": "{\n \"order\": {\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/orders" }, "response": { - "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b5146c0ea9b441929d47cf65c2865732\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cead58a1940a4354bf2db8dd19d2a2cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3d2cc050db8b4f29bc223a83c274dee2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8c12a562c07b49988b805ddea49edc06\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_721f34e06cf0445d99fb1514a7b18186\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b5146c0ea9b441929d47cf65c2865732\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cead58a1940a4354bf2db8dd19d2a2cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3d2cc050db8b4f29bc223a83c274dee2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8c12a562c07b49988b805ddea49edc06\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_e301707eaf5e4a2f9909388b7c1b5aea\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_e301707eaf5e4a2f9909388b7c1b5aea\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_82ffdc326a8a11ed973dac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_da0a19b8b47341099b21aa0779b222bc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1d34102f95f747ea974f999ae5fbddf7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7ecfd6c3cde143dfb89336a3c651ad75\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f1e5354ac7874bdd80eaa05692d19a53\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-22T17:24:25Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_82ffdc326a8a11ed973dac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:24:25Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:24:25Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_830118ad6a8a11ed83c5ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_830118ad6a8a11ed83c5ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:24:25Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:24:25Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_98ff3e85a4004333ad7e4d3e117b5c59\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_82ffdc326a8a11ed973dac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:24:26Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:26Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_da0a19b8b47341099b21aa0779b222bc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:24:26Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:26Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1d34102f95f747ea974f999ae5fbddf7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:24:26Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:26Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7ecfd6c3cde143dfb89336a3c651ad75\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:24:26Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:26Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f1e5354ac7874bdd80eaa05692d19a53\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_82ffdc326a8a11ed973dac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_bca7c5ca6b524ed789d5ac654080ef28\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:24:26Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_830118ad6a8a11ed83c5ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_bca7c5ca6b524ed789d5ac654080ef28\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_830118ad6a8a11ed83c5ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,30 +58,29 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "3a8b2e086372c595e0d9eabe0019c5e1" + "816b7d79637d05c9e0ebe57d003493a1" ], "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", + "extlb1nuq 29913d444b", "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.887458" + "0.930468" ], "etag": [ - "W/\"a8c928963e43200ebbb226f83d6be539\"" + "W/\"8a329652546cc10291db1d116c83f7e1\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/orders/order_e301707eaf5e4a2f9909388b7c1b5aea" + "/api/v2/orders/order_bca7c5ca6b524ed789d5ac654080ef28" ], "x-version-label": [ - "easypost-202211142148-00c0334849-master" + "easypost-202211211953-c7d3fecdcf-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,10 +92,10 @@ }, "uri": "https://api.easypost.com/v2/orders" }, - "duration": 1202 + "duration": 1247 }, { - "recordedAt": 1668466071, + "recordedAt": 1669137867, "request": { "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"First\"\n}", "method": "POST", @@ -111,10 +110,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/orders/order_e301707eaf5e4a2f9909388b7c1b5aea/buy" + "uri": "https://api.easypost.com/v2/orders/order_bca7c5ca6b524ed789d5ac654080ef28/buy" }, "response": { - "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:47:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b5146c0ea9b441929d47cf65c2865732\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cead58a1940a4354bf2db8dd19d2a2cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3d2cc050db8b4f29bc223a83c274dee2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8c12a562c07b49988b805ddea49edc06\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:47:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:50Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cead58a1940a4354bf2db8dd19d2a2cc\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:47:51Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"tracking_code\": \"9400100106068149680445\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzYyMGRlZDA1NDY1MjQzNmRiYzE1Zjc5Yzc5ZTNjYWJl\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"signed_by\": null,\n \"id\": \"trk_620ded054652436dbc15f79c79e3cabe\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:50Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/40c4f81a5cc94e8dbbcb30a8b8c363af.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:51Z\",\n \"id\": \"pl_c7c16842bcc0411f9eac52bebfe35e40\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:50Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_721f34e06cf0445d99fb1514a7b18186\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:47:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b5146c0ea9b441929d47cf65c2865732\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cead58a1940a4354bf2db8dd19d2a2cc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_3d2cc050db8b4f29bc223a83c274dee2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:49Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dff11b74c3834222a5bb8f373cc61ed9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8c12a562c07b49988b805ddea49edc06\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:47:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_5d368be1646e11edb86dac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680445\",\n \"messages\": [],\n \"order_id\": \"order_e301707eaf5e4a2f9909388b7c1b5aea\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:49Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_e301707eaf5e4a2f9909388b7c1b5aea\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:49+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5d37dfea646e11edb86fac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:24:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_82ffdc326a8a11ed973dac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_da0a19b8b47341099b21aa0779b222bc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1d34102f95f747ea974f999ae5fbddf7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7ecfd6c3cde143dfb89336a3c651ad75\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f1e5354ac7874bdd80eaa05692d19a53\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-22T17:24:25Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:24:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_82ffdc326a8a11ed973dac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:24:25Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:24:27Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:24:27Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:27Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7ecfd6c3cde143dfb89336a3c651ad75\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-22T17:24:27Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"tracking_code\": \"9400100106068151919328\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2MwODE3ZjI3MjE2ZTQ4YTI5MzI2ZDJjMTdhZDk3OGRl\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-22T17:24:27Z\",\n \"signed_by\": null,\n \"id\": \"trk_c0817f27216e48a29326d2c17ad978de\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_830118ad6a8a11ed83c5ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_830118ad6a8a11ed83c5ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-22T17:24:27Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/1abce414a89c4f1fb5da3c956e7bf646.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-22T17:24:27Z\",\n \"id\": \"pl_a8d02e82ff6549ff90dc202d7057f6ed\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-22T17:24:27Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:24:25Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:24:25Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_98ff3e85a4004333ad7e4d3e117b5c59\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:24:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_82ffdc326a8a11ed973dac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:24:26Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:26Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_da0a19b8b47341099b21aa0779b222bc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:24:26Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:26Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1d34102f95f747ea974f999ae5fbddf7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:24:26Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:26Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7ecfd6c3cde143dfb89336a3c651ad75\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:24:26Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d17be8674e24a0690abf30c1c3f2d3b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:26Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f1e5354ac7874bdd80eaa05692d19a53\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:24:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_82ffdc326a8a11ed973dac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151919328\",\n \"messages\": [],\n \"order_id\": \"order_bca7c5ca6b524ed789d5ac654080ef28\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:24:26Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_830118ad6a8a11ed83c5ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_bca7c5ca6b524ed789d5ac654080ef28\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:25+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_830118ad6a8a11ed83c5ac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +126,7 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,27 +153,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "3a8b2e0f6372c596e0d9eac00019c692" + "80b871bb637d05cae0ebe57f002e2f6f" ], "x-proxied": [ - "extlb4wdc 29913d444b", + "extlb3wdc 29913d444b", "intlb1wdc 29913d444b", - "intlb1nuq 29913d444b" + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.943272" + "1.021705" ], "etag": [ - "W/\"b0dc23256f282da1a4a804efe86e0bf9\"" + "W/\"36d999482a936d74050fc33466ec4547\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202211142148-00c0334849-master" + "easypost-202211211953-c7d3fecdcf-master" ], "cache-control": [ "private, no-cache, no-store" @@ -184,8 +183,8 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/orders/order_e301707eaf5e4a2f9909388b7c1b5aea/buy" + "uri": "https://api.easypost.com/v2/orders/order_bca7c5ca6b524ed789d5ac654080ef28/buy" }, - "duration": 1168 + "duration": 1271 } ] \ No newline at end of file diff --git a/src/test/cassettes/order/buy_with_rate.json b/src/test/cassettes/order/buy_with_rate.json new file mode 100644 index 000000000..79082da0f --- /dev/null +++ b/src/test/cassettes/order/buy_with_rate.json @@ -0,0 +1,191 @@ +[ + { + "recordedAt": 1669137870, + "request": { + "body": "{\n \"order\": {\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/orders" + }, + "response": { + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_84f7f7d36a8a11edb115ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d78a004e343c44c080646bb1c91d4fc6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f15062672b624f40a67fdbab97ae40a7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62e6793e92d64153b8783ced869d1c6b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c3586deb35094818b831484522c101bd\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-22T17:24:28Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_84f7f7d36a8a11edb115ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:24:28Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:24:28Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_84f958426a8a11edb116ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_84f958426a8a11edb116ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:24:28Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:24:28Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_8cd21be95f024185ba9deebbad8c724a\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_84f7f7d36a8a11edb115ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:24:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:30Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d78a004e343c44c080646bb1c91d4fc6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:24:30Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:30Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f15062672b624f40a67fdbab97ae40a7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:24:30Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:30Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62e6793e92d64153b8783ced869d1c6b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:24:30Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:30Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c3586deb35094818b831484522c101bd\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_84f7f7d36a8a11edb115ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_aad28ef2b7eb4b18b92aef3060e6b96f\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:24:30Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_84f958426a8a11edb116ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_aad28ef2b7eb4b18b92aef3060e6b96f\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_84f958426a8a11edb116ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "11334" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb9nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "80b871bb637d05cce0ebe59c002e3004" + ], + "x-proxied": [ + "extlb3wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "2.122136" + ], + "etag": [ + "W/\"32bf1295ac1587c21f83ddab9df3f05e\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/orders/order_aad28ef2b7eb4b18b92aef3060e6b96f" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/orders" + }, + "duration": 2385 + }, + { + "recordedAt": 1669137872, + "request": { + "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"First\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/orders/order_aad28ef2b7eb4b18b92aef3060e6b96f/buy" + }, + "response": { + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:24:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_84f7f7d36a8a11edb115ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d78a004e343c44c080646bb1c91d4fc6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f15062672b624f40a67fdbab97ae40a7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62e6793e92d64153b8783ced869d1c6b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c3586deb35094818b831484522c101bd\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-22T17:24:28Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:24:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_84f7f7d36a8a11edb115ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:24:28Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:24:31Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:24:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:31Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d78a004e343c44c080646bb1c91d4fc6\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-22T17:24:32Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"tracking_code\": \"9400100106068151919366\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzhkMDM4ODAzNDk2ZjRkYWQ4NjNhM2M3OTZmNDdjYWQz\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-22T17:24:32Z\",\n \"signed_by\": null,\n \"id\": \"trk_8d038803496f4dad863a3c796f47cad3\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_84f958426a8a11edb116ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_84f958426a8a11edb116ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-22T17:24:31Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/9cb13c3ec7ce4d10bae725280b624c2b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-22T17:24:31Z\",\n \"id\": \"pl_36fe5cee70094633a123cd9d8e96a48b\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-22T17:24:31Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:24:28Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:24:28Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_8cd21be95f024185ba9deebbad8c724a\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:24:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_84f7f7d36a8a11edb115ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:24:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:30Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d78a004e343c44c080646bb1c91d4fc6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:24:30Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:30Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_f15062672b624f40a67fdbab97ae40a7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:24:30Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:30Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62e6793e92d64153b8783ced869d1c6b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:24:30Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c46e76d3c782441bbbaedae79632c4ab\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:24:30Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c3586deb35094818b831484522c101bd\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:24:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_84f7f7d36a8a11edb115ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151919366\",\n \"messages\": [],\n \"order_id\": \"order_aad28ef2b7eb4b18b92aef3060e6b96f\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:24:30Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_84f958426a8a11edb116ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_aad28ef2b7eb4b18b92aef3060e6b96f\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:24:28+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:24:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_84f958426a8a11edb116ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "12801" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb1nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "80b871b7637d05cfe0ebe59e002e30e5" + ], + "x-proxied": [ + "extlb3wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.006269" + ], + "etag": [ + "W/\"55344c0134b807eba0d486cbc46bba9b\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/orders/order_aad28ef2b7eb4b18b92aef3060e6b96f/buy" + }, + "duration": 1314 + } +] \ No newline at end of file diff --git a/src/test/cassettes/order/new_rate.json b/src/test/cassettes/order/new_rate.json new file mode 100644 index 000000000..263298fe8 --- /dev/null +++ b/src/test/cassettes/order/new_rate.json @@ -0,0 +1,187 @@ +[ + { + "recordedAt": 1669138264, + "request": { + "body": "{\n \"order\": {\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/orders" + }, + "response": { + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6f8928326a8b11ed9ba3ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2d40af43aa60464684d5e15a3a3a29d0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c4e4b8f9e24f4b5582323f4be51ecc51\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0dcc2c98209547e9ab604dc32ebe3289\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b119b201fe5c4bc69b4278e57a10bade\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-22T17:31:02Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6f8928326a8b11ed9ba3ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:31:02Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:31:02Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6f8ab05c6a8b11ed9ba5ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6f8ab05c6a8b11ed9ba5ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:31:02Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:31:02Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f07b6f76c04f4f8a8ff1985b65c1506f\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6f8928326a8b11ed9ba3ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:31:03Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:31:03Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2d40af43aa60464684d5e15a3a3a29d0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:31:03Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:31:03Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c4e4b8f9e24f4b5582323f4be51ecc51\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:31:03Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:31:03Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0dcc2c98209547e9ab604dc32ebe3289\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:31:03Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:31:03Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b119b201fe5c4bc69b4278e57a10bade\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6f8928326a8b11ed9ba3ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_ac38d624e9d64a3d845263721a16e97f\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:31:03Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6f8ab05c6a8b11ed9ba5ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_ac38d624e9d64a3d845263721a16e97f\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6f8ab05c6a8b11ed9ba5ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "11334" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb6nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "816b7d7b637d0756e0ebee870035308d" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.766953" + ], + "etag": [ + "W/\"f005beec9dc676b1b4878c29e06e97c2\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/orders/order_ac38d624e9d64a3d845263721a16e97f" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/orders" + }, + "duration": 2126 + }, + { + "recordedAt": 1669138265, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/orders/order_ac38d624e9d64a3d845263721a16e97f/rates" + }, + "response": { + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6f8928326a8b11ed9ba3ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": null,\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_161e36ca4142401d841f604dfdcf5eb6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": null,\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7248f333dd9a49d993369af05e402b9b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_96f9249f4b854a5e87b4c06d7268e745\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3f8f707928014e4088322239744ddd6a\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2022-11-22T17:31:02Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6f8928326a8b11ed9ba3ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:31:02Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:31:02Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6f8ab05c6a8b11ed9ba5ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6f8ab05c6a8b11ed9ba5ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:31:02Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:31:02Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f07b6f76c04f4f8a8ff1985b65c1506f\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6f8928326a8b11ed9ba3ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:31:05Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:31:05Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_161e36ca4142401d841f604dfdcf5eb6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:31:05Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:31:05Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7248f333dd9a49d993369af05e402b9b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:31:05Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:31:05Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_96f9249f4b854a5e87b4c06d7268e745\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:31:05Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4c7b1645fcf8441db632fc59bc2952be\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:31:05Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3f8f707928014e4088322239744ddd6a\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6f8928326a8b11ed9ba3ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [],\n \"order_id\": \"order_ac38d624e9d64a3d845263721a16e97f\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": null,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:31:03Z\",\n \"options\": {\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6f8ab05c6a8b11ed9ba5ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_ac38d624e9d64a3d845263721a16e97f\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:31:02+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:31:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6f8ab05c6a8b11ed9ba5ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "10223" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb1nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "80b871ba637d0758e0ebee9f002ebc4c" + ], + "x-proxied": [ + "extlb3wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.423149" + ], + "etag": [ + "W/\"3fe16a03627a66a312a7b143418cd473\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/orders/order_ac38d624e9d64a3d845263721a16e97f/rates" + }, + "duration": 1677 + } +] \ No newline at end of file diff --git a/src/test/cassettes/payment_method/all.json b/src/test/cassettes/payment_method/all.json new file mode 100644 index 000000000..d82badc70 --- /dev/null +++ b/src/test/cassettes/payment_method/all.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1669226766, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/payment_methods" + }, + "response": { + "body": "{\n \"secondary_payment_method\": null,\n \"id\": \"cust_815cb5adf39548fc8ec9ee928cd51a96\",\n \"primary_payment_method\": null,\n \"object\": \"PaymentMethods\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "134" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb6nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "9a15e554637e610de78a0329002127ef" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.020070" + ], + "etag": [ + "W/\"a9da3fd4f7563256345830987de33ece\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211222057-6fd042c9a6-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/payment_methods" + }, + "duration": 505 + } +] \ No newline at end of file diff --git a/src/test/cassettes/pickup/buy.json b/src/test/cassettes/pickup/buy.json index f48e69b25..74d9d9251 100644 --- a/src/test/cassettes/pickup/buy.json +++ b/src/test/cassettes/pickup/buy.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1668466050, + "recordedAt": 1669072639, "request": { "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:47:29Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:47:30Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:30Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2fef5e4e72c141939d74c404c61084db\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:47:30Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"tracking_code\": \"9400100106068149680278\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzhmZjRmNDM1ZWE2ODQ2N2M5ZjgwMjdlNTUwYmNkYTc3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:30Z\",\n \"signed_by\": null,\n \"id\": \"trk_8ff4f435ea68467c9f8027e550bcda77\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_519cb61a646e11ed9d3aac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:47:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_519cb61a646e11ed9d3aac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:47:30Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/e89a45a971b7487aa82f85dc912278be.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:47:30Z\",\n \"id\": \"pl_9d978d0e36ca42909b5ca209032dfb1f\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:47:30Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:47:29Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:47:29Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_1087f2a421214c629559cc64fde75196\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:29+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_51981b89646e11edb31fac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:47:29Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:29Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2fef5e4e72c141939d74c404c61084db\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:47:29Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:29Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_90bc7110790d433a8d2a0b3e2e319521\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:47:29Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:29Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5ccb92dfab5d478491876d034a7dae7d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:47:29Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:47:29Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d3d844b2324849789d0b621f9cc64ff8\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:47:29+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:47:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_51981b89646e11edb31fac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680278\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-21T23:17:18Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-21T23:17:19Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-21T23:17:19Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-21T23:17:19Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a43d07b54f3e41a3bd7b043c047481a4\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-21T23:17:19Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"tracking_code\": \"9400100106068151680303\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzUzOWQzY2U3MTg5MTQxOWQ4MjUxZjVlMGU4YTVkNGM3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-21T23:17:19Z\",\n \"signed_by\": null,\n \"id\": \"trk_539d3ce71891419d8251f5e0e8a5d4c7\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-21T23:17:18+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-21T23:17:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_a4ae246269f211edbd04ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-21T23:17:18+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-21T23:17:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_a4ae246269f211edbd04ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-21T23:17:18Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221121/5f6490f51d4547f4bb26143e0d3d9192.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-21T23:17:19Z\",\n \"id\": \"pl_0e20ff2ec2454c79912bfe91035d0dce\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-21T23:17:18Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-21T23:17:18Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-21T23:17:18Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_cb76860b765a4639b14c83462bdc52e1\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-21T23:17:18+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-21T23:17:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_a4ab040369f211edbd02ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-21T23:17:18Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-21T23:17:18Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_14b75a9c63634cd4ae1cd0b6411a226c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-21T23:17:18Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-21T23:17:18Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cc80c213cf554e51bd040b10a4260712\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-21T23:17:18Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-21T23:17:18Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_db922fe5bdf54d02bafa7fed60e509e7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-21T23:17:18Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-21T23:17:18Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a43d07b54f3e41a3bd7b043c047481a4\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-21T23:17:18+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-21T23:17:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_a4ab040369f211edbd02ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151680303\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -51,6 +51,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -58,30 +61,29 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "3a8b2e086372c581e0d9e7440019bbf1" + "2fd72235637c06fee0ddc1cf005b44ce" ], "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", + "extlb1nuq 29913d444b", "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.305993" + "1.010341" ], "etag": [ - "W/\"b7c34d18a7fb5e317322d5e7d2a50b66\"" + "W/\"438b16aae87e80c1510f666b1b78c373\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_4a554f40176d4a50b45bbe207a5ae4a5" + "/api/v2/shipments/shp_141c6483626b4dc4ad6d1890a2c7d4c3" ], "x-version-label": [ - "easypost-202211142148-00c0334849-master" + "easypost-202211211953-c7d3fecdcf-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +95,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1557 + "duration": 1283 }, { - "recordedAt": 1668466052, + "recordedAt": 1669072641, "request": { - "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-12-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_1087f2a421214c629559cc64fde75196\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"currency\": \"USD\",\n \"id\": \"rate_2fef5e4e72c141939d74c404c61084db\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"currency\": \"USD\",\n \"id\": \"rate_90bc7110790d433a8d2a0b3e2e319521\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"currency\": \"USD\",\n \"id\": \"rate_5ccb92dfab5d478491876d034a7dae7d\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"currency\": \"USD\",\n \"id\": \"rate_d3d844b2324849789d0b621f9cc64ff8\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068149680278\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_51981b89646e11edb31fac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:30 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_519cb61a646e11ed9d3aac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:30 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"currency\": \"USD\",\n \"id\": \"rate_2fef5e4e72c141939d74c404c61084db\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:47:30 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_51981b89646e11edb31fac1f6bc72124\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:30 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:30 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzhmZjRmNDM1ZWE2ODQ2N2M5ZjgwMjdlNTUwYmNkYTc3\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068149680278\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_8ff4f435ea68467c9f8027e550bcda77\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:30 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:47:29 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_519cb61a646e11ed9d3aac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:29 PM\"\n },\n \"id\": \"shp_4a554f40176d4a50b45bbe207a5ae4a5\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 14, 2022, 5:47:30 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_9d978d0e36ca42909b5ca209032dfb1f\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/e89a45a971b7487aa82f85dc912278be.png\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:30 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 14, 2022, 5:47:30 PM\"\n },\n \"min_datetime\": \"2022-12-01\"\n }\n}", + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-12-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:17:18 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_cb76860b765a4639b14c83462bdc52e1\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 21, 2022, 6:17:18 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:17:18 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"currency\": \"USD\",\n \"id\": \"rate_14b75a9c63634cd4ae1cd0b6411a226c\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 21, 2022, 6:17:18 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:17:18 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"currency\": \"USD\",\n \"id\": \"rate_cc80c213cf554e51bd040b10a4260712\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 21, 2022, 6:17:18 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:17:18 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"currency\": \"USD\",\n \"id\": \"rate_db922fe5bdf54d02bafa7fed60e509e7\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 21, 2022, 6:17:18 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:17:18 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"currency\": \"USD\",\n \"id\": \"rate_a43d07b54f3e41a3bd7b043c047481a4\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 21, 2022, 6:17:18 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068151680303\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:17:18 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_a4ab040369f211edbd02ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 21, 2022, 6:17:18 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:17:18 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_a4ae246269f211edbd04ac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 21, 2022, 6:17:18 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:17:19 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"currency\": \"USD\",\n \"id\": \"rate_a43d07b54f3e41a3bd7b043c047481a4\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 21, 2022, 6:17:19 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:17:18 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:17:18 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_a4ab040369f211edbd02ac1f6b0a0d1e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 21, 2022, 6:17:18 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:17:19 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzUzOWQzY2U3MTg5MTQxOWQ4MjUxZjVlMGU4YTVkNGM3\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068151680303\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_539d3ce71891419d8251f5e0e8a5d4c7\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 21, 2022, 6:17:19 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:17:18 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_a4ae246269f211edbd04ac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 21, 2022, 6:17:18 PM\"\n },\n \"id\": \"shp_141c6483626b4dc4ad6d1890a2c7d4c3\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 21, 2022, 6:17:18 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_0e20ff2ec2454c79912bfe91035d0dce\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221121/5f6490f51d4547f4bb26143e0d3d9192.png\",\n \"updatedAt\": \"Nov 21, 2022, 6:17:19 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 21, 2022, 6:17:19 PM\"\n },\n \"min_datetime\": \"2022-12-01\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +116,7 @@ "uri": "https://api.easypost.com/v2/pickups" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:31+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_529438e5646e11edb377ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:31Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:32Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:32Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_ed465270a6274945b74dbfcffaef9387\",\n \"pickup_id\": \"pickup_47f1aa3b91ef4bb59b3144fd55b9dec6\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:31Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_47f1aa3b91ef4bb59b3144fd55b9dec6\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-21T23:17:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-21T23:17:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_a5b06bfd69f211edb053ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-21T23:17:20Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-21T23:17:21Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-21T23:17:21Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_6e187604ec4049bea80d061867ed6545\",\n \"pickup_id\": \"pickup_6e548a7c19c549ea931eb3842ffb6036\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-21T23:17:20Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_6e548a7c19c549ea931eb3842ffb6036\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -157,27 +159,26 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "3a8b2e0b6372c583e0d9e7480019bc9f" + "60b8ac39637c0700e0ddc1d10011412c" ], "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", + "extlb2nuq 29913d444b", "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.878255" + "1.414064" ], "etag": [ - "W/\"23a7f9bf9776c06a5dbeeac704c3d911\"" + "W/\"53f7deb1e4eebe1c9587390adde37edf\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202211142148-00c0334849-master" + "easypost-202211211953-c7d3fecdcf-master" ], "cache-control": [ "private, no-cache, no-store" @@ -189,12 +190,12 @@ }, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1133 + "duration": 1691 }, { - "recordedAt": 1668466053, + "recordedAt": 1669072643, "request": { - "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"NextDay\"\n}", + "body": "{}", "method": "POST", "headers": { "Accept-Charset": [ @@ -207,10 +208,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_47f1aa3b91ef4bb59b3144fd55b9dec6/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_6e548a7c19c549ea931eb3842ffb6036/buy" }, "response": { - "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:31+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_529438e5646e11edb377ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:31Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:32Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:32Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_ed465270a6274945b74dbfcffaef9387\",\n \"pickup_id\": \"pickup_47f1aa3b91ef4bb59b3144fd55b9dec6\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62390428\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:33Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_47f1aa3b91ef4bb59b3144fd55b9dec6\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-21T23:17:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-21T23:17:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_a5b06bfd69f211edb053ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-21T23:17:20Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-21T23:17:21Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-21T23:17:21Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_6e187604ec4049bea80d061867ed6545\",\n \"pickup_id\": \"pickup_6e548a7c19c549ea931eb3842ffb6036\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62413434\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-21T23:17:22Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_6e548a7c19c549ea931eb3842ffb6036\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", "httpVersion": null, "headers": { "null": [ @@ -223,7 +224,7 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -243,6 +244,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -250,10 +254,10 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "3a8b2e096372c584e0d9ea5b0019bd12" + "fde6bf49637c0701e0ddc1ea00556b24" ], "x-proxied": [ - "extlb4wdc 29913d444b", + "extlb3wdc 29913d444b", "intlb1wdc 29913d444b", "intlb1nuq 29913d444b" ], @@ -261,16 +265,16 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.961973" + "1.003815" ], "etag": [ - "W/\"af05c4fd629f9c226210417b7015a864\"" + "W/\"4af92908978d342fb970a51395ecf443\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202211142148-00c0334849-master" + "easypost-202211211953-c7d3fecdcf-master" ], "cache-control": [ "private, no-cache, no-store" @@ -280,8 +284,8 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/pickups/pickup_47f1aa3b91ef4bb59b3144fd55b9dec6/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_6e548a7c19c549ea931eb3842ffb6036/buy" }, - "duration": 1243 + "duration": 1265 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/buy_with_rate.json b/src/test/cassettes/pickup/buy_with_rate.json new file mode 100644 index 000000000..ec2b79ef8 --- /dev/null +++ b/src/test/cassettes/pickup/buy_with_rate.json @@ -0,0 +1,282 @@ +[ + { + "recordedAt": 1669072812, + "request": { + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "response": { + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-21T23:20:11Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-21T23:20:12Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-21T23:20:12Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-21T23:20:12Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4a0884aef5584600b35cd355f9f46566\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-21T23:20:12Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"tracking_code\": \"9400100106068151681317\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzZiM2I3MzUyNzhkZjQ5Y2ViNzIxNzliY2M3MzUxM2Ex\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-21T23:20:12Z\",\n \"signed_by\": null,\n \"id\": \"trk_6b3b735278df49ceb72179bcc73513a1\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-21T23:20:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-21T23:20:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0bf503e969f311ed9f3aac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-21T23:20:11+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-21T23:20:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_0bf503e969f311ed9f3aac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-21T23:20:12Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221121/2256f38a685e46d09398eb1dffc56d6d.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-21T23:20:12Z\",\n \"id\": \"pl_caacae8f99fa422d94d5286a300d2eca\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-21T23:20:12Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-21T23:20:11Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-21T23:20:11Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_99f9d006358f4e9f9fc120929aa2b118\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-21T23:20:11+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-21T23:20:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0bf1d1b369f311ed92a1ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-21T23:20:11Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-21T23:20:11Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b0090c6eab2547109414cc48a961d7d7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-21T23:20:11Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-21T23:20:11Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_c7c6c89ae30542cb90654794f957573f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-21T23:20:11Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-21T23:20:11Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8b6ca0956bca4280b1f150eae0889970\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-21T23:20:11Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-21T23:20:11Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4a0884aef5584600b35cd355f9f46566\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-21T23:20:11+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-21T23:20:11+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_0bf1d1b369f311ed92a1ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151681317\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "7077" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb1nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "60b8ac39637c07abe0de2c0000117833" + ], + "x-proxied": [ + "extlb2nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.088679" + ], + "etag": [ + "W/\"ea7945f418939c2448ab5b937d23c4cb\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_88a9a47e75e344afa65cd7c495967d29" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1392 + }, + { + "recordedAt": 1669072814, + "request": { + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2022-12-01\",\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"shipment\": {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:20:11 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_99f9d006358f4e9f9fc120929aa2b118\",\n \"height\": 4.0,\n \"updatedAt\": \"Nov 21, 2022, 6:20:11 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.82,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.25,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.15,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:20:11 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.15,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"currency\": \"USD\",\n \"id\": \"rate_b0090c6eab2547109414cc48a961d7d7\",\n \"retailRate\": 9.75,\n \"updatedAt\": \"Nov 21, 2022, 6:20:11 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"listRate\": 29.75,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:20:11 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 29.75,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"currency\": \"USD\",\n \"id\": \"rate_c7c6c89ae30542cb90654794f957573f\",\n \"retailRate\": 33.85,\n \"updatedAt\": \"Nov 21, 2022, 6:20:11 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 5.0,\n \"listRate\": 8.0,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:20:11 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 8.0,\n \"deliveryDays\": 5.0,\n \"billingType\": \"easypost\",\n \"service\": \"ParcelSelect\",\n \"shipmentId\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"currency\": \"USD\",\n \"id\": \"rate_8b6ca0956bca4280b1f150eae0889970\",\n \"retailRate\": 8.0,\n \"updatedAt\": \"Nov 21, 2022, 6:20:11 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:20:11 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"currency\": \"USD\",\n \"id\": \"rate_4a0884aef5584600b35cd355f9f46566\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 21, 2022, 6:20:11 PM\"\n }\n ],\n \"trackingCode\": \"9400100106068151681317\",\n \"toAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:20:11 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_0bf1d1b369f311ed92a1ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 21, 2022, 6:20:11 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:20:11 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_0bf503e969f311ed9f3aac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 21, 2022, 6:20:11 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:20:12 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"currency\": \"USD\",\n \"id\": \"rate_4a0884aef5584600b35cd355f9f46566\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 21, 2022, 6:20:12 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:20:11 PM\",\n \"buyerAddress\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"timeZone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:20:11 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"state\": \"CA\",\n \"id\": \"adr_0bf1d1b369f311ed92a1ac1f6bc7b362\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"updatedAt\": \"Nov 21, 2022, 6:20:11 PM\"\n },\n \"tracker\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:20:12 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzZiM2I3MzUyNzhkZjQ5Y2ViNzIxNzliY2M3MzUxM2Ex\",\n \"weight\": 0.0,\n \"trackingCode\": \"9400100106068151681317\",\n \"statusDetail\": \"unknown\",\n \"trackingDetails\": [],\n \"id\": \"trk_6b3b735278df49ceb72179bcc73513a1\",\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 21, 2022, 6:20:12 PM\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"uspsZone\": \"4.0\",\n \"messages\": [],\n \"fromAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:20:11 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_0bf503e969f311ed9f3aac1f6b0a0d1e\",\n \"email\": \"test@example.com\",\n \"updatedAt\": \"Nov 21, 2022, 6:20:11 PM\"\n },\n \"id\": \"shp_88a9a47e75e344afa65cd7c495967d29\",\n \"postageLabel\": {\n \"createdAt\": \"Nov 21, 2022, 6:20:12 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_caacae8f99fa422d94d5286a300d2eca\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221121/2256f38a685e46d09398eb1dffc56d6d.png\",\n \"updatedAt\": \"Nov 21, 2022, 6:20:12 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"updatedAt\": \"Nov 21, 2022, 6:20:12 PM\"\n },\n \"min_datetime\": \"2022-12-01\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/pickups" + }, + "response": { + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-21T23:20:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-21T23:20:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0d05b4c869f311ed9318ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-21T23:20:13Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-21T23:20:14Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-21T23:20:14Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_e1a2c56ca17243a4b05926fb27ffdac9\",\n \"pickup_id\": \"pickup_fd632feccb634b5bb524b498d1829b04\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-21T23:20:13Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_fd632feccb634b5bb524b498d1829b04\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1157" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb2nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "2fd72239637c07ade0de2c02005b80e9" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.929373" + ], + "etag": [ + "W/\"4ed60b6ebfde3e88a0c66657ccbe6e0f\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/pickups" + }, + "duration": 1209 + }, + { + "recordedAt": 1669072815, + "request": { + "body": "{\n \"rate\": {\n \"mode\": \"test\",\n \"createdAt\": \"Nov 21, 2022, 6:20:14 PM\",\n \"carrier\": \"USPS\",\n \"rate\": 0.0,\n \"service\": \"NextDay\",\n \"currency\": \"USD\",\n \"pickupId\": \"pickup_fd632feccb634b5bb524b498d1829b04\",\n \"id\": \"pickuprate_e1a2c56ca17243a4b05926fb27ffdac9\",\n \"updatedAt\": \"Nov 21, 2022, 6:20:14 PM\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/pickups/pickup_fd632feccb634b5bb524b498d1829b04/buy" + }, + "response": { + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-21T23:20:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-21T23:20:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0d05b4c869f311ed9318ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-21T23:20:13Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-21T23:20:14Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-21T23:20:14Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_e1a2c56ca17243a4b05926fb27ffdac9\",\n \"pickup_id\": \"pickup_fd632feccb634b5bb524b498d1829b04\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62413442\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-21T23:20:15Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_fd632feccb634b5bb524b498d1829b04\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1168" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb3nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "e8698f7e637c07aee0de2c04005447d6" + ], + "x-proxied": [ + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.923805" + ], + "etag": [ + "W/\"f2d9efccbfc571c4edc66eabceb4aab1\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/pickups/pickup_fd632feccb634b5bb524b498d1829b04/buy" + }, + "duration": 1164 + } +] \ No newline at end of file diff --git a/src/test/cassettes/referral/create_bad_stripe_token.json b/src/test/cassettes/referral/create_bad_stripe_token.json new file mode 100644 index 000000000..784344e51 --- /dev/null +++ b/src/test/cassettes/referral/create_bad_stripe_token.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1668793890, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/partners/stripe_public_key" + }, + "response": { + "body": "{\n \"public_key\": \"pk_x3JSr5eOVWNTLRej8cZDde9VQ0AT5\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "49" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb8nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "4a2c60ed6377c622e0ed8b240009b6c7" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.102064" + ], + "etag": [ + "W/\"86cc970265a111486b443bf66ef85e91\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211172230-f1ea11b421-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/partners/stripe_public_key" + }, + "duration": 453 + } +] \ No newline at end of file diff --git a/src/test/cassettes/referral/referral_add_credit_card.json b/src/test/cassettes/referral/referral_add_credit_card.json new file mode 100644 index 000000000..8cf550767 --- /dev/null +++ b/src/test/cassettes/referral/referral_add_credit_card.json @@ -0,0 +1,183 @@ +[ + { + "recordedAt": 1669142059, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/partners/stripe_public_key" + }, + "response": { + "body": "{\n \"public_key\": \"pk_x3JSr5eOVWNTLRej8cZDde9VQ0AT5\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "49" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb12nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "816b7d7e637d162be0ed0b67003d3f7b" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.017105" + ], + "etag": [ + "W/\"86cc970265a111486b443bf66ef85e91\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/partners/stripe_public_key" + }, + "duration": 400 + }, + { + "recordedAt": 1669142064, + "request": { + "body": "{\n \"credit_card\": {\n \"stripe_object_id\": \"tok_0M71IWDqT4huGUvdZspMYMfr\",\n \"priority\": \"primary\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/credit_cards" + }, + "response": { + "body": "{\n \"last4\": \"6170\",\n \"disabled_at\": null,\n \"name\": null,\n \"exp_month\": 5.0,\n \"id\": \"card_5eeca4edec3045c8ada6ccd52824d6c1\",\n \"exp_year\": 2028.0,\n \"brand\": \"Visa\",\n \"object\": \"CreditCard\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "159" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb6nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "d96d15b1637d162ce0ed0b81003bbeb2" + ], + "x-proxied": [ + "extlb2nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "3.862250" + ], + "etag": [ + "W/\"195f283080f5458e3b2402386b36ff63\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/credit_cards" + }, + "duration": 4116 + } +] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json b/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id_with_rate.json similarity index 56% rename from src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json rename to src/test/cassettes/shipment/buy_shipment_with_end_shipper_id_with_rate.json index d4c31b0c9..70421059d 100644 --- a/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id.json +++ b/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id_with_rate.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1668466100, + "recordedAt": 1669139038, "request": { "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/end_shippers" }, "response": { - "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_07b096c80f514179904dd00ea470254f\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T17:43:58+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:43:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_78fde5ad3f0a41ccb02ae2d327d4161f\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb9nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,27 +58,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "3a8b2e0c6372c5b4e0d9eb8d0019d5d0" + "80b871ba637d0a5ee0ec691d002ff7fd" ], "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", - "intlb2nuq 29913d444b" + "extlb3wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.040453" + "0.059694" ], "etag": [ - "W/\"9393bec82a60350820cdb76b30130ec0\"" + "W/\"87567c7d1178815f3944143e51807eae\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202211142148-00c0334849-master" + "easypost-202211211953-c7d3fecdcf-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,10 +90,10 @@ }, "uri": "https://api.easypost.com/v2/end_shippers" }, - "duration": 301 + "duration": 255 }, { - "recordedAt": 1668466101, + "recordedAt": 1669139040, "request": { "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -111,7 +111,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:20Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_701f7de4646e11edbf31ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_701f7de4646e11edbf31ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:20Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:20Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f8516ad9fa7e46828993b9e7b59ac7ee\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_701d0615646e11ed8006ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_bdb73ede209e4cd097ad49d51bb6f707\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a990f04172f7441098c5d77b04d8c70f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_23d9de547b334e55817020e90c840617\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e557655ae9464f86bcc03c2bbf257c49\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_701d0615646e11ed8006ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:43:59Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:43:59Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:43:58+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:43:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_3e8024976a8d11edb159ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6b7614568ac14eda9d640bd36cd35eef\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:43:58+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:43:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_3e8024976a8d11edb159ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:43:59Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:43:59Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_8ae7ed29a26f471c93ed34799dee0247\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:43:58+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:43:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_3e7d9d736a8d11edb157ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:43:59Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6b7614568ac14eda9d640bd36cd35eef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:59Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d90e94e0498345bfa81268e5ff627e23\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:43:59Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6b7614568ac14eda9d640bd36cd35eef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:59Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_addd008e1a414d1785aa6dd41ba0bc8a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:43:59Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6b7614568ac14eda9d640bd36cd35eef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:59Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5631faaa63ca4b9fbdca671e01eec746\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:43:59Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6b7614568ac14eda9d640bd36cd35eef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:59Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_4de7ab3b160d44a0bf11cf7c2f2101aa\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:43:58+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:43:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_3e7d9d736a8d11edb157ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -151,30 +151,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "3a8b2e086372c5b4e0da50740019d5f9" + "80b871b8637d0a5ee0ec6936002ff819" ], "x-proxied": [ - "extlb4wdc 29913d444b", + "extlb3wdc 29913d444b", "intlb2wdc 29913d444b", - "intlb1nuq 29913d444b" + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.743743" + "0.939666" ], "etag": [ - "W/\"53e58684d88a3190728d4707c53a7c22\"" + "W/\"6c2da4296678c8bd8224d68e27504df9\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_f36380d7eb4849ee83a6db9ff636dfbc" + "/api/v2/shipments/shp_6b7614568ac14eda9d640bd36cd35eef" ], "x-version-label": [ - "easypost-202211142148-00c0334849-master" + "easypost-202211211953-c7d3fecdcf-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,12 +186,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1038 + "duration": 1225 }, { - "recordedAt": 1668466102, + "recordedAt": 1669139041, "request": { - "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:48:21 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"currency\": \"USD\",\n \"id\": \"rate_e557655ae9464f86bcc03c2bbf257c49\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:48:21 PM\"\n },\n \"end_shipper_id\": \"es_07b096c80f514179904dd00ea470254f\"\n}", + "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 12:43:59 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_6b7614568ac14eda9d640bd36cd35eef\",\n \"currency\": \"USD\",\n \"id\": \"rate_5631faaa63ca4b9fbdca671e01eec746\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 22, 2022, 12:43:59 PM\"\n },\n \"end_shipper_id\": \"es_78fde5ad3f0a41ccb02ae2d327d4161f\"\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -204,10 +204,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_f36380d7eb4849ee83a6db9ff636dfbc/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_6b7614568ac14eda9d640bd36cd35eef/buy" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:20Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:22Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:22Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:22Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e557655ae9464f86bcc03c2bbf257c49\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:48:22Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"tracking_code\": \"9400100106068149680681\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2VlOTI4ZGY3MWNkOTQzMmZhNmExZTc1YzNhNGNkYTNm\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:22Z\",\n \"signed_by\": null,\n \"id\": \"trk_ee928df71cd9432fa6a1e75c3a4cda3f\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_701f7de4646e11edbf31ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_701f7de4646e11edbf31ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:22Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/e3771b5a2db04cedaa4f7995dd565bad.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:22Z\",\n \"id\": \"pl_3f987e07d5424f6bbafc5fab0004b4d6\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:22Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:20Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:20Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f8516ad9fa7e46828993b9e7b59ac7ee\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:48:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_701d0615646e11ed8006ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_bdb73ede209e4cd097ad49d51bb6f707\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a990f04172f7441098c5d77b04d8c70f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_23d9de547b334e55817020e90c840617\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:21Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f36380d7eb4849ee83a6db9ff636dfbc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:21Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e557655ae9464f86bcc03c2bbf257c49\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:48:20+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:48:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_701d0615646e11ed8006ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680681\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:43:59Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:44:01Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:44:00Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6b7614568ac14eda9d640bd36cd35eef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:44:00Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5631faaa63ca4b9fbdca671e01eec746\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-22T17:44:01Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_6b7614568ac14eda9d640bd36cd35eef\",\n \"tracking_code\": \"9400100106068151923660\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2UxYTczMmIyMTdjYzRiOTJiZDJkNTdmMWM3MDlmYTA1\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-22T17:44:01Z\",\n \"signed_by\": null,\n \"id\": \"trk_e1a732b217cc4b92bd2d57f1c709fa05\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:43:58+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:43:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_3e8024976a8d11edb159ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6b7614568ac14eda9d640bd36cd35eef\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:43:58+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:43:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_3e8024976a8d11edb159ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-22T17:44:00Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/6d1d5b28afee4db0b310c7ffade6b700.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-22T17:44:00Z\",\n \"id\": \"pl_a7ddd2303a67474bb73fba5378eff72e\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-22T17:44:00Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:43:59Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:43:59Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_8ae7ed29a26f471c93ed34799dee0247\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:43:58+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:44:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_3e7d9d736a8d11edb157ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:43:59Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6b7614568ac14eda9d640bd36cd35eef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:59Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d90e94e0498345bfa81268e5ff627e23\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:43:59Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6b7614568ac14eda9d640bd36cd35eef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:59Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_addd008e1a414d1785aa6dd41ba0bc8a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:43:59Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6b7614568ac14eda9d640bd36cd35eef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:59Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5631faaa63ca4b9fbdca671e01eec746\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:43:59Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6b7614568ac14eda9d640bd36cd35eef\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:59Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_4de7ab3b160d44a0bf11cf7c2f2101aa\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:43:58+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:44:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_3e7d9d736a8d11edb157ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151923660\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -220,7 +220,7 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb5nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -247,10 +247,10 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "3a8b2e096372c5b5e0da50760019d670" + "80b871bb637d0a60e0ec6938002ff87a" ], "x-proxied": [ - "extlb4wdc 29913d444b", + "extlb3wdc 29913d444b", "intlb1wdc 29913d444b", "intlb2nuq 29913d444b" ], @@ -258,16 +258,16 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.980139" + "0.901747" ], "etag": [ - "W/\"b3b3fb13fcf18f560bd9348b2010a2d5\"" + "W/\"b6aedfb41c854183a9f13be546564c35\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202211142148-00c0334849-master" + "easypost-202211211953-c7d3fecdcf-master" ], "cache-control": [ "private, no-cache, no-store" @@ -277,8 +277,8 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/shipments/shp_f36380d7eb4849ee83a6db9ff636dfbc/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_6b7614568ac14eda9d640bd36cd35eef/buy" }, - "duration": 1206 + "duration": 1231 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id_with_rate_with_params.json b/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id_with_rate_with_params.json new file mode 100644 index 000000000..4c890712b --- /dev/null +++ b/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id_with_rate_with_params.json @@ -0,0 +1,284 @@ +[ + { + "recordedAt": 1669139034, + "request": { + "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/end_shippers" + }, + "response": { + "body": "{\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T17:43:54+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:43:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_94e66c90a78e4b3b8999fed0998e0af1\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"EndShipper\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "365" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb3nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "80b871b7637d0a5ae0ec68fb002ff670" + ], + "x-proxied": [ + "extlb3wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.046154" + ], + "etag": [ + "W/\"15e579b3420efed34a856afc4c530b63\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/end_shippers" + }, + "duration": 248 + }, + { + "recordedAt": 1669139036, + "request": { + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "response": { + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:43:54Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:43:56Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:43:54+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:43:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_3bdba0a36a8d11eda00bac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_0a1e0657d9d54902aaae83f22d5178ed\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:43:54+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:43:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_3bdba0a36a8d11eda00bac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:43:54Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:43:54Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_d5ba05bcb49449229113d142aecaef09\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:43:54+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:43:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_3bd95b2d6a8d11edb7f0ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:43:56Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0a1e0657d9d54902aaae83f22d5178ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:56Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_99025e621ab245a182ad5ca6f7fc00ab\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:43:56Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0a1e0657d9d54902aaae83f22d5178ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:56Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1f98e33b814c45ab841b933187e9cd89\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:43:56Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0a1e0657d9d54902aaae83f22d5178ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:56Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a434c3b9f3af40d087e12a72d15b59bc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:43:56Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0a1e0657d9d54902aaae83f22d5178ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:56Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ebcb8825cd3f4f82b83dc20e04e65a1e\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:43:54+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:43:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_3bd95b2d6a8d11edb7f0ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "5972" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb5nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "80b871b6637d0a5ae0ec68fd002ff688" + ], + "x-proxied": [ + "extlb3wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "2.074358" + ], + "etag": [ + "W/\"79aaf91a1c457afd550abc9edc9c1b0b\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_0a1e0657d9d54902aaae83f22d5178ed" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 2379 + }, + { + "recordedAt": 1669139037, + "request": { + "body": "{\n \"insurance\": 249.99,\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 12:43:56 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_0a1e0657d9d54902aaae83f22d5178ed\",\n \"currency\": \"USD\",\n \"id\": \"rate_ebcb8825cd3f4f82b83dc20e04e65a1e\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 22, 2022, 12:43:56 PM\"\n },\n \"end_shipper_id\": \"es_94e66c90a78e4b3b8999fed0998e0af1\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_0a1e0657d9d54902aaae83f22d5178ed/buy" + }, + "response": { + "body": "{\n \"insurance\": \"249.99\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"1.24995\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:43:54Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:43:57Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:43:57Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0a1e0657d9d54902aaae83f22d5178ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:57Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ebcb8825cd3f4f82b83dc20e04e65a1e\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-22T17:43:57Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_0a1e0657d9d54902aaae83f22d5178ed\",\n \"tracking_code\": \"9400100106068151923639\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE2Yzc3NTA0ZmZjMTQ1NmU4Njk4ZThhYmQwMmRkNjg4\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-22T17:43:57Z\",\n \"signed_by\": null,\n \"id\": \"trk_16c77504ffc1456e8698e8abd02dd688\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:43:54+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:43:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_3bdba0a36a8d11eda00bac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_0a1e0657d9d54902aaae83f22d5178ed\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:43:54+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:43:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_3bdba0a36a8d11eda00bac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-22T17:43:57Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/e4a0ed0e73864af9a3007b38ccec582c.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-22T17:43:57Z\",\n \"id\": \"pl_8b0122539d47459d889197979da1e3f8\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-22T17:43:57Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:43:54Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:43:54Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_d5ba05bcb49449229113d142aecaef09\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:43:54+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:43:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_3bd95b2d6a8d11edb7f0ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:43:56Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0a1e0657d9d54902aaae83f22d5178ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:56Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_99025e621ab245a182ad5ca6f7fc00ab\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:43:56Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0a1e0657d9d54902aaae83f22d5178ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:56Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1f98e33b814c45ab841b933187e9cd89\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:43:56Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0a1e0657d9d54902aaae83f22d5178ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:56Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a434c3b9f3af40d087e12a72d15b59bc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:43:56Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0a1e0657d9d54902aaae83f22d5178ed\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:43:56Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ebcb8825cd3f4f82b83dc20e04e65a1e\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:43:54+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:43:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_3bd95b2d6a8d11edb7f0ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151923639\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "8183" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb8nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "80b871ba637d0a5ce0ec6917002ff74f" + ], + "x-proxied": [ + "extlb3wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.931810" + ], + "etag": [ + "W/\"be54414d90d734d569f64dcf246eb52f\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_0a1e0657d9d54902aaae83f22d5178ed/buy" + }, + "duration": 1129 + } +] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy_with_params.json b/src/test/cassettes/shipment/buy_with_params.json new file mode 100644 index 000000000..d3e1b2e8c --- /dev/null +++ b/src/test/cassettes/shipment/buy_with_params.json @@ -0,0 +1,191 @@ +[ + { + "recordedAt": 1669138830, + "request": { + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "response": { + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:40:29Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:40:30Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:40:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:40:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_c183c76b6a8c11edb081ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_dcc72df2ab884c4882e97eaf2c23b6c0\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:40:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:40:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_c183c76b6a8c11edb081ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:40:29Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:40:29Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a3c4c86f0ca94c1c8c85eb4acba551d5\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:40:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:40:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_c181cebd6a8c11ed8806ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:40:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dcc72df2ab884c4882e97eaf2c23b6c0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:30Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e4c2b7f1ad724802843845063710c581\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:40:30Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dcc72df2ab884c4882e97eaf2c23b6c0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:30Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_1b7754be433c489b9a2ba9f2215703bd\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:40:30Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dcc72df2ab884c4882e97eaf2c23b6c0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:30Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_049809595a94461d99d9784a571acf6b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:40:30Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dcc72df2ab884c4882e97eaf2c23b6c0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:30Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3e9bfcd909f343b2a32fa3ddfdaa9c9d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:40:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:40:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_c181cebd6a8c11ed8806ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "5972" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb12nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "80b871b4637d098de0ebfb26002faf69" + ], + "x-proxied": [ + "extlb3wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.040965" + ], + "etag": [ + "W/\"09d4320b50b710d7acf37e31d3b867be\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_dcc72df2ab884c4882e97eaf2c23b6c0" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1277 + }, + { + "recordedAt": 1669138831, + "request": { + "body": "{\n \"insurance\": 249.99,\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 12:40:30 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_dcc72df2ab884c4882e97eaf2c23b6c0\",\n \"currency\": \"USD\",\n \"id\": \"rate_e4c2b7f1ad724802843845063710c581\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 22, 2022, 12:40:30 PM\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_dcc72df2ab884c4882e97eaf2c23b6c0/buy" + }, + "response": { + "body": "{\n \"insurance\": \"249.99\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"1.24995\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:40:29Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:40:31Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:40:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dcc72df2ab884c4882e97eaf2c23b6c0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:31Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e4c2b7f1ad724802843845063710c581\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-22T17:40:31Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_dcc72df2ab884c4882e97eaf2c23b6c0\",\n \"tracking_code\": \"9400100106068151922823\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2FjOGY3NjUzZjM2MDRjMjRiODFiNjk2YzgwZWUyYzZl\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-22T17:40:31Z\",\n \"signed_by\": null,\n \"id\": \"trk_ac8f7653f3604c24b81b696c80ee2c6e\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:40:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:40:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_c183c76b6a8c11edb081ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_dcc72df2ab884c4882e97eaf2c23b6c0\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:40:29+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:40:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_c183c76b6a8c11edb081ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-22T17:40:31Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/d059b37ddf074771b82240b53abca1da.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-22T17:40:31Z\",\n \"id\": \"pl_c6fd95d0342b4375a821808863ebf596\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-22T17:40:31Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:40:29Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:40:29Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a3c4c86f0ca94c1c8c85eb4acba551d5\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:40:29+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:40:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_c181cebd6a8c11ed8806ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:40:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dcc72df2ab884c4882e97eaf2c23b6c0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:30Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e4c2b7f1ad724802843845063710c581\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:40:30Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dcc72df2ab884c4882e97eaf2c23b6c0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:30Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_1b7754be433c489b9a2ba9f2215703bd\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:40:30Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dcc72df2ab884c4882e97eaf2c23b6c0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:30Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_049809595a94461d99d9784a571acf6b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:40:30Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_dcc72df2ab884c4882e97eaf2c23b6c0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:30Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3e9bfcd909f343b2a32fa3ddfdaa9c9d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:40:29+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:40:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_c181cebd6a8c11ed8806ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151922823\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "8183" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb9nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "632f8eb6637d098ee0ebfb41002f484a" + ], + "x-proxied": [ + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.863278" + ], + "etag": [ + "W/\"03f8f68daee6ecb3bd84eefdcb8c0c27\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_dcc72df2ab884c4882e97eaf2c23b6c0/buy" + }, + "duration": 1059 + } +] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy.json b/src/test/cassettes/shipment/buy_with_rate.json similarity index 60% rename from src/test/cassettes/shipment/buy.json rename to src/test/cassettes/shipment/buy_with_rate.json index a436f5fae..0381ea774 100644 --- a/src/test/cassettes/shipment/buy.json +++ b/src/test/cassettes/shipment/buy_with_rate.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1668466096, + "recordedAt": 1669138836, "request": { "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:15Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6cf6d116646e11edbeb3ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6cf6d116646e11edbeb3ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:15Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:15Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_307bbea2ecc54645af1dca19100e8181\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6cf51540646e11eda7eaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_87d873f591ff455e93e147cd3a2997eb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_85ca3b94a3f74269a78fa38e00f65616\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ed5a616bddeb4b9fb46bbdf386c483a7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2237a1b544834cbebd1ef53aca910054\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6cf51540646e11eda7eaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:40:35Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:40:35Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:40:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:40:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_c4eec7e36a8c11edb1f7ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6c4bb3b241c04088836f0c793c74f601\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:40:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:40:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_c4eec7e36a8c11edb1f7ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:40:35Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:40:35Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_5dfbd6a61c814c4cb9b7f4fac25b8815\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:40:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:40:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_c4eba4936a8c11edb9ccac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:40:35Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6c4bb3b241c04088836f0c793c74f601\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:35Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_65b422db71be447c9240338f11649091\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:40:35Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6c4bb3b241c04088836f0c793c74f601\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:35Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_dd7ee8a398cb4741aeb02842fdc3f1f5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:40:35Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6c4bb3b241c04088836f0c793c74f601\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:35Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2bbc3680ba92414596042f24efed118a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:40:35Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6c4bb3b241c04088836f0c793c74f601\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:35Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_60fcf14accbb43ddb327947155e9d681\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:40:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:40:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_c4eba4936a8c11edb9ccac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,30 +58,30 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "3a8b2e0b6372c5afe0d9eb840019d37f" + "80b871bb637d0992e0ebfb84002fb129" ], "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", + "extlb3wdc 29913d444b", + "intlb2wdc 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.226045" + "1.028888" ], "etag": [ - "W/\"09c0dbfaadc9c1a14de2140369372165\"" + "W/\"8e940330f97715124d4077d6237280c2\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_1308f75de89d4ca2baa6a9233f559e54" + "/api/v2/shipments/shp_6c4bb3b241c04088836f0c793c74f601" ], "x-version-label": [ - "easypost-202211142148-00c0334849-master" + "easypost-202211211953-c7d3fecdcf-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +93,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1520 + "duration": 1331 }, { - "recordedAt": 1668466098, + "recordedAt": 1669138838, "request": { - "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 14, 2022, 5:48:16 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"currency\": \"USD\",\n \"id\": \"rate_2237a1b544834cbebd1ef53aca910054\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 14, 2022, 5:48:16 PM\"\n }\n}", + "body": "{\n \"carbon_offset\": false,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 5.82,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Nov 22, 2022, 12:40:35 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.82,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"First\",\n \"shipmentId\": \"shp_6c4bb3b241c04088836f0c793c74f601\",\n \"currency\": \"USD\",\n \"id\": \"rate_60fcf14accbb43ddb327947155e9d681\",\n \"retailRate\": 5.82,\n \"updatedAt\": \"Nov 22, 2022, 12:40:35 PM\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -111,10 +111,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_1308f75de89d4ca2baa6a9233f559e54/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_6c4bb3b241c04088836f0c793c74f601/buy" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:15Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:17Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:17Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:17Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2237a1b544834cbebd1ef53aca910054\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:48:17Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"tracking_code\": \"9400100106068149680643\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE0MjdhYjVkYTFiODRiOWJiMTc3YzRhNjQxMjE1YjEy\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:17Z\",\n \"signed_by\": null,\n \"id\": \"trk_1427ab5da1b84b9bb177c4a641215b12\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6cf6d116646e11edbeb3ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6cf6d116646e11edbeb3ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:17Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/38cc80d1eeb4440e970a393c3c715b7e.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:17Z\",\n \"id\": \"pl_75de16e0915b4b24b87e64b60bdf8bfe\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:17Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:15Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:15Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_307bbea2ecc54645af1dca19100e8181\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:48:17+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6cf51540646e11eda7eaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_87d873f591ff455e93e147cd3a2997eb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_85ca3b94a3f74269a78fa38e00f65616\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ed5a616bddeb4b9fb46bbdf386c483a7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:16Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1308f75de89d4ca2baa6a9233f559e54\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:16Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2237a1b544834cbebd1ef53aca910054\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-14T22:48:15+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-14T22:48:17+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6cf51540646e11eda7eaac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680643\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:40:35Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:40:38Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:40:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6c4bb3b241c04088836f0c793c74f601\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:37Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_60fcf14accbb43ddb327947155e9d681\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-22T17:40:38Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_6c4bb3b241c04088836f0c793c74f601\",\n \"tracking_code\": \"9400100106068151922830\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzVmZGY3Y2U5MmQ1MTQzYzZiOWFlZjUwOGQ3YjY2MjA5\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-22T17:40:38Z\",\n \"signed_by\": null,\n \"id\": \"trk_5fdf7ce92d5143c6b9aef508d7b66209\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:40:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:40:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_c4eec7e36a8c11edb1f7ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6c4bb3b241c04088836f0c793c74f601\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:40:35+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:40:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_c4eec7e36a8c11edb1f7ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-22T17:40:37Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/820a1d2276e2415ab646841da5f4a7a9.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-22T17:40:38Z\",\n \"id\": \"pl_a6639cf961584126b451313bdaccd77c\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-22T17:40:37Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:40:35Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:40:35Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_5dfbd6a61c814c4cb9b7f4fac25b8815\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:40:35+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:40:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_c4eba4936a8c11edb9ccac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:40:35Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6c4bb3b241c04088836f0c793c74f601\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:35Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_65b422db71be447c9240338f11649091\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:40:35Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6c4bb3b241c04088836f0c793c74f601\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:35Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_dd7ee8a398cb4741aeb02842fdc3f1f5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:40:35Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6c4bb3b241c04088836f0c793c74f601\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:35Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2bbc3680ba92414596042f24efed118a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:40:35Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6c4bb3b241c04088836f0c793c74f601\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:40:35Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_60fcf14accbb43ddb327947155e9d681\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2022-11-22T17:40:35+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 33.8436,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -118.39177\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": false,\n \"updated_at\": \"2022-11-22T17:40:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_c4eba4936a8c11edb9ccac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151922830\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +127,7 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb6nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -154,27 +154,27 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "3a8b2e0a6372c5b1e0d9eb860019d448" + "80b871ba637d0994e0ebfb86002fb19a" ], "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb1wdc 29913d444b", + "extlb3wdc 29913d444b", + "intlb2wdc 29913d444b", "intlb1nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.834370" + "1.974214" ], "etag": [ - "W/\"0c2c9e2431c51d85a6c1df895454444c\"" + "W/\"5fbf7b29bfacfb3c99b1d15ada0f1926\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202211142148-00c0334849-master" + "easypost-202211211953-c7d3fecdcf-master" ], "cache-control": [ "private, no-cache, no-store" @@ -184,8 +184,8 @@ "code": 200, "message": "OK" }, - "uri": "https://api.easypost.com/v2/shipments/shp_1308f75de89d4ca2baa6a9233f559e54/buy" + "uri": "https://api.easypost.com/v2/shipments/shp_6c4bb3b241c04088836f0c793c74f601/buy" }, - "duration": 1123 + "duration": 2214 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/generate_form.json b/src/test/cassettes/shipment/generate_form_with.json similarity index 60% rename from src/test/cassettes/shipment/generate_form.json rename to src/test/cassettes/shipment/generate_form_with.json index 0128f1d8d..65d627388 100644 --- a/src/test/cassettes/shipment/generate_form.json +++ b/src/test/cassettes/shipment/generate_form_with.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1668466088, + "recordedAt": 1669140205, "request": { "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", "method": "POST", @@ -18,7 +18,7 @@ "uri": "https://api.easypost.com/v2/shipments" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:08Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1061ec1d5081475daebffa9d6064095f\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-14T22:48:08Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"tracking_code\": \"9400100106068149680582\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2JjMjAwN2JlZWZiNjQ3YmQ4ZjJiZmJjZGYzMjUzODVl\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:08Z\",\n \"signed_by\": null,\n \"id\": \"trk_bc2007beefb647bd8f2bfbcdf325385e\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_67ffb7e4646e11ed842bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_67ffb7e4646e11ed842bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/4f52f6917128475d889921549d75ba8b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"id\": \"pl_a97244168b07409ead3efa56e5eefced\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:07Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_43380eaf72de4e4d816f72d57784e7fe\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_67fd0057646e11edbbb7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6829c94e973146fbad8de4b222af0574\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_865a3cc353c346b68642eeb7057fbb9e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1061ec1d5081475daebffa9d6064095f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_6dfb76ef60964f12a02e96a9e7fcb7bb\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_67fd0057646e11edbbb7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680582\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T18:03:24Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T18:03:25Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T18:03:25Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:03:25Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7c54af20673e40e7b9644a31a2cf8ec1\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-22T18:03:25Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"tracking_code\": \"9400100106068151927385\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzA5MjY0Zjk5ZGFhOTRlMGVhOWIwYTM2NDMyZTBmYTBl\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-22T18:03:25Z\",\n \"signed_by\": null,\n \"id\": \"trk_09264f99daa94e0ea9b0a36432e0fa0e\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T18:03:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T18:03:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f535aa826a8f11ed9291ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T18:03:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T18:03:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f535aa826a8f11ed9291ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-22T18:03:25Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/2a8a73ac1de8436eae205b2b6122d86b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-22T18:03:25Z\",\n \"id\": \"pl_906f791c61f949a69d917b4677f7f7d6\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-22T18:03:25Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T18:03:24Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T18:03:24Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_4e2a7473e1724baaa3fff88dfb21f16b\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T18:03:24+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-22T18:03:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f53375dc6a8f11ed928fac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T18:03:24Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:03:24Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5a76aa4f034b4813a9c4bfeb707cf51d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T18:03:24Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:03:24Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_21eb7bd0f7b14ddea037c355cf8188b8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T18:03:24Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:03:24Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_7f398da1445642819ab1c060877273c7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T18:03:24Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:03:24Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7c54af20673e40e7b9644a31a2cf8ec1\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T18:03:24+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-22T18:03:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f53375dc6a8f11ed928fac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151927385\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,7 +31,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb1nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -58,30 +58,29 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "3a8b2e0f6372c5a7e0d9eb470019cf3f" + "d96d15b1637d0eece0ec8b4700370b3a" ], "x-proxied": [ - "extlb4wdc 29913d444b", - "intlb2wdc 29913d444b", + "extlb2nuq 29913d444b", "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.977210" + "0.997099" ], "etag": [ - "W/\"86a47ca5627db897afc762fabd7124b4\"" + "W/\"4d6bba65fd09748df50ae24dccbf30fe\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_194a05f44bfe47919cce864d57b9136a" + "/api/v2/shipments/shp_8ae6cac133e2403da7c9c13f7d1111c5" ], "x-version-label": [ - "easypost-202211142148-00c0334849-master" + "easypost-202211211953-c7d3fecdcf-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,12 +92,12 @@ }, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1264 + "duration": 1289 }, { - "recordedAt": 1668466089, + "recordedAt": 1669140206, "request": { - "body": "{\n \"form\": {\n \"line_items\": [\n {\n \"product\": {\n \"title\": \"Square Reader\",\n \"barcode\": \"855658003251\"\n },\n \"units\": 8.0\n }\n ],\n \"type\": \"return_packing_slip\",\n \"barcode\": \"RMA12345678900\"\n }\n}", + "body": "{\n \"form\": {\n \"type\": \"return_packing_slip\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -111,10 +110,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_194a05f44bfe47919cce864d57b9136a/forms" + "uri": "https://api.easypost.com/v2/shipments/shp_8ae6cac133e2403da7c9c13f7d1111c5/forms" }, "response": { - "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-14T22:48:08Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1061ec1d5081475daebffa9d6064095f\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-14T22:48:08Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-14T22:48:08Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-15T11:25:08Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"tracking_code\": \"9400100106068149680582\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2JjMjAwN2JlZWZiNjQ3YmQ4ZjJiZmJjZGYzMjUzODVl\",\n \"est_delivery_date\": \"2022-11-14T22:48:08Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:48:08Z\",\n \"signed_by\": null,\n \"id\": \"trk_bc2007beefb647bd8f2bfbcdf325385e\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_67ffb7e4646e11ed842bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_67ffb7e4646e11ed842bac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221114/4f52f6917128475d889921549d75ba8b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"id\": \"pl_a97244168b07409ead3efa56e5eefced\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-14T22:48:07Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_43380eaf72de4e4d816f72d57784e7fe\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_67fd0057646e11edbbb7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6829c94e973146fbad8de4b222af0574\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_865a3cc353c346b68642eeb7057fbb9e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1061ec1d5081475daebffa9d6064095f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-14T22:48:07Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_194a05f44bfe47919cce864d57b9136a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-14T22:48:07Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_6dfb76ef60964f12a02e96a9e7fcb7bb\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-14T22:48:07+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-14T22:48:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_67fd0057646e11edbbb7ac1f6bc72124\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068149680582\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [\n {\n \"mode\": \"test\",\n \"submitted_electronically\": null,\n \"updated_at\": \"2022-11-14T22:48:09Z\",\n \"form_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20221114/822b53eb3ad3412690d5fec748d5c486.pdf\",\n \"created_at\": \"2022-11-14T22:48:08Z\",\n \"id\": \"form_1e19b2fe67be4cfabe0e126136ad3087\",\n \"form_type\": \"return_packing_slip\",\n \"object\": \"Form\"\n }\n ],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T18:03:24Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T18:03:25Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T18:03:25Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:03:25Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7c54af20673e40e7b9644a31a2cf8ec1\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-22T18:03:25Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-22T18:03:25Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-23T06:40:25Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"tracking_code\": \"9400100106068151927385\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzA5MjY0Zjk5ZGFhOTRlMGVhOWIwYTM2NDMyZTBmYTBl\",\n \"est_delivery_date\": \"2022-11-22T18:03:25Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-22T18:03:25Z\",\n \"signed_by\": null,\n \"id\": \"trk_09264f99daa94e0ea9b0a36432e0fa0e\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T18:03:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T18:03:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f535aa826a8f11ed9291ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T18:03:24+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T18:03:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_f535aa826a8f11ed9291ac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-22T18:03:25Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/2a8a73ac1de8436eae205b2b6122d86b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-22T18:03:25Z\",\n \"id\": \"pl_906f791c61f949a69d917b4677f7f7d6\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-22T18:03:25Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T18:03:24Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T18:03:24Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_4e2a7473e1724baaa3fff88dfb21f16b\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T18:03:24+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-22T18:03:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f53375dc6a8f11ed928fac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T18:03:24Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:03:24Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5a76aa4f034b4813a9c4bfeb707cf51d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T18:03:24Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:03:24Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_21eb7bd0f7b14ddea037c355cf8188b8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T18:03:24Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:03:24Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_7f398da1445642819ab1c060877273c7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T18:03:24Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8ae6cac133e2403da7c9c13f7d1111c5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:03:24Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7c54af20673e40e7b9644a31a2cf8ec1\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T18:03:24+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-22T18:03:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_f53375dc6a8f11ed928fac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151927385\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [\n {\n \"mode\": \"test\",\n \"submitted_electronically\": null,\n \"updated_at\": \"2022-11-22T18:03:26Z\",\n \"form_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20221122/9f50e6603661441999fbd7bf6bdb0a38.pdf\",\n \"created_at\": \"2022-11-22T18:03:26Z\",\n \"id\": \"form_0c32b60c997d41f5b3dd0f39ad7cf36a\",\n \"form_type\": \"return_packing_slip\",\n \"object\": \"Form\"\n }\n ],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,7 +126,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb7nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -147,6 +146,9 @@ "pragma": [ "no-cache" ], + "x-canary": [ + "direct" + ], "x-content-type-options": [ "nosniff" ], @@ -154,10 +156,10 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "3a8b2e0b6372c5a8e0d9eb490019cff9" + "80b871b5637d0eede0ec8b600031d99a" ], "x-proxied": [ - "extlb4wdc 29913d444b", + "extlb3wdc 29913d444b", "intlb1wdc 29913d444b", "intlb2nuq 29913d444b" ], @@ -165,19 +167,19 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.650669" + "0.618299" ], "etag": [ - "W/\"1b28021ba0585c05643d99152705579f\"" + "W/\"3b014fcd5bd301c9efa46d2541a069ae\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "location": [ - "/api/v2/shipments/shp_194a05f44bfe47919cce864d57b9136a/forms/return_packing_slip" + "/api/v2/shipments/shp_8ae6cac133e2403da7c9c13f7d1111c5/forms/return_packing_slip" ], "x-version-label": [ - "easypost-202211142148-00c0334849-master" + "easypost-202211211953-c7d3fecdcf-master" ], "cache-control": [ "private, no-cache, no-store" @@ -187,8 +189,8 @@ "code": 201, "message": "Created" }, - "uri": "https://api.easypost.com/v2/shipments/shp_194a05f44bfe47919cce864d57b9136a/forms" + "uri": "https://api.easypost.com/v2/shipments/shp_8ae6cac133e2403da7c9c13f7d1111c5/forms" }, - "duration": 876 + "duration": 895 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/generate_form_with_option.json b/src/test/cassettes/shipment/generate_form_with_option.json new file mode 100644 index 000000000..d4ff50797 --- /dev/null +++ b/src/test/cassettes/shipment/generate_form_with_option.json @@ -0,0 +1,193 @@ +[ + { + "recordedAt": 1669140076, + "request": { + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"carrier\": \"USPS\",\n \"service\": \"First\",\n \"to_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"carrier_accounts\": [\n \"ca_f09befdb2e9c410e95c7622ea912c18c\"\n ],\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "response": { + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T18:01:16Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f422022b116c49d39917ddac24ae0ef7\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2022-11-22T18:01:16Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"tracking_code\": \"9400100106068151926982\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Y4NTU2OWRjNWYxOTRkNGVhNmYwZGRkYzQ5Njc2ZGE0\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-22T18:01:16Z\",\n \"signed_by\": null,\n \"id\": \"trk_f85569dc5f194d4ea6f0dddc49676da4\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T18:01:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T18:01:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_a81b8e826a8f11edae60ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T18:01:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T18:01:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_a81b8e826a8f11edae60ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/9af55db745e246ad93331857b340ca86.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"id\": \"pl_a7da7c3c38594261a04ad459d57be5bf\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-22T18:01:15Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_593cd261076c4ba1ae2928d28d9cae75\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T18:01:15+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-22T18:01:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_a8191f4f6a8f11edacdeac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_af8e7df8c8434f7f806a5d9a05d0bdfc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_91cf90b0732d482c8c1d908b3df8d71c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a52079c19a2f4487af057df0af63dd85\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f422022b116c49d39917ddac24ae0ef7\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T18:01:15+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-22T18:01:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_a8191f4f6a8f11edacdeac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151926982\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "7077" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb4nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "632f8eb2637d0e6be0ec87e5003169cb" + ], + "x-proxied": [ + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.080650" + ], + "etag": [ + "W/\"b6180ba8a43ea460da48c1c887e108c5\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_018d6293bb404667bc7b5f9ef222d698" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1344 + }, + { + "recordedAt": 1669140077, + "request": { + "body": "{\n \"form\": {\n \"line_items\": [\n {\n \"product\": {\n \"title\": \"Square Reader\",\n \"barcode\": \"855658003251\"\n },\n \"units\": 8.0\n }\n ],\n \"type\": \"return_packing_slip\",\n \"barcode\": \"RMA12345678900\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_018d6293bb404667bc7b5f9ef222d698/forms" + }, + "response": { + "body": "{\n \"insurance\": \"50.00\",\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"5.82000\",\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"0.25000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n }\n ],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T18:01:16Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f422022b116c49d39917ddac24ae0ef7\",\n \"object\": \"Rate\"\n },\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": {\n \"est_delivery_date_local\": null,\n \"origin_location\": \"HOUSTON TX, 77001\",\n \"destination_tracking_location\": null,\n \"guaranteed_delivery_date\": null,\n \"est_delivery_time_local\": null,\n \"service\": \"First-Class Package Service\",\n \"container_type\": null,\n \"initial_delivery_attempt\": null,\n \"origin_tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"destination_location\": \"CHARLESTON SC, 29401\",\n \"alternate_identifier\": null,\n \"object\": \"CarrierDetail\"\n },\n \"created_at\": \"2022-11-22T18:01:16Z\",\n \"weight\": null,\n \"tracking_details\": [\n {\n \"tracking_location\": {\n \"zip\": null,\n \"country\": null,\n \"city\": null,\n \"state\": null,\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-22T18:01:16Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Pre-Shipment Info Sent to USPS\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2022-10-23T06:38:16Z\",\n \"description\": null,\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": null\n }\n ],\n \"shipment_id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"tracking_code\": \"9400100106068151926982\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Y4NTU2OWRjNWYxOTRkNGVhNmYwZGRkYzQ5Njc2ZGE0\",\n \"est_delivery_date\": \"2022-11-22T18:01:16Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-22T18:01:16Z\",\n \"signed_by\": null,\n \"id\": \"trk_f85569dc5f194d4ea6f0dddc49676da4\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T18:01:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T18:01:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_a81b8e826a8f11edae60ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T18:01:15+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T18:01:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_a81b8e826a8f11edae60ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": {\n \"label_resolution\": 300.0,\n \"date_advance\": 0.0,\n \"label_size\": \"4x6\",\n \"integrated_form\": \"none\",\n \"label_pdf_url\": null,\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20221122/9af55db745e246ad93331857b340ca86.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"id\": \"pl_a7da7c3c38594261a04ad459d57be5bf\",\n \"label_zpl_url\": null,\n \"label_date\": \"2022-11-22T18:01:15Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_593cd261076c4ba1ae2928d28d9cae75\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T18:01:15+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-22T18:01:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_a8191f4f6a8f11edacdeac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_af8e7df8c8434f7f806a5d9a05d0bdfc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_91cf90b0732d482c8c1d908b3df8d71c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a52079c19a2f4487af057df0af63dd85\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T18:01:15Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_018d6293bb404667bc7b5f9ef222d698\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T18:01:15Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f422022b116c49d39917ddac24ae0ef7\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2022-11-22T18:01:15+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": 37.77551,\n \"time_zone\": \"America/Los_Angeles\",\n \"longitude\": -122.39697\n },\n \"errors\": []\n },\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": []\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": true,\n \"updated_at\": \"2022-11-22T18:01:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_a8191f4f6a8f11edacdeac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100106068151926982\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [\n {\n \"mode\": \"test\",\n \"submitted_electronically\": null,\n \"updated_at\": \"2022-11-22T18:01:17Z\",\n \"form_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20221122/f5961cb40a704cffafc25c4c53a2c93f.pdf\",\n \"created_at\": \"2022-11-22T18:01:17Z\",\n \"id\": \"form_078ca8af154a47bf8120801e449cbadd\",\n \"form_type\": \"return_packing_slip\",\n \"object\": \"Form\"\n }\n ],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "8545" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb3nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "d96d15b4637d0e6ce0ec87e70036b5ab" + ], + "x-proxied": [ + "extlb2nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.704276" + ], + "etag": [ + "W/\"81ab00c50d0a9c4248bbf73b924c83bd\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_018d6293bb404667bc7b5f9ef222d698/forms/return_packing_slip" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_018d6293bb404667bc7b5f9ef222d698/forms" + }, + "duration": 1077 + } +] \ No newline at end of file diff --git a/src/test/cassettes/shipment/get_lowest_smartrate.json b/src/test/cassettes/shipment/get_lowest_smartrate.json new file mode 100644 index 000000000..0659c435c --- /dev/null +++ b/src/test/cassettes/shipment/get_lowest_smartrate.json @@ -0,0 +1,187 @@ +[ + { + "recordedAt": 1669139844, + "request": { + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "response": { + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:57:23Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:57:24Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:57:23+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:57:23+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_1e3b6ba16a8f11eda9c9ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_504d2df7adbd4800a7393efbf1167985\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:57:23+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:57:23+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_1e3b6ba16a8f11eda9c9ac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:57:23Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:57:23Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f3ada1d2a2eb4bc8906bc45c7845ad39\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:57:23+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:57:23+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_1e3908ac6a8f11eda9c7ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:57:24Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_504d2df7adbd4800a7393efbf1167985\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:57:24Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b9d1136c07d74e38a08db19c79ae1e8b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:57:24Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_504d2df7adbd4800a7393efbf1167985\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:57:24Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4f8d1c0d6d824bcfa298d1eb76373a3b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:57:24Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_504d2df7adbd4800a7393efbf1167985\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:57:24Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0fe8699f3b8c4fb8828668263a124a3b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:57:24Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_504d2df7adbd4800a7393efbf1167985\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:57:24Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6c1ebf715cc74bd897dd13b58d95e7e8\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:57:23+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:57:23+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_1e3908ac6a8f11eda9c7ac1f6b0a0d1e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "5972" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb8nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "632f8eb3637d0d83e0ec7f02003100e3" + ], + "x-proxied": [ + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.968067" + ], + "etag": [ + "W/\"db98798828a561eebda8c3540b2393b7\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_504d2df7adbd4800a7393efbf1167985" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1249 + }, + { + "recordedAt": 1669139845, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_504d2df7adbd4800a7393efbf1167985/smartrate" + }, + "response": { + "body": "{\n \"result\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 29.75,\n \"created_at\": \"2022-11-22T17:57:24Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_504d2df7adbd4800a7393efbf1167985\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 33.85,\n \"updated_at\": \"2022-11-22T17:57:24Z\",\n \"rate\": 29.75,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 3.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 4.0,\n \"percentile_99\": 6.0\n },\n \"service\": \"Express\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_b9d1136c07d74e38a08db19c79ae1e8b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.0,\n \"created_at\": \"2022-11-22T17:57:24Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_504d2df7adbd4800a7393efbf1167985\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 8.0,\n \"updated_at\": \"2022-11-22T17:57:24Z\",\n \"rate\": 8.0,\n \"time_in_transit\": {\n \"percentile_90\": 4.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 3.0,\n \"percentile_95\": 6.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 7.0,\n \"percentile_99\": 10.0\n },\n \"service\": \"ParcelSelect\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4f8d1c0d6d824bcfa298d1eb76373a3b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.15,\n \"created_at\": \"2022-11-22T17:57:24Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_504d2df7adbd4800a7393efbf1167985\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.75,\n \"updated_at\": \"2022-11-22T17:57:24Z\",\n \"rate\": 8.15,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 4.0,\n \"percentile_99\": 5.0\n },\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0fe8699f3b8c4fb8828668263a124a3b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 5.82,\n \"created_at\": \"2022-11-22T17:57:24Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_504d2df7adbd4800a7393efbf1167985\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 5.82,\n \"updated_at\": \"2022-11-22T17:57:24Z\",\n \"rate\": 5.82,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 3.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 5.0,\n \"percentile_99\": 9.0\n },\n \"service\": \"First\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6c1ebf715cc74bd897dd13b58d95e7e8\",\n \"object\": \"Rate\"\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2619" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb11nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "d96d15b6637d0d85e0ec7f03003618e7" + ], + "x-proxied": [ + "extlb2nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.085587" + ], + "etag": [ + "W/\"7dc48c58c7de0761785e00b0db11f826\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_504d2df7adbd4800a7393efbf1167985/smartrate" + }, + "duration": 360 + } +] \ No newline at end of file diff --git a/src/test/cassettes/shipment/get_smartrate_list.json b/src/test/cassettes/shipment/get_smartrate_list.json new file mode 100644 index 000000000..d875c5273 --- /dev/null +++ b/src/test/cassettes/shipment/get_smartrate_list.json @@ -0,0 +1,186 @@ +[ + { + "recordedAt": 1669139628, + "request": { + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "response": { + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-11-22T17:53:47Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-11-22T17:53:48Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:53:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:53:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_9d01c59f6a8e11ed9afbac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_492b552c763b46af95fc88a5037eaf28\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-22T17:53:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:53:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_9d01c59f6a8e11ed9afbac1f6bc7bdc6\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-11-22T17:53:47Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-11-22T17:53:47Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f6dc4845f89440cd893d6486298df158\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:53:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:53:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_9cff7a5e6a8e11eda25fac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-11-22T17:53:48Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_492b552c763b46af95fc88a5037eaf28\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:53:48Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_0d4a02e12a174ffea2ad04bbcd0488da\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-11-22T17:53:48Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_492b552c763b46af95fc88a5037eaf28\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:53:48Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3f1665c973d24e8bb4090fb86339dbfb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-11-22T17:53:48Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_492b552c763b46af95fc88a5037eaf28\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:53:48Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b82aacca3f00447ebba5c7b43b6dd5f9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-11-22T17:53:48Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_492b552c763b46af95fc88a5037eaf28\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-11-22T17:53:48Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b9fe72e3e883448b8c4b3b10ab9f6a00\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-11-22T17:53:47+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-22T17:53:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_9cff7a5e6a8e11eda25fac1f6bc7b362\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "5972" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb3nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "816b7d7b637d0caae0ec7ae3003762c7" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.164741" + ], + "etag": [ + "W/\"3c2882d3506284a4b583a47ec5a8323f\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_492b552c763b46af95fc88a5037eaf28" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1443 + }, + { + "recordedAt": 1669139628, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_492b552c763b46af95fc88a5037eaf28/smartrate" + }, + "response": { + "body": "{\n \"result\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 29.75,\n \"created_at\": \"2022-11-22T17:53:48Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_492b552c763b46af95fc88a5037eaf28\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 33.85,\n \"updated_at\": \"2022-11-22T17:53:48Z\",\n \"rate\": 29.75,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 3.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 4.0,\n \"percentile_99\": 6.0\n },\n \"service\": \"Express\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_0d4a02e12a174ffea2ad04bbcd0488da\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.0,\n \"created_at\": \"2022-11-22T17:53:48Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_492b552c763b46af95fc88a5037eaf28\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 8.0,\n \"updated_at\": \"2022-11-22T17:53:48Z\",\n \"rate\": 8.0,\n \"time_in_transit\": {\n \"percentile_90\": 4.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 3.0,\n \"percentile_95\": 6.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 7.0,\n \"percentile_99\": 10.0\n },\n \"service\": \"ParcelSelect\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3f1665c973d24e8bb4090fb86339dbfb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.15,\n \"created_at\": \"2022-11-22T17:53:48Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_492b552c763b46af95fc88a5037eaf28\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.75,\n \"updated_at\": \"2022-11-22T17:53:48Z\",\n \"rate\": 8.15,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 4.0,\n \"percentile_99\": 5.0\n },\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b82aacca3f00447ebba5c7b43b6dd5f9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 5.82,\n \"created_at\": \"2022-11-22T17:53:48Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_492b552c763b46af95fc88a5037eaf28\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 5.82,\n \"updated_at\": \"2022-11-22T17:53:48Z\",\n \"rate\": 5.82,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 3.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 5.0,\n \"percentile_99\": 9.0\n },\n \"service\": \"First\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b9fe72e3e883448b8c4b3b10ab9f6a00\",\n \"object\": \"Rate\"\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2619" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb4nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "d96d15b3637d0cace0ec7ae40035910f" + ], + "x-proxied": [ + "extlb2nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.179227" + ], + "etag": [ + "W/\"e6b03fb6b7443b98474644a26d239ec3\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211211953-c7d3fecdcf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_492b552c763b46af95fc88a5037eaf28/smartrate" + }, + "duration": 439 + } +] \ No newline at end of file diff --git a/src/test/java/com/easypost/BatchTest.java b/src/test/java/com/easypost/BatchTest.java index 0c21e5a3c..0497fc0c1 100644 --- a/src/test/java/com/easypost/BatchTest.java +++ b/src/test/java/com/easypost/BatchTest.java @@ -8,6 +8,7 @@ import org.junit.jupiter.api.Test; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -174,13 +175,13 @@ public void testCreateScanForm() throws EasyPostException, InterruptedException } /** - * Test adding and removing a shipment from a batch. + * Test adding and removing a shipment from a batch with map. * * @throws EasyPostException when the request fails. */ @Test - public void testAddRemoveShipment() throws EasyPostException { - vcr.setUpTest("add_remove_shipment"); + public void testAddRemoveShipmentWithMap() throws EasyPostException { + vcr.setUpTest("add_remove_shipment_with_map"); Shipment shipment = vcr.client.shipment.create(Fixtures.oneCallBuyShipment()); @@ -201,6 +202,28 @@ public void testAddRemoveShipment() throws EasyPostException { assertEquals(0, batchWithoutShipment.getNumShipments().intValue()); } + /** + * Test adding and removing a shipment from a batch with list. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testAddRemoveShipentWithList() throws EasyPostException { + vcr.setUpTest("add_remove_shipment_with_list"); + + Shipment shipment = vcr.client.shipment.create(Fixtures.oneCallBuyShipment()); + Batch batch = vcr.client.batch.create(); + List shipmentData = Arrays.asList(shipment); + + Batch batchWithAddedShipment = vcr.client.batch.addShipments(batch.getId(), shipmentData); + + assertEquals(1, batchWithAddedShipment.getNumShipments().intValue()); + + Batch batchWithoutShipment = vcr.client.batch.removeShipments(batch.getId(), shipmentData); + + assertEquals(0, batchWithoutShipment.getNumShipments().intValue()); + } + /** * Test generating a label for a Batch. * diff --git a/src/test/java/com/easypost/BillingTest.java b/src/test/java/com/easypost/BillingTest.java index 999484f9b..f79e8ede1 100644 --- a/src/test/java/com/easypost/BillingTest.java +++ b/src/test/java/com/easypost/BillingTest.java @@ -1,16 +1,30 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.http.Constant; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.PaymentMethod; +import com.easypost.model.PaymentMethodObject; + +import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.mockito.MockedStatic; +import org.mockito.Mockito; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertNotNull; public final class BillingTest { private static TestUtils.VCR vcr; + private String jsonResponse = "{\"id\":\"cust_...\",\"object\":\"PaymentMethods\",\"primary_" + + "payment_method\":{\"id\":\"card_...\",\"disabled_at\":null,\"object\":\"CreditCard\",\"na" + + "me\":null,\"last4\":\"4242\",\"exp_month\":1,\"exp_year\":2025,\"brand\":\"Visa\"},\"secondar" + + "y_payment_method\":{\"id\":\"card_...\",\"disabled_at\":null,\"object\":\"CreditCard\",\"name\":nu" + + "ll,\"last4\":\"4444\",\"exp_month\":1,\"exp_year\":2025,\"brand\":\"Mastercard\"}}"; + private PaymentMethod paymentMethod = Constant.GSON.fromJson(jsonResponse, PaymentMethod.class); + private static MockedStatic requestMock = Mockito.mockStatic(Requestor.class); /** * Setup the testing environment for this file. @@ -22,17 +36,38 @@ public static void setup() throws EasyPostException { vcr = new TestUtils.VCR("billing", TestUtils.ApiKey.PRODUCTION); } + /** + * Release the static mock once it has been used. + */ + @AfterAll + public static void cleanup() { + requestMock.close(); + } + /** * Test deleting a payment method. * * @throws EasyPostException when the request fails. */ @Test - @Disabled // Skipping due to the lack of an available real payment method in tests. public void testDeletePaymentMethod() throws EasyPostException { - vcr.setUpTest("delete_payment_method"); + String retrieveUrl = String.format("%s/%s/%s", vcr.client.getApiBase(), vcr.client.getApiVersion(), + "payment_methods"); + requestMock.when( + () -> Requestor.request(RequestMethod.GET, retrieveUrl, null, PaymentMethod.class, vcr.client)) + .thenReturn(paymentMethod); + + PaymentMethodObject paymentMethodObject = vcr.client.billing.retrievePaymentMethods() + .getSecondaryPaymentMethod(); - assertDoesNotThrow(() -> vcr.client.billing.deletePaymentMethod(PaymentMethod.Priority.PRIMARY)); + String deletePaymentUrl = String.format("%s/%s/%s/%s", vcr.client.getApiBase(), vcr.client.getApiVersion(), + paymentMethodObject.getEndpoint(), paymentMethodObject.getId()); + + requestMock.when( + () -> Requestor.request(RequestMethod.GET, deletePaymentUrl, null, PaymentMethod.class, vcr.client)) + .thenReturn(null); + + assertDoesNotThrow(() -> vcr.client.billing.deletePaymentMethod(PaymentMethod.Priority.SECONDARY)); } /** @@ -41,11 +76,24 @@ public void testDeletePaymentMethod() throws EasyPostException { * @throws EasyPostException when the request fails. */ @Test - @Disabled // Skipping due to the lack of an available real payment method in tests. public void testFundWallet() throws EasyPostException { - vcr.setUpTest("fund_wallet"); + String retrieveUrl = String.format("%s/%s/%s", vcr.client.getApiBase(), vcr.client.getApiVersion(), + "payment_methods"); + requestMock.when( + () -> Requestor.request(RequestMethod.GET, retrieveUrl, null, PaymentMethod.class, vcr.client)) + .thenReturn(paymentMethod); + + PaymentMethodObject paymentMethodObject = vcr.client.billing.retrievePaymentMethods() + .getPrimaryPaymentMethod(); - assertDoesNotThrow(() -> vcr.client.billing.fundWallet("2000", PaymentMethod.Priority.PRIMARY)); + String fundWalletUrl = String.format("%s/%s/%s/%s/%s", vcr.client.getApiBase(), vcr.client.getApiVersion(), + paymentMethodObject.getEndpoint(), paymentMethodObject.getId(), "charges"); + + requestMock.when( + () -> Requestor.request(RequestMethod.GET, fundWalletUrl, null, PaymentMethod.class, vcr.client)) + .thenReturn(paymentMethod); + + assertDoesNotThrow(() -> vcr.client.billing.fundWallet("2000")); } /** @@ -54,9 +102,11 @@ public void testFundWallet() throws EasyPostException { * @throws EasyPostException when the request fails. */ @Test - @Disabled // Skipping due to having to manually add and remove a payment method from the account. public void testRetrievePaymentMethods() throws EasyPostException { - vcr.setUpTest("retrieve_payment_methods"); + String url = String.format("%s/%s/%s", vcr.client.getApiBase(), vcr.client.getApiVersion(), "payment_methods"); + + requestMock.when(() -> Requestor.request(RequestMethod.GET, url, null, PaymentMethod.class, vcr.client)) + .thenReturn(paymentMethod); PaymentMethod paymentMethods = vcr.client.billing.retrievePaymentMethods(); diff --git a/src/test/java/com/easypost/OrderTest.java b/src/test/java/com/easypost/OrderTest.java index a7b7c6af6..7fe370895 100644 --- a/src/test/java/com/easypost/OrderTest.java +++ b/src/test/java/com/easypost/OrderTest.java @@ -96,13 +96,13 @@ public void testGetRates() throws EasyPostException { } /** - * Test buying an Order. + * Test buying an Order with params. * * @throws EasyPostException when the request fails. */ @Test - public void testBuy() throws EasyPostException, InterruptedException { - vcr.setUpTest("buy"); + public void testBuyWithParams() throws EasyPostException, InterruptedException { + vcr.setUpTest("buy_with_params"); Order order = createBasicOrder(); @@ -120,6 +120,48 @@ public void testBuy() throws EasyPostException, InterruptedException { } } + /** + * Test buying an Order with rate. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testBuyWithRate() throws EasyPostException, InterruptedException { + vcr.setUpTest("buy_with_rate"); + + Order order = createBasicOrder(); + + Order boughtOrder = vcr.client.order.buy(order.getId(), order.lowestRate()); + + List shipments = boughtOrder.getShipments(); + + assertInstanceOf(Order.class, order); + for (Shipment shipment : shipments) { + assertNotNull(shipment.getPostageLabel()); + } + } + + /** + * Test getting new rates of a order. + * + * @throws EasyPostException + */ + @Test + public void testNewRate() throws EasyPostException { + vcr.setUpTest("new_rate"); + + Order order = createBasicOrder(); + + Order orderWithNewRate = vcr.client.order.newRates(order.getId()); + + List rates = orderWithNewRate.getRates(); + + assertInstanceOf(List.class, rates); + for (Rate rate : rates) { + assertInstanceOf(Rate.class, rate); + } + } + /** * Test getting the lowest rate of an Order. * @@ -132,14 +174,14 @@ public void testLowestRate() throws EasyPostException { Order order = createBasicOrder(); // Test lowest rate with no filters - Rate lowestRate = vcr.client.order.lowestRate(order); + Rate lowestRate = order.lowestRate(); assertEquals("First", lowestRate.getService()); assertEquals(5.82, lowestRate.getRate(), 0.01); assertEquals("USPS", lowestRate.getCarrier()); // Test lowest rate with service filter (this rate is higher than the lowest but should filter) List services = new ArrayList<>(Arrays.asList("Priority")); - Rate lowestRateService = vcr.client.order.lowestRate(null, services, order); + Rate lowestRateService = order.lowestRate(null, services); assertEquals("Priority", lowestRateService.getService()); assertEquals(8.15, lowestRateService.getRate(), 0.01); assertEquals("USPS", lowestRateService.getCarrier()); @@ -147,7 +189,7 @@ public void testLowestRate() throws EasyPostException { // Test lowest rate with carrier filter (should error due to bad carrier) List carriers = new ArrayList<>(Arrays.asList("BAD CARRIER")); assertThrows(EasyPostException.class, () -> { - vcr.client.order.lowestRate(carriers, null, order); + order.lowestRate(carriers, null); }); } } diff --git a/src/test/java/com/easypost/PaymentMethodTest.java b/src/test/java/com/easypost/PaymentMethodTest.java new file mode 100644 index 000000000..d45eae8e9 --- /dev/null +++ b/src/test/java/com/easypost/PaymentMethodTest.java @@ -0,0 +1,39 @@ +package com.easypost; + +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import com.easypost.exception.EasyPostException; +import com.easypost.model.PaymentMethod; + +public class PaymentMethodTest { + private static TestUtils.VCR vcr; + + /** + * Set up the testing environment for this file. + * + * @throws EasyPostException when the request fails. + */ + @BeforeAll + public static void setup() throws EasyPostException { + vcr = new TestUtils.VCR("payment_method", TestUtils.ApiKey.PRODUCTION); + } + + /** + * Test retrieving all payment methods. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testAll() throws EasyPostException { + vcr.setUpTest("all"); + + PaymentMethod paymentMethod = vcr.client.paymentMethod.all(); + + assertInstanceOf(PaymentMethod.class, paymentMethod); + assertTrue(paymentMethod.getId().startsWith("cust_")); + } +} diff --git a/src/test/java/com/easypost/PickupTest.java b/src/test/java/com/easypost/PickupTest.java index 605faec4a..13834641f 100644 --- a/src/test/java/com/easypost/PickupTest.java +++ b/src/test/java/com/easypost/PickupTest.java @@ -91,11 +91,26 @@ public void testBuy() throws EasyPostException, InterruptedException { Pickup pickup = createBasicPickup(); - Map params = new HashMap<>(); - params.put("carrier", Fixtures.usps()); - params.put("service", Fixtures.pickupService()); + Pickup boughtPickup = vcr.client.pickup.buy(pickup.getId()); - Pickup boughtPickup = vcr.client.pickup.buy(pickup.getId(), params); + assertInstanceOf(Pickup.class, boughtPickup); + assertTrue(boughtPickup.getId().startsWith("pickup_")); + assertNotNull(boughtPickup.getConfirmation()); + assertEquals("scheduled", boughtPickup.getStatus()); + } + + /** + * Test buying a pickup with lowest rate. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testBuyWithRate() throws EasyPostException { + vcr.setUpTest("buy_with_rate"); + + Pickup pickup = createBasicPickup(); + + Pickup boughtPickup = vcr.client.pickup.buy(pickup.getId(), pickup.lowestRate()); assertInstanceOf(Pickup.class, boughtPickup); assertTrue(boughtPickup.getId().startsWith("pickup_")); @@ -138,7 +153,7 @@ public void testLowestRate() throws EasyPostException { Pickup pickup = createBasicPickup(); // Test lowest rate with no filters - PickupRate lowestRate = vcr.client.pickup.lowestRate(pickup); + PickupRate lowestRate = pickup.lowestRate(); assertEquals("NextDay", lowestRate.getService()); assertEquals(0.00, lowestRate.getRate(), 0.01); assertEquals("USPS", lowestRate.getCarrier()); @@ -146,13 +161,13 @@ public void testLowestRate() throws EasyPostException { // Test lowest rate with service filter (should error due to bad service) List services = new ArrayList<>(Arrays.asList("BAD SERVICE")); assertThrows(EasyPostException.class, () -> { - vcr.client.pickup.lowestRate(null, services, pickup); + pickup.lowestRate(null, services); }); // Test lowest rate with carrier filter (should error due to bad carrier) List carriers = new ArrayList<>(Arrays.asList("BAD CARRIER")); assertThrows(EasyPostException.class, () -> { - vcr.client.pickup.lowestRate(carriers, null, pickup); + pickup.lowestRate(carriers, null); }); } } diff --git a/src/test/java/com/easypost/ReferralTest.java b/src/test/java/com/easypost/ReferralTest.java index c358cb820..1802cdc4f 100644 --- a/src/test/java/com/easypost/ReferralTest.java +++ b/src/test/java/com/easypost/ReferralTest.java @@ -1,10 +1,12 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.ExternalApiError; import com.easypost.model.PaymentMethod; import com.easypost.model.PaymentMethodObject; import com.easypost.model.ReferralCustomer; import com.easypost.model.ReferralCustomerCollection; + import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -17,6 +19,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; public final class ReferralTest { @@ -32,6 +35,11 @@ public static void setup() throws EasyPostException { vcr = new TestUtils.VCR("referral", TestUtils.ApiKey.PARTNER); } + /** + * Return the referral user key from the system environment. + * + * @return Referral user key. + */ private static String referralUserKey() { return TestUtils.getApiKey(TestUtils.ApiKey.REFERRAL); } @@ -117,4 +125,17 @@ public void testReferralAddCreditCard() throws Exception { assertTrue(creditCard.getId().startsWith("card_")); assertEquals(((String) Fixtures.creditCardDetails().get("number")).substring(12), creditCard.getLast4()); } + + /** + * Test creating bad Stripe token with invalid input parameters. + * + * @throws Exception when the request fails. + */ + @Test + public void testCreateBadStripeToken() throws Exception { + vcr.setUpTest("create_bad_stripe_token"); + + assertThrows(ExternalApiError.class, () -> vcr.client.referralCustomer.addCreditCardToUser(referralUserKey(), + "1234", 1234, 1234, "1234", PaymentMethod.Priority.PRIMARY)); + } } diff --git a/src/test/java/com/easypost/ReportTest.java b/src/test/java/com/easypost/ReportTest.java index 2ace607fa..40658fc03 100644 --- a/src/test/java/com/easypost/ReportTest.java +++ b/src/test/java/com/easypost/ReportTest.java @@ -1,6 +1,7 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.InvalidObjectError; import com.easypost.model.Report; import com.easypost.model.ReportCollection; import org.junit.jupiter.api.BeforeAll; @@ -209,4 +210,19 @@ public void testAllNoType() throws EasyPostException { // so we'll just check fo a generic exception assertThrows(Exception.class, () -> vcr.client.report.all(params)); } + + /** + * Test creating a report without type. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateReportWithoutType() throws EasyPostException { + Map reportParams = new HashMap<>(); + + reportParams.put("start_date", Fixtures.reportDate()); + reportParams.put("end_date", Fixtures.reportDate()); + + assertThrows(InvalidObjectError.class, () -> vcr.client.report.create(reportParams)); + } } diff --git a/src/test/java/com/easypost/ShipmentTest.java b/src/test/java/com/easypost/ShipmentTest.java index 43de56cfb..4d4ad02af 100644 --- a/src/test/java/com/easypost/ShipmentTest.java +++ b/src/test/java/com/easypost/ShipmentTest.java @@ -1,6 +1,7 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.InvalidParameterError; import com.easypost.model.Address; import com.easypost.model.EndShipper; import com.easypost.model.Fee; @@ -42,6 +43,15 @@ public static void setup() throws EasyPostException { vcr = new TestUtils.VCR("shipment", TestUtils.ApiKey.TEST); } + /** + * Create a basic shipment. + * + * @return Shipment object + */ + private static Shipment createBasicShipment() throws EasyPostException { + return vcr.client.shipment.create(Fixtures.basicShipment()); + } + /** * Test creating a shipment. * @@ -109,13 +119,13 @@ public void testAll() throws EasyPostException { } /** - * Test buying a shipment. + * Test buying a shipment with lowest rate. * * @throws EasyPostException when the request fails. */ @Test - public void testBuy() throws EasyPostException { - vcr.setUpTest("buy"); + public void testBuyWithRate() throws EasyPostException { + vcr.setUpTest("buy_with_rate"); Shipment shipment = createBasicShipment(); @@ -125,12 +135,22 @@ public void testBuy() throws EasyPostException { } /** - * Create a basic shipment. + * Test buying a shipment with params. * - * @return Shipment object + * @throws EasyPostException when the request fails. */ - private static Shipment createBasicShipment() throws EasyPostException { - return vcr.client.shipment.create(Fixtures.basicShipment()); + @Test + public void testBuyWithParams() throws EasyPostException { + vcr.setUpTest("buy_with_params"); + + Shipment shipment = createBasicShipment(); + HashMap buyMap = new HashMap(); + buyMap.put("rate", shipment.lowestRate()); + buyMap.put("insurance", 249.99); + + Shipment boughtShipment = vcr.client.shipment.buy(shipment.getId(), buyMap); + + assertNotNull(boughtShipment.getPostageLabel()); } /** @@ -169,7 +189,7 @@ public void testConvertLabel() throws EasyPostException { Map params = new HashMap<>(); params.put("file_format", "ZPL"); - Shipment shipmentWithLabel = vcr.client.shipment.label(params, shipment.getId()); + Shipment shipmentWithLabel = vcr.client.shipment.label(shipment.getId(), params); assertNotNull(shipmentWithLabel.getPostageLabel().getLabelZplUrl()); } @@ -207,7 +227,7 @@ public void testInsure() throws EasyPostException { Shipment shipment = vcr.client.shipment.create(shipmentData); - Shipment shipmentWithInsurance = vcr.client.shipment.insure(insuranceData, shipment.getId()); + Shipment shipmentWithInsurance = vcr.client.shipment.insure(shipment.getId(), insuranceData); assertEquals("100.00", shipmentWithInsurance.getInsurance()); } @@ -260,6 +280,9 @@ public void testSmartRate() throws EasyPostException { assertNotNull(smartRate.getTimeInTransit().getPercentile95()); assertNotNull(smartRate.getTimeInTransit().getPercentile97()); assertNotNull(smartRate.getTimeInTransit().getPercentile99()); + + assertThrows(InvalidParameterError.class, + () -> smartRate.getTimeInTransit().getSmartRateAccuracy("percentile_100")); } /** @@ -403,6 +426,59 @@ public void testInstanceLowestSmartRate() throws EasyPostException { assertThrows(EasyPostException.class, () -> { vcr.client.shipment.lowestSmartRate(shipment.getId(), 0, SmartrateAccuracy.Percentile90); }); + + Smartrate deprecatedLowestSmartRateFilters = vcr.client.shipment.lowestSmartRate(shipment.getId(), 2, + "percentile_90"); + + // Test lowest smartrate with valid filters + assertEquals("Priority", deprecatedLowestSmartRateFilters.getService()); + assertEquals(8.15, deprecatedLowestSmartRateFilters.getRate(), 0.01); + assertEquals("USPS", deprecatedLowestSmartRateFilters.getCarrier()); + + // Test lowest smartrate with invalid filters (should error due to strict + // delivery days) + assertThrows(EasyPostException.class, () -> { + vcr.client.shipment.lowestSmartRate(shipment.getId(), 0, SmartrateAccuracy.Percentile90); + }); + } + + /** + * Test getting smart rates for a shipment. + * + * @throws EasyPostException + */ + @Test + public void testGetSmartRate() throws EasyPostException { + vcr.setUpTest("get_smartrate_list"); + + Shipment shipment = createBasicShipment(); + + List rates = vcr.client.shipment.getSmartrates(shipment.getId()); + + assertInstanceOf(List.class, rates); + + for (Smartrate rate: rates) { + assertInstanceOf(Smartrate.class, rate); + } + } + + /** + * Test retriving lowest smart rate. + * + * @throws EasyPostException + */ + @Test + public void testGetLowestSmartRate() throws EasyPostException { + vcr.setUpTest("get_lowest_smartrate"); + + Shipment shipment = createBasicShipment(); + + List rates = vcr.client.shipment.getSmartrates(shipment.getId()); + Smartrate lowestSmartrate = vcr.client.shipment.getLowestSmartRate(rates, 3, "percentile_85"); + + assertEquals("First", lowestSmartrate.getService()); + assertEquals(5.82, lowestSmartrate.getRate(), 0.01); + assertEquals("USPS", lowestSmartrate.getCarrier()); } /** @@ -438,7 +514,29 @@ public void testStaticLowestSmartRates() throws EasyPostException { */ @Test public void testGenerateForm() throws EasyPostException { - vcr.setUpTest("generate_form"); + vcr.setUpTest("generate_form_with"); + + Shipment shipment = createOneCallBuyShipment(); + String formType = "return_packing_slip"; + + Shipment shipmentWithForm = vcr.client.shipment.generateForm(formType, shipment.getId()); + + assertTrue(shipmentWithForm.getForms().size() > 0); + + Form form = shipmentWithForm.getForms().get(0); + + assertEquals(formType, form.getFormType()); + assertTrue(form.getFormUrl() != null); + } + + /** + * Test generating a form from a shipment with option. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGenerateFormWithOption() throws EasyPostException { + vcr.setUpTest("generate_form_with_option"); Shipment shipment = createOneCallBuyShipment(); String formType = "return_packing_slip"; @@ -552,13 +650,13 @@ public void testRegenerateRatesWithCarbonOffset() throws EasyPostException { } /** - * Test buying a shipment with an EndShipper ID. + * Test buying a shipment with an EndShipper ID with lowest rate. * * @throws EasyPostException when the request fails. */ @Test - public void testBuyShipmentWithEndShipperId() throws EasyPostException { - vcr.setUpTest("buy_shipment_with_end_shipper_id"); + public void testBuyShipmentWithEndShipperIdWithRate() throws EasyPostException { + vcr.setUpTest("buy_shipment_with_end_shipper_id_with_rate"); EndShipper endShipper = vcr.client.endShipper.create(Fixtures.caAddress1()); @@ -567,4 +665,25 @@ public void testBuyShipmentWithEndShipperId() throws EasyPostException { assertNotNull(boughtShipment.getPostageLabel()); } + + /** + * Test buying a shipment with an EndShipper ID with params. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testBuyShipmentWithEndShipperId() throws EasyPostException { + vcr.setUpTest("buy_shipment_with_end_shipper_id_with_rate_with_params"); + + EndShipper endShipper = vcr.client.endShipper.create(Fixtures.caAddress1()); + + Shipment shipment = vcr.client.shipment.create(Fixtures.basicShipment()); + HashMap buyMap = new HashMap(); + buyMap.put("rate", shipment.lowestRate()); + buyMap.put("insurance", 249.99); + + Shipment boughtShipment = vcr.client.shipment.buy(shipment.getId(), buyMap, endShipper.getId()); + + assertNotNull(boughtShipment.getPostageLabel()); + } } diff --git a/src/test/java/com/easypost/UserTest.java b/src/test/java/com/easypost/UserTest.java index da49b55f1..110320661 100644 --- a/src/test/java/com/easypost/UserTest.java +++ b/src/test/java/com/easypost/UserTest.java @@ -1,6 +1,7 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.FilteringError; import com.easypost.model.ApiKey; import com.easypost.model.ApiKeys; import com.easypost.model.Brand; @@ -17,6 +18,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; public final class UserTest { @@ -171,6 +173,10 @@ public void testAllApiKeys() throws EasyPostException { ApiKeys apikeys = vcr.client.apikeys.all(); assertInstanceOf(ApiKeys.class, apikeys); + + List apiKeys = vcr.client.user.apiKeys(apikeys.getId()); + + assertNotNull(apiKeys); } /** @@ -185,7 +191,10 @@ public void testApiKeys() throws EasyPostException { User user = createUser(); List apiKeys = vcr.client.user.apiKeys(user.getId()); + assertNotNull(apiKeys); + + assertThrows(FilteringError.class, () -> vcr.client.user.apiKeys("invlaid_id")); } /** From 68e75c51cbac4c0246ef51c295723c5b0434a156 Mon Sep 17 00:00:00 2001 From: jchen293 Date: Wed, 30 Nov 2022 12:03:01 -0500 Subject: [PATCH 024/208] Add content to upgrade guide for v6 major bump (#208) --- UPGRADE_GUIDE.md | 153 +++++++++++++++++- .../{General => API}/ExternalApiError.java | 2 +- .../service/ReferralCustomerService.java | 2 +- src/test/java/com/easypost/ReferralTest.java | 2 +- 4 files changed, 151 insertions(+), 8 deletions(-) rename src/main/java/com/easypost/exception/{General => API}/ExternalApiError.java (88%) diff --git a/UPGRADE_GUIDE.md b/UPGRADE_GUIDE.md index 370b617ac..d3b70bfba 100644 --- a/UPGRADE_GUIDE.md +++ b/UPGRADE_GUIDE.md @@ -2,22 +2,165 @@ Use the following guide to assist in the upgrade process of the `easypost-java` library between major versions. -* [Upgrading from 4.x to 5.0](#upgrading-from-4x-to-50) +- [Upgrading from 5.x to 6.0](#upgrading-from-5x-to-60) +- [Upgrading from 4.x to 5.0](#upgrading-from-4x-to-50) + +## Upgrading from 5.x to 6.0 + +### 6.0 High Impact Changes + +- [Client Instance](#60-client-instance) +- [Error Types](#60-error-types) +- [Empty Response Function Return Types](#60-empty-response-function-return-types) +- [Services and Resources](#60-services-and-resources) + +### 6.0 Medium Impact Changes + +- [Removal of Setters](#60-removal-of-setters) +- [Rename Some Getters](#60-rename-some-getters) + +### 6.0 Low Impact Changes + +- [Type Changes](#60-type-changes) + +## 6.0 Client Instance + +*Likelihood of Impact: **High*** + +The library is now designed around the idea of a `EasyPostClient`. Users will initialize an `EasyPostClient` instance with their API key and then use that instance to make API calls. + +This change allows for multiple clients to be instantiated with different API keys which allows this library to be safely used in a multi-threaded environment. + +```java +// Old +EasyPost.apiKey = System.getenv("EASYPOST_API_KEY"); // global API key + +// New +EasyPostClient client1 = new EasyPostClient("EASYPOST_API_KEY_1"); // per-client API key +EasyPostClient client2 = new EasyPostClient("EASYPOST_API_KEY_2"); // per-client API key +``` + +All functions are now accessed via the `EasyPostClient` instance. For example, to create a shipment: + +```java +// Old +EasyPost.apiKey = System.getenv("EASYPOST_API_KEY"); +Shipment shipment = Shipment.create(shipmentMap); + +// New +EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY_1"); +Shipment shipment = client.shipment.create(shipmentMap); +``` + +## 6.0 Error Types + +*Likelihood of Impact: **High*** + +Error handling has been overhauled and a number of specific exception types have been introduced. + +All exceptions inherit from `EasyPost.Exception.EasyPostException` (which extends `Java Exception` class). Users can catch this exception type to handle all errors thrown by the library. + +Subclasses of `EasyPostException` are grouped into two categories: + +- `EasyPost.Exception.API` for errors returned by the API. Subclasses of this exception type are: + - `ExternalApiError` - thrown when an issue occurs with an external API (e.g. Stripe) + - `ForbiddenError` - thrown when you don't have permission to access this API resource + - `GatewayTimeoutError` - thrown when the API gateway times out (504 status code) + - `InternalServerError` - thrown when an internal server error occurs (500 status code) + - `InvalidRequestError` - thrown when the API received an invalid request (422 status code) + - `MethodNotAllowedError` - thrown when the API receives a request with an invalid HTTP method ( + 405 status code) + - `NotFoundError` - thrown when the API receives a request for a resource that does not exist ( + 404 status code) + - `PaymentError` - thrown when a payment error occurs (402 status code) + - `ProxyError` - thrown when the library is unable to connect to the API via a proxy + - `RateLimitError` - thrown when the API rate limit is exceeded (429 status code) + - `RedirectError` - thrown when the http status is between 300 and 308. + - `ServiceUnavailableError` - thrown when the API is unavailable (503 status code) + - `TimeoutError` - thrown when the API request times out (408 status code) + - `UnauthorizedError` - thrown when the API receives an unauthorized request (401 or 403 status + code) + - `UnknownApiError` - thrown when an unknown API error occurs (unexpected 4xx status code) +- `EasyPost.Exception.General` for Generic error returned by the client library. Subclasses of this exception type are: + - `FilteringError` - thrown when an error occurs during filtering (e.g. calculating lowest rate) + - `InvalidObjectError` - thrown when an invalid object is being used + - `InvalidParameterError` - thrown when an invalid parameter is being used + - `MissingPropertyError` - thrown when a required property is missing (e.g. `Id` for most objects) + - `SignatureVerificationError` - thrown when the signature for a webhook is invalid + +Any exception thrown by the EasyPost library will be one of the above types. + +Any `EasyPost.Exception.API` exception will have the following properties: + +- `String Code` - the HTTP status code returned by the API call (e.g. 404) +- `String Message` - the error message returned by the API (e.g. "PARAMETER.INVALID") +- `List Errors` - a list of errors returned by the API (e.g. "Invalid parameter: to_address") + +Users can better anticipate exception information through utilities in the `EasyPost.Exception.Constants` file. + +## 6.0 Empty Response Function Return Types + +*Likelihood of Impact: **High*** + +The following functions return an empty body from the API have been changed to return void. + +- `fundWallet()` and `deletePaymentMethod()` in Billing class +- `createList()` in Tracker class +- `updateEmail()` in ReferralCustomer class + +## 6.0 Services and Resources + +*Likelihood of Impact: **High*** + +Static and instance-based methods have been divided into separate services and resources, methods that have API interactions are in services now. + +For example: + +- The static method `Shipment.buy()` is now accessible in the Shipment service via `client.shipment.buy("shp_...")`. +- The instance method `myShipment.lowestRate()` is still accessible only via a Shipment instance because there is no API interaction. +- The instance method of `refresh()` has been removed because you can no longer use an object to make a HTTP request. + +Instances of an object cannot be initialized directly. Instead, use the service to create the instance via a `create`, `retrieve`, or `all` API call. + +## 6.0 Removal of Setters + +*Likelihood of Impact: **Medium*** + +Objects no longer have setters. The use case of the setter is extremely low, but if you need to use the setter for a specific reason, try to use `reflection` in Java. + +## 6.0 Rename Some Getters + +*Likelihood of Impact: **Medium*** + +The following getters have been renamed: + +- Pickup class: `getPickoutRates()` -> `getPickupRates()` +- PaymentMethod class: `getPrimaryPaymentMethodObject()` -> `getPrimaryPaymentMethod()` +- PaymentMethod class: `getSecondaryPaymentMethodObject()` -> `getSecondaryPaymentMethod()` + +## 6.0 Type Changes + +*Likelihood of Impact: **Low*** + +The following properties have changed types: + +- `result` of Event from `EasyPostResource` to `Map` +- `amount` of Insurance from `Float` to `String` ## Upgrading from 4.x to 5.0 ### 5.0 High Impact Changes -* [Updating Dependencies](#50-updating-dependencies) -* [JSON Encoded Bodies](#50-json-encoded-bodies) +- [Updating Dependencies](#50-updating-dependencies) +- [JSON Encoded Bodies](#50-json-encoded-bodies) ### 5.0 Medium Impact Changes -* [Default Timeouts for HTTP Requests](#50-default-timeouts-for-http-requests) +- [Default Timeouts for HTTP Requests](#50-default-timeouts-for-http-requests) ### 5.0 Low Impact Changes -* [Removal of Item and Container Objects](#50-removal-of-item-and-container-objects) +- [Removal of Item and Container Objects](#50-removal-of-item-and-container-objects) ## 5.0 Updating Dependencies diff --git a/src/main/java/com/easypost/exception/General/ExternalApiError.java b/src/main/java/com/easypost/exception/API/ExternalApiError.java similarity index 88% rename from src/main/java/com/easypost/exception/General/ExternalApiError.java rename to src/main/java/com/easypost/exception/API/ExternalApiError.java index 14d32fe6f..d08db164d 100644 --- a/src/main/java/com/easypost/exception/General/ExternalApiError.java +++ b/src/main/java/com/easypost/exception/API/ExternalApiError.java @@ -1,4 +1,4 @@ -package com.easypost.exception.General; +package com.easypost.exception.API; import com.easypost.exception.EasyPostException; diff --git a/src/main/java/com/easypost/service/ReferralCustomerService.java b/src/main/java/com/easypost/service/ReferralCustomerService.java index 83c7bf42a..8a96ecb6a 100644 --- a/src/main/java/com/easypost/service/ReferralCustomerService.java +++ b/src/main/java/com/easypost/service/ReferralCustomerService.java @@ -2,7 +2,7 @@ import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; -import com.easypost.exception.General.ExternalApiError; +import com.easypost.exception.API.ExternalApiError; import com.easypost.http.Constant; import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; diff --git a/src/test/java/com/easypost/ReferralTest.java b/src/test/java/com/easypost/ReferralTest.java index 1802cdc4f..d254752c3 100644 --- a/src/test/java/com/easypost/ReferralTest.java +++ b/src/test/java/com/easypost/ReferralTest.java @@ -1,7 +1,7 @@ package com.easypost; import com.easypost.exception.EasyPostException; -import com.easypost.exception.General.ExternalApiError; +import com.easypost.exception.API.ExternalApiError; import com.easypost.model.PaymentMethod; import com.easypost.model.PaymentMethodObject; import com.easypost.model.ReferralCustomer; From 3aa26ac6a18820192081d3815d3ba3fe1e3e1c60 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Wed, 30 Nov 2022 10:18:58 -0700 Subject: [PATCH 025/208] chore: prepare v6.0.0-rc1 for release --- CHANGELOG.md | 34 +++++++++++++++++++--------------- README.md | 4 ++-- VERSION | 2 +- pom.xml | 4 ++-- 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0be2aa819..f80b27e60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,14 @@ # CHANGELOG -## V6 (Next release) +## v6.0.0-rc1 (2022-11-30) + +### Breaking Changes - Library is now thread-safe - - Initialize a `EasyPostClient` object with an API key, connection and readtime milliseconds are optional, otherwise it will be set to default. - - All methods (i.e. `create`, `retrieve`, retrieve `all` of a resource) exist in services, accessed via property of the client + - Initialize an `EasyPostClient` object with an API key. Optionally set connection and readtime params + - All methods (i.e. `create`, `retrieve`, `all`) exist in services, accessed via property of the client (eg: `client.shipment.create()`) - E.g. Static method -> `Shipment shipment = client.address.create(params)` - - E.g. Instance method -> `Shipment boughtShipment = client.shipment.buy(shipmentID, lowestRate)` + - E.g. Instance methods are now static -> `Shipment boughtShipment = client.shipment.buy(shipmentID, lowestRate)` - All functions are now taking object ID instead of an object, which means the functions are returning the response value directly instead of updating the current object - E.g. `Shipment boughtShipment = client.shipment.buy(shipmentID, lowestRate)` - Improves error exception handling @@ -14,28 +16,30 @@ - API error message may be an array rather than a string. Arrays will be concatenated (by comma) and returned as a string. - Removes `createAndVerifyWithCarrier` function - Removes `verifyWithCarrier` function -- Changes the type of Insurance `Amount` from Float to String - Removes `getUpdate` and `setUpdate` from Tracker class - Removes all beta features and corrsponding unit tests - Removes `serviceCode` from `Rate` class since this value is internal use only -- Converts return type from boolean to void in empty response body functions - - `fundWallet()` and `deletePaymentMethod()` in Billing class - - `createList()` in Tracker class - - `updateEmail()` in ReferralCustomer class -- Adds two missing attributes in the Event class: `pendingUrls` and `completedUrls` -- Changes the type `result` of Event from `EasyPostResource` to `Map` -- AppEngine default timeout is now the same as connection timeout - Removes invalid function `User.create()` since creating a child-user requires a name - Removes deprecated class `CreditCard` and its associated classes `PrimaryPaymentMethod`, `SecondaryPaymentMethod`, and `BaseCreditCard`, please use alternative `Billing` class - Removes all the setters of each object -- Setters are now available via lombok and aren't explicitly in the code anymore +- Removes the `refresh()` function in all classes, please use `retrieve()` function instead +- Removes invalid functions that allow users to make an API request without providing required parameters +- Changes the type of Insurance `Amount` from Float to String - Changes the type `hasMore` in ReferralCustomerCollection from `boolean` to `Boolean` - Renames some getters - Pickup class: `getPickoutRates()` -> `getPickupRates()` - PaymentMethod class: `getPrimaryPaymentMethodObject()` -> `getPrimaryPaymentMethod()` - PaymentMethod class: `getSecondaryPaymentMethodObject()` -> `getSecondaryPaymentMethod()` -- Removes the `refresh()` function in all classes, please use `retrieve()` function instead -- Removes invalid functions that allow users to make an API request without providing required parameters +- Converts return type from a boolean to void when we receive an empty response body from the API + - `fundWallet()` and `deletePaymentMethod()` in Billing class + - `createList()` in Tracker class + - `updateEmail()` in ReferralCustomer class +- Changes the type `result` of Event from `EasyPostResource` to `Map` + +### Bug Fixes + +- Adds two missing attributes in the Event class: `pendingUrls` and `completedUrls` +- AppEngine default timeout is now the same as connection timeout ## v5.10.0 (2022-09-21) diff --git a/README.md b/README.md index 2cdd0dd60..0e535bcff 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this to your project's POM: com.easypost easypost-api-client - 5.10.0 + 6.0.0-rc1 ``` @@ -25,7 +25,7 @@ Add this to your project's POM: Add this to your project's build file: ```groovy -implementation "com.easypost:easypost-api-client:5.10.0" +implementation "com.easypost:easypost-api-client:6.0.0-rc1" ``` **NOTE:** [Google Gson](http://code.google.com/p/google-gson/) is required. diff --git a/VERSION b/VERSION index 509b0b618..3f76b8391 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.10.0 +6.0.0-rc1 diff --git a/pom.xml b/pom.xml index d89e3f9b0..a58242e80 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.easypost easypost-api-client - 5.10.0 + 6.0.0-rc1 jar com.easypost:easypost-api-client @@ -41,7 +41,7 @@ mockito-inline 4.6.1 test - + com.google.code.gson gson From d59d91f1fca629c2dec710bbcab04fad10382e67 Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Wed, 30 Nov 2022 17:20:19 -0700 Subject: [PATCH 026/208] Move Constants to top-level (#211) - Move Constants to top-level - Fix docstrings --- CHANGELOG.md | 5 + .../exception/Constants.ErrorCode.html | 2 +- docs/com/easypost/exception/Constants.html | 2 +- .../class-use/Constants.ErrorCode.html | 6 +- .../exception/class-use/Constants.html | 6 +- src/main/java/com/easypost/Constants.java | 75 +++++++++++ .../com/easypost/exception/Constants.java | 33 ----- src/main/java/com/easypost/http/Constant.java | 30 ----- .../java/com/easypost/http/Requestor.java | 124 +++++++++--------- .../com/easypost/model/EasyPostResource.java | 12 +- .../com/easypost/model/ErrorDeserializer.java | 4 +- .../com/easypost/model/SmartrateAccuracy.java | 4 +- .../com/easypost/model/TimeInTransit.java | 4 +- .../com/easypost/service/BillingService.java | 6 +- .../com/easypost/service/EasyPostClient.java | 19 ++- .../service/PaymentMethodService.java | 4 +- .../service/ReferralCustomerService.java | 7 +- .../com/easypost/service/ReportService.java | 6 +- .../com/easypost/service/ShipmentService.java | 10 +- .../com/easypost/service/UserService.java | 4 +- .../com/easypost/service/WebhookService.java | 9 +- .../java/com/easypost/utils/Utilities.java | 4 +- .../error/invalid_address_verification.json | 95 ++++++++++++++ src/test/java/com/easypost/BillingTest.java | 3 +- src/test/java/com/easypost/ErrorTest.java | 3 +- src/test/java/com/easypost/ThreadTest.java | 3 +- 26 files changed, 292 insertions(+), 188 deletions(-) create mode 100644 src/main/java/com/easypost/Constants.java delete mode 100644 src/main/java/com/easypost/exception/Constants.java delete mode 100644 src/main/java/com/easypost/http/Constant.java create mode 100644 src/test/cassettes/error/invalid_address_verification.json diff --git a/CHANGELOG.md b/CHANGELOG.md index f80b27e60..76793bd52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## Next Release + +- [CHANGED] All constants are now defined in the top-level `Constants` class (`com.easypost.Constants`). + - Users who are utilizing the constants for exception message parsing should account for the new namespace. + ## v6.0.0-rc1 (2022-11-30) ### Breaking Changes diff --git a/docs/com/easypost/exception/Constants.ErrorCode.html b/docs/com/easypost/exception/Constants.ErrorCode.html index 5dbd778d4..770bfd651 100644 --- a/docs/com/easypost/exception/Constants.ErrorCode.html +++ b/docs/com/easypost/exception/Constants.ErrorCode.html @@ -73,7 +73,7 @@

      Class Constants.ErrorCode

      java.lang.Object -
      com.easypost.exception.Constants.ErrorCode
      +
      com.easypost.Constants.ErrorCode
      diff --git a/docs/com/easypost/exception/Constants.html b/docs/com/easypost/exception/Constants.html index 7823554a1..075a68545 100644 --- a/docs/com/easypost/exception/Constants.html +++ b/docs/com/easypost/exception/Constants.html @@ -73,7 +73,7 @@

      Class Constants

    • java.lang.Object -
      com.easypost.exception.Constants
      +
      com.easypost.Constants

      diff --git a/docs/com/easypost/exception/class-use/Constants.ErrorCode.html b/docs/com/easypost/exception/class-use/Constants.ErrorCode.html index 3b7aa1212..f6c397410 100644 --- a/docs/com/easypost/exception/class-use/Constants.ErrorCode.html +++ b/docs/com/easypost/exception/class-use/Constants.ErrorCode.html @@ -3,7 +3,7 @@ -Uses of Class com.easypost.exception.Constants.ErrorCode (com.easypost:easypost-api-client 5.10.0 API) +Uses of Class com.easypost.Constants.ErrorCodes (com.easypost:easypost-api-client 5.10.0 API) @@ -53,9 +53,9 @@
      -

      Uses of Class
      com.easypost.exception.Constants.ErrorCode

      +

      Uses of Class
      com.easypost.Constants.ErrorCodes

      -No usage of com.easypost.exception.Constants.ErrorCode
      +No usage of com.easypost.Constants.ErrorCodes

      diff --git a/docs/com/easypost/exception/class-use/Constants.html b/docs/com/easypost/exception/class-use/Constants.html index fd936ba71..7b87509f3 100644 --- a/docs/com/easypost/exception/class-use/Constants.html +++ b/docs/com/easypost/exception/class-use/Constants.html @@ -3,7 +3,7 @@ -Uses of Class com.easypost.exception.Constants (com.easypost:easypost-api-client 5.10.0 API) +Uses of Class com.easypost.Constants (com.easypost:easypost-api-client 5.10.0 API) @@ -53,9 +53,9 @@
      -

      Uses of Class
      com.easypost.exception.Constants

      +

      Uses of Class
      com.easypost.Constants

      -No usage of com.easypost.exception.Constants
      +No usage of com.easypost.Constants

      diff --git a/src/main/java/com/easypost/Constants.java b/src/main/java/com/easypost/Constants.java new file mode 100644 index 000000000..d785d455f --- /dev/null +++ b/src/main/java/com/easypost/Constants.java @@ -0,0 +1,75 @@ +package com.easypost; + +import com.easypost.http.HashMapSerializer; +import com.easypost.model.Error; +import com.easypost.model.ErrorDeserializer; +import com.easypost.model.SmartrateCollection; +import com.easypost.model.SmartrateCollectionDeserializer; +import com.google.gson.FieldNamingPolicy; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +public abstract class Constants { + + public static final String EASYPOST_SUPPORT_EMAIL = "support@easypost.com"; + + public abstract static class ErrorMessages { + public static final String EXTERNAL_API_CALL_FAILED = + "Could not send card details to %s, please try again later"; + public static final String ENCODED_ERROR = "Encode error for %s"; + public static final String INVALID_API_KEY_TYPE = "Invalid API key type."; + public static final String INVALID_PARAMETER = "Invalid parameter: %s."; + public static final String INVALID_PAYMENT = + "The chosen payment method is not a credit card. Please try again."; + public static final String INVALID_WEBHOOK_SIGNATURE = "Webhook does not contain a valid HMAC signature."; + public static final String MISSING_REQUIRED_PARAMETER = "Missing required parameter: %s."; + public static final String NO_OBJECT_FOUND = "No %s found."; + public static final String NO_PAYMENT_METHODS = + "No payment methods are set up. Please add a payment method and try again."; + public static final String API_DID_NOT_RETURN_ERROR_DETAILS = "API did not return error details."; + public static final String WEBHOOK_DOES_NOT_MATCH = + "Webhook received did not originate from EasyPost or had a webhook secret mismatch."; + } + + public abstract static class ErrorCodes { + public static final int REDIRECT_CODE_BEGIN = 300; + public static final int REDIRECT_CODE_END = 308; + public static final int UNAUTHORIZED_ERROR = 401; + public static final int PAYMENT_ERROR = 402; + public static final int FORBIDDEN_ERROR = 403; + public static final int NOT_FOUND_ERROR = 404; + public static final int METHOD_NOT_ALLOWED_ERROR = 405; + public static final int TIMEOUT_ERROR = 408; + public static final int INVALID_REQUEST_ERROR = 422; + public static final int RATE_LIMIT_ERROR = 429; + public static final int INTERNAL_SERVER_ERROR = 500; + public static final int SERVICE_UNAVAILABLE_ERROR = 503; + public static final int GATEWAY_TIMEOUT_ERROR = 504; + } + + public abstract static class CarrierAccountTypes { + public static final List CARRIER_TYPES_WITH_CUSTOM_WORKFLOW = new ArrayList() {{ + add("FedexAccount"); + add("UpsAccount"); + }}; + } + + public abstract static class Http { + public static final String API_BASE = "https://api.easypost.com"; + public static final String CHARSET = "UTF-8"; + public static final int DEFAULT_CONNECT_TIMEOUT_MILLISECONDS = 30000; + public static final int DEFAULT_READ_TIMEOUT_MILLISECONDS = 60000; + + public static final Gson GSON = + new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) + .registerTypeAdapter(HashMap.class, new HashMapSerializer()) + .registerTypeAdapter(SmartrateCollection.class, new SmartrateCollectionDeserializer()) + .registerTypeAdapter(Error.class, new ErrorDeserializer()).create(); + public static final Gson PRETTY_PRINT_GSON = new GsonBuilder().setPrettyPrinting().serializeNulls() + .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create(); + } +} diff --git a/src/main/java/com/easypost/exception/Constants.java b/src/main/java/com/easypost/exception/Constants.java deleted file mode 100644 index ae4b17b5c..000000000 --- a/src/main/java/com/easypost/exception/Constants.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.easypost.exception; - -public abstract class Constants { - public static final String EXTERNAL_API_CALL_FAILED = "Could not send card details to %s, please try again later"; - public static final String ENCODED_ERROR = "Encode error for %s"; - public static final String INVALID_API_KEY_TYPE = "Invalid API key type."; - public static final String INVALID_PARAMETER = "Invalid parameter: %s."; - public static final String INVALID_PAYMENT = "The chosen payment method is not a credit card. Please try again."; - public static final String INVALID_WEBHOOK_SIGNATURE = "Webhook does not contain a valid HMAC signature."; - public static final String MISSING_REQUIRED_PARAMETER = "Missing required parameter: %s."; - public static final String NO_OBJECT_FOUND = "No %s found."; - public static final String NO_PAYMENT_METHODS = - "No payment methods are set up. Please add a payment method and try again."; - public static final String API_DID_NOT_RETURN_ERROR_DETAILS = "API did not return error details."; - public static final String WEBHOOK_DOES_NOT_MATCH = - "Webhook received did not originate from EasyPost or had a webhook secret mismatch."; - - public abstract class ErrorCode { - public static final int REDIRECT_CODE_BEGIN = 300; - public static final int REDIRECT_CODE_END = 308; - public static final int UNAUTHORIZED_ERROR = 401; - public static final int PAYMENT_ERROR = 402; - public static final int FORBIDDEN_ERROR = 403; - public static final int NOT_FOUND_ERROR = 404; - public static final int METHOD_NOT_ALLOWED_ERROR = 405; - public static final int TIMEOUT_ERROR = 408; - public static final int INVALID_REQUEST_ERROR = 422; - public static final int RATE_LIMIT_ERROR = 429; - public static final int INTERNAL_SERVER_ERROR = 500; - public static final int SERVICE_UNAVAILABLE_ERROR = 503; - public static final int GATEWAY_TIMEOUT_ERROR = 504; - } -} diff --git a/src/main/java/com/easypost/http/Constant.java b/src/main/java/com/easypost/http/Constant.java deleted file mode 100644 index 6e164ee67..000000000 --- a/src/main/java/com/easypost/http/Constant.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.easypost.http; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; - -import com.easypost.model.Error; -import com.easypost.model.ErrorDeserializer; -import com.easypost.model.SmartrateCollection; -import com.easypost.model.SmartrateCollectionDeserializer; -import com.google.gson.FieldNamingPolicy; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - -public abstract class Constant { - public static final String API_BASE = "https://api.easypost.com"; - public static final String CHARSET = "UTF-8"; - public static final int DEFAULT_CONNECT_TIMEOUT_MILLISECONDS = 30000; - public static final int DEFAULT_READ_TIMEOUT_MILLISECONDS = 60000; - public static final String EASYPOST_SUPPORT_EMAIL = "support@easypost.com"; - public static final ArrayList GLOBAL_FIELD_ACCESSORS = new ArrayList<>( - Arrays.asList("getCreatedAt", "getUpdatedAt", "getFees")); - public static final Gson GSON = new GsonBuilder() - .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) - .registerTypeAdapter(HashMap.class, new HashMapSerializer()) - .registerTypeAdapter(SmartrateCollection.class, new SmartrateCollectionDeserializer()) - .registerTypeAdapter(Error.class, new ErrorDeserializer()).create(); - public static final Gson PRETTY_PRINT_GSON = new GsonBuilder().setPrettyPrinting().serializeNulls() - .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create(); -} diff --git a/src/main/java/com/easypost/http/Requestor.java b/src/main/java/com/easypost/http/Requestor.java index 85f552238..16e72d192 100644 --- a/src/main/java/com/easypost/http/Requestor.java +++ b/src/main/java/com/easypost/http/Requestor.java @@ -9,7 +9,7 @@ package com.easypost.http; import com.easypost.EasyPost; -import com.easypost.exception.Constants; +import com.easypost.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.API.ForbiddenError; import com.easypost.exception.API.GatewayTimeoutError; @@ -63,25 +63,26 @@ public enum RequestMethod { private static final String CUSTOM_URL_STREAM_HANDLER_PROPERTY_NAME = "com.easypost.net.customURLStreamHandler"; private static String urlEncodePair(final String key, final String value) throws UnsupportedEncodingException { - return String.format("%s=%s", - URLEncoder.encode(key, Constant.CHARSET), URLEncoder.encode(value, Constant.CHARSET)); + return String.format("%s=%s", URLEncoder.encode(key, Constants.Http.CHARSET), + URLEncoder.encode(value, Constants.Http.CHARSET)); } /** * Set the header of the HTTP request. - * + * * @param apiKey API of this HTTP request. * @return HTTP header * @throws MissingParameterError */ static Map generateHeaders(String apiKey) throws MissingParameterError { Map headers = new HashMap(); - headers.put("Accept-Charset", Constant.CHARSET); - headers.put("User-Agent", String.format("EasyPost/v2 JavaClient/%s Java/%s OS/%s OSVersion/%s OSArch/%s " + - "Implementation/%s", EasyPost.VERSION, System.getProperty("java.version"), - convertSpaceToHyphen(System.getProperty("os.name")), System.getProperty("os.version"), - convertSpaceToHyphen(System.getProperty("os.arch")), - convertSpaceToHyphen(System.getProperties().getProperty("java.vm.name")))); + headers.put("Accept-Charset", Constants.Http.CHARSET); + headers.put("User-Agent", + String.format("EasyPost/v2 JavaClient/%s Java/%s OS/%s OSVersion/%s OSArch/%s " + "Implementation/%s", + EasyPost.VERSION, System.getProperty("java.version"), + convertSpaceToHyphen(System.getProperty("os.name")), System.getProperty("os.version"), + convertSpaceToHyphen(System.getProperty("os.arch")), + convertSpaceToHyphen(System.getProperties().getProperty("java.vm.name")))); headers.put("Authorization", String.format("Bearer %s", apiKey)); @@ -109,16 +110,16 @@ private static String convertSpaceToHyphen(String string) { * @throws MissingParameterError */ private static javax.net.ssl.HttpsURLConnection createEasyPostConnection(final String url, - final EasyPostClient client, - final String method) throws IOException, MissingParameterError { + final EasyPostClient client, + final String method) + throws IOException, MissingParameterError { HttpsURLConnection conn = null; String customURLStreamHandlerClassName = System.getProperty(CUSTOM_URL_STREAM_HANDLER_PROPERTY_NAME, null); if (customURLStreamHandlerClassName != null) { // instantiate the custom handler provided try { - @SuppressWarnings("unchecked") - Class clazz = (Class) Class - .forName(customURLStreamHandlerClassName); + @SuppressWarnings ("unchecked") Class clazz = + (Class) Class.forName(customURLStreamHandlerClassName); Constructor constructor = clazz.getConstructor(); URLStreamHandler customHandler = constructor.newInstance(); URL urlObj = new URL(null, url, customHandler); @@ -169,7 +170,7 @@ private static javax.net.ssl.HttpsURLConnection createEasyPostConnection(final S * @throws IOException */ private static javax.net.ssl.HttpsURLConnection writeBody(final javax.net.ssl.HttpsURLConnection conn, - final JsonObject body) throws IOException { + final JsonObject body) throws IOException { if (body != null) { conn.setDoOutput(true); conn.setRequestProperty("Content-Type", "application/json"); @@ -177,7 +178,7 @@ private static javax.net.ssl.HttpsURLConnection writeBody(final javax.net.ssl.Ht try { output = conn.getOutputStream(); String jsonString = body.toString(); - output.write(jsonString.getBytes(Constant.CHARSET)); + output.write(jsonString.getBytes(Constants.Http.CHARSET)); } finally { if (output != null) { output.close(); @@ -198,7 +199,8 @@ private static javax.net.ssl.HttpsURLConnection writeBody(final javax.net.ssl.Ht * @throws MissingParameterError */ private static javax.net.ssl.HttpsURLConnection createGetConnection(final String url, final String query, - final EasyPostClient client) throws IOException, MissingParameterError { + final EasyPostClient client) + throws IOException, MissingParameterError { String getURL = url; if (query != null) { getURL = String.format("%s?%s", url, query); @@ -218,7 +220,8 @@ private static javax.net.ssl.HttpsURLConnection createGetConnection(final String * @throws MissingParameterError */ private static javax.net.ssl.HttpsURLConnection createPostConnection(final String url, final JsonObject body, - final EasyPostClient client) throws IOException, MissingParameterError { + final EasyPostClient client) + throws IOException, MissingParameterError { javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(url, client, "POST"); conn = writeBody(conn, body); return conn; @@ -235,7 +238,8 @@ private static javax.net.ssl.HttpsURLConnection createPostConnection(final Strin * @throws MissingParameterError */ private static javax.net.ssl.HttpsURLConnection createDeleteConnection(final String url, final String query, - final EasyPostClient client) throws IOException, MissingParameterError { + final EasyPostClient client) + throws IOException, MissingParameterError { String deleteUrl = url; if (query != null) { deleteUrl = String.format("%s?%s", url, query); @@ -255,7 +259,8 @@ private static javax.net.ssl.HttpsURLConnection createDeleteConnection(final Str * @throws MissingParameterError */ private static javax.net.ssl.HttpsURLConnection createPutConnection(final String url, final JsonObject body, - final EasyPostClient client) throws IOException, MissingParameterError { + final EasyPostClient client) + throws IOException, MissingParameterError { javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(url, client, "PUT"); conn = writeBody(conn, body); return conn; @@ -271,7 +276,7 @@ private static JsonObject createBody(final Map params) { // this is a hack to fix a broken concept: // https://github.com/google/gson/issues/1080 // noinspection rawtypes,unchecked - JsonElement jsonElement = Constant.GSON.toJsonTree(new HashMap<>(params)); + JsonElement jsonElement = Constants.Http.GSON.toJsonTree(new HashMap<>(params)); JsonObject jsonObject = jsonElement.getAsJsonObject(); return jsonObject; } @@ -342,8 +347,8 @@ private static String getResponseBody(final InputStream responseStream) throws I return ""; } - @SuppressWarnings("resource") - String rBody = new Scanner(responseStream, Constant.CHARSET).useDelimiter("\\A").next(); + @SuppressWarnings ("resource") String rBody = + new Scanner(responseStream, Constants.Http.CHARSET).useDelimiter("\\A").next(); responseStream.close(); return rBody; } @@ -359,10 +364,9 @@ private static String getResponseBody(final InputStream responseStream) throws I * @return EasyPostResponse object. * @throws EasyPostException */ - private static EasyPostResponse makeURLConnectionRequest(final RequestMethod method, - final String url, final String query, - final JsonObject body, final EasyPostClient client) - throws EasyPostException { + private static EasyPostResponse makeURLConnectionRequest(final RequestMethod method, final String url, + final String query, final JsonObject body, + final EasyPostClient client) throws EasyPostException { javax.net.ssl.HttpsURLConnection conn = null; try { switch (method) { @@ -381,7 +385,7 @@ private static EasyPostResponse makeURLConnectionRequest(final RequestMethod met default: throw new EasyPostException( String.format("Unrecognized HTTP method %s. Please contact EasyPost at %s.", method, - Constant.EASYPOST_SUPPORT_EMAIL)); + Constants.EASYPOST_SUPPORT_EMAIL)); } conn.connect(); // This line is crucial for getting VCR to work // (triggers internal pre-request processing needed for VCR) @@ -398,7 +402,7 @@ private static EasyPostResponse makeURLConnectionRequest(final RequestMethod met } catch (IOException e) { throw new EasyPostException(String.format("Could not connect to EasyPost (%s). " + "Please check your internet connection and try again. If this problem persists," + - "please contact us at %s.", client.getApiBase(), Constant.EASYPOST_SUPPORT_EMAIL), e); + "please contact us at %s.", client.getApiBase(), Constants.EASYPOST_SUPPORT_EMAIL), e); } finally { if (conn != null) { conn.disconnect(); @@ -415,13 +419,11 @@ private static EasyPostResponse makeURLConnectionRequest(final RequestMethod met * @param params The params of the API request. * @param clazz The class of the object for deserialization * @param client The EasyPostClient object. - * * @return A class object. * @throws EasyPostException when the request fails. */ - public static T request(final RequestMethod method, String url, - final Map params, final Class clazz, final EasyPostClient client) - throws EasyPostException { + public static T request(final RequestMethod method, String url, final Map params, + final Class clazz, final EasyPostClient client) throws EasyPostException { String originalDNSCacheTTL = null; boolean allowedToSetTTL = true; url = String.format(url, client.getApiBase(), client.getApiVersion()); @@ -457,14 +459,12 @@ public static T request(final RequestMethod method, String url, * @param params The params of the API request. * @param clazz The class of the object for deserialization * @param client The EasyPostClient object. - * * @return A class object. * @throws EasyPostException when the request fails. */ - @SuppressWarnings("checkstyle:methodname") - protected static T httpRequest(final RequestMethod method, final String url, - final Map params, final Class clazz, final EasyPostClient client) - throws EasyPostException { + @SuppressWarnings ("checkstyle:methodname") + protected static T httpRequest(final RequestMethod method, final String url, final Map params, + final Class clazz, final EasyPostClient client) throws EasyPostException { String query = null; JsonObject body = null; if (params != null) { @@ -476,8 +476,7 @@ protected static T httpRequest(final RequestMethod method, final String url, } catch (UnsupportedEncodingException e) { throw new EasyPostException( String.format("Unable to encode parameters to %s. Please email %s for assistance.", - Constant.CHARSET, Constant.EASYPOST_SUPPORT_EMAIL), - e); + Constants.Http.CHARSET, Constants.EASYPOST_SUPPORT_EMAIL), e); } break; case POST: @@ -487,7 +486,7 @@ protected static T httpRequest(final RequestMethod method, final String url, } catch (Exception e) { throw new EasyPostException(String.format( "Unable to create JSON body from parameters. Please email %s for assistance.", - Constant.EASYPOST_SUPPORT_EMAIL), e); + Constants.EASYPOST_SUPPORT_EMAIL), e); } break; default: @@ -514,7 +513,7 @@ protected static T httpRequest(final RequestMethod method, final String url, handleAPIError(rBody, rCode); } - return Constant.GSON.fromJson(rBody, clazz); + return Constants.Http.GSON.fromJson(rBody, clazz); } /** @@ -527,37 +526,37 @@ protected static void handleAPIError(String rBody, final int rCode) throws EasyP if (rBody == null || rBody.length() == 0) { rBody = "{}"; } - Error error = Constant.GSON.fromJson(rBody, Error.class); + Error error = Constants.Http.GSON.fromJson(rBody, Error.class); String errorMessage = error.getMessage(); String errorCode = error.getCode(); List errors = error.getErrors(); - if (rCode >= Constants.ErrorCode.REDIRECT_CODE_BEGIN && rCode <= Constants.ErrorCode.REDIRECT_CODE_END) { + if (rCode >= Constants.ErrorCodes.REDIRECT_CODE_BEGIN && rCode <= Constants.ErrorCodes.REDIRECT_CODE_END) { throw new RedirectError(errorMessage, errorCode, rCode, errors); } switch (rCode) { - case Constants.ErrorCode.UNAUTHORIZED_ERROR: + case Constants.ErrorCodes.UNAUTHORIZED_ERROR: throw new UnauthorizedError(errorMessage, errorCode, rCode, errors); - case Constants.ErrorCode.FORBIDDEN_ERROR: + case Constants.ErrorCodes.FORBIDDEN_ERROR: throw new ForbiddenError(errorMessage, errorCode, rCode, errors); - case Constants.ErrorCode.PAYMENT_ERROR: + case Constants.ErrorCodes.PAYMENT_ERROR: throw new PaymentError(errorMessage, errorCode, rCode, errors); - case Constants.ErrorCode.NOT_FOUND_ERROR: + case Constants.ErrorCodes.NOT_FOUND_ERROR: throw new NotFoundError(errorMessage, errorCode, rCode, errors); - case Constants.ErrorCode.METHOD_NOT_ALLOWED_ERROR: + case Constants.ErrorCodes.METHOD_NOT_ALLOWED_ERROR: throw new MethodNotAllowedError(errorMessage, errorCode, rCode, errors); - case Constants.ErrorCode.TIMEOUT_ERROR: + case Constants.ErrorCodes.TIMEOUT_ERROR: throw new TimeoutError(errorMessage, errorCode, rCode, errors); - case Constants.ErrorCode.INVALID_REQUEST_ERROR: + case Constants.ErrorCodes.INVALID_REQUEST_ERROR: throw new InvalidRequestError(errorMessage, errorCode, rCode, errors); - case Constants.ErrorCode.RATE_LIMIT_ERROR: + case Constants.ErrorCodes.RATE_LIMIT_ERROR: throw new RateLimitError(errorMessage, errorCode, rCode, errors); - case Constants.ErrorCode.INTERNAL_SERVER_ERROR: + case Constants.ErrorCodes.INTERNAL_SERVER_ERROR: throw new InternalServerError(errorMessage, errorCode, rCode, errors); - case Constants.ErrorCode.SERVICE_UNAVAILABLE_ERROR: + case Constants.ErrorCodes.SERVICE_UNAVAILABLE_ERROR: throw new ServiceUnavailablError(errorMessage, errorCode, rCode, errors); - case Constants.ErrorCode.GATEWAY_TIMEOUT_ERROR: + case Constants.ErrorCodes.GATEWAY_TIMEOUT_ERROR: throw new GatewayTimeoutError(errorMessage, errorCode, rCode, errors); default: throw new UnknownApiError(errorMessage, errorCode, rCode, errors); @@ -566,12 +565,11 @@ protected static void handleAPIError(String rBody, final int rCode) throws EasyP @Generated // Exclude from the jacoco test coverage private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, String url, final String query, - final JsonObject body, final EasyPostClient client) + final JsonObject body, final EasyPostClient client) throws EasyPostException { String unknownErrorMessage = String.format( "Sorry, an unknown error occurred while trying to use the Google App Engine runtime." + - "Please email %s for assistance.", - Constant.EASYPOST_SUPPORT_EMAIL); + "Please email %s for assistance.", Constants.EASYPOST_SUPPORT_EMAIL); try { if ((method == RequestMethod.GET || method == RequestMethod.DELETE) && query != null) { url = String.format("%s?%s", url, query); @@ -589,8 +587,7 @@ private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, System.err.printf( "Warning: this App Engine SDK version does not allow verification of SSL certificates;" + "this exposes you to a MITM attack. Please upgrade your App Engine SDK to >=1.5.0. " + - "If you have questions, email %s.%n", - Constant.EASYPOST_SUPPORT_EMAIL); + "If you have questions, email %s.%n", Constants.EASYPOST_SUPPORT_EMAIL); fetchOptions = fetchOptionsBuilderClass.getDeclaredMethod("withDefaults").invoke(null); } @@ -626,8 +623,9 @@ private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, Object response = fetchMethod.invoke(urlFetchService, request); int responseCode = (Integer) response.getClass().getDeclaredMethod("getResponseCode").invoke(response); - String responseBody = new String( - (byte[]) response.getClass().getDeclaredMethod("getContent").invoke(response), Constant.CHARSET); + String responseBody = + new String((byte[]) response.getClass().getDeclaredMethod("getContent").invoke(response), + Constants.Http.CHARSET); return new EasyPostResponse(responseCode, responseBody); diff --git a/src/main/java/com/easypost/model/EasyPostResource.java b/src/main/java/com/easypost/model/EasyPostResource.java index f2eb1b2f0..625aabacb 100644 --- a/src/main/java/com/easypost/model/EasyPostResource.java +++ b/src/main/java/com/easypost/model/EasyPostResource.java @@ -12,7 +12,7 @@ import java.util.Date; -import com.easypost.http.Constant; +import com.easypost.Constants; import lombok.Getter; @Getter @@ -59,7 +59,7 @@ private Object getIdString() { */ public String prettyPrint() { return String.format("<%s@%s id=%s> JSON: %s", this.getClass().getName(), System.identityHashCode(this), - this.getIdString(), Constant.PRETTY_PRINT_GSON.toJson(this)); + this.getIdString(), Constants.Http.PRETTY_PRINT_GSON.toJson(this)); } /** @@ -69,19 +69,19 @@ public String prettyPrint() { */ @Override public int hashCode() { - return Constant.GSON.toJson(this).hashCode(); + return Constants.Http.GSON.toJson(this).hashCode(); } /** - * Override the equals method, convert objects to Json strings for comparsion. + * Override the Equals method, convert objects to Json strings for comparison. * * @param object Object of any class. * @return If two objects have the same properties. */ @Override public boolean equals(Object object) { - String currentObject = Constant.GSON.toJson(this); - String newObject = Constant.GSON.toJson(object); + String currentObject = Constants.Http.GSON.toJson(this); + String newObject = Constants.Http.GSON.toJson(object); return currentObject.equals(newObject); } diff --git a/src/main/java/com/easypost/model/ErrorDeserializer.java b/src/main/java/com/easypost/model/ErrorDeserializer.java index 335013130..6675f1a8a 100644 --- a/src/main/java/com/easypost/model/ErrorDeserializer.java +++ b/src/main/java/com/easypost/model/ErrorDeserializer.java @@ -1,6 +1,6 @@ package com.easypost.model; -import com.easypost.exception.Constants; +import com.easypost.Constants; import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; @@ -32,7 +32,7 @@ public Error deserialize(final JsonElement json, final Type typeOfT, if (results == null) { Error error = new Error(); - error.setMessage(Constants.API_DID_NOT_RETURN_ERROR_DETAILS); + error.setMessage(Constants.ErrorMessages.API_DID_NOT_RETURN_ERROR_DETAILS); error.setCode("NO RESPONSE CODE"); return error; } diff --git a/src/main/java/com/easypost/model/SmartrateAccuracy.java b/src/main/java/com/easypost/model/SmartrateAccuracy.java index 0fad34d27..7c53b86d8 100644 --- a/src/main/java/com/easypost/model/SmartrateAccuracy.java +++ b/src/main/java/com/easypost/model/SmartrateAccuracy.java @@ -1,6 +1,6 @@ package com.easypost.model; -import com.easypost.exception.Constants; +import com.easypost.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.InvalidParameterError; @@ -40,6 +40,6 @@ public static SmartrateAccuracy getByKeyName(String keyName) throws EasyPostExce return smartrateAccuracy; } } - throw new InvalidParameterError(String.format(Constants.INVALID_PARAMETER, "smartrateAccuracy")); + throw new InvalidParameterError(String.format(Constants.ErrorMessages.INVALID_PARAMETER, "smartrateAccuracy")); } } diff --git a/src/main/java/com/easypost/model/TimeInTransit.java b/src/main/java/com/easypost/model/TimeInTransit.java index 622dd8a7e..7f6dd7932 100644 --- a/src/main/java/com/easypost/model/TimeInTransit.java +++ b/src/main/java/com/easypost/model/TimeInTransit.java @@ -1,6 +1,6 @@ package com.easypost.model; -import com.easypost.exception.Constants; +import com.easypost.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.InvalidParameterError; import com.google.gson.annotations.SerializedName; @@ -52,7 +52,7 @@ public int getSmartRateAccuracy(final String percentile) throws EasyPostExceptio case "percentile_99": return this.percentile99; default: - throw new InvalidParameterError(String.format(Constants.INVALID_PARAMETER, "percentile")); + throw new InvalidParameterError(String.format(Constants.ErrorMessages.INVALID_PARAMETER, "percentile")); } } diff --git a/src/main/java/com/easypost/service/BillingService.java b/src/main/java/com/easypost/service/BillingService.java index 4d068f058..5e58ffa91 100644 --- a/src/main/java/com/easypost/service/BillingService.java +++ b/src/main/java/com/easypost/service/BillingService.java @@ -1,6 +1,6 @@ package com.easypost.service; -import com.easypost.exception.Constants; +import com.easypost.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.InvalidObjectError; import com.easypost.http.Requestor; @@ -81,7 +81,7 @@ public PaymentMethod retrievePaymentMethods() throws EasyPostException { PaymentMethod response = Requestor.request(RequestMethod.GET, url, null, PaymentMethod.class, client); if (response.getId() == null) { - throw new InvalidObjectError(Constants.NO_PAYMENT_METHODS); + throw new InvalidObjectError(Constants.ErrorMessages.NO_PAYMENT_METHODS); } return response; @@ -110,7 +110,7 @@ private PaymentMethodObject getPaymentMethodByPriority(PaymentMethod.Priority pr } if (paymentMethod == null || paymentMethod.getId() == null) { - throw new InvalidObjectError(Constants.NO_PAYMENT_METHODS); + throw new InvalidObjectError(Constants.ErrorMessages.NO_PAYMENT_METHODS); } return paymentMethod; diff --git a/src/main/java/com/easypost/service/EasyPostClient.java b/src/main/java/com/easypost/service/EasyPostClient.java index bcdbd20c3..2ca487284 100644 --- a/src/main/java/com/easypost/service/EasyPostClient.java +++ b/src/main/java/com/easypost/service/EasyPostClient.java @@ -1,8 +1,7 @@ package com.easypost.service; -import com.easypost.exception.Constants; +import com.easypost.Constants; import com.easypost.exception.General.MissingParameterError; -import com.easypost.http.Constant; public class EasyPostClient { private final int connectTimeoutMilliseconds; @@ -42,7 +41,7 @@ public class EasyPostClient { * @throws MissingParameterError */ public EasyPostClient(String apiKey) throws MissingParameterError { - this(apiKey, Constant.DEFAULT_CONNECT_TIMEOUT_MILLISECONDS); + this(apiKey, Constants.Http.DEFAULT_CONNECT_TIMEOUT_MILLISECONDS); } /** @@ -53,8 +52,8 @@ public EasyPostClient(String apiKey) throws MissingParameterError { * @throws MissingParameterError */ public EasyPostClient(String apiKey, String apiBase) throws MissingParameterError { - this(apiKey, Constant.DEFAULT_CONNECT_TIMEOUT_MILLISECONDS, Constant.DEFAULT_READ_TIMEOUT_MILLISECONDS, - apiBase); + this(apiKey, Constants.Http.DEFAULT_CONNECT_TIMEOUT_MILLISECONDS, + Constants.Http.DEFAULT_READ_TIMEOUT_MILLISECONDS, apiBase); } /** @@ -65,7 +64,7 @@ public EasyPostClient(String apiKey, String apiBase) throws MissingParameterErro * @throws MissingParameterError */ public EasyPostClient(String apiKey, int connectTimeoutMilliseconds) throws MissingParameterError { - this(apiKey, connectTimeoutMilliseconds, Constant.API_BASE); + this(apiKey, connectTimeoutMilliseconds, Constants.Http.API_BASE); } /** @@ -77,7 +76,7 @@ public EasyPostClient(String apiKey, int connectTimeoutMilliseconds) throws Miss * @throws MissingParameterError */ public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, String apiBase) throws MissingParameterError { - this(apiKey, connectTimeoutMilliseconds, Constant.DEFAULT_READ_TIMEOUT_MILLISECONDS, apiBase); + this(apiKey, connectTimeoutMilliseconds, Constants.Http.DEFAULT_READ_TIMEOUT_MILLISECONDS, apiBase); } /** @@ -90,7 +89,7 @@ public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, String apiB */ public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTimeoutMilliseconds) throws MissingParameterError { - this(apiKey, connectTimeoutMilliseconds, readTimeoutMilliseconds, Constant.API_BASE); + this(apiKey, connectTimeoutMilliseconds, readTimeoutMilliseconds, Constants.Http.API_BASE); } /** @@ -105,7 +104,7 @@ public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTim public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTimeoutMilliseconds, String apiBase) throws MissingParameterError { if (apiKey == null || apiKey.isEmpty()) { - throw new MissingParameterError(Constants.INVALID_API_KEY_TYPE); + throw new MissingParameterError(Constants.ErrorMessages.INVALID_API_KEY_TYPE); } this.apiBase = apiBase; @@ -167,7 +166,7 @@ public String getApiKey() { /** * Get API version for this EasyPostClient object. - * + * * @return the API version for this EasyPostClient object. */ public String getApiVersion() { diff --git a/src/main/java/com/easypost/service/PaymentMethodService.java b/src/main/java/com/easypost/service/PaymentMethodService.java index 04f464ffe..7cc466121 100644 --- a/src/main/java/com/easypost/service/PaymentMethodService.java +++ b/src/main/java/com/easypost/service/PaymentMethodService.java @@ -1,6 +1,6 @@ package com.easypost.service; -import com.easypost.exception.Constants; +import com.easypost.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.InvalidObjectError; import com.easypost.http.Requestor; @@ -35,7 +35,7 @@ public PaymentMethod all() throws EasyPostException { Requestor.request(RequestMethod.GET, url, null, PaymentMethod.class, client); if (response.getId() == null) { - throw new InvalidObjectError(Constants.NO_PAYMENT_METHODS); + throw new InvalidObjectError(Constants.ErrorMessages.NO_PAYMENT_METHODS); } return response; diff --git a/src/main/java/com/easypost/service/ReferralCustomerService.java b/src/main/java/com/easypost/service/ReferralCustomerService.java index 8a96ecb6a..2f6224ecf 100644 --- a/src/main/java/com/easypost/service/ReferralCustomerService.java +++ b/src/main/java/com/easypost/service/ReferralCustomerService.java @@ -1,9 +1,8 @@ package com.easypost.service; -import com.easypost.exception.Constants; +import com.easypost.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.API.ExternalApiError; -import com.easypost.http.Constant; import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.PaymentMethod; @@ -126,7 +125,7 @@ public PaymentMethodObject addCreditCardToUser(final String referralApiKey, fina try { stripeToken = createStripeToken(number, expirationMonth, expirationYear, cvc, easypostStripeApiKey); } catch (Exception e) { - throw new ExternalApiError(String.format(Constants.EXTERNAL_API_CALL_FAILED, "Stripe")); + throw new ExternalApiError(String.format(Constants.ErrorMessages.EXTERNAL_API_CALL_FAILED, "Stripe")); } return createEasypostCreditCard(referralApiKey, stripeToken, priority.toString().toLowerCase()); @@ -202,7 +201,7 @@ private static String createStripeToken(final String number, final int expiratio String responseBody = response.toString(); @SuppressWarnings("unchecked") - Map responseMap = Constant.GSON.fromJson(responseBody, Map.class); + Map responseMap = Constants.Http.GSON.fromJson(responseBody, Map.class); return responseMap.get("id").toString(); } diff --git a/src/main/java/com/easypost/service/ReportService.java b/src/main/java/com/easypost/service/ReportService.java index 6a3926a19..835829501 100644 --- a/src/main/java/com/easypost/service/ReportService.java +++ b/src/main/java/com/easypost/service/ReportService.java @@ -1,6 +1,6 @@ package com.easypost.service; -import com.easypost.exception.Constants; +import com.easypost.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.InvalidObjectError; import com.easypost.exception.General.InvalidParameterError; @@ -40,7 +40,7 @@ public Report create(final Map params) throws EasyPostException return Requestor.request(RequestMethod.POST, reportURL((String) params.get("type")), paramsWithoutType, Report.class, client); } else { - throw new InvalidObjectError(String.format(Constants.MISSING_REQUIRED_PARAMETER, "type")); + throw new InvalidObjectError(String.format(Constants.ErrorMessages.MISSING_REQUIRED_PARAMETER, "type")); } } @@ -56,7 +56,7 @@ protected String reportURL(final String type) throws EasyPostException { String urlType = URLEncoder.encode(type, "UTF-8").toLowerCase(); return String.format("%s/%s/reports/%s/", client.getApiBase(), client.getApiVersion(), urlType); } catch (java.io.UnsupportedEncodingException e) { - throw new InvalidParameterError(String.format(Constants.ENCODED_ERROR, "report type"), e); + throw new InvalidParameterError(String.format(Constants.ErrorMessages.ENCODED_ERROR, "report type"), e); } } diff --git a/src/main/java/com/easypost/service/ShipmentService.java b/src/main/java/com/easypost/service/ShipmentService.java index fc06e577e..b906c0870 100644 --- a/src/main/java/com/easypost/service/ShipmentService.java +++ b/src/main/java/com/easypost/service/ShipmentService.java @@ -1,6 +1,6 @@ package com.easypost.service; -import com.easypost.exception.Constants; +import com.easypost.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.FilteringError; import com.easypost.http.Requestor; @@ -147,7 +147,7 @@ public Shipment newRates(final String id, final Map params, fina * @param id The ID of shipment. * @return List of Smartrate objects * @throws EasyPostException when the request fails. - * @deprecated Use {@link #smartrates(Map, Shipment)} instead. + * @deprecated Use {@link #smartrates(String, Map)} instead. * Deprecated: v5.5.0 - v7.0.0 */ @Deprecated @@ -360,7 +360,7 @@ public Shipment insure(final String id, final Map params) throws * filtering. * @return lowest Smartrate object * @throws EasyPostException when the request fails. - * @deprecated use {@link #lowestSmartRate(int, SmartrateAccuracy, Shipment)} + * @deprecated use {@link #lowestSmartRate(String, int, SmartrateAccuracy)} * instead. * Deprecated: v5.5.0 - v7.0.0 */ @@ -395,7 +395,7 @@ public Smartrate lowestSmartRate(final String id, final int deliveryDay, Smartra * @param id The ID of shipment. * @return List of Smartrate objects * @throws EasyPostException when the request fails. - * @deprecated Use {@link #smartrates(Shipment)} instead. + * @deprecated Use {@link #smartrates(String, Map)} instead. * Deprecated: v5.5.0 - v7.0.0 */ @Deprecated @@ -447,7 +447,7 @@ public Smartrate findLowestSmartrate(final List smartrates, int deliv } if (lowestSmartrate == null) { - throw new FilteringError(String.format(Constants.NO_OBJECT_FOUND, "rate")); + throw new FilteringError(String.format(Constants.ErrorMessages.NO_OBJECT_FOUND, "rate")); } return lowestSmartrate; diff --git a/src/main/java/com/easypost/service/UserService.java b/src/main/java/com/easypost/service/UserService.java index b6c74c675..b28963f85 100644 --- a/src/main/java/com/easypost/service/UserService.java +++ b/src/main/java/com/easypost/service/UserService.java @@ -5,7 +5,7 @@ import java.util.Map; import java.util.Objects; -import com.easypost.exception.Constants; +import com.easypost.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.FilteringError; import com.easypost.http.Requestor; @@ -110,7 +110,7 @@ public List apiKeys(final String id) throws EasyPostException { } } - throw new FilteringError(String.format(Constants.NO_OBJECT_FOUND, "API keys")); + throw new FilteringError(String.format(Constants.ErrorMessages.NO_OBJECT_FOUND, "API keys")); } /** diff --git a/src/main/java/com/easypost/service/WebhookService.java b/src/main/java/com/easypost/service/WebhookService.java index bf2044a09..07e06193e 100644 --- a/src/main/java/com/easypost/service/WebhookService.java +++ b/src/main/java/com/easypost/service/WebhookService.java @@ -1,9 +1,8 @@ package com.easypost.service; -import com.easypost.exception.Constants; +import com.easypost.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.SignatureVerificationError; -import com.easypost.http.Constant; import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.Event; @@ -150,12 +149,12 @@ public Event validateWebhook(byte[] eventBody, Map headers, Stri if (Cryptography.signaturesMatch(providedSignature, calculatedSignature)) { // Serialize data into a JSON string, then into an Event object String json = new String(eventBody, StandardCharsets.UTF_8); - return Constant.GSON.fromJson(json, Event.class); + return Constants.Http.GSON.fromJson(json, Event.class); } else { - throw new SignatureVerificationError(Constants.WEBHOOK_DOES_NOT_MATCH); + throw new SignatureVerificationError(Constants.ErrorMessages.WEBHOOK_DOES_NOT_MATCH); } } else { - throw new SignatureVerificationError(Constants.INVALID_WEBHOOK_SIGNATURE); + throw new SignatureVerificationError(Constants.ErrorMessages.INVALID_WEBHOOK_SIGNATURE); } } } diff --git a/src/main/java/com/easypost/utils/Utilities.java b/src/main/java/com/easypost/utils/Utilities.java index 9b0bc2737..6ddfaf42a 100644 --- a/src/main/java/com/easypost/utils/Utilities.java +++ b/src/main/java/com/easypost/utils/Utilities.java @@ -1,6 +1,6 @@ package com.easypost.utils; -import com.easypost.exception.Constants; +import com.easypost.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.FilteringError; import com.easypost.model.Rate; @@ -49,7 +49,7 @@ public static Rate getLowestObjectRate(List rates, List carriers, if (lowestRate == null) { throw new FilteringError(String.format( - Constants.NO_OBJECT_FOUND, "lowest rate matching required criteria")); + Constants.ErrorMessages.NO_OBJECT_FOUND, "lowest rate matching required criteria")); } return lowestRate; diff --git a/src/test/cassettes/error/invalid_address_verification.json b/src/test/cassettes/error/invalid_address_verification.json new file mode 100644 index 000000000..0ab8cd480 --- /dev/null +++ b/src/test/cassettes/error/invalid_address_verification.json @@ -0,0 +1,95 @@ +[ + { + "recordedAt": 1666127184, + "request": { + "body": "{}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/addresses/create_and_verify" + }, + "response": { + "body": null, + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 422 Unprocessable Entity" + ], + "content-length": [ + "138" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb7nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-canary": [ + "direct" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "d072eb56634f1550ecb3de8c000e9a9f" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.030448" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202210181951-9e4961b13d-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 422, + "message": "Unprocessable Entity" + }, + "errors": "{\n \"error\": {\n \"code\": \"PARAMETER.REQUIRED\",\n \"message\": \"Missing required parameter.\",\n \"errors\": [\n {\n \"field\": \"address\",\n \"message\": \"cannot be blank\"\n }\n ]\n }\n}", + "uri": "https://api.easypost.com/v2/addresses/create_and_verify" + }, + "duration": 176 + } +] \ No newline at end of file diff --git a/src/test/java/com/easypost/BillingTest.java b/src/test/java/com/easypost/BillingTest.java index f79e8ede1..0643220ca 100644 --- a/src/test/java/com/easypost/BillingTest.java +++ b/src/test/java/com/easypost/BillingTest.java @@ -1,7 +1,6 @@ package com.easypost; import com.easypost.exception.EasyPostException; -import com.easypost.http.Constant; import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.PaymentMethod; @@ -23,7 +22,7 @@ public final class BillingTest { "me\":null,\"last4\":\"4242\",\"exp_month\":1,\"exp_year\":2025,\"brand\":\"Visa\"},\"secondar" + "y_payment_method\":{\"id\":\"card_...\",\"disabled_at\":null,\"object\":\"CreditCard\",\"name\":nu" + "ll,\"last4\":\"4444\",\"exp_month\":1,\"exp_year\":2025,\"brand\":\"Mastercard\"}}"; - private PaymentMethod paymentMethod = Constant.GSON.fromJson(jsonResponse, PaymentMethod.class); + private PaymentMethod paymentMethod = Constants.Http.GSON.fromJson(jsonResponse, PaymentMethod.class); private static MockedStatic requestMock = Mockito.mockStatic(Requestor.class); /** diff --git a/src/test/java/com/easypost/ErrorTest.java b/src/test/java/com/easypost/ErrorTest.java index eee1d8944..acb9789e1 100644 --- a/src/test/java/com/easypost/ErrorTest.java +++ b/src/test/java/com/easypost/ErrorTest.java @@ -1,6 +1,5 @@ package com.easypost; -import com.easypost.exception.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.API.RedirectError; import com.easypost.exception.API.ServiceUnavailablError; @@ -94,7 +93,7 @@ public void testKnownApiException() throws EasyPostException { EasyPostException exception = assertThrows(EasyPostException.class, () -> handleAPIError("{}", entry.getKey())); - assertEquals(Constants.API_DID_NOT_RETURN_ERROR_DETAILS, exception.getMessage()); + assertEquals(Constants.ErrorMessages.API_DID_NOT_RETURN_ERROR_DETAILS, exception.getMessage()); assertEquals("NO RESPONSE CODE", exception.getCode()); assertEquals(entry.getKey(), exception.getStatusCode()); assertInstanceOf(entry.getValue(), exception); diff --git a/src/test/java/com/easypost/ThreadTest.java b/src/test/java/com/easypost/ThreadTest.java index 4570856ba..9f61385c4 100644 --- a/src/test/java/com/easypost/ThreadTest.java +++ b/src/test/java/com/easypost/ThreadTest.java @@ -1,7 +1,6 @@ package com.easypost; import com.easypost.exception.EasyPostException; -import com.easypost.http.Constant; import com.easypost.model.Order; import com.easypost.service.EasyPostClient; @@ -144,6 +143,6 @@ public void testMultipleClients() throws EasyPostException { assertEquals("fake_api_key_2", clientTwo.getApiKey()); assertEquals(55555, clientTwo.getConnectionTimeoutMilliseconds()); - assertEquals(Constant.DEFAULT_READ_TIMEOUT_MILLISECONDS, clientTwo.getReadTimeoutMilliseconds()); + assertEquals(Constants.Http.DEFAULT_READ_TIMEOUT_MILLISECONDS, clientTwo.getReadTimeoutMilliseconds()); } } From 84e080e5162f484a8af5095410356971a243b280 Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Thu, 1 Dec 2022 13:18:04 -0500 Subject: [PATCH 027/208] Use different endpoint for custom workflow carrier account creation (FedEx, UPS) (#210) - Dynamically change endpoint for carrier account registration based on type - New unit test, cassette --- CHANGELOG.md | 1 + .../service/CarrierAccountService.java | 53 +++++++---- .../create_with_custom_workflow.json | 91 +++++++++++++++++++ .../java/com/easypost/CarrierAccountTest.java | 27 ++++++ 4 files changed, 156 insertions(+), 16 deletions(-) create mode 100644 src/test/cassettes/carrier_account/create_with_custom_workflow.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 76793bd52..55fc10e95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - [CHANGED] All constants are now defined in the top-level `Constants` class (`com.easypost.Constants`). - Users who are utilizing the constants for exception message parsing should account for the new namespace. +- [ADDED] Support for creating/registering carrier accounts that require custom workflows (e.g. FedEx, UPS) ## v6.0.0-rc1 (2022-11-30) diff --git a/src/main/java/com/easypost/service/CarrierAccountService.java b/src/main/java/com/easypost/service/CarrierAccountService.java index 74489d229..61d2d158c 100644 --- a/src/main/java/com/easypost/service/CarrierAccountService.java +++ b/src/main/java/com/easypost/service/CarrierAccountService.java @@ -1,10 +1,12 @@ package com.easypost.service; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.MissingParameterError; import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.CarrierAccount; import com.easypost.utils.Utilities; +import com.easypost.Constants; import java.util.Arrays; import java.util.HashMap; @@ -16,7 +18,7 @@ public class CarrierAccountService { /** * CarrierAccountService constructor. - * + * * @param client The client object. */ CarrierAccountService(EasyPostClient client) { @@ -30,13 +32,19 @@ public class CarrierAccountService { * @return created CarrierAccount object. * @throws EasyPostException when the request fails. */ - public CarrierAccount create(final Map params) - throws EasyPostException { + public CarrierAccount create(final Map params) throws EasyPostException { + String type = (String) params.get("type"); + if (type == null) { + throw new MissingParameterError( + String.format(Constants.ErrorMessages.MISSING_REQUIRED_PARAMETER, "carrier account type")); + } + + String endpoint = selectCarrierAccountCreationEndpoint(type); + Map wrappedParams = new HashMap(); wrappedParams.put("carrier_account", params); - return Requestor.request(RequestMethod.POST, Utilities.classURL(CarrierAccount.class), - wrappedParams, CarrierAccount.class, client); + return Requestor.request(RequestMethod.POST, endpoint, wrappedParams, CarrierAccount.class, client); } /** @@ -47,8 +55,8 @@ public CarrierAccount create(final Map params) * @throws EasyPostException when the request fails. */ public CarrierAccount retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(CarrierAccount.class, id), - null, CarrierAccount.class, client); + return Requestor.request(RequestMethod.GET, Utilities.instanceURL(CarrierAccount.class, id), null, + CarrierAccount.class, client); } /** @@ -68,10 +76,10 @@ public List all() throws EasyPostException { * @return List of CarrierAccount objects. * @throws EasyPostException when the request fails. */ - public List all(final Map params) - throws EasyPostException { - CarrierAccount[] response = Requestor.request(RequestMethod.GET, - Utilities.classURL(CarrierAccount.class), params, CarrierAccount[].class, client); + public List all(final Map params) throws EasyPostException { + CarrierAccount[] response = + Requestor.request(RequestMethod.GET, Utilities.classURL(CarrierAccount.class), params, + CarrierAccount[].class, client); return Arrays.asList(response); } @@ -84,8 +92,7 @@ public List all(final Map params) * @return updated CarrierAccount object. * @throws EasyPostException when the request fails. */ - public CarrierAccount update(final Map params, String id) - throws EasyPostException { + public CarrierAccount update(final Map params, String id) throws EasyPostException { Map wrappedParams = new HashMap(); wrappedParams.put("carrier_account", params); @@ -96,11 +103,25 @@ public CarrierAccount update(final Map params, String id) /** * Delete this carrier account. * - * @param id The ID of carrient account. + * @param id The ID of carrier account. * @throws EasyPostException when the request fails. */ public void delete(String id) throws EasyPostException { - Requestor.request(RequestMethod.DELETE, Utilities.instanceURL(CarrierAccount.class, id), - null, CarrierAccount.class, client); + Requestor.request(RequestMethod.DELETE, Utilities.instanceURL(CarrierAccount.class, id), null, + CarrierAccount.class, client); + } + + /** + * Select the endpoint for the carrier account creation request based on the carrier type. + * + * @param carrierAccountType The type of carrier account to create. + * @return The endpoint for the carrier account creation request. + */ + private static String selectCarrierAccountCreationEndpoint(final String carrierAccountType) { + if (Constants.CarrierAccountTypes.CARRIER_TYPES_WITH_CUSTOM_WORKFLOW.contains(carrierAccountType)) { + return "%s/%s/carrier_accounts/register"; + } else { + return "%s/%s/carrier_accounts"; + } } } diff --git a/src/test/cassettes/carrier_account/create_with_custom_workflow.json b/src/test/cassettes/carrier_account/create_with_custom_workflow.json new file mode 100644 index 000000000..140f2c50a --- /dev/null +++ b/src/test/cassettes/carrier_account/create_with_custom_workflow.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1669854247, + "request": { + "body": "{\n \"carrier_account\": {\n \"registration_data\": {\n \"some\": \"data\"\n },\n \"type\": \"FedexAccount\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/register" + }, + "response": { + "body": "{\n \"error\": {\n \"code\": \"UNPROCESSABLE_ENTITY\",\n \"message\": \"The request was understood, but cannot be processed.\",\n \"errors\": [\n {\n \"field\": \"shipping_streets\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"shipping_city\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"shipping_state\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"shipping_postal_code\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"shipping_country_code\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"corporate_first_name\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"corporate_last_name\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"corporate_job_title\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"corporate_company_name\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"corporate_phone_number\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"corporate_email_address\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"corporate_streets\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"corporate_city\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"corporate_state\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"corporate_postal_code\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"corporate_country_code\",\n \"message\": \"must be present and a string\"\n },\n {\n \"field\": \"account_number\",\n \"message\": \"must be present and a string\"\n }\n ]\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 422 Unprocessable Entity" + ], + "content-length": [ + "1347" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb12nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "35b090b46387f427e9b8e441008ba656" + ], + "x-proxied": [ + "extlb2nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.030703" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202211251832-642412d65d-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 422, + "message": "Unprocessable Entity" + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/register" + }, + "duration": 264 + } +] \ No newline at end of file diff --git a/src/test/java/com/easypost/CarrierAccountTest.java b/src/test/java/com/easypost/CarrierAccountTest.java index 1706919c0..380c9a42a 100644 --- a/src/test/java/com/easypost/CarrierAccountTest.java +++ b/src/test/java/com/easypost/CarrierAccountTest.java @@ -63,6 +63,33 @@ public void testCreate() throws EasyPostException { assertEquals("DhlEcsAccount", carrierAccount.getType()); } + /** + * Test creating a carrier account with a custom workflow. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateWithCustomWorkflow() throws EasyPostException { + vcr.setUpTest("create_with_custom_workflow"); + + Map data = new HashMap<>(); + data.put("type", "FedexAccount"); + data.put("registration_data", new HashMap() {{ + put("some", "data"); + }}); + + try { + CarrierAccount carrierAccount = vcr.client.carrierAccount.create(data); + testCarrierAccountId = carrierAccount.getId(); // clean up after test, should never get here + } catch (EasyPostException e) { + // We're sending bad data to the API, so we expect an error + assertEquals(422, e.getStatusCode()); + // We expect one of the sub-errors to be regarding a missing field + assertTrue(e.getErrors().stream().anyMatch(error -> error.getField().equals("account_number") && + error.getMessage().equals("must be present and a string"))); + } + } + private static CarrierAccount createBasicCarrierAccount() throws EasyPostException { CarrierAccount carrierAccount = vcr.client.carrierAccount.create(Fixtures.basicCarrierAccount()); testCarrierAccountId = carrierAccount.getId(); // trigger deletion after test From b80d3d1ed71845a8d03c6c82c9165837c21c9230 Mon Sep 17 00:00:00 2001 From: jchen293 Date: Thu, 1 Dec 2022 13:47:08 -0500 Subject: [PATCH 028/208] swap the parameter to make id in the first argument (#212) --- CHANGELOG.md | 4 ++++ .../easypost/service/CarrierAccountService.java | 3 ++- .../com/easypost/service/EndShipperService.java | 4 ++-- .../com/easypost/service/ShipmentService.java | 16 ++++++++-------- .../java/com/easypost/CarrierAccountTest.java | 2 +- src/test/java/com/easypost/EndShipperTest.java | 2 +- src/test/java/com/easypost/ShipmentTest.java | 8 ++++---- 7 files changed, 22 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55fc10e95..1e57ef8ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ - [CHANGED] All constants are now defined in the top-level `Constants` class (`com.easypost.Constants`). - Users who are utilizing the constants for exception message parsing should account for the new namespace. - [ADDED] Support for creating/registering carrier accounts that require custom workflows (e.g. FedEx, UPS) +- [CHANGED] Swap the parameters for below functions, to make `id` in the first argument + - Shipment.generateForm() + - EndShipper.update() + - CarrierAccount.update() ## v6.0.0-rc1 (2022-11-30) diff --git a/src/main/java/com/easypost/service/CarrierAccountService.java b/src/main/java/com/easypost/service/CarrierAccountService.java index 61d2d158c..00145a89e 100644 --- a/src/main/java/com/easypost/service/CarrierAccountService.java +++ b/src/main/java/com/easypost/service/CarrierAccountService.java @@ -92,7 +92,8 @@ public List all(final Map params) throws EasyPos * @return updated CarrierAccount object. * @throws EasyPostException when the request fails. */ - public CarrierAccount update(final Map params, String id) throws EasyPostException { + public CarrierAccount update(String id, final Map params) + throws EasyPostException { Map wrappedParams = new HashMap(); wrappedParams.put("carrier_account", params); diff --git a/src/main/java/com/easypost/service/EndShipperService.java b/src/main/java/com/easypost/service/EndShipperService.java index 483233707..4b5bfd70b 100644 --- a/src/main/java/com/easypost/service/EndShipperService.java +++ b/src/main/java/com/easypost/service/EndShipperService.java @@ -68,12 +68,12 @@ public EndShipperCollection all(final Map params) /** * Update an EndShipper object. * - * @param params Map of parameters. * @param id The ID of endshipper. + * @param params Map of parameters. * @return EndShipper object. * @throws EasyPostException when the request fails. */ - public EndShipper update(final Map params, final String id) throws EasyPostException { + public EndShipper update(final String id, final Map params) throws EasyPostException { Map wrappedParams = new HashMap(); wrappedParams.put("address", params); diff --git a/src/main/java/com/easypost/service/ShipmentService.java b/src/main/java/com/easypost/service/ShipmentService.java index b906c0870..1b9da6dfc 100644 --- a/src/main/java/com/easypost/service/ShipmentService.java +++ b/src/main/java/com/easypost/service/ShipmentService.java @@ -306,18 +306,18 @@ public Shipment buy(final String id, final Map params, final boo * @throws EasyPostException when the request fails. */ public Shipment refund(final String id) throws EasyPostException { - return this.refund(null, id); + return this.refund(id, null); } /** * Refund this Shipment. * - * @param params The options for the query. * @param id The ID of shipment. + * @param params The options for the query. * @return Shipment object * @throws EasyPostException when the request fails. */ - public Shipment refund(final Map params, final String id) throws EasyPostException { + public Shipment refund(final String id, final Map params) throws EasyPostException { String url = String.format("%s/refund", Utilities.instanceURL(Shipment.class, id)); return Requestor.request(RequestMethod.POST, url, params, Shipment.class, client); @@ -456,25 +456,25 @@ public Smartrate findLowestSmartrate(final List smartrates, int deliv /** * Generate a form for this shipment. * - * @param formType The form type for this shipment. * @param id The ID of shipment. + * @param formType The form type for this shipment. * @return Return a shipment object. * @throws EasyPostException when the request fails. */ - public Shipment generateForm(final String formType, final String id) throws EasyPostException { - return this.generateForm(formType, new HashMap<>(), id); + public Shipment generateForm(final String id, final String formType) throws EasyPostException { + return this.generateForm(id, formType, new HashMap<>()); } /** * Generate a form for this shipment. * + * @param id The ID of shipment. * @param formType The form type for this shipment. * @param formOptions The form options for this shipment. - * @param id The ID of shipment. * @return Return a shipment object. * @throws EasyPostException when the request fails. */ - public Shipment generateForm(final String formType, final Map formOptions, final String id) + public Shipment generateForm(final String id, final String formType, final Map formOptions) throws EasyPostException { HashMap params = new HashMap<>(); HashMap wrappedParams = new HashMap<>(); diff --git a/src/test/java/com/easypost/CarrierAccountTest.java b/src/test/java/com/easypost/CarrierAccountTest.java index 380c9a42a..6217feaee 100644 --- a/src/test/java/com/easypost/CarrierAccountTest.java +++ b/src/test/java/com/easypost/CarrierAccountTest.java @@ -144,7 +144,7 @@ public void testUpdate() throws EasyPostException { Map updateParams = new HashMap<>(); updateParams.put("description", testDescription); - CarrierAccount updatedCarrierAccount = vcr.client.carrierAccount.update(updateParams, carrierAccount.getId()); + CarrierAccount updatedCarrierAccount = vcr.client.carrierAccount.update(carrierAccount.getId(), updateParams); assertInstanceOf(CarrierAccount.class, carrierAccount); assertTrue(updatedCarrierAccount.getId().startsWith("ca_")); diff --git a/src/test/java/com/easypost/EndShipperTest.java b/src/test/java/com/easypost/EndShipperTest.java index aedbbb789..21d668900 100644 --- a/src/test/java/com/easypost/EndShipperTest.java +++ b/src/test/java/com/easypost/EndShipperTest.java @@ -115,7 +115,7 @@ public void testUpdate() throws EasyPostException { updateParams.put("phone", "9999999999"); updateParams.put("email", "test@example.com"); - EndShipper updatedEndShipper = vcr.client.endShipper.update(updateParams, endShipper.getId()); + EndShipper updatedEndShipper = vcr.client.endShipper.update(endShipper.getId(), updateParams); assertInstanceOf(EndShipper.class, updatedEndShipper); assertTrue(updatedEndShipper.getId().startsWith("es_")); diff --git a/src/test/java/com/easypost/ShipmentTest.java b/src/test/java/com/easypost/ShipmentTest.java index 4d4ad02af..03ed83cb7 100644 --- a/src/test/java/com/easypost/ShipmentTest.java +++ b/src/test/java/com/easypost/ShipmentTest.java @@ -457,7 +457,7 @@ public void testGetSmartRate() throws EasyPostException { assertInstanceOf(List.class, rates); - for (Smartrate rate: rates) { + for (Smartrate rate : rates) { assertInstanceOf(Smartrate.class, rate); } } @@ -519,7 +519,7 @@ public void testGenerateForm() throws EasyPostException { Shipment shipment = createOneCallBuyShipment(); String formType = "return_packing_slip"; - Shipment shipmentWithForm = vcr.client.shipment.generateForm(formType, shipment.getId()); + Shipment shipmentWithForm = vcr.client.shipment.generateForm(shipment.getId(), formType); assertTrue(shipmentWithForm.getForms().size() > 0); @@ -541,8 +541,8 @@ public void testGenerateFormWithOption() throws EasyPostException { Shipment shipment = createOneCallBuyShipment(); String formType = "return_packing_slip"; - Shipment shipmentWithForm = vcr.client.shipment.generateForm(formType, Fixtures.rmaFormOptions(), - shipment.getId()); + Shipment shipmentWithForm = vcr.client.shipment.generateForm(shipment.getId(), formType, + Fixtures.rmaFormOptions()); assertTrue(shipmentWithForm.getForms().size() > 0); From c50f7f7a3b35e216865169a9ac60e12969d053b9 Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Fri, 2 Dec 2022 18:13:36 -0500 Subject: [PATCH 029/208] Clean up exceptions (#213) - Clean up exceptions - New exceptions for JSON error, encoding errors, generic HTTP errors - Replace generic EasyPostException exceptions with specific exception types on throw statements and method signatures (more explicit) --- CHANGELOG.md | 1 + .../exception/API/ServiceUnavailablError.html | 2 +- .../API/class-use/ServiceUnavailablError.html | 6 +- docs/serialized-form.html | 2 +- .../easypost/exception/API/EncodingError.java | 24 +++ .../com/easypost/exception/API/HttpError.java | 24 +++ .../com/easypost/exception/API/JsonError.java | 24 +++ ...rror.java => ServiceUnavailableError.java} | 4 +- .../exception/General/FilteringError.java | 10 ++ .../exception/General/InvalidObjectError.java | 10 ++ .../General/InvalidParameterError.java | 17 +- .../General/MissingParameterError.java | 17 +- .../General/SignatureVerificationError.java | 10 ++ .../java/com/easypost/http/Requestor.java | 170 +++++++++++------- .../com/easypost/model/SmartrateAccuracy.java | 3 +- .../com/easypost/model/TimeInTransit.java | 5 +- .../com/easypost/service/EasyPostClient.java | 2 +- .../service/ReferralCustomerService.java | 46 ++--- .../com/easypost/service/ReportService.java | 20 ++- .../java/com/easypost/utils/Utilities.java | 20 +-- src/test/java/com/easypost/ErrorTest.java | 4 +- src/test/java/com/easypost/ReportTest.java | 4 +- 22 files changed, 289 insertions(+), 136 deletions(-) create mode 100644 src/main/java/com/easypost/exception/API/EncodingError.java create mode 100644 src/main/java/com/easypost/exception/API/HttpError.java create mode 100644 src/main/java/com/easypost/exception/API/JsonError.java rename src/main/java/com/easypost/exception/API/{ServiceUnavailablError.java => ServiceUnavailableError.java} (70%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e57ef8ca..e964e7564 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Shipment.generateForm() - EndShipper.update() - CarrierAccount.update() +- [FIXED] Typo, `ServiceUnavailablError` is now `ServiceUnavailableError` ## v6.0.0-rc1 (2022-11-30) diff --git a/docs/com/easypost/exception/API/ServiceUnavailablError.html b/docs/com/easypost/exception/API/ServiceUnavailablError.html index 60ed06ec2..28fbe117b 100644 --- a/docs/com/easypost/exception/API/ServiceUnavailablError.html +++ b/docs/com/easypost/exception/API/ServiceUnavailablError.html @@ -76,7 +76,7 @@

      Class ServiceUnavailablEr
      java.lang.Throwable
      java.lang.Exception
      com.easypost.exception.EasyPostException -
      com.easypost.exception.API.ServiceUnavailablError
      +
      com.easypost.exception.API.ServiceUnavailableError
      diff --git a/docs/com/easypost/exception/API/class-use/ServiceUnavailablError.html b/docs/com/easypost/exception/API/class-use/ServiceUnavailablError.html index 37e1ac34a..fec79420a 100644 --- a/docs/com/easypost/exception/API/class-use/ServiceUnavailablError.html +++ b/docs/com/easypost/exception/API/class-use/ServiceUnavailablError.html @@ -3,7 +3,7 @@ -Uses of Class com.easypost.exception.API.ServiceUnavailablError (com.easypost:easypost-api-client 5.10.0 API) +Uses of Class com.easypost.exception.API.ServiceUnavailableError (com.easypost:easypost-api-client 5.10.0 API) @@ -53,9 +53,9 @@
      -

      Uses of Class
      com.easypost.exception.API.ServiceUnavailablError

      +

      Uses of Class
      com.easypost.exception.API.ServiceUnavailableError

      -No usage of com.easypost.exception.API.ServiceUnavailablError
      +No usage of com.easypost.exception.API.ServiceUnavailableError

    • diff --git a/src/main/java/com/easypost/exception/API/EncodingError.java b/src/main/java/com/easypost/exception/API/EncodingError.java new file mode 100644 index 000000000..4e1c1a4a6 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/EncodingError.java @@ -0,0 +1,24 @@ +package com.easypost.exception.API; + +import com.easypost.exception.EasyPostException; + +public class EncodingError extends EasyPostException { + /** + * EncodingError constructor. + * + * @param message the exception message + */ + public EncodingError(final String message) { + super(message); + } + + /** + * EncodingError constructor with nested exception. + * + * @param message the exception message + * @param e the nested exception + */ + public EncodingError(final String message, Throwable e) { + super(message, e); + } +} diff --git a/src/main/java/com/easypost/exception/API/HttpError.java b/src/main/java/com/easypost/exception/API/HttpError.java new file mode 100644 index 000000000..6a7c5c151 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/HttpError.java @@ -0,0 +1,24 @@ +package com.easypost.exception.API; + +import com.easypost.exception.EasyPostException; + +public class HttpError extends EasyPostException { + /** + * HttpError constructor. + * + * @param message the exception message + */ + public HttpError(final String message) { + super(message); + } + + /** + * HttpError constructor with nested exception. + * + * @param message the exception message + * @param e the nested exception + */ + public HttpError(final String message, Throwable e) { + super(message, e); + } +} diff --git a/src/main/java/com/easypost/exception/API/JsonError.java b/src/main/java/com/easypost/exception/API/JsonError.java new file mode 100644 index 000000000..3a0a064b9 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/JsonError.java @@ -0,0 +1,24 @@ +package com.easypost.exception.API; + +import com.easypost.exception.EasyPostException; + +public class JsonError extends EasyPostException { + /** + * JsonError constructor. + * + * @param message the exception message + */ + public JsonError(final String message) { + super(message); + } + + /** + * JsonError constructor with nested exception. + * + * @param message the exception message + * @param e the nested exception + */ + public JsonError(final String message, Throwable e) { + super(message, e); + } +} diff --git a/src/main/java/com/easypost/exception/API/ServiceUnavailablError.java b/src/main/java/com/easypost/exception/API/ServiceUnavailableError.java similarity index 70% rename from src/main/java/com/easypost/exception/API/ServiceUnavailablError.java rename to src/main/java/com/easypost/exception/API/ServiceUnavailableError.java index a7e95779a..67363f961 100644 --- a/src/main/java/com/easypost/exception/API/ServiceUnavailablError.java +++ b/src/main/java/com/easypost/exception/API/ServiceUnavailableError.java @@ -5,7 +5,7 @@ import com.easypost.model.Error; import com.easypost.exception.EasyPostException; -public class ServiceUnavailablError extends EasyPostException { +public class ServiceUnavailableError extends EasyPostException { /** * ServiceUnavailablError constructor. * @@ -14,7 +14,7 @@ public class ServiceUnavailablError extends EasyPostException { * @param statusCode the exception status code * @param errors the errors array */ - public ServiceUnavailablError(final String message, final String code, final int statusCode, List errors) { + public ServiceUnavailableError(final String message, final String code, final int statusCode, List errors) { super(message, code, statusCode, errors); } } diff --git a/src/main/java/com/easypost/exception/General/FilteringError.java b/src/main/java/com/easypost/exception/General/FilteringError.java index a65580034..f4b93b270 100644 --- a/src/main/java/com/easypost/exception/General/FilteringError.java +++ b/src/main/java/com/easypost/exception/General/FilteringError.java @@ -11,4 +11,14 @@ public class FilteringError extends EasyPostException { public FilteringError(final String message) { super(message); } + + /** + * FilteringError constructor with nested exception. + * + * @param message the exception message + * @param e the nested exception + */ + public FilteringError(final String message, Throwable e) { + super(message, e); + } } diff --git a/src/main/java/com/easypost/exception/General/InvalidObjectError.java b/src/main/java/com/easypost/exception/General/InvalidObjectError.java index 641e4f63b..d9806d379 100644 --- a/src/main/java/com/easypost/exception/General/InvalidObjectError.java +++ b/src/main/java/com/easypost/exception/General/InvalidObjectError.java @@ -11,4 +11,14 @@ public class InvalidObjectError extends EasyPostException { public InvalidObjectError(final String message) { super(message); } + + /** + * InvalidObjectError constructor with nested exception. + * + * @param message the exception message + * @param e the nested exception + */ + public InvalidObjectError(final String message, Throwable e) { + super(message, e); + } } diff --git a/src/main/java/com/easypost/exception/General/InvalidParameterError.java b/src/main/java/com/easypost/exception/General/InvalidParameterError.java index 522a8f1a1..2eec87e70 100644 --- a/src/main/java/com/easypost/exception/General/InvalidParameterError.java +++ b/src/main/java/com/easypost/exception/General/InvalidParameterError.java @@ -1,24 +1,25 @@ package com.easypost.exception.General; +import com.easypost.Constants; import com.easypost.exception.EasyPostException; public class InvalidParameterError extends EasyPostException{ /** * InvalidParameterError constructor. * - * @param message the exception message + * @param parameterName the name of the invalid parameter */ - public InvalidParameterError(final String message) { - this(message, null); + public InvalidParameterError(final String parameterName) { + super(String.format(Constants.ErrorMessages.INVALID_PARAMETER, parameterName)); } /** - * constructor. + * InvalidParameterError constructor with nested exception. * - * @param message the exception message - * @param e the Throwable object + * @param parameterName the name of the invalid parameter + * @param e the nested exception */ - public InvalidParameterError(final String message, Throwable e) { - super(message, e); + public InvalidParameterError(final String parameterName, Throwable e) { + super(String.format(Constants.ErrorMessages.INVALID_PARAMETER, parameterName), e); } } diff --git a/src/main/java/com/easypost/exception/General/MissingParameterError.java b/src/main/java/com/easypost/exception/General/MissingParameterError.java index 84c0680a8..4b9c5825a 100644 --- a/src/main/java/com/easypost/exception/General/MissingParameterError.java +++ b/src/main/java/com/easypost/exception/General/MissingParameterError.java @@ -1,14 +1,25 @@ package com.easypost.exception.General; +import com.easypost.Constants; import com.easypost.exception.EasyPostException; public class MissingParameterError extends EasyPostException { /** * MissingParameterError constructor. * - * @param message the exception message + * @param parameterName the name of the missing parameter */ - public MissingParameterError(final String message) { - super(message); + public MissingParameterError(final String parameterName) { + super(String.format(Constants.ErrorMessages.MISSING_REQUIRED_PARAMETER, parameterName)); + } + + /** + * MissingParameterError constructor with nested exception. + * + * @param parameterName the name of the invalid parameter + * @param e the nested exception + */ + public MissingParameterError(final String parameterName, Throwable e) { + super(String.format(Constants.ErrorMessages.MISSING_REQUIRED_PARAMETER, parameterName), e); } } diff --git a/src/main/java/com/easypost/exception/General/SignatureVerificationError.java b/src/main/java/com/easypost/exception/General/SignatureVerificationError.java index c5c337839..57caf60e4 100644 --- a/src/main/java/com/easypost/exception/General/SignatureVerificationError.java +++ b/src/main/java/com/easypost/exception/General/SignatureVerificationError.java @@ -11,4 +11,14 @@ public class SignatureVerificationError extends EasyPostException { public SignatureVerificationError(final String message) { super(message); } + + /** + * SignatureVerificationError constructor with nested exception. + * + * @param message the exception message + * @param e the nested exception + */ + public SignatureVerificationError(final String message, Throwable e) { + super(message, e); + } } diff --git a/src/main/java/com/easypost/http/Requestor.java b/src/main/java/com/easypost/http/Requestor.java index 16e72d192..97058bbfa 100644 --- a/src/main/java/com/easypost/http/Requestor.java +++ b/src/main/java/com/easypost/http/Requestor.java @@ -10,7 +10,10 @@ import com.easypost.EasyPost; import com.easypost.Constants; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.API.EncodingError; +import com.easypost.exception.API.HttpError; +import com.easypost.exception.API.JsonError; +import com.easypost.exception.API.ServiceUnavailableError; import com.easypost.exception.API.ForbiddenError; import com.easypost.exception.API.GatewayTimeoutError; import com.easypost.exception.API.InternalServerError; @@ -20,7 +23,6 @@ import com.easypost.exception.API.PaymentError; import com.easypost.exception.API.RateLimitError; import com.easypost.exception.API.RedirectError; -import com.easypost.exception.API.ServiceUnavailablError; import com.easypost.exception.API.TimeoutError; import com.easypost.exception.API.UnauthorizedError; import com.easypost.exception.API.UnknownApiError; @@ -106,8 +108,8 @@ private static String convertSpaceToHyphen(String string) { * @param client EasyPostClient object. * @param method Method of the API request. * @return HttpsURLConnection - * @throws IOException - * @throws MissingParameterError + * @throws IOException If the connection cannot be opened. + * @throws MissingParameterError If the connection headers cannot be generated. */ private static javax.net.ssl.HttpsURLConnection createEasyPostConnection(final String url, final EasyPostClient client, @@ -124,19 +126,8 @@ private static javax.net.ssl.HttpsURLConnection createEasyPostConnection(final S URLStreamHandler customHandler = constructor.newInstance(); URL urlObj = new URL(null, url, customHandler); conn = (javax.net.ssl.HttpsURLConnection) urlObj.openConnection(); - } catch (ClassNotFoundException e) { - throw new IOException(e); - } catch (SecurityException e) { - throw new IOException(e); - } catch (NoSuchMethodException e) { - throw new IOException(e); - } catch (IllegalArgumentException e) { - throw new IOException(e); - } catch (InstantiationException e) { - throw new IOException(e); - } catch (IllegalAccessException e) { - throw new IOException(e); - } catch (InvocationTargetException e) { + } catch (ClassNotFoundException | SecurityException | NoSuchMethodException | IllegalArgumentException | + InstantiationException | IllegalAccessException | InvocationTargetException e) { throw new IOException(e); } } else if (EasyPost._vcr != null) { @@ -195,8 +186,8 @@ private static javax.net.ssl.HttpsURLConnection writeBody(final javax.net.ssl.Ht * @param query Query of the HTTP request. * @param client EasyPostClient object. * @return HttpsURLConnection object. - * @throws IOException - * @throws MissingParameterError + * @throws IOException If the connection cannot be opened. + * @throws MissingParameterError If the connection headers cannot be generated. */ private static javax.net.ssl.HttpsURLConnection createGetConnection(final String url, final String query, final EasyPostClient client) @@ -205,8 +196,7 @@ private static javax.net.ssl.HttpsURLConnection createGetConnection(final String if (query != null) { getURL = String.format("%s?%s", url, query); } - javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(getURL, client, "GET"); - return conn; + return createEasyPostConnection(getURL, client, "GET"); } /** @@ -216,8 +206,8 @@ private static javax.net.ssl.HttpsURLConnection createGetConnection(final String * @param body Body of the HTTP request. * @param client EasyPostClient object. * @return HttpsURLConnection object. - * @throws IOException - * @throws MissingParameterError + * @throws IOException If the connection cannot be opened. + * @throws MissingParameterError If the connection headers cannot be generated. */ private static javax.net.ssl.HttpsURLConnection createPostConnection(final String url, final JsonObject body, final EasyPostClient client) @@ -234,8 +224,8 @@ private static javax.net.ssl.HttpsURLConnection createPostConnection(final Strin * @param query Query of the HTTP request. * @param client EasyPostClient object. * @return HttpsURLConnection object. - * @throws IOException - * @throws MissingParameterError + * @throws IOException If the connection cannot be opened. + * @throws MissingParameterError If the connection headers cannot be generated. */ private static javax.net.ssl.HttpsURLConnection createDeleteConnection(final String url, final String query, final EasyPostClient client) @@ -244,8 +234,7 @@ private static javax.net.ssl.HttpsURLConnection createDeleteConnection(final Str if (query != null) { deleteUrl = String.format("%s?%s", url, query); } - javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(deleteUrl, client, "DELETE"); - return conn; + return createEasyPostConnection(deleteUrl, client, "DELETE"); } /** @@ -255,8 +244,8 @@ private static javax.net.ssl.HttpsURLConnection createDeleteConnection(final Str * @param body Body of the HTTP request. * @param client EasyPostClient object. * @return HttpsURLConnection object. - * @throws IOException - * @throws MissingParameterError + * @throws IOException If the connection cannot be opened. + * @throws MissingParameterError If the connection headers cannot be generated. */ private static javax.net.ssl.HttpsURLConnection createPutConnection(final String url, final JsonObject body, final EasyPostClient client) @@ -362,11 +351,11 @@ private static String getResponseBody(final InputStream responseStream) throws I * @param body Body of the HTTP request. * @param client EasyPostClient object * @return EasyPostResponse object. - * @throws EasyPostException + * @throws HttpError if the HTTP connection cannot be made. */ private static EasyPostResponse makeURLConnectionRequest(final RequestMethod method, final String url, final String query, final JsonObject body, - final EasyPostClient client) throws EasyPostException { + final EasyPostClient client) throws HttpError { javax.net.ssl.HttpsURLConnection conn = null; try { switch (method) { @@ -383,7 +372,7 @@ private static EasyPostResponse makeURLConnectionRequest(final RequestMethod met conn = createDeleteConnection(url, query, client); break; default: - throw new EasyPostException( + throw new HttpError( String.format("Unrecognized HTTP method %s. Please contact EasyPost at %s.", method, Constants.EASYPOST_SUPPORT_EMAIL)); } @@ -399,8 +388,12 @@ private static EasyPostResponse makeURLConnectionRequest(final RequestMethod met rBody = getResponseBody(conn.getErrorStream()); } return new EasyPostResponse(rCode, rBody); + } catch (MissingParameterError e) { + throw new HttpError(String.format( + "Could not build EasyPost API request. If this problem persists, please contact us at %s.", + Constants.EASYPOST_SUPPORT_EMAIL)); } catch (IOException e) { - throw new EasyPostException(String.format("Could not connect to EasyPost (%s). " + + throw new HttpError(String.format("Could not connect to EasyPost (%s). " + "Please check your internet connection and try again. If this problem persists," + "please contact us at %s.", client.getApiBase(), Constants.EASYPOST_SUPPORT_EMAIL), e); } finally { @@ -419,11 +412,29 @@ private static EasyPostResponse makeURLConnectionRequest(final RequestMethod met * @param params The params of the API request. * @param clazz The class of the object for deserialization * @param client The EasyPostClient object. - * @return A class object. - * @throws EasyPostException when the request fails. + * @return A clazz-type object. + * @throws HttpError when the HTTP connection cannot be made. + * @throws EncodingError when the request query cannot be encoded. + * @throws JsonError when the request body cannot be encoded. + * @throws RedirectError when the request is redirected. + * @throws UnauthorizedError when the request is unauthorized. + * @throws ForbiddenError when the request is forbidden. + * @throws PaymentError when the request requires payment. + * @throws NotFoundError when the request endpoint is not found. + * @throws MethodNotAllowedError when the request method is not allowed. + * @throws TimeoutError when the request times out. + * @throws InvalidRequestError when the request is invalid. + * @throws RateLimitError when the request exceeds the rate limit. + * @throws InternalServerError when the request fails due to an internal server error. + * @throws ServiceUnavailableError when the request fails due to a service unavailability. + * @throws GatewayTimeoutError when the request fails due to a gateway timeout. + * @throws UnknownApiError when the request fails due to an unknown API error. */ public static T request(final RequestMethod method, String url, final Map params, - final Class clazz, final EasyPostClient client) throws EasyPostException { + final Class clazz, final EasyPostClient client) + throws EncodingError, JsonError, RedirectError, UnauthorizedError, ForbiddenError, PaymentError, + NotFoundError, MethodNotAllowedError, TimeoutError, InvalidRequestError, RateLimitError, + InternalServerError, ServiceUnavailableError, GatewayTimeoutError, UnknownApiError, HttpError { String originalDNSCacheTTL = null; boolean allowedToSetTTL = true; url = String.format(url, client.getApiBase(), client.getApiVersion()); @@ -459,12 +470,29 @@ public static T request(final RequestMethod method, String url, final Map T httpRequest(final RequestMethod method, final String url, final Map params, - final Class clazz, final EasyPostClient client) throws EasyPostException { + final Class clazz, final EasyPostClient client) + throws EncodingError, JsonError, RedirectError, UnauthorizedError, ForbiddenError, PaymentError, + NotFoundError, MethodNotAllowedError, TimeoutError, InvalidRequestError, RateLimitError, + InternalServerError, ServiceUnavailableError, GatewayTimeoutError, UnknownApiError, HttpError { String query = null; JsonObject body = null; if (params != null) { @@ -474,7 +502,7 @@ protected static T httpRequest(final RequestMethod method, final String url, try { query = createQuery(params); } catch (UnsupportedEncodingException e) { - throw new EasyPostException( + throw new EncodingError( String.format("Unable to encode parameters to %s. Please email %s for assistance.", Constants.Http.CHARSET, Constants.EASYPOST_SUPPORT_EMAIL), e); } @@ -484,7 +512,7 @@ protected static T httpRequest(final RequestMethod method, final String url, try { body = createBody(params); } catch (Exception e) { - throw new EasyPostException(String.format( + throw new JsonError(String.format( "Unable to create JSON body from parameters. Please email %s for assistance.", Constants.EASYPOST_SUPPORT_EMAIL), e); } @@ -520,9 +548,25 @@ protected static T httpRequest(final RequestMethod method, final String url, * Handles API error based on the error status code. * * @param rBody Body of the error message. - * @param rCode Status code of the error messsage. + * @param rCode Status code of the error message. + * @throws RedirectError when the request is redirected. + * @throws UnauthorizedError when the request is unauthorized. + * @throws ForbiddenError when the request is forbidden. + * @throws PaymentError when the request requires payment. + * @throws NotFoundError when the request endpoint is not found. + * @throws MethodNotAllowedError when the request method is not allowed. + * @throws TimeoutError when the request times out. + * @throws InvalidRequestError when the request is invalid. + * @throws RateLimitError when the request exceeds the rate limit. + * @throws InternalServerError when the request fails due to an internal server error. + * @throws ServiceUnavailableError when the request fails due to a service unavailability. + * @throws GatewayTimeoutError when the request fails due to a gateway timeout. + * @throws UnknownApiError when the request fails due to an unknown API error. */ - protected static void handleAPIError(String rBody, final int rCode) throws EasyPostException { + protected static void handleAPIError(String rBody, final int rCode) + throws RedirectError, UnauthorizedError, ForbiddenError, PaymentError, NotFoundError, MethodNotAllowedError, + TimeoutError, InvalidRequestError, RateLimitError, InternalServerError, ServiceUnavailableError, + GatewayTimeoutError, UnknownApiError { if (rBody == null || rBody.length() == 0) { rBody = "{}"; } @@ -555,7 +599,7 @@ protected static void handleAPIError(String rBody, final int rCode) throws EasyP case Constants.ErrorCodes.INTERNAL_SERVER_ERROR: throw new InternalServerError(errorMessage, errorCode, rCode, errors); case Constants.ErrorCodes.SERVICE_UNAVAILABLE_ERROR: - throw new ServiceUnavailablError(errorMessage, errorCode, rCode, errors); + throw new ServiceUnavailableError(errorMessage, errorCode, rCode, errors); case Constants.ErrorCodes.GATEWAY_TIMEOUT_ERROR: throw new GatewayTimeoutError(errorMessage, errorCode, rCode, errors); default: @@ -563,10 +607,21 @@ protected static void handleAPIError(String rBody, final int rCode) throws EasyP } } + /** + * Make a request using Google's App Engine library. + * + * @param method The HTTP method. + * @param url The URL to make the request to. + * @param query The query string. + * @param body The request body. + * @param client The EasyPost client. + * @return The response from the API. + * @throws HttpError when the request process fails. + */ @Generated // Exclude from the jacoco test coverage private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, String url, final String query, final JsonObject body, final EasyPostClient client) - throws EasyPostException { + throws HttpError { String unknownErrorMessage = String.format( "Sorry, an unknown error occurred while trying to use the Google App Engine runtime." + "Please email %s for assistance.", Constants.EASYPOST_SUPPORT_EMAIL); @@ -629,26 +684,11 @@ private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, return new EasyPostResponse(responseCode, responseBody); - } catch (InvocationTargetException e) { - throw new EasyPostException(unknownErrorMessage, e); - } catch (MalformedURLException e) { - throw new EasyPostException(unknownErrorMessage, e); - } catch (NoSuchFieldException e) { - throw new EasyPostException(unknownErrorMessage, e); - } catch (SecurityException e) { - throw new EasyPostException(unknownErrorMessage, e); - } catch (NoSuchMethodException e) { - throw new EasyPostException(unknownErrorMessage, e); - } catch (ClassNotFoundException e) { - throw new EasyPostException(unknownErrorMessage, e); - } catch (IllegalArgumentException e) { - throw new EasyPostException(unknownErrorMessage, e); - } catch (IllegalAccessException e) { - throw new EasyPostException(unknownErrorMessage, e); - } catch (InstantiationException e) { - throw new EasyPostException(unknownErrorMessage, e); - } catch (UnsupportedEncodingException e) { - throw new EasyPostException(unknownErrorMessage, e); + // TODO: This suppression makes it a bit confusing what the root cause of the error is downstream. + } catch (InvocationTargetException | MalformedURLException | SecurityException | NoSuchFieldException | + NoSuchMethodException | ClassNotFoundException | IllegalArgumentException | IllegalAccessException | + InstantiationException | MissingParameterError | UnsupportedEncodingException e) { + throw new HttpError(unknownErrorMessage, e); } } } diff --git a/src/main/java/com/easypost/model/SmartrateAccuracy.java b/src/main/java/com/easypost/model/SmartrateAccuracy.java index 7c53b86d8..ae5b7cc48 100644 --- a/src/main/java/com/easypost/model/SmartrateAccuracy.java +++ b/src/main/java/com/easypost/model/SmartrateAccuracy.java @@ -1,6 +1,5 @@ package com.easypost.model; -import com.easypost.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.InvalidParameterError; @@ -40,6 +39,6 @@ public static SmartrateAccuracy getByKeyName(String keyName) throws EasyPostExce return smartrateAccuracy; } } - throw new InvalidParameterError(String.format(Constants.ErrorMessages.INVALID_PARAMETER, "smartrateAccuracy")); + throw new InvalidParameterError("smartrateAccuracy"); } } diff --git a/src/main/java/com/easypost/model/TimeInTransit.java b/src/main/java/com/easypost/model/TimeInTransit.java index 7f6dd7932..e4b4fcdaa 100644 --- a/src/main/java/com/easypost/model/TimeInTransit.java +++ b/src/main/java/com/easypost/model/TimeInTransit.java @@ -1,6 +1,5 @@ package com.easypost.model; -import com.easypost.Constants; import com.easypost.exception.EasyPostException; import com.easypost.exception.General.InvalidParameterError; import com.google.gson.annotations.SerializedName; @@ -52,7 +51,7 @@ public int getSmartRateAccuracy(final String percentile) throws EasyPostExceptio case "percentile_99": return this.percentile99; default: - throw new InvalidParameterError(String.format(Constants.ErrorMessages.INVALID_PARAMETER, "percentile")); + throw new InvalidParameterError("percentile"); } } @@ -80,7 +79,7 @@ public int getBySmartrateAccuracy(SmartrateAccuracy accuracy) throws EasyPostExc case Percentile99: return this.percentile99; default: - throw new EasyPostException("Invalid SmartrateAccuracy enum value."); + throw new InvalidParameterError("accuracy"); } } diff --git a/src/main/java/com/easypost/service/EasyPostClient.java b/src/main/java/com/easypost/service/EasyPostClient.java index 2ca487284..83e20d2a4 100644 --- a/src/main/java/com/easypost/service/EasyPostClient.java +++ b/src/main/java/com/easypost/service/EasyPostClient.java @@ -104,7 +104,7 @@ public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTim public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTimeoutMilliseconds, String apiBase) throws MissingParameterError { if (apiKey == null || apiKey.isEmpty()) { - throw new MissingParameterError(Constants.ErrorMessages.INVALID_API_KEY_TYPE); + throw new MissingParameterError("apiKey"); } this.apiBase = apiBase; diff --git a/src/main/java/com/easypost/service/ReferralCustomerService.java b/src/main/java/com/easypost/service/ReferralCustomerService.java index 2f6224ecf..1c6f8af82 100644 --- a/src/main/java/com/easypost/service/ReferralCustomerService.java +++ b/src/main/java/com/easypost/service/ReferralCustomerService.java @@ -1,6 +1,7 @@ package com.easypost.service; import com.easypost.Constants; +import com.easypost.exception.API.EncodingError; import com.easypost.exception.EasyPostException; import com.easypost.exception.API.ExternalApiError; import com.easypost.http.Requestor; @@ -13,6 +14,7 @@ import java.io.BufferedReader; import java.io.DataOutputStream; +import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; @@ -25,7 +27,7 @@ public class ReferralCustomerService { /** * ReferralCustomerService constructor. - * + * * @param client The client object. */ ReferralCustomerService(EasyPostClient client) { @@ -63,8 +65,8 @@ public void updateEmail(final String email, final String userId) throws EasyPost params.put("email", email); wrappedParams.put("user", params); - String url = String.format("%s/%s/%s/%s", client.getApiBase(), client.getApiVersion(), "referral_customers", - userId); + String url = + String.format("%s/%s/%s/%s", client.getApiBase(), client.getApiVersion(), "referral_customers", userId); Requestor.request(RequestMethod.PUT, url, wrappedParams, ReferralCustomer.class, client); } @@ -76,8 +78,7 @@ public void updateEmail(final String email, final String userId) throws EasyPost * @return ReferralCustomerCollection object. * @throws EasyPostException when the request fails. */ - public ReferralCustomerCollection all(final Map params) - throws EasyPostException { + public ReferralCustomerCollection all(final Map params) throws EasyPostException { String url = String.format("%s/%s/%s", client.getApiBase(), client.getApiVersion(), "referral_customers"); return Requestor.request(RequestMethod.GET, url, params, ReferralCustomerCollection.class, client); @@ -93,11 +94,11 @@ public ReferralCustomerCollection all(final Map params) * @param expirationYear Expiration year of the credit card. * @param cvc CVC of the credit card. * @return PaymentMethodObject object. - * @throws Exception when the request fails. + * @throws EasyPostException when the request fails. */ public PaymentMethodObject addCreditCardToUser(final String referralApiKey, final String number, - final int expirationMonth, - final int expirationYear, final String cvc) throws Exception { + final int expirationMonth, final int expirationYear, + final String cvc) throws EasyPostException { return addCreditCardToUser(referralApiKey, number, expirationMonth, expirationYear, cvc, PaymentMethod.Priority.PRIMARY); } @@ -113,12 +114,12 @@ public PaymentMethodObject addCreditCardToUser(final String referralApiKey, fina * @param cvc CVC of the credit card. * @param priority Priority of this credit card. * @return PaymentMethodObject object. - * @throws Exception when the request fails. + * @throws EasyPostException when the request fails. */ public PaymentMethodObject addCreditCardToUser(final String referralApiKey, final String number, - final int expirationMonth, - final int expirationYear, final String cvc, - final PaymentMethod.Priority priority) throws Exception { + final int expirationMonth, final int expirationYear, + final String cvc, final PaymentMethod.Priority priority) + throws EasyPostException { String easypostStripeApiKey = retrieveEasypostStripeApiKey(); String stripeToken; @@ -138,10 +139,10 @@ public PaymentMethodObject addCreditCardToUser(final String referralApiKey, fina * @throws EasyPostException when the request fails. */ private String retrieveEasypostStripeApiKey() throws EasyPostException { - String url = String.format("%s/%s/%s", client.getApiBase(), client.getApiVersion(), - "partners/stripe_public_key"); - @SuppressWarnings("unchecked") - Map response = Requestor.request(RequestMethod.GET, url, null, Map.class, client); + String url = + String.format("%s/%s/%s", client.getApiBase(), client.getApiVersion(), "partners/stripe_public_key"); + @SuppressWarnings ("unchecked") Map response = + Requestor.request(RequestMethod.GET, url, null, Map.class, client); return response.getOrDefault("public_key", ""); } @@ -155,11 +156,12 @@ private String retrieveEasypostStripeApiKey() throws EasyPostException { * @param cvc CVC of the credit card. * @param easypostStripeApiKey EasyPost Stripe API key. * @return Stripe token. - * @throws Exception when the request fails. + * @throws EncodingError when the request details could not be encoded. + * @throws IOException when the request fails. */ private static String createStripeToken(final String number, final int expirationMonth, final int expirationYear, - final String cvc, - final String easypostStripeApiKey) throws Exception { + final String cvc, final String easypostStripeApiKey) + throws EncodingError, IOException { Map params = new HashMap<>(); params.put("number", number); params.put("exp_month", String.valueOf(expirationMonth)); @@ -200,8 +202,8 @@ private static String createStripeToken(final String number, final int expiratio String responseBody = response.toString(); - @SuppressWarnings("unchecked") - Map responseMap = Constants.Http.GSON.fromJson(responseBody, Map.class); + @SuppressWarnings ("unchecked") Map responseMap = + Constants.Http.GSON.fromJson(responseBody, Map.class); return responseMap.get("id").toString(); } @@ -216,7 +218,7 @@ private static String createStripeToken(final String number, final int expiratio * @throws EasyPostException when the request fails. */ private PaymentMethodObject createEasypostCreditCard(final String referralApiKey, final String stripeObjectId, - final String priority) throws EasyPostException { + final String priority) throws EasyPostException { Map params = new HashMap<>(); params.put("stripe_object_id", stripeObjectId); params.put("priority", priority); diff --git a/src/main/java/com/easypost/service/ReportService.java b/src/main/java/com/easypost/service/ReportService.java index 835829501..e2be37143 100644 --- a/src/main/java/com/easypost/service/ReportService.java +++ b/src/main/java/com/easypost/service/ReportService.java @@ -1,9 +1,9 @@ package com.easypost.service; import com.easypost.Constants; +import com.easypost.exception.API.EncodingError; import com.easypost.exception.EasyPostException; -import com.easypost.exception.General.InvalidObjectError; -import com.easypost.exception.General.InvalidParameterError; +import com.easypost.exception.General.MissingParameterError; import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.Report; @@ -19,7 +19,7 @@ public class ReportService { /** * ReportService constructor. - * + * * @param client The client object. */ ReportService(EasyPostClient client) { @@ -31,16 +31,18 @@ public class ReportService { * * @param params a map of parameters. * @return Report object. - * @throws EasyPostException when the request fails. + * @throws EncodingError if the parameters cannot be encoded. + * @throws MissingParameterError if required parameters are missing. + * @throws EasyPostException when the request fails. */ public Report create(final Map params) throws EasyPostException { if (params.containsKey("type")) { HashMap paramsWithoutType = new HashMap<>(params); paramsWithoutType.remove("type"); - return Requestor.request(RequestMethod.POST, - reportURL((String) params.get("type")), paramsWithoutType, Report.class, client); + return Requestor.request(RequestMethod.POST, reportURL((String) params.get("type")), paramsWithoutType, + Report.class, client); } else { - throw new InvalidObjectError(String.format(Constants.ErrorMessages.MISSING_REQUIRED_PARAMETER, "type")); + throw new MissingParameterError("type"); } } @@ -49,14 +51,14 @@ public Report create(final Map params) throws EasyPostException * * @param type the type of report to generate. * @return the URL to generate the report. - * @throws EasyPostException when the request fails. + * @throws EncodingError when the request cannot be encoded properly. */ protected String reportURL(final String type) throws EasyPostException { try { String urlType = URLEncoder.encode(type, "UTF-8").toLowerCase(); return String.format("%s/%s/reports/%s/", client.getApiBase(), client.getApiVersion(), urlType); } catch (java.io.UnsupportedEncodingException e) { - throw new InvalidParameterError(String.format(Constants.ErrorMessages.ENCODED_ERROR, "report type"), e); + throw new EncodingError(String.format(Constants.ErrorMessages.ENCODED_ERROR, "report type"), e); } } diff --git a/src/main/java/com/easypost/utils/Utilities.java b/src/main/java/com/easypost/utils/Utilities.java index 6ddfaf42a..5332563a3 100644 --- a/src/main/java/com/easypost/utils/Utilities.java +++ b/src/main/java/com/easypost/utils/Utilities.java @@ -1,7 +1,7 @@ package com.easypost.utils; import com.easypost.Constants; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.API.EncodingError; import com.easypost.exception.General.FilteringError; import com.easypost.model.Rate; @@ -18,22 +18,18 @@ public abstract class Utilities { * @param carriers the carriers to use in the filter. * @param services the services to use in the filter. * @return lowest Rate object - * @throws EasyPostException when the request fails. + * @throws FilteringError when the filters could not be applied. */ public static Rate getLowestObjectRate(List rates, List carriers, List services) - throws EasyPostException { + throws FilteringError { Rate lowestRate = null; if (carriers != null) { - for (int i = 0; i < carriers.size(); i++) { - carriers.set(i, carriers.get(i).toLowerCase()); - } + carriers.replaceAll(String::toLowerCase); } if (services != null) { - for (int i = 0; i < services.size(); i++) { - services.set(i, services.get(i).toLowerCase()); - } + services.replaceAll(String::toLowerCase); } for (Rate rate : rates) { @@ -61,9 +57,9 @@ public static Rate getLowestObjectRate(List rates, List carriers, * @param params Map of parameters to be encoded. * @param parentKey Parent key in the encoded URL. * @return Encoded URL for Stripe API call. - * @throws Exception + * @throws EncodingError when the URL encoding fails. */ - public static String getEncodedURL(Map params, String parentKey) throws Exception { + public static String getEncodedURL(Map params, String parentKey) throws EncodingError { StringBuilder result = new StringBuilder(); boolean first = true; @@ -80,7 +76,7 @@ public static String getEncodedURL(Map params, String parentKey) result.append(URLEncoder.encode(entry.getValue(), "UTF-8")); } } catch (Exception e) { - throw new Exception("Something went wrong during the URL encoding."); + throw new EncodingError("Something went wrong during the URL encoding."); } return result.toString(); diff --git a/src/test/java/com/easypost/ErrorTest.java b/src/test/java/com/easypost/ErrorTest.java index acb9789e1..044086e1f 100644 --- a/src/test/java/com/easypost/ErrorTest.java +++ b/src/test/java/com/easypost/ErrorTest.java @@ -2,7 +2,7 @@ import com.easypost.exception.EasyPostException; import com.easypost.exception.API.RedirectError; -import com.easypost.exception.API.ServiceUnavailablError; +import com.easypost.exception.API.ServiceUnavailableError; import com.easypost.exception.API.UnauthorizedError; import com.easypost.exception.API.UnknownApiError; import com.easypost.exception.General.MissingParameterError; @@ -85,7 +85,7 @@ public void testKnownApiException() throws EasyPostException { put(429, RateLimitError.class); put(444, UnknownApiError.class); put(500, InternalServerError.class); - put(503, ServiceUnavailablError.class); + put(503, ServiceUnavailableError.class); put(504, GatewayTimeoutError.class); }}; diff --git a/src/test/java/com/easypost/ReportTest.java b/src/test/java/com/easypost/ReportTest.java index 40658fc03..83dbbea5f 100644 --- a/src/test/java/com/easypost/ReportTest.java +++ b/src/test/java/com/easypost/ReportTest.java @@ -1,7 +1,7 @@ package com.easypost; import com.easypost.exception.EasyPostException; -import com.easypost.exception.General.InvalidObjectError; +import com.easypost.exception.General.MissingParameterError; import com.easypost.model.Report; import com.easypost.model.ReportCollection; import org.junit.jupiter.api.BeforeAll; @@ -223,6 +223,6 @@ public void testCreateReportWithoutType() throws EasyPostException { reportParams.put("start_date", Fixtures.reportDate()); reportParams.put("end_date", Fixtures.reportDate()); - assertThrows(InvalidObjectError.class, () -> vcr.client.report.create(reportParams)); + assertThrows(MissingParameterError.class, () -> vcr.client.report.create(reportParams)); } } From 97ce3f92ebcf65f0e759d3f8007d2e5e5c974a29 Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Thu, 8 Dec 2022 15:14:00 -0700 Subject: [PATCH 030/208] Fix EasyVCR-related issues for unit tests (#216) - Fix EasyVCR-related issues for unit tests - Re-enable disabled unit tests (no more disabled unit tests) - Change GitHub runner OS --- .github/workflows/ci.yml | 6 +- .../service/ReferralCustomerService.java | 28 +- .../referral/referral_add_credit_card.json | 114 +++++- .../cassettes/shipment/create_with_ids.json | 383 ++++++++++++++++++ src/test/java/com/easypost/ReferralTest.java | 2 - src/test/java/com/easypost/ShipmentTest.java | 9 +- 6 files changed, 503 insertions(+), 39 deletions(-) create mode 100644 src/test/cassettes/shipment/create_with_ids.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e67b71ee..6e4f7f740 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: javaversion: [ "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19" ] @@ -46,7 +46,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: "./coverage.lcov" lint: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - name: Run CheckStyle checks @@ -57,7 +57,7 @@ jobs: checkstyle_config: easypost_java_style.xml tool_name: "style_enforcer" security: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - name: Load Maven dependencies and CVE database cache diff --git a/src/main/java/com/easypost/service/ReferralCustomerService.java b/src/main/java/com/easypost/service/ReferralCustomerService.java index 1c6f8af82..7daaa4b4c 100644 --- a/src/main/java/com/easypost/service/ReferralCustomerService.java +++ b/src/main/java/com/easypost/service/ReferralCustomerService.java @@ -1,6 +1,7 @@ package com.easypost.service; import com.easypost.Constants; +import com.easypost.EasyPost; import com.easypost.exception.API.EncodingError; import com.easypost.exception.EasyPostException; import com.easypost.exception.API.ExternalApiError; @@ -13,12 +14,10 @@ import com.easypost.utils.Utilities; import java.io.BufferedReader; -import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; -import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; @@ -162,28 +161,33 @@ private String retrieveEasypostStripeApiKey() throws EasyPostException { private static String createStripeToken(final String number, final int expirationMonth, final int expirationYear, final String cvc, final String easypostStripeApiKey) throws EncodingError, IOException { + String apiToken = String.format("%s %s", "Bearer", easypostStripeApiKey); + Map params = new HashMap<>(); params.put("number", number); params.put("exp_month", String.valueOf(expirationMonth)); params.put("exp_year", String.valueOf(expirationYear)); params.put("cvc", cvc); - URL stripeUrl = new URL("https://api.stripe.com/v1/tokens"); - HttpURLConnection conn = (HttpURLConnection) stripeUrl.openConnection(); - String apiToken = String.format("%s %s", "Bearer", easypostStripeApiKey); + String encodedURL = Utilities.getEncodedURL(params, "card"); + URL stripeUrl = new URL("https://api.stripe.com/v1/tokens?" + encodedURL); + + HttpURLConnection conn; + if (EasyPost._vcr != null) { + try { + conn = EasyPost._vcr.getHttpUrlConnection(stripeUrl).openConnectionSecure(); + } catch (Exception vcrException) { + throw new IOException(vcrException); + } + } else { + conn = (HttpURLConnection) stripeUrl.openConnection(); + } conn.setRequestMethod("POST"); conn.setRequestProperty("Authorization", apiToken); conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); conn.setDoOutput(true); - String encodedURL = Utilities.getEncodedURL(params, "card"); - byte[] postData = encodedURL.getBytes(StandardCharsets.UTF_8); - - try (DataOutputStream wr = new DataOutputStream(conn.getOutputStream())) { - wr.write(postData); - } - StringBuilder response; try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) { diff --git a/src/test/cassettes/referral/referral_add_credit_card.json b/src/test/cassettes/referral/referral_add_credit_card.json index 8cf550767..0a4f28825 100644 --- a/src/test/cassettes/referral/referral_add_credit_card.json +++ b/src/test/cassettes/referral/referral_add_credit_card.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1669142059, + "recordedAt": 1670453545, "request": { "body": "", "method": "GET", @@ -28,7 +28,7 @@ "0" ], "x-node": [ - "bigweb12nuq" + "bigweb3nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -55,17 +55,18 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "816b7d7e637d162be0ed0b67003d3f7b" + "99d32e0663911929ec9f76e0001e67ad" ], "x-proxied": [ - "extlb1nuq 29913d444b", - "intlb1nuq 29913d444b" + "extlb3wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb2nuq 29913d444b" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.017105" + "0.016522" ], "etag": [ "W/\"86cc970265a111486b443bf66ef85e91\"" @@ -74,7 +75,7 @@ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202211211953-c7d3fecdcf-master" + "easypost-202212072114-cbd87d5dd7-master" ], "cache-control": [ "private, no-cache, no-store" @@ -86,12 +87,91 @@ }, "uri": "https://api.easypost.com/v2/partners/stripe_public_key" }, - "duration": 400 + "duration": 510 + }, + { + "recordedAt": 1670453546, + "request": { + "body": "", + "method": "POST", + "headers": { + "Content-Type": [ + "application/x-www-form-urlencoded" + ] + }, + "uri": "https://api.stripe.com/v1/tokens?card%5Bcvc%5D\u003dREDACTED\u0026card%5Bexp_year%5D\u003d2028\u0026card%5Bnumber%5D\u003dREDACTED\u0026card%5Bexp_month%5D\u003d5" + }, + "response": { + "body": "{\n \"livemode\": true,\n \"created\": 1.670453546E9,\n \"client_ip\": \"REDACTED\",\n \"id\": \"tok_0MCWTWDqT4huGUvdRss7rShI\",\n \"used\": false,\n \"type\": \"card\",\n \"card\": {\n \"address_zip_check\": null,\n \"country\": \"US\",\n \"last4\": \"6170\",\n \"funding\": \"credit\",\n \"address_country\": null,\n \"address_state\": null,\n \"exp_month\": 5.0,\n \"exp_year\": 2028.0,\n \"address_city\": null,\n \"tokenization_method\": null,\n \"cvc_check\": \"unchecked\",\n \"address_line2\": null,\n \"address_line1\": null,\n \"name\": null,\n \"id\": \"card_0MCWTWDqT4huGUvdxJDpWTkZ\",\n \"address_line1_check\": null,\n \"address_zip\": null,\n \"dynamic_last4\": null,\n \"brand\": \"Visa\",\n \"object\": \"card\"\n },\n \"object\": \"token\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "Server": [ + "nginx" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Access-Control-Allow-Methods": [ + "GET, POST, HEAD, OPTIONS, DELETE" + ], + "Idempotency-Key": [ + "ceb6ba5b-6211-4bb5-8407-0a4112a6fd20" + ], + "Connection": [ + "keep-alive" + ], + "Original-Request": [ + "req_cvg4JaGUqXU2Re" + ], + "Stripe-Version": [ + "2020-08-27" + ], + "Stripe-Should-Retry": [ + "false" + ], + "Date": [ + "Wed, 07 Dec 2022 22:52:26 GMT" + ], + "Strict-Transport-Security": [ + "max-age\u003d63072000; includeSubDomains; preload" + ], + "Access-Control-Expose-Headers": [ + "Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required" + ], + "Cache-Control": [ + "no-cache, no-store" + ], + "Access-Control-Allow-Credentials": [ + "true" + ], + "Access-Control-Max-Age": [ + "300" + ], + "Content-Length": [ + "720" + ], + "Request-Id": [ + "req_cvg4JaGUqXU2Re" + ], + "Content-Type": [ + "application/json" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.stripe.com/v1/tokens?card%5Bcvc%5D\u003dREDACTED\u0026card%5Bexp_year%5D\u003d2028\u0026card%5Bnumber%5D\u003dREDACTED\u0026card%5Bexp_month%5D\u003d5" + }, + "duration": 644 }, { - "recordedAt": 1669142064, + "recordedAt": 1670453550, "request": { - "body": "{\n \"credit_card\": {\n \"stripe_object_id\": \"tok_0M71IWDqT4huGUvdZspMYMfr\",\n \"priority\": \"primary\"\n }\n}", + "body": "{\n \"credit_card\": {\n \"stripe_object_id\": \"tok_0MCWTWDqT4huGUvdRss7rShI\",\n \"priority\": \"primary\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -107,7 +187,7 @@ "uri": "https://api.easypost.com/v2/credit_cards" }, "response": { - "body": "{\n \"last4\": \"6170\",\n \"disabled_at\": null,\n \"name\": null,\n \"exp_month\": 5.0,\n \"id\": \"card_5eeca4edec3045c8ada6ccd52824d6c1\",\n \"exp_year\": 2028.0,\n \"brand\": \"Visa\",\n \"object\": \"CreditCard\"\n}", + "body": "{\n \"last4\": \"6170\",\n \"disabled_at\": null,\n \"name\": null,\n \"exp_month\": 5.0,\n \"id\": \"card_4ad89a83939644e382b3520f41d0e51c\",\n \"exp_year\": 2028.0,\n \"brand\": \"Visa\",\n \"object\": \"CreditCard\"\n}", "httpVersion": null, "headers": { "null": [ @@ -120,7 +200,7 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb4nuq" ], "x-frame-options": [ "SAMEORIGIN" @@ -147,7 +227,7 @@ "1; mode\u003dblock" ], "x-ep-request-uuid": [ - "d96d15b1637d162ce0ed0b81003bbeb2" + "e26b982c6391192aec7a46e100202d39" ], "x-proxied": [ "extlb2nuq 29913d444b", @@ -157,16 +237,16 @@ "strict-origin-when-cross-origin" ], "x-runtime": [ - "3.862250" + "4.135978" ], "etag": [ - "W/\"195f283080f5458e3b2402386b36ff63\"" + "W/\"1fdc43c736f661170d96af73b24c6201\"" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202211211953-c7d3fecdcf-master" + "easypost-202212072114-cbd87d5dd7-master" ], "cache-control": [ "private, no-cache, no-store" @@ -178,6 +258,6 @@ }, "uri": "https://api.easypost.com/v2/credit_cards" }, - "duration": 4116 + "duration": 4364 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/create_with_ids.json b/src/test/cassettes/shipment/create_with_ids.json new file mode 100644 index 000000000..b56d349df --- /dev/null +++ b/src/test/cassettes/shipment/create_with_ids.json @@ -0,0 +1,383 @@ +[ + { + "recordedAt": 1670532250, + "request": { + "body": "{\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/addresses" + }, + "response": { + "body": "{\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-12-08T20:44:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-12-08T20:44:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_113855d4773911ed9c27ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "461" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb2nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "8b57e25f63924c9afe7189cd000fb578" + ], + "x-proxied": [ + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.034476" + ], + "etag": [ + "W/\"c7b7a601758a03f7d3213a791d98b888\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/addresses/adr_113855d4773911ed9c27ac1f6bc72124" + ], + "x-version-label": [ + "easypost-202212081958-674da0c6cf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/addresses" + }, + "duration": 401 + }, + { + "recordedAt": 1670532250, + "request": { + "body": "{\n \"address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/addresses" + }, + "response": { + "body": "{\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-12-08T20:44:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-12-08T20:44:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_11916632773911ed8d47ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "459" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb2nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "fbbd444663924c9afe7189cf0011d29e" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.055236" + ], + "etag": [ + "W/\"045bd7e4282c3688d2602bd1c7e413cd\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/addresses/adr_11916632773911ed8d47ac1f6bc7bdc6" + ], + "x-version-label": [ + "easypost-202212081958-674da0c6cf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/addresses" + }, + "duration": 210 + }, + { + "recordedAt": 1670532251, + "request": { + "body": "{\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/parcels" + }, + "response": { + "body": "{\n \"mode\": \"test\",\n \"updated_at\": \"2022-12-08T20:44:11Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-12-08T20:44:11Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_4fd654b687a94f449bb62c31ec8423cd\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "229" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb5nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "fbbd444463924c9bfe7189d10011d2ea" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.027685" + ], + "etag": [ + "W/\"6cbd4a2b8928bf827f7efdfa947ab377\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/prcl_4fd654b687a94f449bb62c31ec8423cd/parcels" + ], + "x-version-label": [ + "easypost-202212081958-674da0c6cf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/parcels" + }, + "duration": 191 + }, + { + "recordedAt": 1670532252, + "request": { + "body": "{\n \"carbon_offset\": false,\n \"shipment\": {\n \"parcel\": {\n \"id\": \"prcl_4fd654b687a94f449bb62c31ec8423cd\"\n },\n \"to_address\": {\n \"id\": \"adr_11916632773911ed8d47ac1f6bc7bdc6\"\n },\n \"from_address\": {\n \"id\": \"adr_113855d4773911ed9c27ac1f6bc72124\"\n }\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "response": { + "body": "{\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2022-12-08T20:44:11Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2022-12-08T20:44:12Z\",\n \"selected_rate\": null,\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\n },\n \"tracker\": null,\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-12-08T20:44:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-12-08T20:44:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_113855d4773911ed9c27ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d813e04339d94b8aa6867563c2766559\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-12-08T20:44:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-12-08T20:44:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_113855d4773911ed9c27ac1f6bc72124\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"customs_info\": null,\n \"postage_label\": null,\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2022-12-08T20:44:11Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2022-12-08T20:44:11Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_4fd654b687a94f449bb62c31ec8423cd\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-12-08T20:44:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-12-08T20:44:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_11916632773911ed8d47ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.15\",\n \"created_at\": \"2022-12-08T20:44:12Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d813e04339d94b8aa6867563c2766559\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.75\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-12-08T20:44:12Z\",\n \"rate\": \"8.15\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_54e707b270574ac8879db3fabcc154db\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"29.75\",\n \"created_at\": \"2022-12-08T20:44:12Z\",\n \"delivery_days\": null,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d813e04339d94b8aa6867563c2766559\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"33.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-12-08T20:44:12Z\",\n \"rate\": \"29.75\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": null,\n \"currency\": \"USD\",\n \"id\": \"rate_8b89fd2d098e4c4c90f5e8467758a3f4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.00\",\n \"created_at\": \"2022-12-08T20:44:12Z\",\n \"delivery_days\": 5.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d813e04339d94b8aa6867563c2766559\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-12-08T20:44:12Z\",\n \"rate\": \"8.00\",\n \"service\": \"ParcelSelect\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 5.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8142865128134cd2b78b18fe020e8593\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.82\",\n \"created_at\": \"2022-12-08T20:44:12Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d813e04339d94b8aa6867563c2766559\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"5.82\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2022-12-08T20:44:12Z\",\n \"rate\": \"5.82\",\n \"service\": \"First\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_623d9e38b196463aa09f6049cc04d58d\",\n \"object\": \"Rate\"\n }\n ],\n \"scan_form\": null,\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2022-12-08T20:44:10+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-12-08T20:44:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_11916632773911ed8d47ac1f6bc7bdc6\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "5972" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb11nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "fbbd444563924c9bfe7189ea0011d325" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.736276" + ], + "etag": [ + "W/\"8b7552338227e6523a0247a9740dbf53\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_d813e04339d94b8aa6867563c2766559" + ], + "x-version-label": [ + "easypost-202212081958-674da0c6cf-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 908 + } +] \ No newline at end of file diff --git a/src/test/java/com/easypost/ReferralTest.java b/src/test/java/com/easypost/ReferralTest.java index d254752c3..c06542bea 100644 --- a/src/test/java/com/easypost/ReferralTest.java +++ b/src/test/java/com/easypost/ReferralTest.java @@ -8,7 +8,6 @@ import com.easypost.model.ReferralCustomerCollection; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import java.util.HashMap; @@ -110,7 +109,6 @@ public void testAll() throws EasyPostException { * @throws EasyPostException when the request fails. */ @Test - @Disabled // failing on replay likely because of urlencoding public void testReferralAddCreditCard() throws Exception { vcr.setUpTest("referral_add_credit_card"); diff --git a/src/test/java/com/easypost/ShipmentTest.java b/src/test/java/com/easypost/ShipmentTest.java index 03ed83cb7..b8a60f48a 100644 --- a/src/test/java/com/easypost/ShipmentTest.java +++ b/src/test/java/com/easypost/ShipmentTest.java @@ -13,7 +13,6 @@ import com.easypost.model.Smartrate; import com.easypost.model.SmartrateAccuracy; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import java.util.ArrayList; @@ -344,14 +343,14 @@ public void testCreateTaxIdentifiers() throws EasyPostException { * @throws EasyPostException when the request fails. */ @Test - @Disabled - // TODO: test is for some reason failing to pull a proper recording when playing - // back. Only test doing this public void testCreateWithIds() throws EasyPostException { vcr.setUpTest("create_with_ids"); + // VCR will overwrite the first address recording if the parameters are the exact same, + // which will cause us to lose the response from the first address creation and cause the replay to fail. + // So wee need to use two different addresses here. Address fromAddress = vcr.client.address.create(Fixtures.caAddress1()); - Address toAddress = vcr.client.address.create(Fixtures.caAddress1()); + Address toAddress = vcr.client.address.create(Fixtures.caAddress2()); Parcel parcel = vcr.client.parcel.create(Fixtures.basicParcel()); Map shipmentData = Fixtures.basicShipment(); From 2f87bb468ece9af948dda843010b7d86d15da174 Mon Sep 17 00:00:00 2001 From: "Junjie(Jack) Chen" Date: Fri, 9 Dec 2022 16:50:11 -0500 Subject: [PATCH 031/208] fix typo of scanform, apikeys, and smartrate (#214) --- CHANGELOG.md | 1 + .../model/{Smartrate.java => SmartRate.java} | 2 +- .../easypost/model/SmartrateCollection.java | 12 ++-- .../SmartrateCollectionDeserializer.java | 2 +- .../com/easypost/service/EasyPostClient.java | 14 ++--- .../com/easypost/service/ShipmentService.java | 62 +++++++++---------- .../com/easypost/service/UserService.java | 2 +- src/test/java/com/easypost/ScanFormTest.java | 6 +- src/test/java/com/easypost/ShipmentTest.java | 26 ++++---- src/test/java/com/easypost/UserTest.java | 2 +- 10 files changed, 65 insertions(+), 64 deletions(-) rename src/main/java/com/easypost/model/{Smartrate.java => SmartRate.java} (73%) diff --git a/CHANGELOG.md b/CHANGELOG.md index e964e7564..25374b443 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - EndShipper.update() - CarrierAccount.update() - [FIXED] Typo, `ServiceUnavailablError` is now `ServiceUnavailableError` +- [FIXED] Typo: `Smartrate` is now `SmartRate`, `apikeys` is now `apiKey`, `scanform` is now `scanForm` ## v6.0.0-rc1 (2022-11-30) diff --git a/src/main/java/com/easypost/model/Smartrate.java b/src/main/java/com/easypost/model/SmartRate.java similarity index 73% rename from src/main/java/com/easypost/model/Smartrate.java rename to src/main/java/com/easypost/model/SmartRate.java index 26ce034ed..f45f07bae 100644 --- a/src/main/java/com/easypost/model/Smartrate.java +++ b/src/main/java/com/easypost/model/SmartRate.java @@ -3,6 +3,6 @@ import lombok.Getter; @Getter -public class Smartrate extends Rate { +public class SmartRate extends Rate { private TimeInTransit timeInTransit; } diff --git a/src/main/java/com/easypost/model/SmartrateCollection.java b/src/main/java/com/easypost/model/SmartrateCollection.java index fc4e8b35f..3113401ec 100644 --- a/src/main/java/com/easypost/model/SmartrateCollection.java +++ b/src/main/java/com/easypost/model/SmartrateCollection.java @@ -4,14 +4,14 @@ import java.util.List; public final class SmartrateCollection { - private List smartrates; + private List smartrates; /** * Get this SmartrateCollection's Smartrate objects. * * @return List of Smartrate objects. */ - public List getSmartrates() { + public List getSmartrates() { return this.smartrates; } @@ -20,7 +20,7 @@ public List getSmartrates() { * * @param smartrates List of Smartrate objects. */ - public void setSmartrates(final List smartrates) { + public void setSmartrates(final List smartrates) { this.smartrates = smartrates; } @@ -28,7 +28,7 @@ public void setSmartrates(final List smartrates) { * Constructor. */ public SmartrateCollection() { - this.smartrates = new ArrayList(); + this.smartrates = new ArrayList(); } /** @@ -36,7 +36,7 @@ public SmartrateCollection() { * * @param smartrates List of Smartrate objects */ - public SmartrateCollection(final List smartrates) { + public SmartrateCollection(final List smartrates) { setSmartrates(smartrates); } @@ -45,7 +45,7 @@ public SmartrateCollection(final List smartrates) { * * @param rate Rate object */ - public void addRate(final Smartrate rate) { + public void addRate(final SmartRate rate) { smartrates.add(rate); } } diff --git a/src/main/java/com/easypost/model/SmartrateCollectionDeserializer.java b/src/main/java/com/easypost/model/SmartrateCollectionDeserializer.java index 04ba6baec..e0a98cc87 100644 --- a/src/main/java/com/easypost/model/SmartrateCollectionDeserializer.java +++ b/src/main/java/com/easypost/model/SmartrateCollectionDeserializer.java @@ -33,7 +33,7 @@ public SmartrateCollection deserialize(final JsonElement json, final Type typeOf // the JsonDeserializationContext should have access to the other type adapters, // so we can tap into the RateDeserializer from here results.getAsJsonArray().forEach(rateData -> { - smartrateCollection.addRate(context.deserialize(rateData, Smartrate.class)); + smartrateCollection.addRate(context.deserialize(rateData, SmartRate.class)); }); return smartrateCollection; diff --git a/src/main/java/com/easypost/service/EasyPostClient.java b/src/main/java/com/easypost/service/EasyPostClient.java index 83e20d2a4..d6913a821 100644 --- a/src/main/java/com/easypost/service/EasyPostClient.java +++ b/src/main/java/com/easypost/service/EasyPostClient.java @@ -6,11 +6,11 @@ public class EasyPostClient { private final int connectTimeoutMilliseconds; private final int readTimeoutMilliseconds; - private final String apiKey; + private final String clientApiKey; // API key for all EasyPost API requests private final String apiVersion = "v2"; private final String apiBase; public final AddressService address; - public final ApiKeyService apikeys; + public final ApiKeyService apiKey; public final BatchService batch; public final BillingService billing; public final CarrierAccountService carrierAccount; @@ -28,7 +28,7 @@ public class EasyPostClient { public final ReferralCustomerService referralCustomer; public final RefundService refund; public final ReportService report; - public final ScanformService scanform; + public final ScanformService scanForm; public final ShipmentService shipment; public final TrackerService tracker; public final UserService user; @@ -108,11 +108,11 @@ public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTim } this.apiBase = apiBase; - this.apiKey = apiKey; + this.clientApiKey = apiKey; this.connectTimeoutMilliseconds = connectTimeoutMilliseconds; this.readTimeoutMilliseconds = readTimeoutMilliseconds; this.address = new AddressService(this); - this.apikeys = new ApiKeyService(this); + this.apiKey = new ApiKeyService(this); this.batch = new BatchService(this); this.billing = new BillingService(this); this.carrierAccount = new CarrierAccountService(this); @@ -130,7 +130,7 @@ public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTim this.referralCustomer = new ReferralCustomerService(this); this.refund = new RefundService(this); this.report = new ReportService(this); - this.scanform = new ScanformService(this); + this.scanForm = new ScanformService(this); this.shipment = new ShipmentService(this); this.tracker = new TrackerService(this); this.user = new UserService(this); @@ -161,7 +161,7 @@ public int getReadTimeoutMilliseconds() { * @return the API key for this EasyPostClient object */ public String getApiKey() { - return apiKey; + return clientApiKey; } /** diff --git a/src/main/java/com/easypost/service/ShipmentService.java b/src/main/java/com/easypost/service/ShipmentService.java index 1b9da6dfc..8ee824548 100644 --- a/src/main/java/com/easypost/service/ShipmentService.java +++ b/src/main/java/com/easypost/service/ShipmentService.java @@ -8,7 +8,7 @@ import com.easypost.model.Rate; import com.easypost.model.Shipment; import com.easypost.model.ShipmentCollection; -import com.easypost.model.Smartrate; +import com.easypost.model.SmartRate; import com.easypost.model.SmartrateAccuracy; import com.easypost.model.SmartrateCollection; import com.easypost.utils.Utilities; @@ -141,41 +141,41 @@ public Shipment newRates(final String id, final Map params, fina } /** - * Get Smartrates for this Shipment. + * Get SmartRates for this Shipment. * * @param params The options for the query. * @param id The ID of shipment. - * @return List of Smartrate objects + * @return List of SmartRate objects * @throws EasyPostException when the request fails. * @deprecated Use {@link #smartrates(String, Map)} instead. * Deprecated: v5.5.0 - v7.0.0 */ @Deprecated - public List getSmartrates(final String id, final Map params) + public List getSmartrates(final String id, final Map params) throws EasyPostException { return this.smartrates(id, params); } /** - * Get Smartrates for this Shipment. + * Get SmartRate for this Shipment. * * @param id The ID of shipment. - * @return List of Smartrate objects + * @return List of SmartRate objects * @throws EasyPostException when the request fails. */ - public List smartrates(final String id) throws EasyPostException { + public List smartrates(final String id) throws EasyPostException { return this.smartrates(id, null); } /** - * Get Smartrates for this Shipment. + * Get SmartRates for this Shipment. * * @param id The ID of shipment. * @param params The options for the query. - * @return List of Smartrate objects + * @return List of SmartRate objects * @throws EasyPostException when the request fails. */ - public List smartrates(final String id, final Map params) + public List smartrates(final String id, final Map params) throws EasyPostException { String url = String.format("%s/smartrate", Utilities.instanceURL(Shipment.class, id)); SmartrateCollection smartrateCollection = Requestor.request(RequestMethod.GET, url, params, @@ -352,91 +352,91 @@ public Shipment insure(final String id, final Map params) throws } /** - * Get the lowest smartrate for this Shipment. + * Get the lowest SmartRate for this Shipment. * * @param id The ID of shipment. * @param deliveryDay Delivery days restriction to use when filtering. * @param deliveryAccuracy Delivery days accuracy restriction to use when * filtering. - * @return lowest Smartrate object + * @return lowest SmartRate object * @throws EasyPostException when the request fails. * @deprecated use {@link #lowestSmartRate(String, int, SmartrateAccuracy)} * instead. * Deprecated: v5.5.0 - v7.0.0 */ @Deprecated - public Smartrate lowestSmartRate(final String id, int deliveryDay, String deliveryAccuracy) + public SmartRate lowestSmartRate(final String id, int deliveryDay, String deliveryAccuracy) throws EasyPostException { return this.lowestSmartRate(id, deliveryDay, SmartrateAccuracy.getByKeyName(deliveryAccuracy)); } /** - * Get the lowest smartrate for this Shipment. + * Get the lowest SmartRate for this Shipment. * * @param id The ID of shipment. * @param deliveryDay Delivery days restriction to use when filtering. * @param deliveryAccuracy Delivery days accuracy restriction to use when * filtering. - * @return lowest Smartrate object + * @return lowest SmartRate object * @throws EasyPostException when the request fails. */ - public Smartrate lowestSmartRate(final String id, final int deliveryDay, SmartrateAccuracy deliveryAccuracy) + public SmartRate lowestSmartRate(final String id, final int deliveryDay, SmartrateAccuracy deliveryAccuracy) throws EasyPostException { - List smartrates = this.smartrates(id, null); + List smartrates = this.smartrates(id, null); - Smartrate lowestSmartrate = findLowestSmartrate(smartrates, deliveryDay, deliveryAccuracy); + SmartRate lowestSmartrate = findLowestSmartrate(smartrates, deliveryDay, deliveryAccuracy); return lowestSmartrate; } /** - * Get Smartrates for this Shipment. + * Get SmartRates for this Shipment. * * @param id The ID of shipment. - * @return List of Smartrate objects + * @return List of SmartRate objects * @throws EasyPostException when the request fails. * @deprecated Use {@link #smartrates(String, Map)} instead. * Deprecated: v5.5.0 - v7.0.0 */ @Deprecated - public List getSmartrates(final String id) throws EasyPostException { + public List getSmartrates(final String id) throws EasyPostException { return this.getSmartrates(id, null); } /** - * Get the lowest Smartrate from a list of Smartrates. + * Get the lowest SmartRate from a list of SmartRates. * - * @param smartrates List of Smartrates to filter from. + * @param smartRates List of SmartRates to filter from. * @param deliveryDay Delivery days restriction to use when filtering. * @param deliveryAccuracy Delivery days accuracy restriction to use when * filtering. - * @return lowest Smartrate object + * @return lowest SmartRate object * @throws EasyPostException when the request fails. * @deprecated Use {@link #findLowestSmartrate(List, int, SmartrateAccuracy)} * instead. * Deprecated: v5.5.0 - v7.0.0 */ @Deprecated - public Smartrate getLowestSmartRate(final List smartrates, int deliveryDay, + public SmartRate getLowestSmartRate(final List smartRates, int deliveryDay, String deliveryAccuracy) throws EasyPostException { - return findLowestSmartrate(smartrates, deliveryDay, SmartrateAccuracy.getByKeyName(deliveryAccuracy)); + return findLowestSmartrate(smartRates, deliveryDay, SmartrateAccuracy.getByKeyName(deliveryAccuracy)); } /** - * Find the lowest Smartrate from a list of Smartrates. + * Find the lowest SmartRate from a list of SmartRates. * - * @param smartrates List of Smartrates to filter from. + * @param smartRates List of SmartRates to filter from. * @param deliveryDay Delivery days restriction to use when filtering. * @param deliveryAccuracy Delivery days accuracy restriction to use when * filtering. * @return lowest Smartrate object * @throws EasyPostException when the request fails. */ - public Smartrate findLowestSmartrate(final List smartrates, int deliveryDay, + public SmartRate findLowestSmartrate(final List smartRates, int deliveryDay, SmartrateAccuracy deliveryAccuracy) throws EasyPostException { - Smartrate lowestSmartrate = null; + SmartRate lowestSmartrate = null; - for (Smartrate rate : smartrates) { + for (SmartRate rate : smartRates) { int smartrateDeliveryDay = rate.getTimeInTransit().getBySmartrateAccuracy(deliveryAccuracy); if (smartrateDeliveryDay > deliveryDay) { diff --git a/src/main/java/com/easypost/service/UserService.java b/src/main/java/com/easypost/service/UserService.java index b28963f85..21e3c5a58 100644 --- a/src/main/java/com/easypost/service/UserService.java +++ b/src/main/java/com/easypost/service/UserService.java @@ -98,7 +98,7 @@ public void delete(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public List apiKeys(final String id) throws EasyPostException { - ApiKeys parentKeys = client.apikeys.all(); + ApiKeys parentKeys = client.apiKey.all(); if (Objects.equals(id, parentKeys.getId())) { return parentKeys.getKeys(); diff --git a/src/test/java/com/easypost/ScanFormTest.java b/src/test/java/com/easypost/ScanFormTest.java index 2e6f49bd2..4a5854138 100644 --- a/src/test/java/com/easypost/ScanFormTest.java +++ b/src/test/java/com/easypost/ScanFormTest.java @@ -58,7 +58,7 @@ private static ScanForm getBasicScanForm() throws EasyPostException { Map params = new HashMap<>(); params.put("shipments", shipments); - ScanForm scanForm = vcr.client.scanform.create(params); + ScanForm scanForm = vcr.client.scanForm.create(params); return scanForm; } @@ -73,7 +73,7 @@ public void testRetrieve() throws EasyPostException { ScanForm scanForm = getBasicScanForm(); - ScanForm retrievedScanForm = vcr.client.scanform.retrieve(scanForm.getId()); + ScanForm retrievedScanForm = vcr.client.scanForm.retrieve(scanForm.getId()); assertInstanceOf(ScanForm.class, retrievedScanForm); assertTrue(scanForm.equals(retrievedScanForm)); @@ -91,7 +91,7 @@ public void testAll() throws EasyPostException { Map params = new HashMap<>(); params.put("page_size", Fixtures.pageSize()); - ScanFormCollection scanForms = vcr.client.scanform.all(params); + ScanFormCollection scanForms = vcr.client.scanForm.all(params); List scanFormsList = scanForms.getScanForms(); assertTrue(scanFormsList.size() <= Fixtures.pageSize()); diff --git a/src/test/java/com/easypost/ShipmentTest.java b/src/test/java/com/easypost/ShipmentTest.java index b8a60f48a..4f9c82f15 100644 --- a/src/test/java/com/easypost/ShipmentTest.java +++ b/src/test/java/com/easypost/ShipmentTest.java @@ -10,7 +10,7 @@ import com.easypost.model.Rate; import com.easypost.model.Shipment; import com.easypost.model.ShipmentCollection; -import com.easypost.model.Smartrate; +import com.easypost.model.SmartRate; import com.easypost.model.SmartrateAccuracy; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -267,9 +267,9 @@ public void testSmartRate() throws EasyPostException { assertNotNull(shipment.getRates()); Rate rate = shipment.getRates().get(0); - List smartRates = vcr.client.shipment.smartrates(shipment.getId()); + List smartRates = vcr.client.shipment.smartrates(shipment.getId()); assertInstanceOf(List.class, smartRates); - Smartrate smartRate = smartRates.get(0); + SmartRate smartRate = smartRates.get(0); assertEquals(rate.getId(), smartRate.getId()); assertNotNull(smartRate.getTimeInTransit().getPercentile50()); @@ -412,7 +412,7 @@ public void testInstanceLowestSmartRate() throws EasyPostException { vcr.setUpTest("lowest_smartrate"); Shipment shipment = createBasicShipment(); - Smartrate lowestSmartRateFilters = vcr.client.shipment.lowestSmartRate(shipment.getId(), 2, + SmartRate lowestSmartRateFilters = vcr.client.shipment.lowestSmartRate(shipment.getId(), 2, SmartrateAccuracy.Percentile90); // Test lowest smartrate with valid filters @@ -426,7 +426,7 @@ public void testInstanceLowestSmartRate() throws EasyPostException { vcr.client.shipment.lowestSmartRate(shipment.getId(), 0, SmartrateAccuracy.Percentile90); }); - Smartrate deprecatedLowestSmartRateFilters = vcr.client.shipment.lowestSmartRate(shipment.getId(), 2, + SmartRate deprecatedLowestSmartRateFilters = vcr.client.shipment.lowestSmartRate(shipment.getId(), 2, "percentile_90"); // Test lowest smartrate with valid filters @@ -452,12 +452,12 @@ public void testGetSmartRate() throws EasyPostException { Shipment shipment = createBasicShipment(); - List rates = vcr.client.shipment.getSmartrates(shipment.getId()); + List rates = vcr.client.shipment.getSmartrates(shipment.getId()); assertInstanceOf(List.class, rates); - for (Smartrate rate : rates) { - assertInstanceOf(Smartrate.class, rate); + for (SmartRate rate : rates) { + assertInstanceOf(SmartRate.class, rate); } } @@ -472,8 +472,8 @@ public void testGetLowestSmartRate() throws EasyPostException { Shipment shipment = createBasicShipment(); - List rates = vcr.client.shipment.getSmartrates(shipment.getId()); - Smartrate lowestSmartrate = vcr.client.shipment.getLowestSmartRate(rates, 3, "percentile_85"); + List rates = vcr.client.shipment.getSmartrates(shipment.getId()); + SmartRate lowestSmartrate = vcr.client.shipment.getLowestSmartRate(rates, 3, "percentile_85"); assertEquals("First", lowestSmartrate.getService()); assertEquals(5.82, lowestSmartrate.getRate(), 0.01); @@ -490,10 +490,10 @@ public void testStaticLowestSmartRates() throws EasyPostException { vcr.setUpTest("lowest_smartrate_list"); Shipment shipment = createBasicShipment(); - List smartrates = vcr.client.shipment.smartrates(shipment.getId()); + List smartRates = vcr.client.shipment.smartrates(shipment.getId()); // Test lowest smartrate with valid filters - Smartrate lowestSmartRate = vcr.client.shipment.findLowestSmartrate(smartrates, 2, + SmartRate lowestSmartRate = vcr.client.shipment.findLowestSmartrate(smartRates, 2, SmartrateAccuracy.Percentile90); assertEquals("Priority", lowestSmartRate.getService()); assertEquals(8.15, lowestSmartRate.getRate(), 0.01); @@ -502,7 +502,7 @@ public void testStaticLowestSmartRates() throws EasyPostException { // Test lowest smartrate with invalid filters (should error due to strict // delivery days) assertThrows(EasyPostException.class, () -> { - vcr.client.shipment.findLowestSmartrate(smartrates, 0, SmartrateAccuracy.Percentile90); + vcr.client.shipment.findLowestSmartrate(smartRates, 0, SmartrateAccuracy.Percentile90); }); } diff --git a/src/test/java/com/easypost/UserTest.java b/src/test/java/com/easypost/UserTest.java index 110320661..1caaf217b 100644 --- a/src/test/java/com/easypost/UserTest.java +++ b/src/test/java/com/easypost/UserTest.java @@ -170,7 +170,7 @@ public void testDelete() throws EasyPostException { public void testAllApiKeys() throws EasyPostException { vcr.setUpTest("all_api_keys"); - ApiKeys apikeys = vcr.client.apikeys.all(); + ApiKeys apikeys = vcr.client.apiKey.all(); assertInstanceOf(ApiKeys.class, apikeys); From 1855c3995f176dd2339aae7169698831305933c9 Mon Sep 17 00:00:00 2001 From: "Junjie(Jack) Chen" Date: Sat, 10 Dec 2022 16:39:14 -0500 Subject: [PATCH 032/208] move validateWebhook to Utilities file (#215) --- CHANGELOG.md | 1 + .../com/easypost/service/AddressService.java | 18 +-- .../com/easypost/service/ApiKeyService.java | 4 +- .../com/easypost/service/BatchService.java | 41 +++--- .../service/CarrierAccountService.java | 19 +-- .../easypost/service/CarrierTypeService.java | 4 +- .../easypost/service/CustomsInfoService.java | 6 +- .../easypost/service/CustomsItemService.java | 6 +- .../easypost/service/EndShipperService.java | 4 +- .../com/easypost/service/EventService.java | 9 +- .../easypost/service/InsuranceService.java | 10 +- .../com/easypost/service/OrderService.java | 12 +- .../com/easypost/service/ParcelService.java | 8 +- .../service/PaymentMethodService.java | 4 +- .../com/easypost/service/PickupService.java | 18 +-- .../com/easypost/service/RateService.java | 4 +- .../service/ReferralCustomerService.java | 4 +- .../com/easypost/service/RefundService.java | 10 +- .../com/easypost/service/ReportService.java | 4 +- .../com/easypost/service/ScanformService.java | 10 +- .../com/easypost/service/ShipmentService.java | 26 ++-- .../com/easypost/service/TrackerService.java | 10 +- .../com/easypost/service/UserService.java | 16 ++- .../com/easypost/service/WebhookService.java | 63 ++------ .../com/easypost/utils/InternalUtilities.java | 86 +++++++++++ .../java/com/easypost/utils/Utilities.java | 136 ++++++++++-------- src/test/java/com/easypost/ShipmentTest.java | 6 +- src/test/java/com/easypost/WebhookTest.java | 7 +- 28 files changed, 307 insertions(+), 239 deletions(-) create mode 100644 src/main/java/com/easypost/utils/InternalUtilities.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 25374b443..90a507280 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - CarrierAccount.update() - [FIXED] Typo, `ServiceUnavailablError` is now `ServiceUnavailableError` - [FIXED] Typo: `Smartrate` is now `SmartRate`, `apikeys` is now `apiKey`, `scanform` is now `scanForm` +- [FIXED] Move `validateWebook`, `findLowestSmartrate`, and `getLowestSmartRate` from Services to Utilities since it does not required an EasyPost client object ## v6.0.0-rc1 (2022-11-30) diff --git a/src/main/java/com/easypost/service/AddressService.java b/src/main/java/com/easypost/service/AddressService.java index f614cdf42..6837643d3 100644 --- a/src/main/java/com/easypost/service/AddressService.java +++ b/src/main/java/com/easypost/service/AddressService.java @@ -9,7 +9,7 @@ import com.easypost.model.Address; import com.easypost.model.AddressCollection; import com.easypost.model.AddressVerifyResponse; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; public class AddressService { private final EasyPostClient client; @@ -43,8 +43,8 @@ public Address create(final Map params) throws EasyPostException wrappedParams.put("address", params); - return Requestor.request(RequestMethod.POST, Utilities.classURL(Address.class), wrappedParams, Address.class, - client); + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(Address.class), wrappedParams, + Address.class, client); } /** @@ -55,8 +55,8 @@ public Address create(final Map params) throws EasyPostException * @throws EasyPostException when the request fails. */ public Address retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Address.class, id), null, Address.class, - client); + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(Address.class, id), null, + Address.class, client); } /** @@ -68,8 +68,8 @@ public Address retrieve(final String id) throws EasyPostException { */ public AddressCollection all(final Map params) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.classURL(Address.class), params, AddressCollection.class, - client); + return Requestor.request(RequestMethod.GET, InternalUtilities.classURL(Address.class), params, + AddressCollection.class, client); } /** @@ -84,7 +84,7 @@ public Address createAndVerify(final Map params) Map wrappedParams = new HashMap(); wrappedParams.put("address", params); - String url = String.format("%s/create_and_verify", Utilities.classURL(Address.class)); + String url = String.format("%s/create_and_verify", InternalUtilities.classURL(Address.class)); AddressVerifyResponse response = Requestor.request(RequestMethod.POST, url, wrappedParams, AddressVerifyResponse.class, client); @@ -99,7 +99,7 @@ public Address createAndVerify(final Map params) * @throws EasyPostException when the request fails. */ public Address verify(String id) throws EasyPostException { - String url = String.format("%s/verify", Utilities.instanceURL(Address.class, id)); + String url = String.format("%s/verify", InternalUtilities.instanceURL(Address.class, id)); AddressVerifyResponse response = Requestor.request(RequestMethod.GET, url, null, AddressVerifyResponse.class, client); diff --git a/src/main/java/com/easypost/service/ApiKeyService.java b/src/main/java/com/easypost/service/ApiKeyService.java index 1f342310f..c7da2557d 100644 --- a/src/main/java/com/easypost/service/ApiKeyService.java +++ b/src/main/java/com/easypost/service/ApiKeyService.java @@ -5,7 +5,7 @@ import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.ApiKey; import com.easypost.model.ApiKeys; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; public class ApiKeyService { private final EasyPostClient client; @@ -26,7 +26,7 @@ public class ApiKeyService { * @throws EasyPostException when the request fails. */ public ApiKeys all() throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.classURL(ApiKey.class), + return Requestor.request(RequestMethod.GET, InternalUtilities.classURL(ApiKey.class), null, ApiKeys.class, client); } } diff --git a/src/main/java/com/easypost/service/BatchService.java b/src/main/java/com/easypost/service/BatchService.java index 570dd4f7f..c5898fd31 100644 --- a/src/main/java/com/easypost/service/BatchService.java +++ b/src/main/java/com/easypost/service/BatchService.java @@ -6,7 +6,7 @@ import com.easypost.model.Batch; import com.easypost.model.BatchCollection; import com.easypost.model.Shipment; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import java.util.HashMap; import java.util.List; @@ -45,8 +45,8 @@ public Batch create(final Map params) throws EasyPostException { Map wrappedParams = new HashMap(); wrappedParams.put("batch", params); - return Requestor.request(RequestMethod.POST, Utilities.classURL(Batch.class), wrappedParams, Batch.class, - client); + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(Batch.class), wrappedParams, + Batch.class, client); } /** @@ -57,7 +57,8 @@ public Batch create(final Map params) throws EasyPostException { * @throws EasyPostException when the request fails. */ public Batch retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Batch.class, id), null, Batch.class, client); + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(Batch.class, id), null, Batch.class, + client); } /** @@ -68,8 +69,8 @@ public Batch retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public BatchCollection all(final Map params) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.classURL(Batch.class), params, BatchCollection.class, - client); + return Requestor.request(RequestMethod.GET, InternalUtilities.classURL(Batch.class), params, + BatchCollection.class, client); } /** @@ -83,20 +84,20 @@ public Batch createAndBuy(final Map params) throws EasyPostExcep Map wrappedParams = new HashMap(); wrappedParams.put("batch", params); - return Requestor.request(RequestMethod.POST, Utilities.classURL(Batch.class), wrappedParams, Batch.class, - client); + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(Batch.class), wrappedParams, + Batch.class, client); } /** * Label this Batch object. * - * @param id The ID of batch. + * @param id The ID of batch. * @param params Map of parameters. * @return Batch object. * @throws EasyPostException when the request fails. */ public Batch label(final String id, final Map params) throws EasyPostException { - String url = String.format("%s/label", Utilities.instanceURL(Batch.class, id)); + String url = String.format("%s/label", InternalUtilities.instanceURL(Batch.class, id)); return Requestor.request(RequestMethod.POST, url, params, Batch.class, client); } @@ -104,13 +105,13 @@ public Batch label(final String id, final Map params) throws Eas /** * Add shipments to this Batch object. * - * @param id The ID of batch. + * @param id The ID of batch. * @param params Map of parameters. * @return Batch object. * @throws EasyPostException when the request fails. */ public Batch addShipments(final String id, final Map params) throws EasyPostException { - String url = String.format("%s/add_shipments", Utilities.instanceURL(Batch.class, id)); + String url = String.format("%s/add_shipments", InternalUtilities.instanceURL(Batch.class, id)); return Requestor.request(RequestMethod.POST, url, params, Batch.class, client); } @@ -118,7 +119,7 @@ public Batch addShipments(final String id, final Map params) thr /** * Add shipments to this Batch object. * - * @param id The ID of batch. + * @param id The ID of batch. * @param shipments List of Shipment objects. * @return Batch object. * @throws EasyPostException when the request fails. @@ -133,13 +134,13 @@ public Batch addShipments(final String id, final List shipments) throw /** * Remove shipments from this Batch object. * - * @param id The ID of batch. + * @param id The ID of batch. * @param params Map of parameters. * @return Batch object. * @throws EasyPostException when the request fails. */ public Batch removeShipments(final String id, final Map params) throws EasyPostException { - String url = String.format("%s/remove_shipments", Utilities.instanceURL(Batch.class, id)); + String url = String.format("%s/remove_shipments", InternalUtilities.instanceURL(Batch.class, id)); return Requestor.request(RequestMethod.POST, url, params, Batch.class, client); } @@ -147,7 +148,7 @@ public Batch removeShipments(final String id, final Map params) /** * Remove shipments from this Batch object. * - * @param id The ID of batch. + * @param id The ID of batch. * @param shipments List of Shipment objects. * @return Batch object. * @throws EasyPostException when the request fails. @@ -173,13 +174,13 @@ public Batch buy(final String id) throws EasyPostException { /** * Buy this batch. * - * @param id The ID of batch. + * @param id The ID of batch. * @param params Map of parameters. * @return Batch object. * @throws EasyPostException when the request fails. */ public Batch buy(final String id, final Map params) throws EasyPostException { - String url = String.format("%s/buy", Utilities.instanceURL(Batch.class, id)); + String url = String.format("%s/buy", InternalUtilities.instanceURL(Batch.class, id)); return Requestor.request(RequestMethod.POST, url, params, Batch.class, client); } @@ -198,13 +199,13 @@ public Batch createScanForm(final String id) throws EasyPostException { /** * Create a scan form for this batch. * - * @param id The ID of batch. + * @param id The ID of batch. * @param params Map of parameters. * @return Batch object. * @throws EasyPostException when the request fails. */ public Batch createScanForm(final String id, final Map params) throws EasyPostException { - String url = String.format("%s/scan_form", Utilities.instanceURL(Batch.class, id)); + String url = String.format("%s/scan_form", InternalUtilities.instanceURL(Batch.class, id)); return Requestor.request(RequestMethod.POST, url, params, Batch.class, client); } diff --git a/src/main/java/com/easypost/service/CarrierAccountService.java b/src/main/java/com/easypost/service/CarrierAccountService.java index 00145a89e..496d87ad9 100644 --- a/src/main/java/com/easypost/service/CarrierAccountService.java +++ b/src/main/java/com/easypost/service/CarrierAccountService.java @@ -5,7 +5,7 @@ import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.CarrierAccount; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import com.easypost.Constants; import java.util.Arrays; @@ -55,7 +55,7 @@ public CarrierAccount create(final Map params) throws EasyPostEx * @throws EasyPostException when the request fails. */ public CarrierAccount retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(CarrierAccount.class, id), null, + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(CarrierAccount.class, id), null, CarrierAccount.class, client); } @@ -77,9 +77,9 @@ public List all() throws EasyPostException { * @throws EasyPostException when the request fails. */ public List all(final Map params) throws EasyPostException { - CarrierAccount[] response = - Requestor.request(RequestMethod.GET, Utilities.classURL(CarrierAccount.class), params, - CarrierAccount[].class, client); + CarrierAccount[] response = Requestor.request(RequestMethod.GET, + InternalUtilities.classURL(CarrierAccount.class), params, + CarrierAccount[].class, client); return Arrays.asList(response); } @@ -97,8 +97,8 @@ public CarrierAccount update(String id, final Map params) Map wrappedParams = new HashMap(); wrappedParams.put("carrier_account", params); - return Requestor.request(RequestMethod.PUT, Utilities.instanceURL(CarrierAccount.class, id), wrappedParams, - CarrierAccount.class, client); + return Requestor.request(RequestMethod.PUT, InternalUtilities.instanceURL(CarrierAccount.class, id), + wrappedParams, CarrierAccount.class, client); } /** @@ -108,12 +108,13 @@ public CarrierAccount update(String id, final Map params) * @throws EasyPostException when the request fails. */ public void delete(String id) throws EasyPostException { - Requestor.request(RequestMethod.DELETE, Utilities.instanceURL(CarrierAccount.class, id), null, + Requestor.request(RequestMethod.DELETE, InternalUtilities.instanceURL(CarrierAccount.class, id), null, CarrierAccount.class, client); } /** - * Select the endpoint for the carrier account creation request based on the carrier type. + * Select the endpoint for the carrier account creation request based on the + * carrier type. * * @param carrierAccountType The type of carrier account to create. * @return The endpoint for the carrier account creation request. diff --git a/src/main/java/com/easypost/service/CarrierTypeService.java b/src/main/java/com/easypost/service/CarrierTypeService.java index f5fb26b49..48d828cb1 100644 --- a/src/main/java/com/easypost/service/CarrierTypeService.java +++ b/src/main/java/com/easypost/service/CarrierTypeService.java @@ -4,7 +4,7 @@ import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.CarrierType; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import java.util.Arrays; import java.util.List; @@ -28,7 +28,7 @@ public class CarrierTypeService { * @throws EasyPostException when the request fails. */ public List all() throws EasyPostException { - CarrierType[] response = Requestor.request(RequestMethod.GET, Utilities.classURL(CarrierType.class), + CarrierType[] response = Requestor.request(RequestMethod.GET, InternalUtilities.classURL(CarrierType.class), null, CarrierType[].class, client); return Arrays.asList(response); } diff --git a/src/main/java/com/easypost/service/CustomsInfoService.java b/src/main/java/com/easypost/service/CustomsInfoService.java index 84b0b1872..935da5f54 100644 --- a/src/main/java/com/easypost/service/CustomsInfoService.java +++ b/src/main/java/com/easypost/service/CustomsInfoService.java @@ -7,7 +7,7 @@ import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.CustomsInfo; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; public class CustomsInfoService { private final EasyPostClient client; @@ -32,7 +32,7 @@ public CustomsInfo create(final Map params) throws EasyPostExcep Map wrappedParams = new HashMap(); wrappedParams.put("customs_info", params); - return Requestor.request(RequestMethod.POST, Utilities.classURL(CustomsInfo.class), + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(CustomsInfo.class), wrappedParams, CustomsInfo.class, client); } @@ -45,6 +45,6 @@ public CustomsInfo create(final Map params) throws EasyPostExcep */ public CustomsInfo retrieve(final String id) throws EasyPostException { return Requestor.request(RequestMethod.GET, - Utilities.instanceURL(CustomsInfo.class, id), null, CustomsInfo.class, client); + InternalUtilities.instanceURL(CustomsInfo.class, id), null, CustomsInfo.class, client); } } diff --git a/src/main/java/com/easypost/service/CustomsItemService.java b/src/main/java/com/easypost/service/CustomsItemService.java index 5e7f90982..df04063b3 100644 --- a/src/main/java/com/easypost/service/CustomsItemService.java +++ b/src/main/java/com/easypost/service/CustomsItemService.java @@ -4,7 +4,7 @@ import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.CustomsItem; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import java.util.HashMap; import java.util.Map; @@ -32,7 +32,7 @@ public CustomsItem create(final Map params) throws EasyPostExcep Map wrappedParams = new HashMap(); wrappedParams.put("customs_item", params); - return Requestor.request(RequestMethod.POST, Utilities.classURL(CustomsItem.class), + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(CustomsItem.class), wrappedParams, CustomsItem.class, client); } @@ -44,7 +44,7 @@ public CustomsItem create(final Map params) throws EasyPostExcep * @throws EasyPostException when the request fails. */ public CustomsItem retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(CustomsItem.class, id), + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(CustomsItem.class, id), null, CustomsItem.class, client); } } diff --git a/src/main/java/com/easypost/service/EndShipperService.java b/src/main/java/com/easypost/service/EndShipperService.java index 4b5bfd70b..dc88ecc0e 100644 --- a/src/main/java/com/easypost/service/EndShipperService.java +++ b/src/main/java/com/easypost/service/EndShipperService.java @@ -5,7 +5,7 @@ import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.EndShipper; import com.easypost.model.EndShipperCollection; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import java.util.HashMap; import java.util.Map; @@ -62,7 +62,7 @@ public EndShipper retrieve(final String id) throws EasyPostException { public EndShipperCollection all(final Map params) throws EasyPostException { return Requestor.request(RequestMethod.GET, - Utilities.classURL(EndShipper.class), params, EndShipperCollection.class, client); + InternalUtilities.classURL(EndShipper.class), params, EndShipperCollection.class, client); } /** diff --git a/src/main/java/com/easypost/service/EventService.java b/src/main/java/com/easypost/service/EventService.java index 56e5029a8..aae406fac 100644 --- a/src/main/java/com/easypost/service/EventService.java +++ b/src/main/java/com/easypost/service/EventService.java @@ -7,7 +7,7 @@ import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.Event; import com.easypost.model.EventCollection; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; public class EventService { private final EasyPostClient client; @@ -29,7 +29,8 @@ public class EventService { * @throws EasyPostException when the request fails. */ public Event retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Event.class, id), null, Event.class, client); + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(Event.class, id), null, Event.class, + client); } /** @@ -40,7 +41,7 @@ public Event retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public EventCollection all(final Map params) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.classURL(Event.class), params, EventCollection.class, - client); + return Requestor.request(RequestMethod.GET, InternalUtilities.classURL(Event.class), params, + EventCollection.class, client); } } diff --git a/src/main/java/com/easypost/service/InsuranceService.java b/src/main/java/com/easypost/service/InsuranceService.java index 86c483ce4..11b21fcc3 100644 --- a/src/main/java/com/easypost/service/InsuranceService.java +++ b/src/main/java/com/easypost/service/InsuranceService.java @@ -5,7 +5,7 @@ import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.Insurance; import com.easypost.model.InsuranceCollection; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import java.util.HashMap; import java.util.Map; @@ -33,7 +33,7 @@ public Insurance create(final Map params) throws EasyPostExcepti Map wrappedParams = new HashMap(); wrappedParams.put("insurance", params); - return Requestor.request(RequestMethod.POST, Utilities.classURL(Insurance.class), wrappedParams, + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(Insurance.class), wrappedParams, Insurance.class, client); } @@ -45,8 +45,8 @@ public Insurance create(final Map params) throws EasyPostExcepti * @throws EasyPostException when the request fails. */ public Insurance retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Insurance.class, id), null, Insurance.class, - client); + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(Insurance.class, id), null, + Insurance.class, client); } /** @@ -58,7 +58,7 @@ public Insurance retrieve(final String id) throws EasyPostException { */ public InsuranceCollection all(final Map params) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.classURL(Insurance.class), + return Requestor.request(RequestMethod.GET, InternalUtilities.classURL(Insurance.class), params, InsuranceCollection.class, client); } } diff --git a/src/main/java/com/easypost/service/OrderService.java b/src/main/java/com/easypost/service/OrderService.java index 282b5b672..4847f5b04 100644 --- a/src/main/java/com/easypost/service/OrderService.java +++ b/src/main/java/com/easypost/service/OrderService.java @@ -5,7 +5,7 @@ import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.Order; import com.easypost.model.Rate; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import java.util.HashMap; import java.util.Map; @@ -33,7 +33,8 @@ public Order create(final Map params) throws EasyPostException { Map wrappedParams = new HashMap(); wrappedParams.put("order", params); - return Requestor.request(RequestMethod.POST, Utilities.classURL(Order.class), wrappedParams, Order.class, + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(Order.class), wrappedParams, + Order.class, client); } @@ -45,7 +46,8 @@ public Order create(final Map params) throws EasyPostException { * @throws EasyPostException when the request fails. */ public Order retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Order.class, id), null, Order.class, client); + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(Order.class, id), null, Order.class, + client); } /** @@ -69,7 +71,7 @@ public Order newRates(final String id) throws EasyPostException { */ public Order newRates(final String id, final Map params) throws EasyPostException { return Requestor.request(RequestMethod.GET, String.format("%s/rates", - Utilities.instanceURL(Order.class, id)), params, Order.class, client); + InternalUtilities.instanceURL(Order.class, id)), params, Order.class, client); } /** @@ -82,7 +84,7 @@ public Order newRates(final String id, final Map params) throws */ public Order buy(final String id, final Map params) throws EasyPostException { return Requestor.request(RequestMethod.POST, String.format("%s/buy", - Utilities.instanceURL(Order.class, id)), params, Order.class, client); + InternalUtilities.instanceURL(Order.class, id)), params, Order.class, client); } /** diff --git a/src/main/java/com/easypost/service/ParcelService.java b/src/main/java/com/easypost/service/ParcelService.java index da74ba90c..efb56cfb6 100644 --- a/src/main/java/com/easypost/service/ParcelService.java +++ b/src/main/java/com/easypost/service/ParcelService.java @@ -4,7 +4,7 @@ import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.Parcel; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import java.util.HashMap; import java.util.Map; @@ -32,8 +32,8 @@ public Parcel create(final Map params) throws EasyPostException Map wrappedParams = new HashMap(); wrappedParams.put("parcel", params); - return Requestor.request(RequestMethod.POST, Utilities.classURL(Parcel.class), wrappedParams, Parcel.class, - client); + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(Parcel.class), wrappedParams, + Parcel.class, client); } /** @@ -44,7 +44,7 @@ public Parcel create(final Map params) throws EasyPostException * @throws EasyPostException when the request fails. */ public Parcel retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Parcel.class, id), null, Parcel.class, + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(Parcel.class, id), null, Parcel.class, client); } } diff --git a/src/main/java/com/easypost/service/PaymentMethodService.java b/src/main/java/com/easypost/service/PaymentMethodService.java index 7cc466121..890c806b4 100644 --- a/src/main/java/com/easypost/service/PaymentMethodService.java +++ b/src/main/java/com/easypost/service/PaymentMethodService.java @@ -6,7 +6,7 @@ import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.PaymentMethod; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; public class PaymentMethodService { private final EasyPostClient client; @@ -30,7 +30,7 @@ public class PaymentMethodService { */ @Deprecated public PaymentMethod all() throws EasyPostException { - String url = Utilities.classURL(PaymentMethod.class); + String url = InternalUtilities.classURL(PaymentMethod.class); PaymentMethod response = Requestor.request(RequestMethod.GET, url, null, PaymentMethod.class, client); diff --git a/src/main/java/com/easypost/service/PickupService.java b/src/main/java/com/easypost/service/PickupService.java index e7dd396eb..38fe1e39c 100644 --- a/src/main/java/com/easypost/service/PickupService.java +++ b/src/main/java/com/easypost/service/PickupService.java @@ -5,7 +5,7 @@ import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.Pickup; import com.easypost.model.PickupRate; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import java.util.HashMap; import java.util.Map; @@ -33,8 +33,8 @@ public Pickup create(final Map params) throws EasyPostException Map wrappedParams = new HashMap(); wrappedParams.put("pickup", params); - return Requestor.request(RequestMethod.POST, Utilities.classURL(Pickup.class), wrappedParams, Pickup.class, - client); + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(Pickup.class), wrappedParams, + Pickup.class, client); } /** @@ -45,7 +45,7 @@ public Pickup create(final Map params) throws EasyPostException * @throws EasyPostException when the request fails. */ public Pickup retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Pickup.class, id), null, Pickup.class, + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(Pickup.class, id), null, Pickup.class, client); } @@ -64,13 +64,13 @@ public Pickup buy(final String id) throws EasyPostException { /** * Buy this Pickup. * - * @param id The ID of pickup. + * @param id The ID of pickup. * @param params Map of parameters. * @return Pickup object. * @throws EasyPostException when the request fails. */ public Pickup buy(final String id, final Map params) throws EasyPostException { - String url = String.format("%s/buy", Utilities.instanceURL(Pickup.class, id)); + String url = String.format("%s/buy", InternalUtilities.instanceURL(Pickup.class, id)); return Requestor.request(RequestMethod.POST, url, params, Pickup.class, client); } @@ -78,7 +78,7 @@ public Pickup buy(final String id, final Map params) throws Easy /** * Buy this Pickup. * - * @param id The ID of pickup. + * @param id The ID of pickup. * @param pickupRate PickupRate to buy. * @return Pickup object. * @throws EasyPostException when the request fails. @@ -104,13 +104,13 @@ public Pickup cancel(final String id) throws EasyPostException { /** * Cancel this Pickup. * - * @param id The ID of pickup. + * @param id The ID of pickup. * @param params Map of parameters. * @return Pickup object. * @throws EasyPostException when the request fails. */ public Pickup cancel(final String id, final Map params) throws EasyPostException { - String url = String.format("%s/cancel", Utilities.instanceURL(Pickup.class, id)); + String url = String.format("%s/cancel", InternalUtilities.instanceURL(Pickup.class, id)); return Requestor.request(RequestMethod.POST, url, params, Pickup.class, client); } diff --git a/src/main/java/com/easypost/service/RateService.java b/src/main/java/com/easypost/service/RateService.java index 62f02b99a..3ca60b353 100644 --- a/src/main/java/com/easypost/service/RateService.java +++ b/src/main/java/com/easypost/service/RateService.java @@ -4,7 +4,7 @@ import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.Rate; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; public class RateService { private final EasyPostClient client; @@ -27,7 +27,7 @@ public class RateService { */ public Rate retrieve(final String id) throws EasyPostException { Rate response; - response = Requestor.request(RequestMethod.GET, Utilities.instanceURL(Rate.class, id), null, Rate.class, + response = Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(Rate.class, id), null, Rate.class, client); return response; diff --git a/src/main/java/com/easypost/service/ReferralCustomerService.java b/src/main/java/com/easypost/service/ReferralCustomerService.java index 7daaa4b4c..2730dbe1a 100644 --- a/src/main/java/com/easypost/service/ReferralCustomerService.java +++ b/src/main/java/com/easypost/service/ReferralCustomerService.java @@ -11,7 +11,7 @@ import com.easypost.model.PaymentMethodObject; import com.easypost.model.ReferralCustomer; import com.easypost.model.ReferralCustomerCollection; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import java.io.BufferedReader; import java.io.IOException; @@ -169,7 +169,7 @@ private static String createStripeToken(final String number, final int expiratio params.put("exp_year", String.valueOf(expirationYear)); params.put("cvc", cvc); - String encodedURL = Utilities.getEncodedURL(params, "card"); + String encodedURL = InternalUtilities.getEncodedURL(params, "card"); URL stripeUrl = new URL("https://api.stripe.com/v1/tokens?" + encodedURL); HttpURLConnection conn; diff --git a/src/main/java/com/easypost/service/RefundService.java b/src/main/java/com/easypost/service/RefundService.java index 692882841..d020ac8cf 100644 --- a/src/main/java/com/easypost/service/RefundService.java +++ b/src/main/java/com/easypost/service/RefundService.java @@ -5,7 +5,7 @@ import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.Refund; import com.easypost.model.RefundCollection; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import java.util.Arrays; import java.util.HashMap; @@ -35,7 +35,7 @@ public List create(final Map params) throws EasyPostExce Map wrappedParams = new HashMap(); wrappedParams.put("refund", params); - Refund[] response = Requestor.request(RequestMethod.POST, Utilities.classURL(Refund.class), + Refund[] response = Requestor.request(RequestMethod.POST, InternalUtilities.classURL(Refund.class), wrappedParams, Refund[].class, client); return Arrays.asList(response); @@ -49,7 +49,7 @@ public List create(final Map params) throws EasyPostExce * @throws EasyPostException when the request fails. */ public Refund retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Refund.class, id), null, Refund.class, + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(Refund.class, id), null, Refund.class, client); } @@ -61,7 +61,7 @@ public Refund retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public RefundCollection all(final Map params) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.classURL(Refund.class), params, RefundCollection.class, - client); + return Requestor.request(RequestMethod.GET, InternalUtilities.classURL(Refund.class), params, + RefundCollection.class, client); } } diff --git a/src/main/java/com/easypost/service/ReportService.java b/src/main/java/com/easypost/service/ReportService.java index e2be37143..cfa15cc8d 100644 --- a/src/main/java/com/easypost/service/ReportService.java +++ b/src/main/java/com/easypost/service/ReportService.java @@ -8,7 +8,7 @@ import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.Report; import com.easypost.model.ReportCollection; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import java.net.URLEncoder; import java.util.HashMap; @@ -70,7 +70,7 @@ protected String reportURL(final String type) throws EasyPostException { * @throws EasyPostException when the request fails. */ public Report retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Report.class, id), null, Report.class, + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(Report.class, id), null, Report.class, client); } diff --git a/src/main/java/com/easypost/service/ScanformService.java b/src/main/java/com/easypost/service/ScanformService.java index 027c7db8c..91e180c53 100644 --- a/src/main/java/com/easypost/service/ScanformService.java +++ b/src/main/java/com/easypost/service/ScanformService.java @@ -5,7 +5,7 @@ import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.ScanForm; import com.easypost.model.ScanFormCollection; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import java.util.Map; @@ -29,7 +29,7 @@ public class ScanformService { * @throws EasyPostException when the request fails. when the request fails. */ public ScanForm create(final Map params) throws EasyPostException { - return Requestor.request(RequestMethod.POST, Utilities.classURL(ScanForm.class), params, ScanForm.class, + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(ScanForm.class), params, ScanForm.class, client); } @@ -41,8 +41,8 @@ public ScanForm create(final Map params) throws EasyPostExceptio * @throws EasyPostException when the request fails. when the request fails. */ public ScanForm retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(ScanForm.class, id), null, ScanForm.class, - client); + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(ScanForm.class, id), null, + ScanForm.class, client); } /** @@ -54,7 +54,7 @@ public ScanForm retrieve(final String id) throws EasyPostException { */ public ScanFormCollection all(final Map params) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.classURL(ScanForm.class), params, + return Requestor.request(RequestMethod.GET, InternalUtilities.classURL(ScanForm.class), params, ScanFormCollection.class, client); } } diff --git a/src/main/java/com/easypost/service/ShipmentService.java b/src/main/java/com/easypost/service/ShipmentService.java index 8ee824548..f42073c05 100644 --- a/src/main/java/com/easypost/service/ShipmentService.java +++ b/src/main/java/com/easypost/service/ShipmentService.java @@ -11,7 +11,7 @@ import com.easypost.model.SmartRate; import com.easypost.model.SmartrateAccuracy; import com.easypost.model.SmartrateCollection; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; import java.util.HashMap; import java.util.List; @@ -55,8 +55,8 @@ public Shipment create(final Map params, boolean withCarbonOffse wrappedParams.put("shipment", params); wrappedParams.put("carbon_offset", withCarbonOffset); - return Requestor.request(RequestMethod.POST, Utilities.classURL(Shipment.class), wrappedParams, Shipment.class, - client); + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(Shipment.class), wrappedParams, + Shipment.class, client); } /** @@ -67,8 +67,8 @@ public Shipment create(final Map params, boolean withCarbonOffse * @throws EasyPostException when the request fails. */ public Shipment retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Shipment.class, id), null, Shipment.class, - client); + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(Shipment.class, id), null, + Shipment.class, client); } /** @@ -80,7 +80,7 @@ public Shipment retrieve(final String id) throws EasyPostException { */ public ShipmentCollection all(final Map params) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.classURL(Shipment.class), params, + return Requestor.request(RequestMethod.GET, InternalUtilities.classURL(Shipment.class), params, ShipmentCollection.class, client); } @@ -135,7 +135,7 @@ public Shipment newRates(final String id, final Map params, fina throws EasyPostException { params.put("carbon_offset", withCarbonOffset); - String url = String.format("%s/rerate", Utilities.instanceURL(Shipment.class, id)); + String url = String.format("%s/rerate", InternalUtilities.instanceURL(Shipment.class, id)); return Requestor.request(RequestMethod.POST, url, params, Shipment.class, client); } @@ -177,7 +177,7 @@ public List smartrates(final String id) throws EasyPostException { */ public List smartrates(final String id, final Map params) throws EasyPostException { - String url = String.format("%s/smartrate", Utilities.instanceURL(Shipment.class, id)); + String url = String.format("%s/smartrate", InternalUtilities.instanceURL(Shipment.class, id)); SmartrateCollection smartrateCollection = Requestor.request(RequestMethod.GET, url, params, SmartrateCollection.class, client); @@ -293,7 +293,7 @@ public Shipment buy(final String id, final Map params, final boo params.put("end_shipper_id", endShipperId); } - String url = String.format("%s/buy", Utilities.instanceURL(Shipment.class, id)); + String url = String.format("%s/buy", InternalUtilities.instanceURL(Shipment.class, id)); return Requestor.request(RequestMethod.POST, url, params, Shipment.class, client); } @@ -318,7 +318,7 @@ public Shipment refund(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public Shipment refund(final String id, final Map params) throws EasyPostException { - String url = String.format("%s/refund", Utilities.instanceURL(Shipment.class, id)); + String url = String.format("%s/refund", InternalUtilities.instanceURL(Shipment.class, id)); return Requestor.request(RequestMethod.POST, url, params, Shipment.class, client); } @@ -332,7 +332,7 @@ public Shipment refund(final String id, final Map params) throws * @throws EasyPostException when the request fails. */ public Shipment label(final String id, final Map params) throws EasyPostException { - String url = String.format("%s/label", Utilities.instanceURL(Shipment.class, id)); + String url = String.format("%s/label", InternalUtilities.instanceURL(Shipment.class, id)); return Requestor.request(RequestMethod.GET, url, params, Shipment.class, client); } @@ -346,7 +346,7 @@ public Shipment label(final String id, final Map params) throws * @throws EasyPostException when the request fails. */ public Shipment insure(final String id, final Map params) throws EasyPostException { - String url = String.format("%s/insure", Utilities.instanceURL(Shipment.class, id)); + String url = String.format("%s/insure", InternalUtilities.instanceURL(Shipment.class, id)); return Requestor.request(RequestMethod.POST, url, params, Shipment.class, client); } @@ -483,7 +483,7 @@ public Shipment generateForm(final String id, final String formType, final Map params) throws EasyPostException Map wrappedParams = new HashMap(); wrappedParams.put("tracker", params); - return Requestor.request(RequestMethod.POST, Utilities.classURL(Tracker.class), + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(Tracker.class), wrappedParams, Tracker.class, client); } @@ -45,7 +45,7 @@ public Tracker create(final Map params) throws EasyPostException * @throws EasyPostException when the request fails. */ public Tracker retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Tracker.class, id), + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(Tracker.class, id), null, Tracker.class, client); } @@ -58,7 +58,7 @@ public Tracker retrieve(final String id) throws EasyPostException { */ public TrackerCollection all(final Map params) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.classURL(Tracker.class), + return Requestor.request(RequestMethod.GET, InternalUtilities.classURL(Tracker.class), params, TrackerCollection.class, client); } @@ -69,7 +69,7 @@ public TrackerCollection all(final Map params) * @throws EasyPostException when the request fails. */ public void createList(final Map params) throws EasyPostException { - String createListUrl = String.format("%s/create_list", Utilities.classURL(Tracker.class)); + String createListUrl = String.format("%s/create_list", InternalUtilities.classURL(Tracker.class)); Map newParams = new HashMap(); newParams.put("trackers", params); diff --git a/src/main/java/com/easypost/service/UserService.java b/src/main/java/com/easypost/service/UserService.java index 21e3c5a58..01a36417a 100644 --- a/src/main/java/com/easypost/service/UserService.java +++ b/src/main/java/com/easypost/service/UserService.java @@ -14,7 +14,7 @@ import com.easypost.model.ApiKeys; import com.easypost.model.Brand; import com.easypost.model.User; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; public class UserService { private final EasyPostClient client; @@ -36,7 +36,8 @@ public class UserService { * @throws EasyPostException when the request fails. */ public User retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(User.class, id), null, User.class, client); + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(User.class, id), null, User.class, + client); } /** @@ -46,7 +47,7 @@ public User retrieve(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public User retrieveMe() throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.classURL(User.class), null, User.class, client); + return Requestor.request(RequestMethod.GET, InternalUtilities.classURL(User.class), null, User.class, client); } /** @@ -60,7 +61,8 @@ public User create(final Map params) throws EasyPostException { Map wrappedParams = new HashMap(); wrappedParams.put("user", params); - return Requestor.request(RequestMethod.POST, Utilities.classURL(User.class), wrappedParams, User.class, client); + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(User.class), wrappedParams, User.class, + client); } /** @@ -76,7 +78,7 @@ public User update(final String id, final Map params) throws Eas wrappedParams.put("user", params); return Requestor.request(RequestMethod.PUT, - Utilities.instanceURL(User.class, id), wrappedParams, User.class, client); + InternalUtilities.instanceURL(User.class, id), wrappedParams, User.class, client); } /** @@ -86,7 +88,7 @@ public User update(final String id, final Map params) throws Eas * @throws EasyPostException when the request fails. */ public void delete(final String id) throws EasyPostException { - Requestor.request(RequestMethod.DELETE, Utilities.instanceURL(User.class, id), + Requestor.request(RequestMethod.DELETE, InternalUtilities.instanceURL(User.class, id), null, User.class, client); } @@ -122,7 +124,7 @@ public List apiKeys(final String id) throws EasyPostException { * @throws EasyPostException when the request fails. */ public Brand updateBrand(final String id, final Map params) throws EasyPostException { - String updateBrandUrl = String.format("%s/brand", Utilities.instanceURL(User.class, id)); + String updateBrandUrl = String.format("%s/brand", InternalUtilities.instanceURL(User.class, id)); Map wrappedParams = new HashMap(); wrappedParams.put("brand", params); diff --git a/src/main/java/com/easypost/service/WebhookService.java b/src/main/java/com/easypost/service/WebhookService.java index 07e06193e..a381c7c37 100644 --- a/src/main/java/com/easypost/service/WebhookService.java +++ b/src/main/java/com/easypost/service/WebhookService.java @@ -1,18 +1,12 @@ package com.easypost.service; -import com.easypost.Constants; import com.easypost.exception.EasyPostException; -import com.easypost.exception.General.SignatureVerificationError; import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; -import com.easypost.model.Event; import com.easypost.model.Webhook; import com.easypost.model.WebhookCollection; -import com.easypost.utils.Cryptography; -import com.easypost.utils.Utilities; +import com.easypost.utils.InternalUtilities; -import java.nio.charset.StandardCharsets; -import java.text.Normalizer; import java.util.HashMap; import java.util.Map; @@ -39,7 +33,7 @@ public Webhook create(final Map params) throws EasyPostException Map wrappedParams = new HashMap(); wrappedParams.put("webhook", params); - return Requestor.request(RequestMethod.POST, Utilities.classURL(Webhook.class), + return Requestor.request(RequestMethod.POST, InternalUtilities.classURL(Webhook.class), wrappedParams, Webhook.class, client); } @@ -51,7 +45,7 @@ public Webhook create(final Map params) throws EasyPostException * @throws EasyPostException when the request fails. */ public Webhook retrieve(final String id) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.instanceURL(Webhook.class, id), + return Requestor.request(RequestMethod.GET, InternalUtilities.instanceURL(Webhook.class, id), null, Webhook.class, client); } @@ -74,7 +68,7 @@ public WebhookCollection all() throws EasyPostException { */ public WebhookCollection all(final Map params) throws EasyPostException { - return Requestor.request(RequestMethod.GET, Utilities.classURL(Webhook.class), + return Requestor.request(RequestMethod.GET, InternalUtilities.classURL(Webhook.class), params, WebhookCollection.class, client); } @@ -85,7 +79,7 @@ public WebhookCollection all(final Map params) * @throws EasyPostException when the request fails. */ public void delete(final String id) throws EasyPostException { - Requestor.request(RequestMethod.DELETE, Utilities.instanceURL(Webhook.class, + Requestor.request(RequestMethod.DELETE, InternalUtilities.instanceURL(Webhook.class, id), null, Webhook.class, client); } @@ -104,8 +98,8 @@ public Webhook update(final String id) throws EasyPostException { /** * Update this webhook. * - * @param id The ID of webhook. - * @param params Map of parameters + * @param id The ID of webhook. + * @param params Map of parameters * @return Webhook object * @throws EasyPostException when the request fails. */ @@ -114,47 +108,6 @@ public Webhook update(final String id, final Map params) throws wrappedParams.put("webhook", params); return Requestor.request(RequestMethod.PUT, - Utilities.instanceURL(Webhook.class, id), wrappedParams, Webhook.class, client); - } - - /** - * Validate a webhook by comparing the HMAC signature header sent from EasyPost - * to your shared secret. - * If the signatures do not match, an error will be raised signifying - * the webhook either did not originate from EasyPost or the secrets do not - * match. - * If the signatures do match, the `event_body` will be returned as JSON. - * - * @param eventBody Data to validate - * @param headers Headers received from the webhook - * @param webhookSecret Shared secret to use in validation - * @return JSON string of the event body if the signatures match, otherwise an - * error will be raised. - * @throws EasyPostException when the request fails. - */ - public Event validateWebhook(byte[] eventBody, Map headers, String webhookSecret) - throws EasyPostException { - - String providedSignature = null; - try { - providedSignature = headers.get("X-Hmac-Signature").toString(); - } catch (NullPointerException ignored) { // catch error raised if header key doesn't exist - } - - if (providedSignature != null) { - String calculatedDigest = Cryptography.toHMACSHA256HexDigest(eventBody, webhookSecret, - Normalizer.Form.NFKD); - String calculatedSignature = "hmac-sha256-hex=" + calculatedDigest; - - if (Cryptography.signaturesMatch(providedSignature, calculatedSignature)) { - // Serialize data into a JSON string, then into an Event object - String json = new String(eventBody, StandardCharsets.UTF_8); - return Constants.Http.GSON.fromJson(json, Event.class); - } else { - throw new SignatureVerificationError(Constants.ErrorMessages.WEBHOOK_DOES_NOT_MATCH); - } - } else { - throw new SignatureVerificationError(Constants.ErrorMessages.INVALID_WEBHOOK_SIGNATURE); - } + InternalUtilities.instanceURL(Webhook.class, id), wrappedParams, Webhook.class, client); } } diff --git a/src/main/java/com/easypost/utils/InternalUtilities.java b/src/main/java/com/easypost/utils/InternalUtilities.java new file mode 100644 index 000000000..988245619 --- /dev/null +++ b/src/main/java/com/easypost/utils/InternalUtilities.java @@ -0,0 +1,86 @@ +package com.easypost.utils; + +import com.easypost.exception.API.EncodingError; + +import java.net.URLEncoder; + +import java.util.Map; + +public abstract class InternalUtilities { + /** + * Create Encoded URL from a Map. + * + * @param params Map of parameters to be encoded. + * @param parentKey Parent key in the encoded URL. + * @return Encoded URL for Stripe API call. + * @throws EncodingError when the URL encoding fails. + */ + public static String getEncodedURL(Map params, String parentKey) throws EncodingError { + StringBuilder result = new StringBuilder(); + boolean first = true; + + try { + for (Map.Entry entry : params.entrySet()) { + if (first) { + first = false; + } else { + result.append("&"); + } + + result.append(URLEncoder.encode(parentKey + "[" + entry.getKey() + "]", "UTF-8")); + result.append("="); + result.append(URLEncoder.encode(entry.getValue(), "UTF-8")); + } + } catch (Exception e) { + throw new EncodingError("Something went wrong during the URL encoding."); + } + + return result.toString(); + } + + /** + * Get the URL for the instance object. + * + * @param clazz The class of the instance object. + * @param id The id of the object. + * @return The string of instance object name and its id. + */ + public static String instanceURL(final Class clazz, final String id) { + return String.format("%s/%s", classURL(clazz), id); + } + + /** + * Get the URL for the class. + * + * @param clazz The class of the URL. + * @return The string of the class name. + */ + public static String classURL(final Class clazz) { + String singleURL = singleClassURL(clazz); + if (singleURL.charAt(singleURL.length() - 1) == 's' || singleURL.charAt(singleURL.length() - 1) == 'h') { + return String.format("%ses", singleClassURL(clazz)); + } else { + return String.format("%ss", singleClassURL(clazz)); + } + } + + /** + * Get the URL for this class with the API base url. + * + * @param clazz The class name. + * @return String that has API base and class name. + */ + private static String singleClassURL(final Class clazz) { + return String.format("%s/%s", "%s/%s", className(clazz)); + } + + /** + * Get the class name from the given parameter. + * + * @param clazz The class name. + * @return String of class name. + */ + private static String className(final Class clazz) { + return clazz.getSimpleName().replaceAll("([a-z])([A-Z])", "$1_$2").toLowerCase().replace("$", ""); + } +} diff --git a/src/main/java/com/easypost/utils/Utilities.java b/src/main/java/com/easypost/utils/Utilities.java index 5332563a3..78539345c 100644 --- a/src/main/java/com/easypost/utils/Utilities.java +++ b/src/main/java/com/easypost/utils/Utilities.java @@ -1,14 +1,18 @@ package com.easypost.utils; import com.easypost.Constants; -import com.easypost.exception.API.EncodingError; +import com.easypost.exception.EasyPostException; import com.easypost.exception.General.FilteringError; +import com.easypost.exception.General.SignatureVerificationError; +import com.easypost.model.Event; import com.easypost.model.Rate; - -import java.net.URLEncoder; +import com.easypost.model.SmartRate; +import com.easypost.model.SmartrateAccuracy; import java.util.List; import java.util.Map; +import java.nio.charset.StandardCharsets; +import java.text.Normalizer; public abstract class Utilities { /** @@ -52,79 +56,93 @@ public static Rate getLowestObjectRate(List rates, List carriers, } /** - * Create Encoded URL from a Map. + * Validate a webhook by comparing the HMAC signature header sent from EasyPost + * to your shared secret. + * If the signatures do not match, an error will be raised signifying + * the webhook either did not originate from EasyPost or the secrets do not + * match. + * If the signatures do match, the `event_body` will be returned as JSON. * - * @param params Map of parameters to be encoded. - * @param parentKey Parent key in the encoded URL. - * @return Encoded URL for Stripe API call. - * @throws EncodingError when the URL encoding fails. + * @param eventBody Data to validate + * @param headers Headers received from the webhook + * @param webhookSecret Shared secret to use in validation + * @return JSON string of the event body if the signatures match, otherwise an + * error will be raised. + * @throws EasyPostException when the request fails. */ - public static String getEncodedURL(Map params, String parentKey) throws EncodingError { - StringBuilder result = new StringBuilder(); - boolean first = true; + public static Event validateWebhook(byte[] eventBody, Map headers, String webhookSecret) + throws EasyPostException { + String providedSignature = null; try { - for (Map.Entry entry : params.entrySet()) { - if (first) { - first = false; - } else { - result.append("&"); - } - - result.append(URLEncoder.encode(parentKey + "[" + entry.getKey() + "]", "UTF-8")); - result.append("="); - result.append(URLEncoder.encode(entry.getValue(), "UTF-8")); - } - } catch (Exception e) { - throw new EncodingError("Something went wrong during the URL encoding."); + providedSignature = headers.get("X-Hmac-Signature").toString(); + } catch (NullPointerException ignored) { // catch error raised if header key doesn't exist } - return result.toString(); - } - - /** - * Get the URL for the instance object. - * - * @param clazz The class of the instance object. - * @param id The id of the object. - * @return The string of instance object name and its id. - */ - public static String instanceURL(final Class clazz, final String id) { - return String.format("%s/%s", classURL(clazz), id); - } - - /** - * Get the URL for the class. - * - * @param clazz The class of the URL. - * @return The string of the class name. - */ - public static String classURL(final Class clazz) { - String singleURL = singleClassURL(clazz); - if (singleURL.charAt(singleURL.length() - 1) == 's' || singleURL.charAt(singleURL.length() - 1) == 'h') { - return String.format("%ses", singleClassURL(clazz)); + if (providedSignature != null) { + String calculatedDigest = Cryptography.toHMACSHA256HexDigest(eventBody, webhookSecret, + Normalizer.Form.NFKD); + String calculatedSignature = "hmac-sha256-hex=" + calculatedDigest; + + if (Cryptography.signaturesMatch(providedSignature, calculatedSignature)) { + // Serialize data into a JSON string, then into an Event object + String json = new String(eventBody, StandardCharsets.UTF_8); + return Constants.Http.GSON.fromJson(json, Event.class); + } else { + throw new SignatureVerificationError(Constants.ErrorMessages.WEBHOOK_DOES_NOT_MATCH); + } } else { - return String.format("%ss", singleClassURL(clazz)); + throw new SignatureVerificationError(Constants.ErrorMessages.INVALID_WEBHOOK_SIGNATURE); } } /** - * Get the URL for this class with the API base url. + * Get the lowest Smartrate from a list of Smartrates. * - * @param clazz The class name. - * @return String that has API base and class name. + * @param smartrates List of Smartrates to filter from. + * @param deliveryDay Delivery days restriction to use when filtering. + * @param deliveryAccuracy Delivery days accuracy restriction to use when + * filtering. + * @return lowest Smartrate object + * @throws EasyPostException when the request fails. + * @deprecated Use {@link #findLowestSmartrate(List, int, SmartrateAccuracy)} + * instead. + * Deprecated: v5.5.0 - v7.0.0 */ - private static String singleClassURL(final Class clazz) { - return String.format("%s/%s", "%s/%s", className(clazz)); + @Deprecated + public static SmartRate getLowestSmartRate(final List smartrates, int deliveryDay, + String deliveryAccuracy) throws EasyPostException { + return findLowestSmartrate(smartrates, deliveryDay, SmartrateAccuracy.getByKeyName(deliveryAccuracy)); } /** - * Get the class name from the given parameter. + * Find the lowest Smartrate from a list of Smartrates. * - * @param clazz The class name. - * @return String of class name. + * @param smartrates List of Smartrates to filter from. + * @param deliveryDay Delivery days restriction to use when filtering. + * @param deliveryAccuracy Delivery days accuracy restriction to use when + * filtering. + * @return lowest Smartrate object + * @throws EasyPostException when the request fails. */ - private static String className(final Class clazz) { - return clazz.getSimpleName().replaceAll("([a-z])([A-Z])", "$1_$2").toLowerCase().replace("$", ""); + public static SmartRate findLowestSmartrate(final List smartrates, int deliveryDay, + SmartrateAccuracy deliveryAccuracy) throws EasyPostException { + SmartRate lowestSmartrate = null; + + for (SmartRate rate : smartrates) { + int smartrateDeliveryDay = rate.getTimeInTransit().getBySmartrateAccuracy(deliveryAccuracy); + + if (smartrateDeliveryDay > deliveryDay) { + continue; + } else if (lowestSmartrate == null || rate.getRate() < lowestSmartrate.getRate()) { + lowestSmartrate = rate; + } + } + + if (lowestSmartrate == null) { + throw new FilteringError(String.format(Constants.ErrorMessages.NO_OBJECT_FOUND, "rate")); + } + + return lowestSmartrate; } } diff --git a/src/test/java/com/easypost/ShipmentTest.java b/src/test/java/com/easypost/ShipmentTest.java index 4f9c82f15..faa3714d0 100644 --- a/src/test/java/com/easypost/ShipmentTest.java +++ b/src/test/java/com/easypost/ShipmentTest.java @@ -12,6 +12,8 @@ import com.easypost.model.ShipmentCollection; import com.easypost.model.SmartRate; import com.easypost.model.SmartrateAccuracy; +import com.easypost.utils.Utilities; + import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -493,7 +495,7 @@ public void testStaticLowestSmartRates() throws EasyPostException { List smartRates = vcr.client.shipment.smartrates(shipment.getId()); // Test lowest smartrate with valid filters - SmartRate lowestSmartRate = vcr.client.shipment.findLowestSmartrate(smartRates, 2, + SmartRate lowestSmartRate = Utilities.findLowestSmartrate(smartRates, 2, SmartrateAccuracy.Percentile90); assertEquals("Priority", lowestSmartRate.getService()); assertEquals(8.15, lowestSmartRate.getRate(), 0.01); @@ -502,7 +504,7 @@ public void testStaticLowestSmartRates() throws EasyPostException { // Test lowest smartrate with invalid filters (should error due to strict // delivery days) assertThrows(EasyPostException.class, () -> { - vcr.client.shipment.findLowestSmartrate(smartRates, 0, SmartrateAccuracy.Percentile90); + Utilities.findLowestSmartrate(smartRates, 0, SmartrateAccuracy.Percentile90); }); } diff --git a/src/test/java/com/easypost/WebhookTest.java b/src/test/java/com/easypost/WebhookTest.java index 7016af509..43c5fc347 100644 --- a/src/test/java/com/easypost/WebhookTest.java +++ b/src/test/java/com/easypost/WebhookTest.java @@ -1,5 +1,6 @@ package com.easypost; +import com.easypost.utils.Utilities; import com.easypost.exception.EasyPostException; import com.easypost.model.Event; import com.easypost.model.Webhook; @@ -162,7 +163,7 @@ public void testValidateWebhook() throws EasyPostException { } }; - Event event = vcr.client.webhook.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); + Event event = Utilities.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); assertEquals("batch.created", event.getDescription()); assertEquals("batch_123...", event.getResult().get("id")); @@ -181,7 +182,7 @@ public void testValidateWebhookInvalidSecret() { }; assertThrows(EasyPostException.class, () -> { - vcr.client.webhook.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); + Utilities.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); }); } @@ -198,7 +199,7 @@ public void testValidateWebhookMissingSecret() { }; assertThrows(EasyPostException.class, () -> { - vcr.client.webhook.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); + Utilities.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); }); } } From 6693eea3b70a675911fe98a9c3d9ffa9f438ca3c Mon Sep 17 00:00:00 2001 From: "Junjie(Jack) Chen" Date: Tue, 13 Dec 2022 15:37:23 -0500 Subject: [PATCH 033/208] add APIException class for all HTTP exceptions (#217) --- CHANGELOG.md | 1 + .../easypost/exception/API/EncodingError.java | 4 +- .../exception/API/ExternalApiError.java | 4 +- .../exception/API/ForbiddenError.java | 4 +- .../exception/API/GatewayTimeoutError.java | 4 +- .../com/easypost/exception/API/HttpError.java | 4 +- .../exception/API/InternalServerError.java | 4 +- .../exception/API/InvalidRequestError.java | 4 +- .../com/easypost/exception/API/JsonError.java | 4 +- .../exception/API/MethodNotAllowedError.java | 4 +- .../easypost/exception/API/NotFoundError.java | 4 +- .../easypost/exception/API/PaymentError.java | 4 +- .../exception/API/RateLimitError.java | 4 +- .../easypost/exception/API/RedirectError.java | 4 +- .../API/ServiceUnavailableError.java | 4 +- .../easypost/exception/API/TimeoutError.java | 4 +- .../exception/API/UnauthorizedError.java | 4 +- .../exception/API/UnknownApiError.java | 4 +- .../com/easypost/exception/APIException.java | 106 ++++++++++++++++++ .../easypost/exception/EasyPostException.java | 86 +------------- .../exception/General/FilteringError.java | 10 -- .../exception/General/InvalidObjectError.java | 10 -- .../General/InvalidParameterError.java | 10 -- .../General/MissingParameterError.java | 10 -- .../General/SignatureVerificationError.java | 10 -- src/test/java/com/easypost/AddressTest.java | 3 +- .../java/com/easypost/CarrierAccountTest.java | 3 +- src/test/java/com/easypost/ErrorTest.java | 5 +- 28 files changed, 149 insertions(+), 173 deletions(-) create mode 100644 src/main/java/com/easypost/exception/APIException.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 90a507280..4b6f81bf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - [FIXED] Typo, `ServiceUnavailablError` is now `ServiceUnavailableError` - [FIXED] Typo: `Smartrate` is now `SmartRate`, `apikeys` is now `apiKey`, `scanform` is now `scanForm` - [FIXED] Move `validateWebook`, `findLowestSmartrate`, and `getLowestSmartRate` from Services to Utilities since it does not required an EasyPost client object +- [ADDED] Add a root level `APIException` class for all HTTP exceptions ## v6.0.0-rc1 (2022-11-30) diff --git a/src/main/java/com/easypost/exception/API/EncodingError.java b/src/main/java/com/easypost/exception/API/EncodingError.java index 4e1c1a4a6..772b1daae 100644 --- a/src/main/java/com/easypost/exception/API/EncodingError.java +++ b/src/main/java/com/easypost/exception/API/EncodingError.java @@ -1,8 +1,8 @@ package com.easypost.exception.API; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class EncodingError extends EasyPostException { +public class EncodingError extends APIException { /** * EncodingError constructor. * diff --git a/src/main/java/com/easypost/exception/API/ExternalApiError.java b/src/main/java/com/easypost/exception/API/ExternalApiError.java index d08db164d..1b39c7450 100644 --- a/src/main/java/com/easypost/exception/API/ExternalApiError.java +++ b/src/main/java/com/easypost/exception/API/ExternalApiError.java @@ -1,8 +1,8 @@ package com.easypost.exception.API; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class ExternalApiError extends EasyPostException { +public class ExternalApiError extends APIException { /** * ExternalApiError constructor. * diff --git a/src/main/java/com/easypost/exception/API/ForbiddenError.java b/src/main/java/com/easypost/exception/API/ForbiddenError.java index fab4126ab..4f5d9070e 100644 --- a/src/main/java/com/easypost/exception/API/ForbiddenError.java +++ b/src/main/java/com/easypost/exception/API/ForbiddenError.java @@ -3,9 +3,9 @@ import java.util.List; import com.easypost.model.Error; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class ForbiddenError extends EasyPostException { +public class ForbiddenError extends APIException { /** * ForbiddenError constructor. * diff --git a/src/main/java/com/easypost/exception/API/GatewayTimeoutError.java b/src/main/java/com/easypost/exception/API/GatewayTimeoutError.java index 3e205d44a..ab42e2015 100644 --- a/src/main/java/com/easypost/exception/API/GatewayTimeoutError.java +++ b/src/main/java/com/easypost/exception/API/GatewayTimeoutError.java @@ -3,9 +3,9 @@ import java.util.List; import com.easypost.model.Error; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class GatewayTimeoutError extends EasyPostException { +public class GatewayTimeoutError extends APIException { /** * GatewayTimeoutError constructor. * diff --git a/src/main/java/com/easypost/exception/API/HttpError.java b/src/main/java/com/easypost/exception/API/HttpError.java index 6a7c5c151..bbb5a5bdb 100644 --- a/src/main/java/com/easypost/exception/API/HttpError.java +++ b/src/main/java/com/easypost/exception/API/HttpError.java @@ -1,8 +1,8 @@ package com.easypost.exception.API; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class HttpError extends EasyPostException { +public class HttpError extends APIException { /** * HttpError constructor. * diff --git a/src/main/java/com/easypost/exception/API/InternalServerError.java b/src/main/java/com/easypost/exception/API/InternalServerError.java index 61b4b7ee3..fff3980bd 100644 --- a/src/main/java/com/easypost/exception/API/InternalServerError.java +++ b/src/main/java/com/easypost/exception/API/InternalServerError.java @@ -3,9 +3,9 @@ import java.util.List; import com.easypost.model.Error; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class InternalServerError extends EasyPostException { +public class InternalServerError extends APIException { /** * InternalServerError constructor. * diff --git a/src/main/java/com/easypost/exception/API/InvalidRequestError.java b/src/main/java/com/easypost/exception/API/InvalidRequestError.java index 6ca255f23..26d32a77f 100644 --- a/src/main/java/com/easypost/exception/API/InvalidRequestError.java +++ b/src/main/java/com/easypost/exception/API/InvalidRequestError.java @@ -3,9 +3,9 @@ import java.util.List; import com.easypost.model.Error; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class InvalidRequestError extends EasyPostException { +public class InvalidRequestError extends APIException { /** * InvalidRequestError constructor. * diff --git a/src/main/java/com/easypost/exception/API/JsonError.java b/src/main/java/com/easypost/exception/API/JsonError.java index 3a0a064b9..f33821654 100644 --- a/src/main/java/com/easypost/exception/API/JsonError.java +++ b/src/main/java/com/easypost/exception/API/JsonError.java @@ -1,8 +1,8 @@ package com.easypost.exception.API; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class JsonError extends EasyPostException { +public class JsonError extends APIException { /** * JsonError constructor. * diff --git a/src/main/java/com/easypost/exception/API/MethodNotAllowedError.java b/src/main/java/com/easypost/exception/API/MethodNotAllowedError.java index 6fe9b98d3..719b40169 100644 --- a/src/main/java/com/easypost/exception/API/MethodNotAllowedError.java +++ b/src/main/java/com/easypost/exception/API/MethodNotAllowedError.java @@ -3,9 +3,9 @@ import java.util.List; import com.easypost.model.Error; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class MethodNotAllowedError extends EasyPostException { +public class MethodNotAllowedError extends APIException { /** * MethodNotAllowedError constructor. * diff --git a/src/main/java/com/easypost/exception/API/NotFoundError.java b/src/main/java/com/easypost/exception/API/NotFoundError.java index 0eba51e24..688aa142c 100644 --- a/src/main/java/com/easypost/exception/API/NotFoundError.java +++ b/src/main/java/com/easypost/exception/API/NotFoundError.java @@ -3,9 +3,9 @@ import java.util.List; import com.easypost.model.Error; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class NotFoundError extends EasyPostException { +public class NotFoundError extends APIException { /** * NotFoundError constructor. * diff --git a/src/main/java/com/easypost/exception/API/PaymentError.java b/src/main/java/com/easypost/exception/API/PaymentError.java index 6023c6c0a..c1dddde13 100644 --- a/src/main/java/com/easypost/exception/API/PaymentError.java +++ b/src/main/java/com/easypost/exception/API/PaymentError.java @@ -3,9 +3,9 @@ import java.util.List; import com.easypost.model.Error; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class PaymentError extends EasyPostException { +public class PaymentError extends APIException { /** * PaymentError constructor. * diff --git a/src/main/java/com/easypost/exception/API/RateLimitError.java b/src/main/java/com/easypost/exception/API/RateLimitError.java index b2490eb35..896a417a8 100644 --- a/src/main/java/com/easypost/exception/API/RateLimitError.java +++ b/src/main/java/com/easypost/exception/API/RateLimitError.java @@ -3,9 +3,9 @@ import java.util.List; import com.easypost.model.Error; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class RateLimitError extends EasyPostException { +public class RateLimitError extends APIException { /** * RateLimitError constructor. * diff --git a/src/main/java/com/easypost/exception/API/RedirectError.java b/src/main/java/com/easypost/exception/API/RedirectError.java index 7215cf493..c00ad1ef1 100644 --- a/src/main/java/com/easypost/exception/API/RedirectError.java +++ b/src/main/java/com/easypost/exception/API/RedirectError.java @@ -3,9 +3,9 @@ import java.util.List; import com.easypost.model.Error; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class RedirectError extends EasyPostException { +public class RedirectError extends APIException { /** * RedirectError constructor. * diff --git a/src/main/java/com/easypost/exception/API/ServiceUnavailableError.java b/src/main/java/com/easypost/exception/API/ServiceUnavailableError.java index 67363f961..0756428b0 100644 --- a/src/main/java/com/easypost/exception/API/ServiceUnavailableError.java +++ b/src/main/java/com/easypost/exception/API/ServiceUnavailableError.java @@ -3,9 +3,9 @@ import java.util.List; import com.easypost.model.Error; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class ServiceUnavailableError extends EasyPostException { +public class ServiceUnavailableError extends APIException { /** * ServiceUnavailablError constructor. * diff --git a/src/main/java/com/easypost/exception/API/TimeoutError.java b/src/main/java/com/easypost/exception/API/TimeoutError.java index 6a60e97d4..28993acfe 100644 --- a/src/main/java/com/easypost/exception/API/TimeoutError.java +++ b/src/main/java/com/easypost/exception/API/TimeoutError.java @@ -3,9 +3,9 @@ import java.util.List; import com.easypost.model.Error; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class TimeoutError extends EasyPostException { +public class TimeoutError extends APIException { /** * TimeoutError constructor. * diff --git a/src/main/java/com/easypost/exception/API/UnauthorizedError.java b/src/main/java/com/easypost/exception/API/UnauthorizedError.java index 2b7640e54..1434cc183 100644 --- a/src/main/java/com/easypost/exception/API/UnauthorizedError.java +++ b/src/main/java/com/easypost/exception/API/UnauthorizedError.java @@ -3,9 +3,9 @@ import java.util.List; import com.easypost.model.Error; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class UnauthorizedError extends EasyPostException { +public class UnauthorizedError extends APIException { /** * UnauthorizedError constructor. * diff --git a/src/main/java/com/easypost/exception/API/UnknownApiError.java b/src/main/java/com/easypost/exception/API/UnknownApiError.java index d3ca95598..423464ac1 100644 --- a/src/main/java/com/easypost/exception/API/UnknownApiError.java +++ b/src/main/java/com/easypost/exception/API/UnknownApiError.java @@ -3,9 +3,9 @@ import java.util.List; import com.easypost.model.Error; -import com.easypost.exception.EasyPostException; +import com.easypost.exception.APIException; -public class UnknownApiError extends EasyPostException { +public class UnknownApiError extends APIException { /** * UnknownApiError constructor. * diff --git a/src/main/java/com/easypost/exception/APIException.java b/src/main/java/com/easypost/exception/APIException.java new file mode 100644 index 000000000..fb8256b0b --- /dev/null +++ b/src/main/java/com/easypost/exception/APIException.java @@ -0,0 +1,106 @@ +/** + * APIException.java + * This file is a part of EasyPost API SDK. + * (c) 2022 EasyPost + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +package com.easypost.exception; + +import com.easypost.model.Error; + +import java.util.List; + +public class APIException extends EasyPostException { + private static final long serialVersionUID = 1L; + private final String code; + private final Integer statusCode; + private final String message; + private final List errors; + + /** + * APIException constructor. + * + * @param message the exception message + */ + public APIException(final String message) { + this(message, null); + } + + /** + * APIException constructor. + * + * @param message the exception message + * @param ex the exception cause + */ + public APIException(final String message, final Throwable ex) { + this(message, null, null, null, ex); + } + + /** + * APIException constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + */ + public APIException(final String message, final String code, final int statusCode, final List errors) { + this(message, code, statusCode, errors, null); + } + + /** + * APIException constructor. + * + * @param message the exception message + * @param code the exception code + * @param statusCode the exception status code + * @param errors the errors array + * @param ex the exception cause + */ + public APIException(final String message, final String code, final Integer statusCode, + final List errors, final Throwable ex) { + super(message); + this.code = code; + this.statusCode = statusCode; + this.message = message; + this.errors = errors; + } + + /** + * Get status code of the error object. + * + * @return statusCode the status code of the error object + */ + public Integer getStatusCode() { + return statusCode; + } + + /** + * Get code of the error object. + * + * @return code the code of the error object + */ + public String getCode() { + return code; + } + + /** + * Get message of the error object. + * + * @return message the message of the error object + */ + public String getMessage() { + return message; + } + + /** + * Get errors array of the exception. + * + * @return errors of the exception + */ + public List getErrors() { + return errors; + } +} diff --git a/src/main/java/com/easypost/exception/EasyPostException.java b/src/main/java/com/easypost/exception/EasyPostException.java index 3a254668f..47c2ff59f 100644 --- a/src/main/java/com/easypost/exception/EasyPostException.java +++ b/src/main/java/com/easypost/exception/EasyPostException.java @@ -8,16 +8,8 @@ package com.easypost.exception; -import com.easypost.model.Error; - -import java.util.List; - public class EasyPostException extends Exception { private static final long serialVersionUID = 1L; - private final String code; - private final Integer statusCode; - private final String message; - private final List errors; /** * EasyPostException constructor. @@ -25,82 +17,6 @@ public class EasyPostException extends Exception { * @param message the exception message */ public EasyPostException(final String message) { - this(message, null); - } - - /** - * EasyPostException constructor. - * - * @param message the exception message - * @param ex the exception cause - */ - public EasyPostException(final String message, final Throwable ex) { - this(message, null, null, null, ex); - } - - /** - * EasyPostException constructor. - * - * @param message the exception message - * @param code the exception code - * @param statusCode the exception status code - * @param errors the errors array - */ - public EasyPostException(final String message, final String code, final int statusCode, final List errors) { - this(message, code, statusCode, errors, null); - } - - /** - * EasyPostException constructor. - * - * @param message the exception message - * @param code the exception code - * @param statusCode the exception status code - * @param errors the errors array - * @param ex the exception cause - */ - public EasyPostException(final String message, final String code, final Integer statusCode, - final List errors, final Throwable ex) { - super(message, ex); - this.code = code; - this.statusCode = statusCode; - this.message = message; - this.errors = errors; - } - - /** - * Get status code of the error object. - * - * @return statusCode the status code of the error object - */ - public Integer getStatusCode() { - return statusCode; - } - - /** - * Get code of the error object. - * - * @return code the code of the error object - */ - public String getCode() { - return code; - } - - /** - * Get message of the error object. - * - * @return message the message of the error object - */ - public String getMessage() { - return message; - } - - /** - * Get errors array of the exception. - * - * @return errors of the exception - */ - public List getErrors() { - return errors; + super(message); } } diff --git a/src/main/java/com/easypost/exception/General/FilteringError.java b/src/main/java/com/easypost/exception/General/FilteringError.java index f4b93b270..a65580034 100644 --- a/src/main/java/com/easypost/exception/General/FilteringError.java +++ b/src/main/java/com/easypost/exception/General/FilteringError.java @@ -11,14 +11,4 @@ public class FilteringError extends EasyPostException { public FilteringError(final String message) { super(message); } - - /** - * FilteringError constructor with nested exception. - * - * @param message the exception message - * @param e the nested exception - */ - public FilteringError(final String message, Throwable e) { - super(message, e); - } } diff --git a/src/main/java/com/easypost/exception/General/InvalidObjectError.java b/src/main/java/com/easypost/exception/General/InvalidObjectError.java index d9806d379..641e4f63b 100644 --- a/src/main/java/com/easypost/exception/General/InvalidObjectError.java +++ b/src/main/java/com/easypost/exception/General/InvalidObjectError.java @@ -11,14 +11,4 @@ public class InvalidObjectError extends EasyPostException { public InvalidObjectError(final String message) { super(message); } - - /** - * InvalidObjectError constructor with nested exception. - * - * @param message the exception message - * @param e the nested exception - */ - public InvalidObjectError(final String message, Throwable e) { - super(message, e); - } } diff --git a/src/main/java/com/easypost/exception/General/InvalidParameterError.java b/src/main/java/com/easypost/exception/General/InvalidParameterError.java index 2eec87e70..96674e81f 100644 --- a/src/main/java/com/easypost/exception/General/InvalidParameterError.java +++ b/src/main/java/com/easypost/exception/General/InvalidParameterError.java @@ -12,14 +12,4 @@ public class InvalidParameterError extends EasyPostException{ public InvalidParameterError(final String parameterName) { super(String.format(Constants.ErrorMessages.INVALID_PARAMETER, parameterName)); } - - /** - * InvalidParameterError constructor with nested exception. - * - * @param parameterName the name of the invalid parameter - * @param e the nested exception - */ - public InvalidParameterError(final String parameterName, Throwable e) { - super(String.format(Constants.ErrorMessages.INVALID_PARAMETER, parameterName), e); - } } diff --git a/src/main/java/com/easypost/exception/General/MissingParameterError.java b/src/main/java/com/easypost/exception/General/MissingParameterError.java index 4b9c5825a..86786cfb7 100644 --- a/src/main/java/com/easypost/exception/General/MissingParameterError.java +++ b/src/main/java/com/easypost/exception/General/MissingParameterError.java @@ -12,14 +12,4 @@ public class MissingParameterError extends EasyPostException { public MissingParameterError(final String parameterName) { super(String.format(Constants.ErrorMessages.MISSING_REQUIRED_PARAMETER, parameterName)); } - - /** - * MissingParameterError constructor with nested exception. - * - * @param parameterName the name of the invalid parameter - * @param e the nested exception - */ - public MissingParameterError(final String parameterName, Throwable e) { - super(String.format(Constants.ErrorMessages.MISSING_REQUIRED_PARAMETER, parameterName), e); - } } diff --git a/src/main/java/com/easypost/exception/General/SignatureVerificationError.java b/src/main/java/com/easypost/exception/General/SignatureVerificationError.java index 57caf60e4..c5c337839 100644 --- a/src/main/java/com/easypost/exception/General/SignatureVerificationError.java +++ b/src/main/java/com/easypost/exception/General/SignatureVerificationError.java @@ -11,14 +11,4 @@ public class SignatureVerificationError extends EasyPostException { public SignatureVerificationError(final String message) { super(message); } - - /** - * SignatureVerificationError constructor with nested exception. - * - * @param message the exception message - * @param e the nested exception - */ - public SignatureVerificationError(final String message, Throwable e) { - super(message, e); - } } diff --git a/src/test/java/com/easypost/AddressTest.java b/src/test/java/com/easypost/AddressTest.java index 43881268d..d6653e41b 100644 --- a/src/test/java/com/easypost/AddressTest.java +++ b/src/test/java/com/easypost/AddressTest.java @@ -1,6 +1,7 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.exception.API.InvalidRequestError; import com.easypost.model.Address; import com.easypost.model.AddressCollection; @@ -203,7 +204,7 @@ public void testVerify() throws EasyPostException { @Test public void testInvalidAddressCreation() throws EasyPostException { vcr.setUpTest("error_address_creation"); - EasyPostException exception = assertThrows(EasyPostException.class, + InvalidRequestError exception = assertThrows(InvalidRequestError.class, () -> vcr.client.address.createAndVerify(null)); assertEquals("PARAMETER.REQUIRED", exception.getCode()); diff --git a/src/test/java/com/easypost/CarrierAccountTest.java b/src/test/java/com/easypost/CarrierAccountTest.java index 6217feaee..ce3bebb4c 100644 --- a/src/test/java/com/easypost/CarrierAccountTest.java +++ b/src/test/java/com/easypost/CarrierAccountTest.java @@ -1,6 +1,7 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.exception.API.InvalidRequestError; import com.easypost.model.CarrierAccount; import com.easypost.model.CarrierType; import org.junit.jupiter.api.AfterEach; @@ -81,7 +82,7 @@ public void testCreateWithCustomWorkflow() throws EasyPostException { try { CarrierAccount carrierAccount = vcr.client.carrierAccount.create(data); testCarrierAccountId = carrierAccount.getId(); // clean up after test, should never get here - } catch (EasyPostException e) { + } catch (InvalidRequestError e) { // We're sending bad data to the API, so we expect an error assertEquals(422, e.getStatusCode()); // We expect one of the sub-errors to be regarding a missing field diff --git a/src/test/java/com/easypost/ErrorTest.java b/src/test/java/com/easypost/ErrorTest.java index 044086e1f..d5c2e82ee 100644 --- a/src/test/java/com/easypost/ErrorTest.java +++ b/src/test/java/com/easypost/ErrorTest.java @@ -1,5 +1,6 @@ package com.easypost; +import com.easypost.exception.APIException; import com.easypost.exception.EasyPostException; import com.easypost.exception.API.RedirectError; import com.easypost.exception.API.ServiceUnavailableError; @@ -49,7 +50,7 @@ public static void setup() throws MissingParameterError { public void testError() throws EasyPostException { vcr.setUpTest("error"); - EasyPostException exception = assertThrows(InvalidRequestError.class, () -> vcr.client.shipment.create(null)); + APIException exception = assertThrows(InvalidRequestError.class, () -> vcr.client.shipment.create(null)); assertEquals(422, exception.getStatusCode()); assertEquals("PARAMETER.REQUIRED", exception.getCode()); @@ -90,7 +91,7 @@ public void testKnownApiException() throws EasyPostException { }}; for (Map.Entry> entry: apiErrorsMap.entrySet()) { - EasyPostException exception = assertThrows(EasyPostException.class, + APIException exception = assertThrows(APIException.class, () -> handleAPIError("{}", entry.getKey())); assertEquals(Constants.ErrorMessages.API_DID_NOT_RETURN_ERROR_DETAILS, exception.getMessage()); From 4e69633cf83e661364acac309959dcaa7254df6b Mon Sep 17 00:00:00 2001 From: Justin Hammond <39606064+Justintime50@users.noreply.github.com> Date: Tue, 20 Dec 2022 13:25:25 -0700 Subject: [PATCH 034/208] fix: maven link (#219) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e535bcff..eda1871b3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # EasyPost Java Client Library [![CI](https://github.com/EasyPost/easypost-java/workflows/CI/badge.svg)](https://github.com/EasyPost/easypost-java/actions?query=workflow%3ACI) -[![Maven Central](https://img.shields.io/maven-central/v/com.easypost/easypost-api-client?label=Maven%20Central)](https://search.maven.org/artifact/com.easypost/easypost-api-client) [![Coverage Status](https://coveralls.io/repos/github/EasyPost/easypost-java/badge.svg?branch=master)](https://coveralls.io/github/EasyPost/easypost-java?branch=master) +[![Maven Central](https://img.shields.io/maven-central/v/com.easypost/easypost-api-client?label=Maven%20Central)](https://central.sonatype.dev/search?q=easypost-api-client) EasyPost, the simple shipping solution. You can sign up for an account at . From 8c4bb24d05e2e8d2d3bd9d0e2ae3b7a3dd90b46b Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Wed, 4 Jan 2023 12:06:41 -0700 Subject: [PATCH 035/208] chore: prepare v6.0.0 for release --- CHANGELOG.md | 28 +++++++++++++++------------- README.md | 4 ++-- VERSION | 2 +- pom.xml | 2 +- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b6f81bf4..0470183e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,18 +1,20 @@ # CHANGELOG -## Next Release - -- [CHANGED] All constants are now defined in the top-level `Constants` class (`com.easypost.Constants`). - - Users who are utilizing the constants for exception message parsing should account for the new namespace. -- [ADDED] Support for creating/registering carrier accounts that require custom workflows (e.g. FedEx, UPS) -- [CHANGED] Swap the parameters for below functions, to make `id` in the first argument - - Shipment.generateForm() - - EndShipper.update() - - CarrierAccount.update() -- [FIXED] Typo, `ServiceUnavailablError` is now `ServiceUnavailableError` -- [FIXED] Typo: `Smartrate` is now `SmartRate`, `apikeys` is now `apiKey`, `scanform` is now `scanForm` -- [FIXED] Move `validateWebook`, `findLowestSmartrate`, and `getLowestSmartRate` from Services to Utilities since it does not required an EasyPost client object -- [ADDED] Add a root level `APIException` class for all HTTP exceptions +## v6.0.0 (2023-01-05) + +Includes all the changes from `v6.0.0-rc1` listed below in addition to the following: + +- All constants are now defined in the top-level `Constants` class (`com.easypost.Constants`) + - Users who are utilizing the constants for exception message parsing should account for the new namespace +- Added support for creating/registering carrier accounts that require custom workflows (e.g. FedEx, UPS) +- Swapped the parameters for the following functions, making `id` the first argument + - `Shipment.generateForm()` + - `EndShipper.update()` + - `CarrierAccount.update()` +- Fixed a typo, `ServiceUnavailablError` is now `ServiceUnavailableError` +- Fixed a typo: `Smartrate` is now `SmartRate`, `apikeys` is now `apiKey`, `scanform` is now `scanForm` +- Moved `validateWebook`, `findLowestSmartrate`, and `getLowestSmartRate` from Services to Utilities since it does not required an EasyPost client object +- Added a root level `APIException` class for all HTTP exceptions ## v6.0.0-rc1 (2022-11-30) diff --git a/README.md b/README.md index eda1871b3..eb4107229 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this to your project's POM: com.easypost easypost-api-client - 6.0.0-rc1 + 6.0.0 ``` @@ -25,7 +25,7 @@ Add this to your project's POM: Add this to your project's build file: ```groovy -implementation "com.easypost:easypost-api-client:6.0.0-rc1" +implementation "com.easypost:easypost-api-client:6.0.0" ``` **NOTE:** [Google Gson](http://code.google.com/p/google-gson/) is required. diff --git a/VERSION b/VERSION index 3f76b8391..09b254e90 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.0.0-rc1 +6.0.0 diff --git a/pom.xml b/pom.xml index a58242e80..27d78a374 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.easypost easypost-api-client - 6.0.0-rc1 + 6.0.0 jar com.easypost:easypost-api-client From bbf9d5ab9b648575af3662a98e38608781eb2b67 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Wed, 4 Jan 2023 16:59:20 -0700 Subject: [PATCH 036/208] chore: remove community health files to use defaults instead --- CODE_OF_CONDUCT.md | 16 ---------------- CONTRIBUTING.md | 47 ---------------------------------------------- SECURITY.md | 7 ------- SUPPORT.md | 3 --- 4 files changed, 73 deletions(-) delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 SECURITY.md delete mode 100644 SUPPORT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 5178a71dc..000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,16 +0,0 @@ -# Code of Conduct - -> Remember the golden rule? Treat others as you'd like to be treated - -## Standards - -- Create a welcoming and safe community for `everyone` -- Demonstrate empathy towards others, realize that everyone has a different `level of experience` -- Be respectful of others opinions, viewpoints, and experiences -- Give and receive respectful constructive feedback -- Accept responsibility and apologize when necessary -- Focus on what is best for the overall community - -## Failure to Follow Standards - -If there is a failure to follow the standards laid out above, the user will first be warned. If the offending behavior continues, the user may be blocked entirely. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 4ff91912c..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -# Contributing Guide - -Please read this document in its entirety. - -## General - -- Be nice and respectful of maintainers’ and contributors’ time and viewpoints -- Be as descriptive as possible! More info is always better than not enough -- Be patient, there may be a lot of in-flight work, some of it across multiple projects not related to the repo being contributed to -- Have fun! - -## Contributing - -Contributing comes in many forms! We are incredibly grateful to anyone who can do any of the following: - -- Add new features -- Fix bugs -- Fix typos -- Improve docs -- Improve tests -- Triage issues -- Review pull requests -- Share opinions and viewpoints on issues - -## Issues - -- If your issue is security related, please follow the [SECURITY guide](https://github.com/easypost/.github/SECURITY.md) -- Before opening a new issue, check for existing issues that are related, including closed ones -- Provide as much information as possible about the issue, including how to reproduce the problem and the expected behavior -- Don't needlessly bump issues (eg: if there hasn’t been progress for more than a few weeks, feel free to reach back out) - -## Pull Requests - -- All Pull Requests should be accompanied first by an issue describing the reason why the Pull Request is needed -- Be as descriptive as possible in your PR description about why the changes are being made and what the changes contain -- Pull Requests should be as small as possible -- Don't make unrelated changes in your Pull Request -- Don't open a Pull Request if you don't plan to see it through. PRs submitted by individuals that cannot complete additional work to get a PR merged may be closed without completion -- Adhere to the existing code style of the repo, even if it differs from your personal preference -- When applicable, add tests that provide ample coverage of the logic added or changed -- Pull Requests should come from branches and never the default `master` branch -- Pull Requests must pass CI, including linting and testing -- Pull Requests must go through code review before they can be merged to the main branch -- Do not include "version bump" changes in the same PR as your code changes; these will be handled as a separate PR and releasing process -- Make sure the `Allow edits from maintainers` checkbox is checked. That way EasyPost engineers can make certain minor changes as needed, allowing your pull request to be merged sooner. - -You agree and acknowledge that you have necessary intellectual property rights to provide your Contribution and hereby assign to EasyPost all right, title and interest in such Contribution. diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index a8f84787f..000000000 --- a/SECURITY.md +++ /dev/null @@ -1,7 +0,0 @@ -# Security Guide - -We take security seriously at EasyPost. If you find a security issue or vulnerability in our open source projects, please abide by the following guidelines: - -- Please read our [Responsible Disclosure Policy](https://www.easypost.com/privacy#disclosure-policy). -- Do not open an issue on GitHub about the security vulnerability. Doing so draws attention to the issue and exposes it to the public. -- Send an email to `security-abuse@easypost.com` including as many details as possible. diff --git a/SUPPORT.md b/SUPPORT.md deleted file mode 100644 index c10451c17..000000000 --- a/SUPPORT.md +++ /dev/null @@ -1,3 +0,0 @@ -# Support Guide - -Looking for support for one of our projects? If your question is related to our API, please contact our support team at `support@easypost.com`. If you need support regarding this project, create an issue on GitHub with as many details as possible and we’ll take a look. From 012d014c442857e091d682394fe52cc703df279d Mon Sep 17 00:00:00 2001 From: "Junjie(Jack) Chen" Date: Fri, 6 Jan 2023 11:26:43 -0500 Subject: [PATCH 037/208] add error prone and fix some potential bugs (#220) --- .github/workflows/ci.yml | 22 +++++++- Makefile | 2 +- dependency-check-suppressions.xml | 12 ++++ pom.xml | 41 +++++++++++++- src/main/java/com/easypost/Constants.java | 18 +++--- .../java/com/easypost/utils/Cryptography.java | 2 +- .../java/com/easypost/CarrierAccountTest.java | 6 +- src/test/java/com/easypost/ErrorTest.java | 45 ++++++++------- src/test/java/com/easypost/Fixtures.java | 21 ++++--- src/test/java/com/easypost/TestUtils.java | 55 +++++++------------ src/test/java/com/easypost/WebhookTest.java | 23 +++----- 11 files changed, 144 insertions(+), 103 deletions(-) create mode 100644 dependency-check-suppressions.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e4f7f740..dc4d7ea07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,12 +23,32 @@ jobs: ${{ runner.os }}-maven- - name: Install dependencies run: make install + - name: Set up JDK for compilation + uses: actions/setup-java@v3 + with: + distribution: "zulu" + java-version: "19" # Always use the latest JDK for building + - name: Compile + run: make build - name: Set up Java ${{ matrix.javaversion }} uses: actions/setup-java@v3 with: distribution: "zulu" java-version: ${{ matrix.javaversion }} - - name: Build and test with Maven + - name: Run test with Java ${{ matrix.javaversion }} + run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make test + coverage: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: make install + - name: Set up JDK for compilation + uses: actions/setup-java@v3 + with: + distribution: "zulu" + java-version: "19" # Always use the latest JDK for building + - name: Test coverage run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make coverage - name: Load Rust cache if: github.ref == 'refs/heads/master' diff --git a/Makefile b/Makefile index 57317cdd5..4e8675708 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,6 @@ scan: ## test - Test the project test: - mvn --batch-mode install -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true + mvn surefire:test .PHONY: help build clean coverage docs install-checkstyle install lint publish publish-dry release scan scan-strict test diff --git a/dependency-check-suppressions.xml b/dependency-check-suppressions.xml new file mode 100644 index 000000000..6a42b6c8d --- /dev/null +++ b/dependency-check-suppressions.xml @@ -0,0 +1,12 @@ + + + + + CVE-2022-3171 + CVE-2022-3509 + CVE-2022-3510 + + diff --git a/pom.xml b/pom.xml index 27d78a374..82ae91f43 100644 --- a/pom.xml +++ b/pom.xml @@ -47,6 +47,12 @@ gson 2.8.9 + + com.google.errorprone + error_prone_core + 2.17.0 + provided + org.junit.jupiter junit-jupiter @@ -101,6 +107,7 @@ UTF-8 UTF-8 + 8 @@ -198,8 +205,37 @@ maven-compiler-plugin 3.9.0 - 1.8 - 1.8 + 8 + UTF-8 + true + + -XDcompilePolicy=simple + -Xplugin:ErrorProne + -XDcompilePolicy=simple + -Xplugin:ErrorProne + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + + + + com.google.errorprone + error_prone_core + 2.17.0 + + + org.projectlombok + lombok + 1.18.24 + + @@ -279,6 +315,7 @@ dependency-check-maven 7.1.1 + dependency-check-suppressions.xml 7 7 diff --git a/src/main/java/com/easypost/Constants.java b/src/main/java/com/easypost/Constants.java index d785d455f..fb8962c9b 100644 --- a/src/main/java/com/easypost/Constants.java +++ b/src/main/java/com/easypost/Constants.java @@ -5,11 +5,11 @@ import com.easypost.model.ErrorDeserializer; import com.easypost.model.SmartrateCollection; import com.easypost.model.SmartrateCollectionDeserializer; +import com.google.common.collect.ImmutableList; import com.google.gson.FieldNamingPolicy; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -52,10 +52,8 @@ public abstract static class ErrorCodes { } public abstract static class CarrierAccountTypes { - public static final List CARRIER_TYPES_WITH_CUSTOM_WORKFLOW = new ArrayList() {{ - add("FedexAccount"); - add("UpsAccount"); - }}; + public static final List CARRIER_TYPES_WITH_CUSTOM_WORKFLOW = ImmutableList.of("FedexAccount", + "UpsAccount"); } public abstract static class Http { @@ -64,11 +62,11 @@ public abstract static class Http { public static final int DEFAULT_CONNECT_TIMEOUT_MILLISECONDS = 30000; public static final int DEFAULT_READ_TIMEOUT_MILLISECONDS = 60000; - public static final Gson GSON = - new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) - .registerTypeAdapter(HashMap.class, new HashMapSerializer()) - .registerTypeAdapter(SmartrateCollection.class, new SmartrateCollectionDeserializer()) - .registerTypeAdapter(Error.class, new ErrorDeserializer()).create(); + public static final Gson GSON = new GsonBuilder() + .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) + .registerTypeAdapter(HashMap.class, new HashMapSerializer()) + .registerTypeAdapter(SmartrateCollection.class, new SmartrateCollectionDeserializer()) + .registerTypeAdapter(Error.class, new ErrorDeserializer()).create(); public static final Gson PRETTY_PRINT_GSON = new GsonBuilder().setPrettyPrinting().serializeNulls() .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create(); } diff --git a/src/main/java/com/easypost/utils/Cryptography.java b/src/main/java/com/easypost/utils/Cryptography.java index 5f02c924a..0dca81ded 100644 --- a/src/main/java/com/easypost/utils/Cryptography.java +++ b/src/main/java/com/easypost/utils/Cryptography.java @@ -56,7 +56,7 @@ public static String hexEncodeToString(byte @NotNull [] bytes) { * @return Hex digest of data. */ public static String toHMACSHA256HexDigest(byte @NotNull [] data, @NotNull String key, - @Nullable Normalizer.Form normalizationForm) { + Normalizer.@Nullable Form normalizationForm) { if (normalizationForm != null) { key = Normalizer.normalize(key, normalizationForm); } diff --git a/src/test/java/com/easypost/CarrierAccountTest.java b/src/test/java/com/easypost/CarrierAccountTest.java index ce3bebb4c..9d2ff98e2 100644 --- a/src/test/java/com/easypost/CarrierAccountTest.java +++ b/src/test/java/com/easypost/CarrierAccountTest.java @@ -4,6 +4,8 @@ import com.easypost.exception.API.InvalidRequestError; import com.easypost.model.CarrierAccount; import com.easypost.model.CarrierType; +import com.google.common.collect.ImmutableMap; + import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -75,9 +77,7 @@ public void testCreateWithCustomWorkflow() throws EasyPostException { Map data = new HashMap<>(); data.put("type", "FedexAccount"); - data.put("registration_data", new HashMap() {{ - put("some", "data"); - }}); + data.put("registration_data", ImmutableMap.of("some", "data")); try { CarrierAccount carrierAccount = vcr.client.carrierAccount.create(data); diff --git a/src/test/java/com/easypost/ErrorTest.java b/src/test/java/com/easypost/ErrorTest.java index d5c2e82ee..75de6a6b2 100644 --- a/src/test/java/com/easypost/ErrorTest.java +++ b/src/test/java/com/easypost/ErrorTest.java @@ -66,29 +66,28 @@ public void testError() throws EasyPostException { */ @Test public void testKnownApiException() throws EasyPostException { - HashMap> apiErrorsMap = new HashMap>() {{ - put(300, RedirectError.class); - put(301, RedirectError.class); - put(302, RedirectError.class); - put(303, RedirectError.class); - put(304, RedirectError.class); - put(305, RedirectError.class); - put(306, RedirectError.class); - put(307, RedirectError.class); - put(308, RedirectError.class); - put(401, UnauthorizedError.class); - put(402, PaymentError.class); - put(403, ForbiddenError.class); - put(404, NotFoundError.class); - put(405, MethodNotAllowedError.class); - put(408, TimeoutError.class); - put(422, InvalidRequestError.class); - put(429, RateLimitError.class); - put(444, UnknownApiError.class); - put(500, InternalServerError.class); - put(503, ServiceUnavailableError.class); - put(504, GatewayTimeoutError.class); - }}; + HashMap> apiErrorsMap = new HashMap>(); + apiErrorsMap.put(300, RedirectError.class); + apiErrorsMap.put(301, RedirectError.class); + apiErrorsMap.put(302, RedirectError.class); + apiErrorsMap.put(303, RedirectError.class); + apiErrorsMap.put(304, RedirectError.class); + apiErrorsMap.put(305, RedirectError.class); + apiErrorsMap.put(306, RedirectError.class); + apiErrorsMap.put(307, RedirectError.class); + apiErrorsMap.put(308, RedirectError.class); + apiErrorsMap.put(401, UnauthorizedError.class); + apiErrorsMap.put(402, PaymentError.class); + apiErrorsMap.put(403, ForbiddenError.class); + apiErrorsMap.put(404, NotFoundError.class); + apiErrorsMap.put(405, MethodNotAllowedError.class); + apiErrorsMap.put(408, TimeoutError.class); + apiErrorsMap.put(422, InvalidRequestError.class); + apiErrorsMap.put(429, RateLimitError.class); + apiErrorsMap.put(444, UnknownApiError.class); + apiErrorsMap.put(500, InternalServerError.class); + apiErrorsMap.put(503, ServiceUnavailableError.class); + apiErrorsMap.put(504, GatewayTimeoutError.class); for (Map.Entry> entry: apiErrorsMap.entrySet()) { APIException exception = assertThrows(APIException.class, diff --git a/src/test/java/com/easypost/Fixtures.java b/src/test/java/com/easypost/Fixtures.java index 3e28546c6..bfbf71338 100644 --- a/src/test/java/com/easypost/Fixtures.java +++ b/src/test/java/com/easypost/Fixtures.java @@ -1,6 +1,7 @@ package com.easypost; import com.easypost.fixtures.FixtureStructure; +import com.google.common.collect.ImmutableList; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; @@ -10,7 +11,6 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.ArrayList; import java.util.HashMap; import java.util.Objects; @@ -206,16 +206,15 @@ public static HashMap fullShipment() { * @return The default one-call-buy shipment */ public static HashMap oneCallBuyShipment() { - return new HashMap() {{ - put("to_address", caAddress1()); - put("from_address", caAddress2()); - put("parcel", basicParcel()); - put("service", uspsService()); - put("carrier_accounts", new ArrayList() {{ - add(uspsCarrierAccountID()); - }}); - put("carrier", usps()); - }}; + HashMap values = new HashMap<>(); + values.put("to_address", caAddress1()); + values.put("from_address", caAddress2()); + values.put("parcel", basicParcel()); + values.put("service", uspsService()); + values.put("carrier_accounts", ImmutableList.of(uspsCarrierAccountID())); + values.put("carrier", usps()); + + return values; } /** diff --git a/src/test/java/com/easypost/TestUtils.java b/src/test/java/com/easypost/TestUtils.java index 24e55fe7f..010167341 100644 --- a/src/test/java/com/easypost/TestUtils.java +++ b/src/test/java/com/easypost/TestUtils.java @@ -10,12 +10,12 @@ import com.easypost.easyvcr.TimeFrame; import com.easypost.exception.General.MissingParameterError; import com.easypost.service.EasyPostClient; +import com.google.common.collect.ImmutableList; import java.io.File; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.ArrayList; import java.util.List; public abstract class TestUtils { @@ -28,37 +28,21 @@ public enum ApiKey { private static final String API_KEY_FAILED_TO_PULL = "couldNotPullApiKey"; private static final String CASSETTES_PATH = "src/test/cassettes"; - private static final java.util.List HEADER_CENSORS = new ArrayList() { - { - add("Authorization"); - add("User-Agent"); - } - }; - private static final List QUERY_CENSORS = new ArrayList() { - { - add("card[cvc]"); - add("card[number]"); - } - }; - private static final List BODY_CENSORS = new ArrayList() { - { - add("api_keys"); - add("client_ip"); - add("credentials"); - add("key"); - add("keys"); - add("phone_number"); - add("phone"); - add("test_credentials"); - } - }; - private static final List BODY_ELEMENTS_TO_IGNORE_ON_MATCH = new ArrayList() { - { - // Timezone difference between machines causing failure on replay - add(new CensorElement("createdAt", false)); - add(new CensorElement("updatedAt", false)); - } - }; + private static final List HEADER_CENSORS = ImmutableList.of("Authorization", "User-Agent"); + private static final List QUERY_CENSORS = ImmutableList.of("card[cvc]", "card[number]"); + private static final List BODY_CENSORS = ImmutableList.of( + "api_keys", + "client_ip", + "credentials", + "key", + "keys", + "phone_number", + "phone", + "test_credentials" + ); + private static final List BODY_ELEMENTS_TO_IGNORE_ON_MATCH = ImmutableList.of( + new CensorElement("createdAt", false), + new CensorElement("updatedAt", false)); /** * Get the directory where the program is currently executing. @@ -144,9 +128,10 @@ public boolean isRecording() { } /** - * Constructor. + * Constructor. + * * @throws MissingParameterError - */ + */ public VCR() throws MissingParameterError { this(null, ApiKey.TEST); } @@ -238,7 +223,7 @@ public void setUpTest(String cassetteName) throws MissingParameterError { public void setUpTest(String cassetteName, String overrideApiKey) throws MissingParameterError { // override api key if needed client = new EasyPostClient(overrideApiKey.isEmpty() ? this.apiKey : overrideApiKey); - + // set up cassette Cassette cassette = new Cassette(testCassettesFolder, cassetteName); diff --git a/src/test/java/com/easypost/WebhookTest.java b/src/test/java/com/easypost/WebhookTest.java index 43c5fc347..57890d52b 100644 --- a/src/test/java/com/easypost/WebhookTest.java +++ b/src/test/java/com/easypost/WebhookTest.java @@ -1,6 +1,7 @@ package com.easypost; import com.easypost.utils.Utilities; +import com.google.common.collect.ImmutableMap; import com.easypost.exception.EasyPostException; import com.easypost.model.Event; import com.easypost.model.Webhook; @@ -156,12 +157,8 @@ public void testDelete() throws EasyPostException { @Test public void testValidateWebhook() throws EasyPostException { String webhookSecret = "sécret"; - Map headers = new HashMap() { - { - put("X-Hmac-Signature", - "hmac-sha256-hex=e93977c8ccb20363d51a62b3fe1fc402b7829be1152da9e88cf9e8d07115a46b"); - } - }; + Map headers = ImmutableMap.of("X-Hmac-Signature", + "hmac-sha256-hex=e93977c8ccb20363d51a62b3fe1fc402b7829be1152da9e88cf9e8d07115a46b"); Event event = Utilities.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); @@ -175,11 +172,7 @@ public void testValidateWebhook() throws EasyPostException { @Test public void testValidateWebhookInvalidSecret() { String webhookSecret = "invalid_secret"; - Map headers = new HashMap() { - { - put("X-Hmac-Signature", "some-signature"); - } - }; + Map headers = ImmutableMap.of("X-Hmac-Signature", "some-signature"); assertThrows(EasyPostException.class, () -> { Utilities.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); @@ -192,11 +185,9 @@ public void testValidateWebhookInvalidSecret() { @Test public void testValidateWebhookMissingSecret() { String webhookSecret = "123"; - Map headers = new HashMap() { - { - put("some-header", "some-value"); - } - }; + Map headers = ImmutableMap.of( + "some-header", "some-value" + ); assertThrows(EasyPostException.class, () -> { Utilities.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); From 1be0099984ceb5a2f076dba49be7bdfb7902123a Mon Sep 17 00:00:00 2001 From: "Junjie(Jack) Chen" Date: Mon, 9 Jan 2023 17:10:22 -0500 Subject: [PATCH 038/208] add new billing functionality that allow user to add/refund payment (#218) --- CHANGELOG.md | 7 ++ README.md | 2 +- pom.xml | 2 +- .../com/easypost/model/BetaPaymentRefund.java | 13 +++ .../service/BetaReferralCustomerService.java | 89 ++++++++++++++++++ .../com/easypost/service/EasyPostClient.java | 2 + .../add_payment_method.json | 91 +++++++++++++++++++ .../refund_by_amount.json | 91 +++++++++++++++++++ .../refund_by_payment_log_id.json | 91 +++++++++++++++++++ .../easypost/BetaReferralCustomerTest.java | 73 +++++++++++++++ src/test/java/com/easypost/TestUtils.java | 2 +- 11 files changed, 460 insertions(+), 3 deletions(-) create mode 100644 src/main/java/com/easypost/model/BetaPaymentRefund.java create mode 100644 src/main/java/com/easypost/service/BetaReferralCustomerService.java create mode 100644 src/test/cassettes/beta_referral_customer/add_payment_method.json create mode 100644 src/test/cassettes/beta_referral_customer/refund_by_amount.json create mode 100644 src/test/cassettes/beta_referral_customer/refund_by_payment_log_id.json create mode 100644 src/test/java/com/easypost/BetaReferralCustomerTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 0470183e1..cf0498786 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG +## Next Release + +- [ADDED] Adds new beta billing functionality for ReferralCustomer users + - `addPaymentMethod` can add a pre-existing Stripe bank account or credit card to your EasyPost account + - `refundByAmount` refunds your wallet by a dollar amount + - `refundByPaymentLog` refunds you wallet by a PaymentLog ID + ## v6.0.0 (2023-01-05) Includes all the changes from `v6.0.0-rc1` listed below in addition to the following: diff --git a/README.md b/README.md index eb4107229..e45a84ee2 100644 --- a/README.md +++ b/README.md @@ -146,4 +146,4 @@ Some tests may require an EasyPost user with a particular set of enabled feature - `USPS_CARRIER_ACCOUNT_ID` (eg: one-call buying a shipment for non-EasyPost employees) - `PARTNER_USER_PROD_API_KEY` (eg: creating a referral user) -- `REFERRAL_USER_PROD_API_KEY` (eg: adding a credit card to a referral user) +- `REFERRAL_CUSTOMER_PROD_API_KEY` (eg: adding a credit card to a referral user) diff --git a/pom.xml b/pom.xml index 82ae91f43..01d056a97 100644 --- a/pom.xml +++ b/pom.xml @@ -313,7 +313,7 @@ org.owasp dependency-check-maven - 7.1.1 + 7.4.4 dependency-check-suppressions.xml 7 diff --git a/src/main/java/com/easypost/model/BetaPaymentRefund.java b/src/main/java/com/easypost/model/BetaPaymentRefund.java new file mode 100644 index 000000000..6970b5529 --- /dev/null +++ b/src/main/java/com/easypost/model/BetaPaymentRefund.java @@ -0,0 +1,13 @@ +package com.easypost.model; + +import java.util.List; +import lombok.Getter; + +@Getter +public class BetaPaymentRefund extends EasyPostResource{ + private int refundedAmount; + private List errors; + private List refundedPaymentLogs; + private String paymentLogId; + private String refundedAmountCurrencys; +} diff --git a/src/main/java/com/easypost/service/BetaReferralCustomerService.java b/src/main/java/com/easypost/service/BetaReferralCustomerService.java new file mode 100644 index 000000000..95847e3fa --- /dev/null +++ b/src/main/java/com/easypost/service/BetaReferralCustomerService.java @@ -0,0 +1,89 @@ +package com.easypost.service; + +import java.util.HashMap; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.BetaPaymentRefund; +import com.easypost.model.PaymentMethod; +import com.easypost.model.PaymentMethodObject; + +public class BetaReferralCustomerService { + private final EasyPostClient client; + + /** + * BetaReferralCustomerService constructor. + * + * @param client The client object. + */ + BetaReferralCustomerService(EasyPostClient client) { + this.client = client; + } + + /** + * Add Stripe payment method to referral customer. + * + * @param stripeCustomerId ID of the Stripe account. + * @param paymentMethodReference Reference of Stripe payment method. + * @return PaymentMethodObject object. + * @throws EasyPostException + */ + public PaymentMethodObject addPaymentMethod(String stripeCustomerId, String paymentMethodReference) + throws EasyPostException { + return addPaymentMethod(stripeCustomerId, paymentMethodReference, PaymentMethod.Priority.PRIMARY); + } + + /** + * Add Stripe payment method to referral customer. + * + * @param stripeCustomerId ID of the Stripe account. + * @param paymentMethodReference Reference of Stripe payment method. + * @param primaryOrSecondary Primary or secondary of this payment method. + * @return PaymentMethodObject object. + * @throws EasyPostException + */ + public PaymentMethodObject addPaymentMethod(String stripeCustomerId, String paymentMethodReference, + PaymentMethod.Priority primaryOrSecondary) throws EasyPostException { + HashMap params = new HashMap<>(); + params.put("stripe_customer_id", stripeCustomerId); + params.put("payment_method_reference", paymentMethodReference); + params.put("priority", primaryOrSecondary); + + HashMap wrappedParams = new HashMap<>(); + wrappedParams.put("payment_method", params); + + return Requestor.request(RequestMethod.POST, "%s/beta/referral_customers/payment_method", wrappedParams, + PaymentMethodObject.class, client); + } + + /** + * Refund by amount for a recent payment. + * + * @param refundAmount Amount to be refunded by cents. + * @return BetaPaymentRefund object. + * @throws EasyPostException + */ + public BetaPaymentRefund refundByAmount(int refundAmount) throws EasyPostException { + HashMap params = new HashMap<>(); + params.put("refund_amount", refundAmount); + + return Requestor.request(RequestMethod.POST, "%s/beta/referral_customers/refunds", params, + BetaPaymentRefund.class, client); + } + + /** + * Refund a payment by a payment log ID. + * + * @param paymentLogId ID of the payment log. + * @return BetaPaymentRefund object. + * @throws EasyPostException + */ + public BetaPaymentRefund refundByPaymentLog(String paymentLogId) throws EasyPostException { + HashMap params = new HashMap<>(); + params.put("payment_log_id", paymentLogId); + + return Requestor.request(RequestMethod.POST, "%s/beta/referral_customers/refunds", params, + BetaPaymentRefund.class, client); + } +} diff --git a/src/main/java/com/easypost/service/EasyPostClient.java b/src/main/java/com/easypost/service/EasyPostClient.java index d6913a821..288a9314d 100644 --- a/src/main/java/com/easypost/service/EasyPostClient.java +++ b/src/main/java/com/easypost/service/EasyPostClient.java @@ -12,6 +12,7 @@ public class EasyPostClient { public final AddressService address; public final ApiKeyService apiKey; public final BatchService batch; + public final BetaReferralCustomerService betaReferralCustomer; public final BillingService billing; public final CarrierAccountService carrierAccount; public final CarrierTypeService carrierType; @@ -114,6 +115,7 @@ public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTim this.address = new AddressService(this); this.apiKey = new ApiKeyService(this); this.batch = new BatchService(this); + this.betaReferralCustomer = new BetaReferralCustomerService(this); this.billing = new BillingService(this); this.carrierAccount = new CarrierAccountService(this); this.carrierType = new CarrierTypeService(this); diff --git a/src/test/cassettes/beta_referral_customer/add_payment_method.json b/src/test/cassettes/beta_referral_customer/add_payment_method.json new file mode 100644 index 000000000..5824ca193 --- /dev/null +++ b/src/test/cassettes/beta_referral_customer/add_payment_method.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1671127897, + "request": { + "body": "{\n \"payment_method\": {\n \"stripe_customer_id\": \"cus_123\",\n \"payment_method_reference\": \"ba_123\",\n \"priority\": \"PRIMARY\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/beta/referral_customers/payment_method" + }, + "response": { + "body": "{\n \"error\": {\n \"code\": \"BILLING.INVALID_PAYMENT_GATEWAY_REFERENCE\",\n \"message\": \"Invalid Payment Gateway Reference.\",\n \"errors\": []\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 422 Unprocessable Entity" + ], + "content-length": [ + "121" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb2nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "93788120639b6359e799dd8500277c57" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.067577" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202212141856-b2c38022ed-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 422, + "message": "Unprocessable Entity" + }, + "uri": "https://api.easypost.com/beta/referral_customers/payment_method" + }, + "duration": 472 + } +] \ No newline at end of file diff --git a/src/test/cassettes/beta_referral_customer/refund_by_amount.json b/src/test/cassettes/beta_referral_customer/refund_by_amount.json new file mode 100644 index 000000000..ab62975c9 --- /dev/null +++ b/src/test/cassettes/beta_referral_customer/refund_by_amount.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1672950635, + "request": { + "body": "{\n \"refund_amount\": 2000.0\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/beta/referral_customers/refunds" + }, + "response": { + "body": "{\n \"error\": {\n \"code\": \"TRANSACTION.AMOUNT_INVALID\",\n \"message\": \"Refund amount is invalid. Please use a valid amount or escalate to finance.\",\n \"errors\": []\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 422 Unprocessable Entity" + ], + "content-length": [ + "147" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb2nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "2244afed63b7336ae788511f002df385" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.595590" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202301051929-8ead4baefd-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 422, + "message": "Unprocessable Entity" + }, + "uri": "https://api.easypost.com/beta/referral_customers/refunds" + }, + "duration": 10497 + } +] \ No newline at end of file diff --git a/src/test/cassettes/beta_referral_customer/refund_by_payment_log_id.json b/src/test/cassettes/beta_referral_customer/refund_by_payment_log_id.json new file mode 100644 index 000000000..1b7ed06fc --- /dev/null +++ b/src/test/cassettes/beta_referral_customer/refund_by_payment_log_id.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1671138963, + "request": { + "body": "{\n \"payment_log_id\": \"paylog_123\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/beta/referral_customers/refunds" + }, + "response": { + "body": "{\n \"error\": {\n \"code\": \"TRANSACTION.DOES_NOT_EXIST\",\n \"message\": \"We could not find a transaction with that id.\",\n \"errors\": []\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 422 Unprocessable Entity" + ], + "content-length": [ + "117" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb2nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "3ad0bde4639b8e93e79b01e20016db1a" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.046951" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202212141856-b2c38022ed-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 422, + "message": "Unprocessable Entity" + }, + "uri": "https://api.easypost.com/beta/referral_customers/refunds" + }, + "duration": 435 + } +] \ No newline at end of file diff --git a/src/test/java/com/easypost/BetaReferralCustomerTest.java b/src/test/java/com/easypost/BetaReferralCustomerTest.java new file mode 100644 index 000000000..66b67adda --- /dev/null +++ b/src/test/java/com/easypost/BetaReferralCustomerTest.java @@ -0,0 +1,73 @@ +package com.easypost; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.BeforeAll; + +import com.easypost.exception.EasyPostException; +import com.easypost.exception.API.InvalidRequestError; +import org.junit.jupiter.api.Test; + +public class BetaReferralCustomerTest { + private static TestUtils.VCR vcr; + + /** + * Set up the testing environment for this file. + * + * @throws EasyPostException when the request fails. + */ + @BeforeAll + public static void setup() throws EasyPostException { + vcr = new TestUtils.VCR("beta_referral_customer", TestUtils.ApiKey.REFERRAL); + } + + /** + * Test add Stripe payment method for referral customer. + * + * @throws EasyPostException + */ + @Test + public void testAddPaymentMethod() throws EasyPostException { + vcr.setUpTest("add_payment_method"); + InvalidRequestError exception = assertThrows(InvalidRequestError.class, + () -> vcr.client.betaReferralCustomer.addPaymentMethod("cus_123", "ba_123")); + + assertEquals("BILLING.INVALID_PAYMENT_GATEWAY_REFERENCE", exception.getCode()); + assertEquals(422, exception.getStatusCode()); + assertEquals("Invalid Payment Gateway Reference.", exception.getMessage()); + } + + /** + * Test refund by amount for a previous payment. + * + * @throws EasyPostException + */ + @Test + public void testRefundByAmount() throws EasyPostException { + vcr.setUpTest("refund_by_amount"); + InvalidRequestError exception = assertThrows(InvalidRequestError.class, + () -> vcr.client.betaReferralCustomer.refundByAmount(2000)); + + assertEquals("TRANSACTION.AMOUNT_INVALID", exception.getCode()); + assertEquals(422, exception.getStatusCode()); + assertEquals("Refund amount is invalid. Please use a valid amount or escalate to finance.", + exception.getMessage()); + } + + /** + * Test refund by payment log for a previous payment. + * + * @throws EasyPostException + */ + @Test + public void testRefundByPaymentLogId() throws EasyPostException { + vcr.setUpTest("refund_by_payment_log_id"); + InvalidRequestError exception = assertThrows(InvalidRequestError.class, + () -> vcr.client.betaReferralCustomer.refundByPaymentLog(("paylog_123"))); + + assertEquals("TRANSACTION.DOES_NOT_EXIST", exception.getCode()); + assertEquals(422, exception.getStatusCode()); + assertEquals("We could not find a transaction with that id.", exception.getMessage()); + } +} diff --git a/src/test/java/com/easypost/TestUtils.java b/src/test/java/com/easypost/TestUtils.java index 010167341..13589cea6 100644 --- a/src/test/java/com/easypost/TestUtils.java +++ b/src/test/java/com/easypost/TestUtils.java @@ -96,7 +96,7 @@ public static String getApiKey(ApiKey apiKey) { keyName = "EASYPOST_PROD_API_KEY"; break; case REFERRAL: - keyName = "REFERRAL_USER_PROD_API_KEY"; + keyName = "REFERRAL_CUSTOMER_PROD_API_KEY"; break; case PARTNER: keyName = "PARTNER_USER_PROD_API_KEY"; From 36d385f68ef3a366a49469aa05323ca700f33c9f Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Wed, 11 Jan 2023 09:54:11 -0700 Subject: [PATCH 039/208] chore: prepare v6.1.0 for release --- CHANGELOG.md | 4 ++-- README.md | 4 ++-- VERSION | 2 +- pom.xml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf0498786..988ce34f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # CHANGELOG -## Next Release +## v6.1.0 (2023-01-11) -- [ADDED] Adds new beta billing functionality for ReferralCustomer users +- Adds new beta billing functionality for ReferralCustomer users - `addPaymentMethod` can add a pre-existing Stripe bank account or credit card to your EasyPost account - `refundByAmount` refunds your wallet by a dollar amount - `refundByPaymentLog` refunds you wallet by a PaymentLog ID diff --git a/README.md b/README.md index e45a84ee2..0407398eb 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this to your project's POM: com.easypost easypost-api-client - 6.0.0 + 6.1.0 ``` @@ -25,7 +25,7 @@ Add this to your project's POM: Add this to your project's build file: ```groovy -implementation "com.easypost:easypost-api-client:6.0.0" +implementation "com.easypost:easypost-api-client:6.1.0" ``` **NOTE:** [Google Gson](http://code.google.com/p/google-gson/) is required. diff --git a/VERSION b/VERSION index 09b254e90..dfda3e0b4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.0.0 +6.1.0 diff --git a/pom.xml b/pom.xml index 01d056a97..3663b1ab6 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.easypost easypost-api-client - 6.0.0 + 6.1.0 jar com.easypost:easypost-api-client @@ -223,7 +223,7 @@ -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED - + com.google.errorprone From b91c6e6f9287e83ccf0b052d6942814e4741a128 Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Thu, 12 Jan 2023 10:53:31 -0700 Subject: [PATCH 040/208] Drop vulnerable Apache dependencies, implement dependent functions (#224) - Extract required Apache functions (hex conversion) into ApachePatch - Drop vulnerable Apache dependencies --- pom.xml | 5 - .../java/com/easypost/utils/ApachePatch.java | 469 ++++++++++++++++++ .../java/com/easypost/utils/Cryptography.java | 2 +- style_suppressions.xml | 2 + 4 files changed, 472 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/easypost/utils/ApachePatch.java diff --git a/pom.xml b/pom.xml index 3663b1ab6..40fe3946b 100644 --- a/pom.xml +++ b/pom.xml @@ -76,11 +76,6 @@ 0.4.2 compile - - org.apache.httpcomponents - httpclient - 4.5.13 - org.projectlombok lombok diff --git a/src/main/java/com/easypost/utils/ApachePatch.java b/src/main/java/com/easypost/utils/ApachePatch.java new file mode 100644 index 000000000..afece4eb8 --- /dev/null +++ b/src/main/java/com/easypost/utils/ApachePatch.java @@ -0,0 +1,469 @@ +package com.easypost.utils; + +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; + +/** + * This class is a collection of Apache functions that have been extracted for use in this application. + * This class is required because Apache's libraries are notorious for security vulnerabilities, so we'll only + * extract the safe functions that we need, rather than importing an entire vulnerable dependency. + *

      + * A lot of the functions in here are lifted straight from Apache's source code with minor alterations, + * so any janky code complaints should be directed at the Apache developers who wrote them probably 20 years ago. + */ +public abstract class ApachePatch { + + /** + * This class was lifted and modified from + * + * common-codec:common-codec version 1.15, + * namespace org.apache.commons.codec.DecoderException, + * released under the Apache License 2.0. + */ + public static class DecoderException extends Exception { + + private static final long serialVersionUID = 1L; + + /** + * Constructs a new {@link DecoderException}. + */ + public DecoderException() {} + + /** + * Constructs a new {@link DecoderException} with the specified message. + * + * @param message the message + */ + public DecoderException(String message) { + super(message); + } + + /** + * Constructs a new {@link DecoderException} with the specified message and inner exception. + * + * @param message the message + * @param cause the inner exception + */ + public DecoderException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructs a new {@link DecoderException} with the specified inner exception. + * + * @param cause the inner exception + */ + public DecoderException(Throwable cause) { + super(cause); + } + } + + /** + * This class was lifted and modified from + * + * common-codec:common-codec version 1.15, + * namespace org.apache.commons.codec.EncoderException, + * released under the Apache License 2.0. + */ + public static class EncoderException extends Exception { + + private static final long serialVersionUID = 1L; + + /** + * Constructs a new {@link EncoderException}. + */ + public EncoderException() {} + + /** + * Constructs a new {@link EncoderException} with the specified message. + * + * @param message the message + */ + public EncoderException(String message) { + super(message); + } + + /** + * Constructs a new {@link EncoderException} with the specified message and inner exception. + * + * @param message the message + * @param cause the inner exception + */ + public EncoderException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructs a new {@link EncoderException} with the specified inner exception. + * + * @param cause the inner exception + */ + public EncoderException(Throwable cause) { + super(cause); + } + } + + /** + * This class was lifted and modified from + * + * common-codec:common-codec version 1.15, + * namespace org.apache.commons.codec.binary.Hex, + * released under the Apache License 2.0. + */ + public static class Hex { + public static final Charset DEFAULT_CHARSET; + private static final char[] DIGITS_LOWER; + private static final char[] DIGITS_UPPER; + private final Charset charset; + + /** + * Decode a hex string into a byte array. + * + * @param data the string to decode + * @return the decoded byte array + */ + public static byte[] decodeHex(String data) throws DecoderException { + return decodeHex(data.toCharArray()); + } + + /** + * Decode a hex char array into a byte array. + * + * @param data the char array to decode + * @return the decoded byte array + */ + public static byte[] decodeHex(char[] data) throws DecoderException { + int len = data.length; + if ((len & 1) != 0) { + throw new DecoderException("Odd number of characters."); + } else { + byte[] out = new byte[len >> 1]; + int i = 0; + + for (int j = 0; j < len; ++i) { + int f = toDigit(data[j], j) << 4; + ++j; + f |= toDigit(data[j], j); + ++j; + out[i] = (byte) (f & 255); + } + + return out; + } + } + + /** + * Encode a byte array into a hex char array. + * + * @param data the byte array to encode + * @return the hex encoded char array + */ + public static char[] encodeHex(byte[] data) { + return encodeHex(data, true); + } + + /** + * Encode a ByteBuffer into a hex char array. + * + * @param data the ByteBuffer to encode + * @return the hex encoded char array + */ + public static char[] encodeHex(ByteBuffer data) { + return encodeHex(data, true); + } + + /** + * Encode a byte array into a hex char array. + * + * @param data the byte array to encode + * @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase + * @return the hex encoded char array + */ + public static char[] encodeHex(byte[] data, boolean toLowerCase) { + return encodeHex(data, toLowerCase ? DIGITS_LOWER : DIGITS_UPPER); + } + + /** + * Encode a ByteBuffer into a hex char array. + * + * @param data the ByteBuffer to encode + * @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase + * @return the hex encoded char array + */ + public static char[] encodeHex(ByteBuffer data, boolean toLowerCase) { + return encodeHex(data, toLowerCase ? DIGITS_LOWER : DIGITS_UPPER); + } + + /** + * Encode a byte array into a hex char array. + * + * @param data the byte array to encode + * @param toDigits map of elements to convert to digits + * @return the hex encoded char array + */ + protected static char[] encodeHex(byte[] data, char[] toDigits) { + int l = data.length; + char[] out = new char[l << 1]; + int i = 0; + + for (int j = 0; i < l; ++i) { + out[j++] = toDigits[(240 & data[i]) >>> 4]; + out[j++] = toDigits[15 & data[i]]; + } + + return out; + } + + /** + * Encode a ByteBuffer into a hex char array. + * + * @param data the ByteBuffer to encode + * @param toDigits map of elements to convert to digits + * @return the hex encoded char array + */ + protected static char[] encodeHex(ByteBuffer data, char[] toDigits) { + return encodeHex(data.array(), toDigits); + } + + /** + * Encode a byte array into a hex string. + * + * @param data the byte array to encode + * @return the hex encoded string + */ + public static String encodeHexString(byte[] data) { + return new String(encodeHex(data)); + } + + /** + * Encode a byte array into a hex string. + * + * @param data the byte array to encode + * @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase + * @return the hex encoded string + */ + public static String encodeHexString(byte[] data, boolean toLowerCase) { + return new String(encodeHex(data, toLowerCase)); + } + + /** + * Encode a ByteBuffer into a hex string. + * + * @param data the ByteBuffer to encode + * @return the hex encoded char array + */ + public static String encodeHexString(ByteBuffer data) { + return new String(encodeHex(data)); + } + + /** + * Encode a ByteBuffer into a hex string. + * + * @param data the ByteBuffer to encode + * @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase + * @return the hex encoded char array + */ + public static String encodeHexString(ByteBuffer data, boolean toLowerCase) { + return new String(encodeHex(data, toLowerCase)); + } + + /** + * Decode a character to a digit. + * + * @param ch the character to decode + * @param index the index of the character in the source + * @return the digit + * @throws DecoderException Thrown if ch is an illegal hex character + */ + protected static int toDigit(char ch, int index) throws DecoderException { + int digit = Character.digit(ch, 16); + if (digit == -1) { + throw new DecoderException("Illegal hexadecimal character " + ch + " at index " + index); + } else { + return digit; + } + } + + /** + * Construct a new Hex codec with the default charset. + */ + public Hex() { + this.charset = DEFAULT_CHARSET; + } + + /** + * Construct a new Hex codec with the given charset. + * + * @param charset the charset to use for string decoding and encoding + */ + public Hex(Charset charset) { + this.charset = charset; + } + + /** + * Construct a new Hex codec with the given charset name. + * + * @param charsetName the name of the charset to use for string decoding and encoding + */ + public Hex(String charsetName) { + this(Charset.forName(charsetName)); + } + + /** + * Decode a hex byte array into a byte array. + * + * @param array An array of hex-encoded characters + * @return A byte array representing the decoded hex string + */ + public byte[] decode(byte[] array) throws DecoderException { + return decodeHex((new String(array, this.getCharset())).toCharArray()); + } + + /** + * Decode a hex ByteBuffer into a byte array. + * + * @param buffer A ByteBuffer of hex-encoded characters + * @return A byte array representing the decoded hex string + * @throws DecoderException Thrown if the ByteBuffer is not backed by an array + */ + public byte[] decode(ByteBuffer buffer) throws DecoderException { + return decodeHex((new String(buffer.array(), this.getCharset())).toCharArray()); + } + + /** + * Decode a hex object. + * + * @param object The object to decode + * @return A byte array representing the decoded hex string + * @throws DecoderException Thrown if the object is not a String or byte[] + */ + public Object decode(Object object) throws DecoderException { + if (object instanceof String) { + return this.decode((Object) ((String) object).toCharArray()); + } else if (object instanceof byte[]) { + return this.decode((byte[]) ((byte[]) object)); + } else if (object instanceof ByteBuffer) { + return this.decode((ByteBuffer) object); + } else { + try { + return decodeHex((char[]) ((char[]) object)); + } catch (ClassCastException var3) { + throw new DecoderException(var3.getMessage(), var3); + } + } + } + + /** + * Decode a hex byte array into a byte array. + * + * @param array An array of hex-encoded characters + * @return A byte array representing the decoded hex string + */ + public byte[] encode(byte[] array) { + return encodeHexString(array).getBytes(this.getCharset()); + } + + /** + * Decode a hex ByteBuffer into a byte array. + * + * @param array A ByteBuffer of hex-encoded characters + * @return A byte array representing the decoded hex string + */ + public byte[] encode(ByteBuffer array) { + return encodeHexString(array).getBytes(this.getCharset()); + } + + /** + * Encode an object. + * + * @param object The object to encode + * @return An encoded object + * @throws EncoderException Thrown if the object is not a String or byte[] + */ + public Object encode(Object object) throws EncoderException { + byte[] byteArray; + if (object instanceof String) { + byteArray = ((String) object).getBytes(this.getCharset()); + } else if (object instanceof ByteBuffer) { + byteArray = ((ByteBuffer) object).array(); + } else { + try { + byteArray = (byte[]) ((byte[]) object); + } catch (ClassCastException var4) { + throw new EncoderException(var4.getMessage(), var4); + } + } + + return encodeHex(byteArray); + } + + /** + * Gets the charset. + * + * @return the charset + */ + public Charset getCharset() { + return this.charset; + } + + /** + * Gets the charset name. + * + * @return the name of the charset + */ + public String getCharsetName() { + return this.charset.name(); + } + + /** + * Returns a string representation of the object, which includes the charset name. + * + * @return a string representation of the object + */ + public String toString() { + return super.toString() + "[charsetName=" + this.charset + "]"; + } + + static { + DEFAULT_CHARSET = StandardCharsets.UTF_8; + DIGITS_LOWER = new char[] { + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + 'a', + 'b', + 'c', + 'd', + 'e', + 'f' + }; + DIGITS_UPPER = new char[] { + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + 'A', + 'B', + 'C', + 'D', + 'E', + 'F' + }; + } + } + +} diff --git a/src/main/java/com/easypost/utils/Cryptography.java b/src/main/java/com/easypost/utils/Cryptography.java index 0dca81ded..1c23c1769 100644 --- a/src/main/java/com/easypost/utils/Cryptography.java +++ b/src/main/java/com/easypost/utils/Cryptography.java @@ -1,6 +1,6 @@ package com.easypost.utils; -import org.apache.commons.codec.binary.Hex; +import com.easypost.utils.ApachePatch.Hex; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/style_suppressions.xml b/style_suppressions.xml index 79d5c5f5f..ae6d79f1c 100644 --- a/style_suppressions.xml +++ b/style_suppressions.xml @@ -5,6 +5,8 @@ + + From 2f5f6f8084e8b69209ea70b4a951ce2ea0e1385b Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 13 Jan 2023 14:40:37 -0700 Subject: [PATCH 041/208] fix: bump easyvcr to fix vulnerabilities --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 40fe3946b..5676feac2 100644 --- a/pom.xml +++ b/pom.xml @@ -73,7 +73,7 @@ com.easypost easyvcr - 0.4.2 + 0.5.1 compile From c7c4954cb32f8bef6e0f7ea639899fa938cfc405 Mon Sep 17 00:00:00 2001 From: "Junjie(Jack) Chen" Date: Sun, 15 Jan 2023 00:11:15 -0500 Subject: [PATCH 042/208] add retrieve all pickups function (#225) --- CHANGELOG.md | 4 + .../com/easypost/service/PickupService.java | 14 +++ src/test/cassettes/pickup/all.json | 91 +++++++++++++++++++ src/test/java/com/easypost/PickupTest.java | 22 +++++ 4 files changed, 131 insertions(+) create mode 100644 src/test/cassettes/pickup/all.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 988ce34f7..e3523bb82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## Next Release + +- Adds `all` function to `Pickup` to retrieve all pickups + ## v6.1.0 (2023-01-11) - Adds new beta billing functionality for ReferralCustomer users diff --git a/src/main/java/com/easypost/service/PickupService.java b/src/main/java/com/easypost/service/PickupService.java index 38fe1e39c..f4772a4a0 100644 --- a/src/main/java/com/easypost/service/PickupService.java +++ b/src/main/java/com/easypost/service/PickupService.java @@ -4,6 +4,7 @@ import com.easypost.http.Requestor; import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.Pickup; +import com.easypost.model.PickupCollection; import com.easypost.model.PickupRate; import com.easypost.utils.InternalUtilities; @@ -22,6 +23,19 @@ public class PickupService { this.client = client; } + /** + * Get a list of all Pickup objects. + * + * @param params The options for the query. + * @return PickupCollection object + * @throws EasyPostException when the request fails. + */ + public PickupCollection all(final Map params) + throws EasyPostException { + return Requestor.request(RequestMethod.GET, InternalUtilities.classURL(Pickup.class), params, + PickupCollection.class, client); + } + /** * Create a new Pickup object from a map of parameters. * diff --git a/src/test/cassettes/pickup/all.json b/src/test/cassettes/pickup/all.json new file mode 100644 index 000000000..4fe14c92e --- /dev/null +++ b/src/test/cassettes/pickup/all.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1673640637, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/pickups?page_size\u003d5" + }, + "response": { + "body": "{\n \"pickups\": [\n {\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-21T23:20:13+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-21T23:20:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_0d05b4c869f311ed9318ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-21T23:20:13Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-21T23:20:14Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-21T23:20:14Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_e1a2c56ca17243a4b05926fb27ffdac9\",\n \"pickup_id\": \"pickup_fd632feccb634b5bb524b498d1829b04\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62413442\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-21T23:20:15Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_fd632feccb634b5bb524b498d1829b04\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n },\n {\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-21T23:17:20+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-21T23:17:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_a5b06bfd69f211edb053ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-21T23:17:20Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-21T23:17:21Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-21T23:17:21Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_6e187604ec4049bea80d061867ed6545\",\n \"pickup_id\": \"pickup_6e548a7c19c549ea931eb3842ffb6036\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62413434\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-21T23:17:22Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_6e548a7c19c549ea931eb3842ffb6036\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n },\n {\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:45+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5b10c085646e11edb799ac1f6bc7b362\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:45Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:46Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:46Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_1a8115ebdfc84dc59bc4932700c43530\",\n \"pickup_id\": \"pickup_c2f156e8121b4c57bad6d3be2758bbb4\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:45Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_c2f156e8121b4c57bad6d3be2758bbb4\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n },\n {\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:40+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_5830f2ac646e11ed9facac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:40Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:41Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:41Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_3918e50a5afa4cdc98e9cc755624ad6c\",\n \"pickup_id\": \"pickup_0b2d650f7c9e490991e666652ace1192\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC62390430\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:43Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_0b2d650f7c9e490991e666652ace1192\",\n \"object\": \"Pickup\",\n \"status\": \"canceled\"\n },\n {\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2022-11-14T22:47:38+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2022-11-14T22:47:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_569aabe3646e11ed9eefac1f6b0a0d1e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2022-12-01T00:00:00Z\",\n \"created_at\": \"2022-11-14T22:47:38Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2022-11-14T22:47:38Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2022-11-14T22:47:38Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_476bf73e9cc44d2fbf35c1fcff20c2c3\",\n \"pickup_id\": \"pickup_709c5c1cdf214272b4546e28163b292e\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2022-12-01T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2022-11-14T22:47:38Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_709c5c1cdf214272b4546e28163b292e\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n }\n ],\n \"has_more\": true\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "5851" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb2nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "3ac9ec2a63c1babde0dbfac70009c892" + ], + "x-proxied": [ + "extlb2nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.116332" + ], + "etag": [ + "W/\"51a5bef0263a54094090e4db315c8406\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202301131832-957dabd382-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/pickups?page_size\u003d5" + }, + "duration": 480 + } +] \ No newline at end of file diff --git a/src/test/java/com/easypost/PickupTest.java b/src/test/java/com/easypost/PickupTest.java index 13834641f..65670781e 100644 --- a/src/test/java/com/easypost/PickupTest.java +++ b/src/test/java/com/easypost/PickupTest.java @@ -2,6 +2,7 @@ import com.easypost.exception.EasyPostException; import com.easypost.model.Pickup; +import com.easypost.model.PickupCollection; import com.easypost.model.PickupRate; import com.easypost.model.Shipment; import org.junit.jupiter.api.BeforeAll; @@ -47,6 +48,27 @@ private static Pickup createBasicPickup() throws EasyPostException { return vcr.client.pickup.create(pickupData); } + /** + * Test retrieving all shipments. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testAll() throws EasyPostException { + vcr.setUpTest("all"); + + Map params = new HashMap(); + params.put("page_size", Fixtures.pageSize()); + + PickupCollection pickupCollection = vcr.client.pickup.all(params); + + List pickups = pickupCollection.getPickups(); + + assertTrue(pickups.size() <= Fixtures.pageSize()); + assertNotNull(pickupCollection.getHasMore()); + assertTrue(pickups.stream().allMatch(pickup -> pickup instanceof Pickup)); + } + /** * Test creating a pickup. * From 5945c3d69f3dfa6f00d1bd29a4d6f387cea89d5e Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Tue, 17 Jan 2023 14:58:03 -0700 Subject: [PATCH 043/208] fix: bump easyvcr --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5676feac2..d13dd5434 100644 --- a/pom.xml +++ b/pom.xml @@ -73,7 +73,7 @@ com.easypost easyvcr - 0.5.1 + 0.5.2 compile From e03386647137c803282201dc1bd506a38399cba4 Mon Sep 17 00:00:00 2001 From: "Junjie(Jack) Chen" Date: Wed, 18 Jan 2023 11:17:55 -0500 Subject: [PATCH 044/208] add retrieve payload(s) functions (#227) --- CHANGELOG.md | 1 + src/main/java/com/easypost/model/Payload.java | 16 + .../com/easypost/model/PayloadCollection.java | 10 + .../com/easypost/service/EventService.java | 33 ++ .../event/retrieve_all_payloads.json | 456 ++++++++++++++++++ .../cassettes/event/retrieve_payload.json | 452 +++++++++++++++++ src/test/java/com/easypost/EventTest.java | 75 +++ 7 files changed, 1043 insertions(+) create mode 100644 src/main/java/com/easypost/model/Payload.java create mode 100644 src/main/java/com/easypost/model/PayloadCollection.java create mode 100644 src/test/cassettes/event/retrieve_all_payloads.json create mode 100644 src/test/cassettes/event/retrieve_payload.json diff --git a/CHANGELOG.md b/CHANGELOG.md index e3523bb82..23cb14a29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Next Release - Adds `all` function to `Pickup` to retrieve all pickups +- Adds `retrieveAllPayloads` and `retrievePayload` to retrieve all payloads or just a payload ## v6.1.0 (2023-01-11) diff --git a/src/main/java/com/easypost/model/Payload.java b/src/main/java/com/easypost/model/Payload.java new file mode 100644 index 000000000..dc4899f49 --- /dev/null +++ b/src/main/java/com/easypost/model/Payload.java @@ -0,0 +1,16 @@ +package com.easypost.model; + +import java.util.Map; + +import lombok.Getter; + +@Getter +public class Payload extends EasyPostResource { + private String requestUrl; + private Map requestHeaders; + private Map requestBody; + private Map responseHeaders; + private String responseBody; + private int responseCode; + private int totalTime; +} diff --git a/src/main/java/com/easypost/model/PayloadCollection.java b/src/main/java/com/easypost/model/PayloadCollection.java new file mode 100644 index 000000000..f5dbc86e0 --- /dev/null +++ b/src/main/java/com/easypost/model/PayloadCollection.java @@ -0,0 +1,10 @@ +package com.easypost.model; + +import lombok.Getter; + +import java.util.List; + +@Getter +public class PayloadCollection { + private List payloads; +} diff --git a/src/main/java/com/easypost/service/EventService.java b/src/main/java/com/easypost/service/EventService.java index aae406fac..c0e215530 100644 --- a/src/main/java/com/easypost/service/EventService.java +++ b/src/main/java/com/easypost/service/EventService.java @@ -1,5 +1,6 @@ package com.easypost.service; +import java.util.List; import java.util.Map; import com.easypost.exception.EasyPostException; @@ -7,6 +8,8 @@ import com.easypost.http.Requestor.RequestMethod; import com.easypost.model.Event; import com.easypost.model.EventCollection; +import com.easypost.model.Payload; +import com.easypost.model.PayloadCollection; import com.easypost.utils.InternalUtilities; public class EventService { @@ -44,4 +47,34 @@ public EventCollection all(final Map params) throws EasyPostExce return Requestor.request(RequestMethod.GET, InternalUtilities.classURL(Event.class), params, EventCollection.class, client); } + + /** + * Retrieve all payloads. + * + * @param eventId The ID of event. + * @return List of Payload objects. + * @throws EasyPostException when the request fails. + */ + public List retrieveAllPayloads(final String eventId) throws EasyPostException { + PayloadCollection payloads = Requestor.request(RequestMethod.GET, + String.format("%s/%s", InternalUtilities.instanceURL(Event.class, eventId), "payloads"), null, + PayloadCollection.class, client); + + return payloads.getPayloads(); + } + + /** + * Retrieve a payload. + * + * @param eventId The ID of event. + * @param payloadId The ID of payload. + * @return PayloadCollection object + * @throws EasyPostException when the request fails. + */ + public Payload retrievePayload(final String eventId, final String payloadId) throws EasyPostException { + return Requestor.request(RequestMethod.GET, + String.format("%s/%s/%s", InternalUtilities.instanceURL(Event.class, eventId), "payloads", payloadId), + null, + Payload.class, client); + } } diff --git a/src/test/cassettes/event/retrieve_all_payloads.json b/src/test/cassettes/event/retrieve_all_payloads.json new file mode 100644 index 000000000..7b87348ff --- /dev/null +++ b/src/test/cassettes/event/retrieve_all_payloads.json @@ -0,0 +1,456 @@ +[ + { + "recordedAt": 1673974878, + "request": { + "body": "{\n \"webhook\": {\n \"url\": \"http://example.com\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/webhooks" + }, + "response": { + "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2023-01-17T17:01:18Z\",\n \"id\": \"hook_8f595d06968811ed80e0738bf11bb458\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "161" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb6nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "8dd3793b63c6d45ee0de410700032174" + ], + "x-proxied": [ + "extlb2nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.296523" + ], + "etag": [ + "W/\"302a8816b72426726a425a24be6b39f7\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202301141836-adb6f40816-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/webhooks" + }, + "duration": 571 + }, + { + "recordedAt": 1673974879, + "request": { + "body": "{\n \"batch\": {\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/batches" + }, + "response": { + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2023-01-17T17:01:19Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2023-01-17T17:01:19Z\",\n \"id\": \"batch_318a61840d064d62940d720f6f6fd8c9\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "384" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb12nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "11b19e3363c6d45fe0de41090004e4da" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.043957" + ], + "etag": [ + "W/\"02d52d4191c823414c513de333f9a27c\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202301141836-adb6f40816-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches" + }, + "duration": 308 + }, + { + "recordedAt": 1673974884, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/events?page_size\u003d5" + }, + "response": { + "body": "{\n \"has_more\": true,\n \"events\": [\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.updated\",\n \"created_at\": \"2023-01-17T17:01:19.422Z\",\n \"id\": \"evt_90038362968811ed9a3b6170d5effba2\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.created\",\n \"created_at\": \"2023-01-17T17:01:19.318Z\",\n \"id\": \"evt_8ff3a320968811ed82fe63b96936c958\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.updated\",\n \"created_at\": \"2023-01-17T16:59:32.645Z\",\n \"id\": \"evt_505ea660968811edb7837d64e4e6d490\",\n \"status\": \"failed\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.created\",\n \"created_at\": \"2023-01-17T16:59:32.490Z\",\n \"id\": \"evt_50470618968811eda54229dcfd401efe\",\n \"status\": \"failed\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.updated\",\n \"created_at\": \"2023-01-13T22:07:03.553Z\",\n \"id\": \"evt_9c50c97e938e11ed9610119c664b470f\",\n \"status\": \"failed\",\n \"object\": \"Event\"\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1105" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb3nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "389254ce63c6d464e0de410a0004e97e" + ], + "x-proxied": [ + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.356482" + ], + "etag": [ + "W/\"47e6d81986093dadcad812c582f55e7e\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202301141836-adb6f40816-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/events?page_size\u003d5" + }, + "duration": 596 + }, + { + "recordedAt": 1673974886, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/events/evt_90038362968811ed9a3b6170d5effba2/payloads" + }, + "response": { + "body": "{\n \"payloads\": []\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "15" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb5nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "389254ce63c6d466e0de410b0004ea2d" + ], + "x-proxied": [ + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.160427" + ], + "etag": [ + "W/\"b5e6dd0a7b95afc23c69e9e95aa4ce47\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202301141836-adb6f40816-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/events/evt_90038362968811ed9a3b6170d5effba2/payloads" + }, + "duration": 1368 + }, + { + "recordedAt": 1673974886, + "request": { + "body": "", + "method": "DELETE", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/webhooks/hook_8f595d06968811ed80e0738bf11bb458" + }, + "response": { + "body": "{}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb12nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "61b3fe0f63c6d466e0de41240000398e" + ], + "x-proxied": [ + "extlb3wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.495649" + ], + "etag": [ + "W/\"44136fa355b3678a1146ad16f7e8649e\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202301141836-adb6f40816-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/webhooks/hook_8f595d06968811ed80e0738bf11bb458" + }, + "duration": 709 + } +] \ No newline at end of file diff --git a/src/test/cassettes/event/retrieve_payload.json b/src/test/cassettes/event/retrieve_payload.json new file mode 100644 index 000000000..b56e8a8b2 --- /dev/null +++ b/src/test/cassettes/event/retrieve_payload.json @@ -0,0 +1,452 @@ +[ + { + "recordedAt": 1673974771, + "request": { + "body": "{\n \"webhook\": {\n \"url\": \"http://example.com\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/webhooks" + }, + "response": { + "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2023-01-17T16:59:31Z\",\n \"id\": \"hook_4fa5a0ca968811eda4b2671fca204e09\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "161" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb12nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "8dd3793863c6d3f3e0de3d8e0002f762" + ], + "x-proxied": [ + "extlb2nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.275060" + ], + "etag": [ + "W/\"fcaa604a8d0a958b7f50ccee344d0f1e\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202301141836-adb6f40816-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/webhooks" + }, + "duration": 592 + }, + { + "recordedAt": 1673974772, + "request": { + "body": "{\n \"batch\": {\n \"shipments\": [\n {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n },\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"street1\": \"388 Townsend St\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\"\n }\n }\n ]\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/batches" + }, + "response": { + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2023-01-17T16:59:32Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2023-01-17T16:59:32Z\",\n \"id\": \"batch_041c6e4aba184d3d8ccf49ecae3a3b6b\",\n \"state\": \"creating\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 0.0,\n \"creation_failed\": 0.0\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "384" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb1nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "11b19e3163c6d3f4e0de3d900004b068" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.042645" + ], + "etag": [ + "W/\"3cffb1b9051fd4322ca1e217490a4dcd\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202301141836-adb6f40816-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches" + }, + "duration": 331 + }, + { + "recordedAt": 1673974773, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/events?page_size\u003d5" + }, + "response": { + "body": "{\n \"has_more\": true,\n \"events\": [\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.updated\",\n \"created_at\": \"2023-01-17T16:59:32.645Z\",\n \"id\": \"evt_505ea660968811edb7837d64e4e6d490\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.created\",\n \"created_at\": \"2023-01-17T16:59:32.490Z\",\n \"id\": \"evt_50470618968811eda54229dcfd401efe\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.updated\",\n \"created_at\": \"2023-01-13T22:07:03.553Z\",\n \"id\": \"evt_9c50c97e938e11ed9610119c664b470f\",\n \"status\": \"failed\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.created\",\n \"created_at\": \"2023-01-13T22:07:03.431Z\",\n \"id\": \"evt_9c3e305c938e11ed8af543a7fc474f7d\",\n \"status\": \"failed\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.updated\",\n \"created_at\": \"2023-01-13T21:56:48.268Z\",\n \"id\": \"evt_2d93b948938d11ed9a8549b4a20a7311\",\n \"status\": \"completed\",\n \"object\": \"Event\"\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1108" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb6nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "11b19e3463c6d3f4e0de3d910004b08e" + ], + "x-proxied": [ + "extlb1nuq 29913d444b", + "intlb2nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.316871" + ], + "etag": [ + "W/\"c28d19001078e5d069596e82206a2938\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202301141836-adb6f40816-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/events?page_size\u003d5" + }, + "duration": 661 + }, + { + "recordedAt": 1673974778, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/events/evt_505ea660968811edb7837d64e4e6d490/payloads/payload_11111111111111111111111111111111" + }, + "response": { + "body": "{\n \"error\": {\n \"code\": \"PAYLOAD.NOT_FOUND\",\n \"message\": \"The payload(s) could not be found.\",\n \"errors\": []\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 404 Not Found" + ], + "content-length": [ + "97" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb5nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "389254cc63c6d3fae0de40a30004b64f" + ], + "x-proxied": [ + "extlb4wdc 29913d444b", + "intlb2wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.160444" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202301141836-adb6f40816-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 404, + "message": "Not Found" + }, + "uri": "https://api.easypost.com/v2/events/evt_505ea660968811edb7837d64e4e6d490/payloads/payload_11111111111111111111111111111111" + }, + "duration": 429 + }, + { + "recordedAt": 1673974779, + "request": { + "body": "", + "method": "DELETE", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/webhooks/hook_4fa5a0ca968811eda4b2671fca204e09" + }, + "response": { + "body": "{}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb8nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-backend": [ + "easypost" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-download-options": [ + "noopen" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-ep-request-uuid": [ + "389254d163c6d3fae0de40a40004b670" + ], + "x-proxied": [ + "extlb4wdc 29913d444b", + "intlb1wdc 29913d444b", + "intlb1nuq 29913d444b" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.524116" + ], + "etag": [ + "W/\"44136fa355b3678a1146ad16f7e8649e\"" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202301141836-adb6f40816-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/webhooks/hook_4fa5a0ca968811eda4b2671fca204e09" + }, + "duration": 772 + } +] \ No newline at end of file diff --git a/src/test/java/com/easypost/EventTest.java b/src/test/java/com/easypost/EventTest.java index 06c06bddc..8acf69613 100644 --- a/src/test/java/com/easypost/EventTest.java +++ b/src/test/java/com/easypost/EventTest.java @@ -1,11 +1,16 @@ package com.easypost; +import com.easypost.exception.APIException; import com.easypost.exception.EasyPostException; import com.easypost.model.Event; import com.easypost.model.EventCollection; +import com.easypost.model.Payload; +import com.easypost.model.Webhook; + import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -13,6 +18,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; public final class EventTest { @@ -76,4 +82,73 @@ public void testRetrieve() throws EasyPostException { // Must compare IDs since can't do whole-object comparisons currently assertEquals(event.getId(), retrievedEvent.getId()); } + + /** + * Test retrieving all payloads. + * + * @throws EasyPostException when the request fails. + * @throws InterruptedException when vcr recording fails. + */ + @Test + public void testEventRetrieveAllPayloads() throws EasyPostException, InterruptedException { + vcr.setUpTest("retrieve_all_payloads"); + + Map params = new HashMap<>(); + params.put("url", Fixtures.webhookUrl()); + Webhook webhook = vcr.client.webhook.create(params); + + List shipments = new ArrayList<>(); + shipments.add(Fixtures.basicShipment()); + + Map batchParams = new HashMap<>(); + batchParams.put("shipments", shipments); + vcr.client.batch.create(batchParams); + + if (vcr.isRecording()) { + Thread.sleep(5000); // Wait enough time for the batch to process before buying the shipment + } + + EventCollection events = getBasicEventCollection(); + + List eventsList = events.getEvents(); + List payloads = vcr.client.event.retrieveAllPayloads(eventsList.get(0).getId()); + assertTrue(payloads.stream().allMatch(payload -> payload instanceof Payload)); + vcr.client.webhook.delete(webhook.getId()); + } + + /** + * Test retrieving a payload. + * + * @throws EasyPostException when the request fails. + * @throws InterruptedException when vcr recording fails. + */ + @Test + public void testEventRetrievePayload() throws EasyPostException, InterruptedException { + vcr.setUpTest("retrieve_payload"); + + Map params = new HashMap<>(); + params.put("url", Fixtures.webhookUrl()); + Webhook webhook = vcr.client.webhook.create(params); + + List shipments = new ArrayList<>(); + shipments.add(Fixtures.basicShipment()); + + Map batchParams = new HashMap<>(); + batchParams.put("shipments", shipments); + vcr.client.batch.create(batchParams); + + if (vcr.isRecording()) { + Thread.sleep(5000); // Wait enough time for the batch to process before buying the shipment + } + + EventCollection events = getBasicEventCollection(); + + APIException exception = assertThrows(APIException.class, + () -> vcr.client.event.retrievePayload(events.getEvents().get(0).getId(), + "payload_11111111111111111111111111111111")); // Need a valid-length, invalid payload ID here + + assertEquals(404, exception.getStatusCode()); + + vcr.client.webhook.delete(webhook.getId()); + } } From 2942c53999dc1a635e8f7f98448a4f0aea60bda0 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Wed, 18 Jan 2023 09:31:07 -0700 Subject: [PATCH 045/208] chore: prepare v6.2.0 for release --- CHANGELOG.md | 4 ++-- README.md | 4 ++-- VERSION | 2 +- pom.xml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23cb14a29..205b99c3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ # CHANGELOG -## Next Release +## v6.2.0 (2023-01-18) - Adds `all` function to `Pickup` to retrieve all pickups -- Adds `retrieveAllPayloads` and `retrievePayload` to retrieve all payloads or just a payload +- Adds `retrieveAllPayloads` and `retrievePayload` to retrieve all payloads or a single event payload ## v6.1.0 (2023-01-11) diff --git a/README.md b/README.md index 0407398eb..76ff5a788 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this to your project's POM: com.easypost easypost-api-client - 6.1.0 + 6.2.0 ``` @@ -25,7 +25,7 @@ Add this to your project's POM: Add this to your project's build file: ```groovy -implementation "com.easypost:easypost-api-client:6.1.0" +implementation "com.easypost:easypost-api-client:6.2.0" ``` **NOTE:** [Google Gson](http://code.google.com/p/google-gson/) is required. diff --git a/VERSION b/VERSION index dfda3e0b4..6abaeb2f9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.1.0 +6.2.0 diff --git a/pom.xml b/pom.xml index d13dd5434..0794a92a7 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.easypost easypost-api-client - 6.1.0 + 6.2.0 jar com.easypost:easypost-api-client From b581c16bdb48093317d6001e68de99871583afdf Mon Sep 17 00:00:00 2001 From: "Junjie(Jack) Chen" Date: Fri, 20 Jan 2023 16:38:00 -0500 Subject: [PATCH 046/208] bump example submodule and regenerate doc (#229) --- Makefile | 2 +- docs/allclasses-index.html | 551 +- docs/allpackages-index.html | 33 +- .../Constants.CarrierAccountTypes.html | 166 + docs/com/easypost/Constants.ErrorCodes.html | 378 ++ .../com/easypost/Constants.ErrorMessages.html | 344 ++ docs/com/easypost/Constants.Http.html | 243 + docs/com/easypost/Constants.html | 194 + docs/com/easypost/EasyPost.html | 113 +- .../Constants.CarrierAccountTypes.html | 63 + .../class-use/Constants.ErrorCodes.html | 63 + .../class-use/Constants.ErrorMessages.html | 63 + .../easypost/class-use/Constants.Http.html | 63 + docs/com/easypost/class-use/Constants.html | 63 + docs/com/easypost/class-use/EasyPost.html | 27 +- .../easypost/exception/API/EncodingError.html | 184 + .../exception/API/ExternalApiError.html | 166 + .../exception/API/ForbiddenError.html | 63 +- .../exception/API/GatewayTimeoutError.html | 63 +- .../com/easypost/exception/API/HttpError.html | 184 + .../exception/API/InternalServerError.html | 63 +- .../exception/API/InvalidRequestError.html | 63 +- .../com/easypost/exception/API/JsonError.html | 184 + .../exception/API/MethodNotAllowedError.html | 63 +- .../easypost/exception/API/NotFoundError.html | 63 +- .../easypost/exception/API/PaymentError.html | 63 +- .../exception/API/RateLimitError.html | 63 +- .../easypost/exception/API/RedirectError.html | 63 +- .../API/ServiceUnavailableError.html | 175 + .../easypost/exception/API/TimeoutError.html | 63 +- .../exception/API/UnauthorizedError.html | 63 +- .../exception/API/UnknownApiError.html | 63 +- .../API/class-use/EncodingError.html | 126 + .../API/class-use/ExternalApiError.html | 63 + .../API/class-use/ForbiddenError.html | 77 +- .../API/class-use/GatewayTimeoutError.html | 77 +- .../exception/API/class-use/HttpError.html | 105 + .../API/class-use/InternalServerError.html | 77 +- .../API/class-use/InvalidRequestError.html | 77 +- .../exception/API/class-use/JsonError.html | 105 + .../API/class-use/MethodNotAllowedError.html | 77 +- .../API/class-use/NotFoundError.html | 77 +- .../exception/API/class-use/PaymentError.html | 77 +- .../API/class-use/RateLimitError.html | 77 +- .../API/class-use/RedirectError.html | 77 +- .../class-use/ServiceUnavailableError.html | 111 + .../exception/API/class-use/TimeoutError.html | 77 +- .../API/class-use/UnauthorizedError.html | 77 +- .../API/class-use/UnknownApiError.html | 77 +- .../exception/API/package-summary.html | 128 +- .../easypost/exception/API/package-tree.html | 69 +- .../easypost/exception/API/package-use.html | 98 +- docs/com/easypost/exception/APIException.html | 322 ++ .../easypost/exception/EasyPostException.html | 220 +- .../exception/General/FilteringError.html | 60 +- .../exception/General/InvalidObjectError.html | 60 +- .../General/InvalidParameterError.html | 80 +- .../General/MissingParameterError.html | 62 +- .../General/SignatureVerificationError.html | 60 +- .../General/class-use/FilteringError.html | 60 +- .../General/class-use/InvalidObjectError.html | 27 +- .../class-use/InvalidParameterError.html | 27 +- .../class-use/MissingParameterError.html | 92 +- .../class-use/SignatureVerificationError.html | 27 +- .../exception/General/package-summary.html | 90 +- .../exception/General/package-tree.html | 46 +- .../exception/General/package-use.html | 68 +- .../exception/class-use/APIException.html | 138 + .../class-use/EasyPostException.html | 1613 ++---- .../easypost/exception/package-summary.html | 93 +- docs/com/easypost/exception/package-tree.html | 41 +- docs/com/easypost/exception/package-use.html | 85 +- docs/com/easypost/http/EasyPostResponse.html | 137 +- docs/com/easypost/http/HashMapSerializer.html | 63 +- .../http/Requestor.RequestMethod.html | 86 +- docs/com/easypost/http/Requestor.html | 332 +- .../http/class-use/EasyPostResponse.html | 27 +- .../http/class-use/HashMapSerializer.html | 27 +- .../class-use/Requestor.RequestMethod.html | 58 +- .../easypost/http/class-use/Requestor.html | 27 +- docs/com/easypost/http/package-summary.html | 105 +- docs/com/easypost/http/package-tree.html | 42 +- docs/com/easypost/http/package-use.html | 27 +- docs/com/easypost/model/Address.html | 458 +- .../com/easypost/model/AddressCollection.html | 139 +- docs/com/easypost/model/AddressDetail.html | 167 +- .../easypost/model/AddressVerification.html | 167 +- .../easypost/model/AddressVerifications.html | 139 +- .../easypost/model/AddressVerifyResponse.html | 135 +- docs/com/easypost/model/ApiKey.html | 107 +- docs/com/easypost/model/ApiKeys.html | 179 +- docs/com/easypost/model/BaseAddress.html | 395 +- docs/com/easypost/model/BaseUser.html | 619 +- docs/com/easypost/model/Batch.html | 955 +--- docs/com/easypost/model/BatchCollection.html | 139 +- docs/com/easypost/model/BatchStatus.html | 199 +- .../com/easypost/model/BetaPaymentRefund.html | 138 + docs/com/easypost/model/Billing.html | 222 +- docs/com/easypost/model/Brand.html | 363 +- docs/com/easypost/model/CarbonOffset.html | 139 +- docs/com/easypost/model/CarrierAccount.html | 630 +- docs/com/easypost/model/CarrierDetail.html | 359 +- docs/com/easypost/model/CarrierType.html | 243 +- docs/com/easypost/model/CustomsInfo.html | 485 +- docs/com/easypost/model/CustomsItem.html | 421 +- docs/com/easypost/model/EasyPostResource.html | 251 +- docs/com/easypost/model/EndShipper.html | 258 +- .../easypost/model/EndShipperCollection.html | 135 +- docs/com/easypost/model/Error.html | 231 +- .../com/easypost/model/ErrorDeserializer.html | 57 +- docs/com/easypost/model/Event.html | 319 +- docs/com/easypost/model/EventCollection.html | 139 +- docs/com/easypost/model/EventData.html | 139 +- docs/com/easypost/model/Fee.html | 199 +- docs/com/easypost/model/Field.html | 203 +- docs/com/easypost/model/Fields.html | 203 +- docs/com/easypost/model/Form.html | 171 +- docs/com/easypost/model/Insurance.html | 647 +-- .../easypost/model/InsuranceCollection.html | 139 +- docs/com/easypost/model/Order.html | 829 +-- docs/com/easypost/model/OrderCollection.html | 139 +- docs/com/easypost/model/Parcel.html | 325 +- docs/com/easypost/model/Payload.html | 138 + .../com/easypost/model/PayloadCollection.html | 133 + .../model/PaymentMethod.Priority.html | 82 +- docs/com/easypost/model/PaymentMethod.html | 231 +- ...PaymentMethodObject.PaymentMethodType.html | 82 +- .../easypost/model/PaymentMethodObject.html | 259 +- docs/com/easypost/model/Pickup.html | 801 +-- docs/com/easypost/model/PickupCollection.html | 139 +- docs/com/easypost/model/PickupRate.html | 110 +- docs/com/easypost/model/PostageLabel.html | 715 +-- docs/com/easypost/model/Rate.html | 634 +-- docs/com/easypost/model/ReferralCustomer.html | 316 +- .../model/ReferralCustomerCollection.html | 139 +- docs/com/easypost/model/Refund.html | 370 +- docs/com/easypost/model/RefundCollection.html | 139 +- docs/com/easypost/model/Report.html | 423 +- docs/com/easypost/model/ReportCollection.html | 139 +- docs/com/easypost/model/ScanForm.html | 498 +- .../easypost/model/ScanFormCollection.html | 139 +- docs/com/easypost/model/Shipment.html | 2409 +------- .../easypost/model/ShipmentCollection.html | 139 +- docs/com/easypost/model/ShipmentMessage.html | 199 +- docs/com/easypost/model/ShipmentOptions.html | 135 +- docs/com/easypost/model/Smartrate.html | 108 +- .../com/easypost/model/SmartrateAccuracy.html | 118 +- .../easypost/model/SmartrateCollection.html | 79 +- .../SmartrateCollectionDeserializer.html | 57 +- docs/com/easypost/model/TaxIdentifier.html | 203 +- docs/com/easypost/model/TimeInTransit.html | 289 +- docs/com/easypost/model/Tracker.html | 603 +- .../com/easypost/model/TrackerCollection.html | 139 +- docs/com/easypost/model/TrackingDetail.html | 231 +- docs/com/easypost/model/TrackingLocation.html | 199 +- docs/com/easypost/model/User.html | 372 +- docs/com/easypost/model/Webhook.html | 424 +- .../com/easypost/model/WebhookCollection.html | 107 +- .../com/easypost/model/class-use/Address.html | 230 +- .../model/class-use/AddressCollection.html | 47 +- .../model/class-use/AddressDetail.html | 69 +- .../model/class-use/AddressVerification.html | 79 +- .../model/class-use/AddressVerifications.html | 69 +- .../class-use/AddressVerifyResponse.html | 27 +- docs/com/easypost/model/class-use/ApiKey.html | 65 +- .../com/easypost/model/class-use/ApiKeys.html | 68 +- .../easypost/model/class-use/BaseAddress.html | 35 +- .../easypost/model/class-use/BaseUser.html | 31 +- docs/com/easypost/model/class-use/Batch.html | 182 +- .../model/class-use/BatchCollection.html | 47 +- .../easypost/model/class-use/BatchStatus.html | 69 +- .../model/class-use/BetaPaymentRefund.html | 97 + .../com/easypost/model/class-use/Billing.html | 27 +- docs/com/easypost/model/class-use/Brand.html | 46 +- .../model/class-use/CarbonOffset.html | 69 +- .../model/class-use/CarrierAccount.html | 118 +- .../model/class-use/CarrierDetail.html | 69 +- .../easypost/model/class-use/CarrierType.html | 46 +- .../easypost/model/class-use/CustomsInfo.html | 81 +- .../easypost/model/class-use/CustomsItem.html | 79 +- .../model/class-use/EasyPostResource.html | 269 +- .../easypost/model/class-use/EndShipper.html | 88 +- .../model/class-use/EndShipperCollection.html | 47 +- docs/com/easypost/model/class-use/Error.html | 97 +- .../model/class-use/ErrorDeserializer.html | 27 +- docs/com/easypost/model/class-use/Event.html | 85 +- .../model/class-use/EventCollection.html | 47 +- .../easypost/model/class-use/EventData.html | 27 +- docs/com/easypost/model/class-use/Fee.html | 67 +- docs/com/easypost/model/class-use/Field.html | 79 +- docs/com/easypost/model/class-use/Fields.html | 69 +- docs/com/easypost/model/class-use/Form.html | 69 +- .../easypost/model/class-use/Insurance.html | 98 +- .../model/class-use/InsuranceCollection.html | 47 +- docs/com/easypost/model/class-use/Order.html | 124 +- .../model/class-use/OrderCollection.html | 27 +- docs/com/easypost/model/class-use/Parcel.html | 73 +- .../com/easypost/model/class-use/Payload.html | 104 + .../model/class-use/PayloadCollection.html | 63 + .../class-use/PaymentMethod.Priority.html | 70 +- .../model/class-use/PaymentMethod.html | 59 +- ...PaymentMethodObject.PaymentMethodType.html | 33 +- .../model/class-use/PaymentMethodObject.html | 56 +- docs/com/easypost/model/class-use/Pickup.html | 131 +- .../model/class-use/PickupCollection.html | 58 +- .../easypost/model/class-use/PickupRate.html | 69 +- .../model/class-use/PostageLabel.html | 69 +- docs/com/easypost/model/class-use/Rate.html | 149 +- .../model/class-use/ReferralCustomer.html | 69 +- .../class-use/ReferralCustomerCollection.html | 47 +- docs/com/easypost/model/class-use/Refund.html | 75 +- .../model/class-use/RefundCollection.html | 47 +- docs/com/easypost/model/class-use/Report.html | 79 +- .../model/class-use/ReportCollection.html | 47 +- .../easypost/model/class-use/ScanForm.html | 103 +- .../model/class-use/ScanFormCollection.html | 47 +- .../easypost/model/class-use/Shipment.html | 281 +- .../model/class-use/ShipmentCollection.html | 47 +- .../model/class-use/ShipmentMessage.html | 89 +- .../model/class-use/ShipmentOptions.html | 27 +- .../easypost/model/class-use/Smartrate.html | 248 +- .../model/class-use/SmartrateAccuracy.html | 89 +- .../model/class-use/SmartrateCollection.html | 29 +- .../SmartrateCollectionDeserializer.html | 27 +- .../model/class-use/TaxIdentifier.html | 69 +- .../model/class-use/TimeInTransit.html | 58 +- .../com/easypost/model/class-use/Tracker.html | 103 +- .../model/class-use/TrackerCollection.html | 47 +- .../model/class-use/TrackingDetail.html | 69 +- .../model/class-use/TrackingLocation.html | 69 +- docs/com/easypost/model/class-use/User.html | 102 +- .../com/easypost/model/class-use/Webhook.html | 90 +- .../model/class-use/WebhookCollection.html | 51 +- docs/com/easypost/model/package-summary.html | 393 +- docs/com/easypost/model/package-tree.html | 189 +- docs/com/easypost/model/package-use.html | 207 +- docs/com/easypost/package-summary.html | 92 +- docs/com/easypost/package-tree.html | 36 +- docs/com/easypost/package-use.html | 27 +- docs/com/easypost/service/AddressService.html | 233 + docs/com/easypost/service/ApiKeyService.html | 147 + docs/com/easypost/service/BatchService.html | 441 ++ .../service/BetaReferralCustomerService.html | 221 + docs/com/easypost/service/BillingService.html | 208 + .../service/CarrierAccountService.html | 253 + .../easypost/service/CarrierTypeService.html | 147 + .../easypost/service/CustomsInfoService.html | 170 + .../easypost/service/CustomsItemService.html | 170 + docs/com/easypost/service/EasyPostClient.html | 607 ++ .../easypost/service/EndShipperService.html | 215 + docs/com/easypost/service/EventService.html | 215 + .../easypost/service/InsuranceService.html | 191 + docs/com/easypost/service/OrderService.html | 263 + docs/com/easypost/service/ParcelService.html | 170 + .../service/PaymentMethodService.html | 154 + docs/com/easypost/service/PickupService.html | 305 + docs/com/easypost/service/RateService.html | 149 + .../service/ReferralCustomerService.html | 265 + docs/com/easypost/service/RefundService.html | 191 + docs/com/easypost/service/ReportService.html | 215 + .../com/easypost/service/ScanformService.html | 191 + .../com/easypost/service/ShipmentService.html | 881 +++ docs/com/easypost/service/TrackerService.html | 210 + docs/com/easypost/service/UserService.html | 277 + docs/com/easypost/service/WebhookService.html | 274 + .../service/class-use/AddressService.html | 90 + .../service/class-use/ApiKeyService.html | 90 + .../service/class-use/BatchService.html | 90 + .../BetaReferralCustomerService.html | 90 + .../service/class-use/BillingService.html | 90 + .../class-use/CarrierAccountService.html | 90 + .../service/class-use/CarrierTypeService.html | 90 + .../service/class-use/CustomsInfoService.html | 90 + .../service/class-use/CustomsItemService.html | 90 + .../service/class-use/EasyPostClient.html | 105 + .../service/class-use/EndShipperService.html | 90 + .../service/class-use/EventService.html | 90 + .../service/class-use/InsuranceService.html | 90 + .../service/class-use/OrderService.html | 90 + .../service/class-use/ParcelService.html | 90 + .../class-use/PaymentMethodService.html | 90 + .../service/class-use/PickupService.html | 90 + .../service/class-use/RateService.html | 90 + .../class-use/ReferralCustomerService.html | 90 + .../service/class-use/RefundService.html | 90 + .../service/class-use/ReportService.html | 90 + .../service/class-use/ScanformService.html | 90 + .../service/class-use/ShipmentService.html | 90 + .../service/class-use/TrackerService.html | 90 + .../service/class-use/UserService.html | 90 + .../service/class-use/WebhookService.html | 90 + .../com/easypost/service/package-summary.html | 184 + docs/com/easypost/service/package-tree.html | 102 + docs/com/easypost/service/package-use.html | 150 + .../utils/ApachePatch.DecoderException.html | 212 + .../utils/ApachePatch.EncoderException.html | 212 + docs/com/easypost/utils/ApachePatch.Hex.html | 660 +++ docs/com/easypost/utils/ApachePatch.html | 178 + .../utils/Cryptography.HmacAlgorithm.html | 86 +- docs/com/easypost/utils/Cryptography.html | 147 +- .../com/easypost/utils/InternalUtilities.html | 218 + docs/com/easypost/utils/Utilities.html | 281 + .../ApachePatch.DecoderException.html | 118 + .../ApachePatch.EncoderException.html | 92 + .../utils/class-use/ApachePatch.Hex.html | 63 + .../easypost/utils/class-use/ApachePatch.html | 63 + .../class-use/Cryptography.HmacAlgorithm.html | 33 +- .../utils/class-use/Cryptography.html | 27 +- .../utils/class-use/InternalUtilities.html | 63 + .../easypost/utils/class-use/Utilities.html | 63 + docs/com/easypost/utils/package-summary.html | 127 +- docs/com/easypost/utils/package-tree.html | 51 +- docs/com/easypost/utils/package-use.html | 43 +- docs/constant-values.html | 211 +- docs/deprecated-list.html | 159 +- docs/element-list | 1 + docs/help-doc.html | 173 +- docs/index-all.html | 5048 ++++------------- docs/index.html | 61 +- docs/legal/ADDITIONAL_LICENSE_INFO | 37 + docs/legal/ASSEMBLY_EXCEPTION | 27 + docs/legal/LICENSE | 347 ++ docs/legal/jquery.md | 72 + docs/legal/jqueryUI.md | 49 + docs/member-search-index.js | 2 +- docs/overview-summary.html | 7 +- docs/overview-tree.html | 295 +- docs/package-search-index.js | 2 +- docs/search.js | 12 +- docs/serialized-form.html | 160 +- docs/stylesheet.css | 86 +- docs/tag-search-index.js | 2 +- docs/type-search-index.js | 2 +- examples | 2 +- 334 files changed, 25759 insertions(+), 32517 deletions(-) create mode 100644 docs/com/easypost/Constants.CarrierAccountTypes.html create mode 100644 docs/com/easypost/Constants.ErrorCodes.html create mode 100644 docs/com/easypost/Constants.ErrorMessages.html create mode 100644 docs/com/easypost/Constants.Http.html create mode 100644 docs/com/easypost/Constants.html create mode 100644 docs/com/easypost/class-use/Constants.CarrierAccountTypes.html create mode 100644 docs/com/easypost/class-use/Constants.ErrorCodes.html create mode 100644 docs/com/easypost/class-use/Constants.ErrorMessages.html create mode 100644 docs/com/easypost/class-use/Constants.Http.html create mode 100644 docs/com/easypost/class-use/Constants.html create mode 100644 docs/com/easypost/exception/API/EncodingError.html create mode 100644 docs/com/easypost/exception/API/ExternalApiError.html create mode 100644 docs/com/easypost/exception/API/HttpError.html create mode 100644 docs/com/easypost/exception/API/JsonError.html create mode 100644 docs/com/easypost/exception/API/ServiceUnavailableError.html create mode 100644 docs/com/easypost/exception/API/class-use/EncodingError.html create mode 100644 docs/com/easypost/exception/API/class-use/ExternalApiError.html create mode 100644 docs/com/easypost/exception/API/class-use/HttpError.html create mode 100644 docs/com/easypost/exception/API/class-use/JsonError.html create mode 100644 docs/com/easypost/exception/API/class-use/ServiceUnavailableError.html create mode 100644 docs/com/easypost/exception/APIException.html create mode 100644 docs/com/easypost/exception/class-use/APIException.html create mode 100644 docs/com/easypost/model/BetaPaymentRefund.html create mode 100644 docs/com/easypost/model/Payload.html create mode 100644 docs/com/easypost/model/PayloadCollection.html create mode 100644 docs/com/easypost/model/class-use/BetaPaymentRefund.html create mode 100644 docs/com/easypost/model/class-use/Payload.html create mode 100644 docs/com/easypost/model/class-use/PayloadCollection.html create mode 100644 docs/com/easypost/service/AddressService.html create mode 100644 docs/com/easypost/service/ApiKeyService.html create mode 100644 docs/com/easypost/service/BatchService.html create mode 100644 docs/com/easypost/service/BetaReferralCustomerService.html create mode 100644 docs/com/easypost/service/BillingService.html create mode 100644 docs/com/easypost/service/CarrierAccountService.html create mode 100644 docs/com/easypost/service/CarrierTypeService.html create mode 100644 docs/com/easypost/service/CustomsInfoService.html create mode 100644 docs/com/easypost/service/CustomsItemService.html create mode 100644 docs/com/easypost/service/EasyPostClient.html create mode 100644 docs/com/easypost/service/EndShipperService.html create mode 100644 docs/com/easypost/service/EventService.html create mode 100644 docs/com/easypost/service/InsuranceService.html create mode 100644 docs/com/easypost/service/OrderService.html create mode 100644 docs/com/easypost/service/ParcelService.html create mode 100644 docs/com/easypost/service/PaymentMethodService.html create mode 100644 docs/com/easypost/service/PickupService.html create mode 100644 docs/com/easypost/service/RateService.html create mode 100644 docs/com/easypost/service/ReferralCustomerService.html create mode 100644 docs/com/easypost/service/RefundService.html create mode 100644 docs/com/easypost/service/ReportService.html create mode 100644 docs/com/easypost/service/ScanformService.html create mode 100644 docs/com/easypost/service/ShipmentService.html create mode 100644 docs/com/easypost/service/TrackerService.html create mode 100644 docs/com/easypost/service/UserService.html create mode 100644 docs/com/easypost/service/WebhookService.html create mode 100644 docs/com/easypost/service/class-use/AddressService.html create mode 100644 docs/com/easypost/service/class-use/ApiKeyService.html create mode 100644 docs/com/easypost/service/class-use/BatchService.html create mode 100644 docs/com/easypost/service/class-use/BetaReferralCustomerService.html create mode 100644 docs/com/easypost/service/class-use/BillingService.html create mode 100644 docs/com/easypost/service/class-use/CarrierAccountService.html create mode 100644 docs/com/easypost/service/class-use/CarrierTypeService.html create mode 100644 docs/com/easypost/service/class-use/CustomsInfoService.html create mode 100644 docs/com/easypost/service/class-use/CustomsItemService.html create mode 100644 docs/com/easypost/service/class-use/EasyPostClient.html create mode 100644 docs/com/easypost/service/class-use/EndShipperService.html create mode 100644 docs/com/easypost/service/class-use/EventService.html create mode 100644 docs/com/easypost/service/class-use/InsuranceService.html create mode 100644 docs/com/easypost/service/class-use/OrderService.html create mode 100644 docs/com/easypost/service/class-use/ParcelService.html create mode 100644 docs/com/easypost/service/class-use/PaymentMethodService.html create mode 100644 docs/com/easypost/service/class-use/PickupService.html create mode 100644 docs/com/easypost/service/class-use/RateService.html create mode 100644 docs/com/easypost/service/class-use/ReferralCustomerService.html create mode 100644 docs/com/easypost/service/class-use/RefundService.html create mode 100644 docs/com/easypost/service/class-use/ReportService.html create mode 100644 docs/com/easypost/service/class-use/ScanformService.html create mode 100644 docs/com/easypost/service/class-use/ShipmentService.html create mode 100644 docs/com/easypost/service/class-use/TrackerService.html create mode 100644 docs/com/easypost/service/class-use/UserService.html create mode 100644 docs/com/easypost/service/class-use/WebhookService.html create mode 100644 docs/com/easypost/service/package-summary.html create mode 100644 docs/com/easypost/service/package-tree.html create mode 100644 docs/com/easypost/service/package-use.html create mode 100644 docs/com/easypost/utils/ApachePatch.DecoderException.html create mode 100644 docs/com/easypost/utils/ApachePatch.EncoderException.html create mode 100644 docs/com/easypost/utils/ApachePatch.Hex.html create mode 100644 docs/com/easypost/utils/ApachePatch.html create mode 100644 docs/com/easypost/utils/InternalUtilities.html create mode 100644 docs/com/easypost/utils/Utilities.html create mode 100644 docs/com/easypost/utils/class-use/ApachePatch.DecoderException.html create mode 100644 docs/com/easypost/utils/class-use/ApachePatch.EncoderException.html create mode 100644 docs/com/easypost/utils/class-use/ApachePatch.Hex.html create mode 100644 docs/com/easypost/utils/class-use/ApachePatch.html create mode 100644 docs/com/easypost/utils/class-use/InternalUtilities.html create mode 100644 docs/com/easypost/utils/class-use/Utilities.html create mode 100644 docs/legal/ADDITIONAL_LICENSE_INFO create mode 100644 docs/legal/ASSEMBLY_EXCEPTION create mode 100644 docs/legal/LICENSE create mode 100644 docs/legal/jquery.md create mode 100644 docs/legal/jqueryUI.md diff --git a/Makefile b/Makefile index 4e8675708..62b441523 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ coverage: ## docs - Generates library documentation docs: mvn install -DskipTests=true -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true - cp -R target/apidocs docs + cp -R target/apidocs/ ./docs/ ## install-checkstyle - Install CheckStyle install-checkstyle: diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html index 809565eae..0f39eca69 100644 --- a/docs/allclasses-index.html +++ b/docs/allclasses-index.html @@ -1,12 +1,11 @@ - - -All Classes (com.easypost:easypost-api-client 5.10.0 API) + +All Classes and Interfaces (com.easypost:easypost-api-client 6.2.0 API) - + @@ -30,9 +29,9 @@
      -

      All Classes

      +

      All Classes and Interfaces

      -
      +
      Class
      Description
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
      Deprecated. -
      Use PaymentMethodObject instead.
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
      +
      This class is a collection of Apache functions that have been extracted for use in this application.
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
      Deprecated. -
      Use PaymentMethodObject instead.
      + +
      +
      This class was lifted and modified from + + common-codec:common-codec version 1.15, + namespace org.apache.commons.codec.DecoderException, + released under the Apache License 2.0.
      - -
      Deprecated. - + +
      +
      This class was lifted and modified from + + common-codec:common-codec version 1.15, + namespace org.apache.commons.codec.EncoderException, + released under the Apache License 2.0.
      - -
      + +
      +
      This class was lifted and modified from + + common-codec:common-codec version 1.15, + namespace org.apache.commons.codec.binary.Hex, + released under the Apache License 2.0.
      +
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
      Class for various cryptography utilities.
      - -
      + +
      Enums for the supported HMAC algorithms.
      - -
       
      - -
       
      - -
      + +
       
      + +
       
      + +
       
      + +
       
      + +
      Hello weary traveler, welcome to the EasyPost Java client library.
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
      Deprecated. -
      Use PaymentMethodObject instead.
      -
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
       
      - -
       
      - -
       
      - -
      Deprecated. -
      Use PaymentMethodObject instead.
      -
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      - -
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       
      + +
       

      - +
      diff --git a/docs/allpackages-index.html b/docs/allpackages-index.html index 9cbf60e6e..9f10f6935 100644 --- a/docs/allpackages-index.html +++ b/docs/allpackages-index.html @@ -1,12 +1,11 @@ - - -All Packages (com.easypost:easypost-api-client 5.10.0 API) + +All Packages (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
      @@ -83,15 +80,19 @@

      All Packages

      Classes for the EasyPost API.
      - +
      +
      Interact with the EasyPost API in Java.
      +
      + +
      Utility classes for the EasyPost API Java client library.

      - +
      diff --git a/docs/com/easypost/Constants.CarrierAccountTypes.html b/docs/com/easypost/Constants.CarrierAccountTypes.html new file mode 100644 index 000000000..9fe151664 --- /dev/null +++ b/docs/com/easypost/Constants.CarrierAccountTypes.html @@ -0,0 +1,166 @@ + + + + +Constants.CarrierAccountTypes (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
      + +
      +
      + +
      +
      Package com.easypost
      +

      Class Constants.CarrierAccountTypes

      +
      +
      java.lang.Object +
      com.easypost.Constants.CarrierAccountTypes
      +
      +
      +
      +
      Enclosing class:
      +
      Constants
      +
      +
      +
      public abstract static class Constants.CarrierAccountTypes +extends Object
      +
      +
      + +
      +
      +
        + +
      • +
        +

        Field Details

        +
          +
        • +
          +

          CARRIER_TYPES_WITH_CUSTOM_WORKFLOW

          +
          public static final List<String> CARRIER_TYPES_WITH_CUSTOM_WORKFLOW
          +
          +
        • +
        +
        +
      • + +
      • +
        +

        Constructor Details

        +
          +
        • +
          +

          CarrierAccountTypes

          +
          public CarrierAccountTypes()
          +
          +
        • +
        +
        +
      • +
      +
      + +
      +
      +
      + +
      +
      +
      + + diff --git a/docs/com/easypost/Constants.ErrorCodes.html b/docs/com/easypost/Constants.ErrorCodes.html new file mode 100644 index 000000000..7cc30d9fc --- /dev/null +++ b/docs/com/easypost/Constants.ErrorCodes.html @@ -0,0 +1,378 @@ + + + + +Constants.ErrorCodes (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
      + +
      +
      + +
      +
      Package com.easypost
      +

      Class Constants.ErrorCodes

      +
      +
      java.lang.Object +
      com.easypost.Constants.ErrorCodes
      +
      +
      +
      +
      Enclosing class:
      +
      Constants
      +
      +
      +
      public abstract static class Constants.ErrorCodes +extends Object
      +
      +
      + +
      +
      +
        + +
      • +
        +

        Field Details

        +
          +
        • +
          +

          REDIRECT_CODE_BEGIN

          +
          public static final int REDIRECT_CODE_BEGIN
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          REDIRECT_CODE_END

          +
          public static final int REDIRECT_CODE_END
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          UNAUTHORIZED_ERROR

          +
          public static final int UNAUTHORIZED_ERROR
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          PAYMENT_ERROR

          +
          public static final int PAYMENT_ERROR
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          FORBIDDEN_ERROR

          +
          public static final int FORBIDDEN_ERROR
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          NOT_FOUND_ERROR

          +
          public static final int NOT_FOUND_ERROR
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          METHOD_NOT_ALLOWED_ERROR

          +
          public static final int METHOD_NOT_ALLOWED_ERROR
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          TIMEOUT_ERROR

          +
          public static final int TIMEOUT_ERROR
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          INVALID_REQUEST_ERROR

          +
          public static final int INVALID_REQUEST_ERROR
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          RATE_LIMIT_ERROR

          +
          public static final int RATE_LIMIT_ERROR
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          INTERNAL_SERVER_ERROR

          +
          public static final int INTERNAL_SERVER_ERROR
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          SERVICE_UNAVAILABLE_ERROR

          +
          public static final int SERVICE_UNAVAILABLE_ERROR
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          GATEWAY_TIMEOUT_ERROR

          +
          public static final int GATEWAY_TIMEOUT_ERROR
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        +
        +
      • + +
      • +
        +

        Constructor Details

        +
          +
        • +
          +

          ErrorCodes

          +
          public ErrorCodes()
          +
          +
        • +
        +
        +
      • +
      +
      + +
      +
      +
      + +
      +
      +
      + + diff --git a/docs/com/easypost/Constants.ErrorMessages.html b/docs/com/easypost/Constants.ErrorMessages.html new file mode 100644 index 000000000..b03eb6c13 --- /dev/null +++ b/docs/com/easypost/Constants.ErrorMessages.html @@ -0,0 +1,344 @@ + + + + +Constants.ErrorMessages (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
      + +
      +
      + +
      +
      Package com.easypost
      +

      Class Constants.ErrorMessages

      +
      +
      java.lang.Object +
      com.easypost.Constants.ErrorMessages
      +
      +
      +
      +
      Enclosing class:
      +
      Constants
      +
      +
      +
      public abstract static class Constants.ErrorMessages +extends Object
      +
      +
      + +
      +
      +
        + +
      • +
        +

        Field Details

        + +
        +
      • + +
      • +
        +

        Constructor Details

        +
          +
        • +
          +

          ErrorMessages

          +
          public ErrorMessages()
          +
          +
        • +
        +
        +
      • +
      +
      + +
      +
      +
      + +
      +
      +
      + + diff --git a/docs/com/easypost/Constants.Http.html b/docs/com/easypost/Constants.Http.html new file mode 100644 index 000000000..44c12f0a0 --- /dev/null +++ b/docs/com/easypost/Constants.Http.html @@ -0,0 +1,243 @@ + + + + +Constants.Http (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
      + +
      +
      + +
      +
      Package com.easypost
      +

      Class Constants.Http

      +
      +
      java.lang.Object +
      com.easypost.Constants.Http
      +
      +
      +
      +
      Enclosing class:
      +
      Constants
      +
      +
      +
      public abstract static class Constants.Http +extends Object
      +
      +
      + +
      +
      +
        + +
      • +
        +

        Field Details

        +
          +
        • +
          +

          API_BASE

          +
          public static final String API_BASE
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          CHARSET

          +
          public static final String CHARSET
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          DEFAULT_CONNECT_TIMEOUT_MILLISECONDS

          +
          public static final int DEFAULT_CONNECT_TIMEOUT_MILLISECONDS
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          DEFAULT_READ_TIMEOUT_MILLISECONDS

          +
          public static final int DEFAULT_READ_TIMEOUT_MILLISECONDS
          +
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          GSON

          +
          public static final com.google.gson.Gson GSON
          +
          +
        • +
        • +
          +

          PRETTY_PRINT_GSON

          +
          public static final com.google.gson.Gson PRETTY_PRINT_GSON
          +
          +
        • +
        +
        +
      • + +
      • +
        +

        Constructor Details

        +
          +
        • +
          +

          Http

          +
          public Http()
          +
          +
        • +
        +
        +
      • +
      +
      + +
      +
      +
      + +
      +
      +
      + + diff --git a/docs/com/easypost/Constants.html b/docs/com/easypost/Constants.html new file mode 100644 index 000000000..9897d900d --- /dev/null +++ b/docs/com/easypost/Constants.html @@ -0,0 +1,194 @@ + + + + +Constants (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
      + +
      +
      + +
      +
      Package com.easypost
      +

      Class Constants

      +
      +
      java.lang.Object +
      com.easypost.Constants
      +
      +
      +
      +
      public abstract class Constants +extends Object
      +
      +
      + +
      +
      +
        + +
      • +
        +

        Field Details

        + +
        +
      • + +
      • +
        +

        Constructor Details

        +
          +
        • +
          +

          Constants

          +
          public Constants()
          +
          +
        • +
        +
        +
      • +
      +
      + +
      +
      +
      + +
      +
      +
      + + diff --git a/docs/com/easypost/EasyPost.html b/docs/com/easypost/EasyPost.html index 606796a49..08783069c 100644 --- a/docs/com/easypost/EasyPost.html +++ b/docs/com/easypost/EasyPost.html @@ -1,12 +1,11 @@ - - -EasyPost (com.easypost:easypost-api-client 5.10.0 API) + +EasyPost (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
      @@ -75,21 +72,21 @@

      Class EasyPost

      java.lang.Object
      com.easypost.EasyPost
      -
      +

      public abstract class EasyPost extends Object
      Hello weary traveler, welcome to the EasyPost Java client library.

      This file exists as a template for the Templating Maven Plugin (https://www.mojohaus.org/templating-maven-plugin/) - If you notice the VERSION = 5.10.0 below, that's an example of a template variable. + If you notice the VERSION = 6.2.0 below, that's an example of a template variable.

      In Maven, you can set variables inside the pom.xml file (https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#available-variables)

      The Templating Maven Plugin, at compile time, will extract these variables and add them into the source code.

      - Specifically here, VERSION = 5.10.0 will be replaced with, i.e. VERSION = 1.0.0 when compiling the code. + Specifically here, VERSION = 6.2.0 will be replaced with, i.e. VERSION = 1.0.0 when compiling the code. NOTE: The VERSION will not populate if built with Gradle.

      The placement of this file is important. @@ -108,7 +105,7 @@

      Class EasyPost


      - +
      diff --git a/docs/com/easypost/class-use/Constants.CarrierAccountTypes.html b/docs/com/easypost/class-use/Constants.CarrierAccountTypes.html new file mode 100644 index 000000000..cdcd941d7 --- /dev/null +++ b/docs/com/easypost/class-use/Constants.CarrierAccountTypes.html @@ -0,0 +1,63 @@ + + + + +Uses of Class com.easypost.Constants.CarrierAccountTypes (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Uses of Class
      com.easypost.Constants.CarrierAccountTypes

      +
      +No usage of com.easypost.Constants.CarrierAccountTypes
      +
      +
      + +
      +
      +
      + + diff --git a/docs/com/easypost/class-use/Constants.ErrorCodes.html b/docs/com/easypost/class-use/Constants.ErrorCodes.html new file mode 100644 index 000000000..577db7481 --- /dev/null +++ b/docs/com/easypost/class-use/Constants.ErrorCodes.html @@ -0,0 +1,63 @@ + + + + +Uses of Class com.easypost.Constants.ErrorCodes (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Uses of Class
      com.easypost.Constants.ErrorCodes

      +
      +No usage of com.easypost.Constants.ErrorCodes
      +
      +
      + +
      +
      +
      + + diff --git a/docs/com/easypost/class-use/Constants.ErrorMessages.html b/docs/com/easypost/class-use/Constants.ErrorMessages.html new file mode 100644 index 000000000..abc8ebd1c --- /dev/null +++ b/docs/com/easypost/class-use/Constants.ErrorMessages.html @@ -0,0 +1,63 @@ + + + + +Uses of Class com.easypost.Constants.ErrorMessages (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Uses of Class
      com.easypost.Constants.ErrorMessages

      +
      +No usage of com.easypost.Constants.ErrorMessages
      +
      +
      + +
      +
      +
      + + diff --git a/docs/com/easypost/class-use/Constants.Http.html b/docs/com/easypost/class-use/Constants.Http.html new file mode 100644 index 000000000..4a003ca77 --- /dev/null +++ b/docs/com/easypost/class-use/Constants.Http.html @@ -0,0 +1,63 @@ + + + + +Uses of Class com.easypost.Constants.Http (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Uses of Class
      com.easypost.Constants.Http

      +
      +No usage of com.easypost.Constants.Http
      +
      +
      + +
      +
      +
      + + diff --git a/docs/com/easypost/class-use/Constants.html b/docs/com/easypost/class-use/Constants.html new file mode 100644 index 000000000..55f8388a6 --- /dev/null +++ b/docs/com/easypost/class-use/Constants.html @@ -0,0 +1,63 @@ + + + + +Uses of Class com.easypost.Constants (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Uses of Class
      com.easypost.Constants

      +
      +No usage of com.easypost.Constants
      +
      +
      + +
      +
      +
      + + diff --git a/docs/com/easypost/class-use/EasyPost.html b/docs/com/easypost/class-use/EasyPost.html index b125ee526..fdbe856b5 100644 --- a/docs/com/easypost/class-use/EasyPost.html +++ b/docs/com/easypost/class-use/EasyPost.html @@ -1,12 +1,11 @@ - - -Uses of Class com.easypost.EasyPost (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Class com.easypost.EasyPost (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
      @@ -58,7 +55,7 @@

      Uses of Class
      c No usage of com.easypost.EasyPost


      - +
      diff --git a/docs/com/easypost/exception/API/EncodingError.html b/docs/com/easypost/exception/API/EncodingError.html new file mode 100644 index 000000000..f6a160ff2 --- /dev/null +++ b/docs/com/easypost/exception/API/EncodingError.html @@ -0,0 +1,184 @@ + + + + +EncodingError (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
      + +
      +
      + +
      + +

      Class EncodingError

      +
      + +
      +
      +
      All Implemented Interfaces:
      +
      Serializable
      +
      +
      +
      public class EncodingError +extends APIException
      +
      +
      See Also:
      +
      + +
      +
      +
      +
      + +
      +
      +
        + +
      • +
        +

        Constructor Details

        +
          +
        • +
          +

          EncodingError

          +
          public EncodingError(String message)
          +
          EncodingError constructor.
          +
          +
          Parameters:
          +
          message - the exception message
          +
          +
          +
        • +
        • +
          +

          EncodingError

          +
          public EncodingError(String message, + Throwable e)
          +
          EncodingError constructor with nested exception.
          +
          +
          Parameters:
          +
          message - the exception message
          +
          e - the nested exception
          +
          +
          +
        • +
        +
        +
      • +
      +
      + +
      +
      +
      + +
      +
      +
      + + diff --git a/docs/com/easypost/exception/API/ExternalApiError.html b/docs/com/easypost/exception/API/ExternalApiError.html new file mode 100644 index 000000000..8ceeb32bf --- /dev/null +++ b/docs/com/easypost/exception/API/ExternalApiError.html @@ -0,0 +1,166 @@ + + + + +ExternalApiError (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
      + +
      +
      + +
      + +

      Class ExternalApiError

      +
      + +
      +
      +
      All Implemented Interfaces:
      +
      Serializable
      +
      +
      +
      public class ExternalApiError +extends APIException
      +
      +
      See Also:
      +
      + +
      +
      +
      +
      + +
      +
      +
        + +
      • +
        +

        Constructor Details

        +
          +
        • +
          +

          ExternalApiError

          +
          public ExternalApiError(String message)
          +
          ExternalApiError constructor.
          +
          +
          Parameters:
          +
          message - the exception message
          +
          +
          +
        • +
        +
        +
      • +
      +
      + +
      +
      +
      + +
      +
      +
      + + diff --git a/docs/com/easypost/exception/API/ForbiddenError.html b/docs/com/easypost/exception/API/ForbiddenError.html index b14de6da1..c3109c575 100644 --- a/docs/com/easypost/exception/API/ForbiddenError.html +++ b/docs/com/easypost/exception/API/ForbiddenError.html @@ -1,12 +1,11 @@ - - -ForbiddenError (com.easypost:easypost-api-client 5.10.0 API) + +ForbiddenError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
      @@ -76,35 +73,41 @@

      Class ForbiddenError

      -
      +
      +
      All Implemented Interfaces:
      Serializable

      public class ForbiddenError -extends EasyPostException
      +extends APIException
      See Also:
      -
      Serialized Form
      +
      + +
      • -
        +

        Constructor Summary

        Constructors
        Constructor
        Description
        -
        ForbiddenError​(String message, +
        ForbiddenError(String message, String code, int statusCode, List<Error> errors)
        @@ -116,16 +119,16 @@

        Constructor Summary

      • -
        +

        Method Summary

        -

        Methods inherited from class com.easypost.exception.EasyPostException

        -getCode, getErrors, getMessage, getStatusCode
        +

        Methods inherited from class com.easypost.exception.APIException

        +getCode, getErrors, getMessage, getStatusCode
        -

        Methods inherited from class java.lang.Object

        +

        Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • @@ -135,13 +138,13 @@

        Methods inherited from cl
        • -
          +

          Constructor Details

          • ForbiddenError

            -
            public ForbiddenError(String message, +
            public ForbiddenError(String message, String code, int statusCode, List<Error> errors)
            @@ -164,7 +167,7 @@

            ForbiddenError


            - +
            diff --git a/docs/com/easypost/exception/API/GatewayTimeoutError.html b/docs/com/easypost/exception/API/GatewayTimeoutError.html index 5de5d6dc2..ec521f0e8 100644 --- a/docs/com/easypost/exception/API/GatewayTimeoutError.html +++ b/docs/com/easypost/exception/API/GatewayTimeoutError.html @@ -1,12 +1,11 @@ - - -GatewayTimeoutError (com.easypost:easypost-api-client 5.10.0 API) + +GatewayTimeoutError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
            @@ -76,35 +73,41 @@

            Class GatewayTimeoutErrorjava.lang.Throwable

            -
            + +
            All Implemented Interfaces:
            Serializable

            public class GatewayTimeoutError -extends EasyPostException
            +extends APIException
            See Also:
            -
            Serialized Form
            +
            + +
            • -
              +

              Constructor Summary

              Constructors
              Constructor
              Description
              -
              GatewayTimeoutError​(String message, +
              GatewayTimeoutError(String message, String code, int statusCode, List<Error> errors)
              @@ -116,16 +119,16 @@

              Constructor Summary

            • -
              +

              Method Summary

              -

              Methods inherited from class com.easypost.exception.EasyPostException

              -getCode, getErrors, getMessage, getStatusCode
              +

              Methods inherited from class com.easypost.exception.APIException

              +getCode, getErrors, getMessage, getStatusCode
              -

              Methods inherited from class java.lang.Object

              +

              Methods inherited from class java.lang.Object

              clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
            • @@ -135,13 +138,13 @@

              Methods inherited from cl
              • -
                +

                Constructor Details

                • GatewayTimeoutError

                  -
                  public GatewayTimeoutError(String message, +
                  public GatewayTimeoutError(String message, String code, int statusCode, List<Error> errors)
                  @@ -164,7 +167,7 @@

                  GatewayTimeoutError


                  - +
                  diff --git a/docs/com/easypost/exception/API/HttpError.html b/docs/com/easypost/exception/API/HttpError.html new file mode 100644 index 000000000..196406866 --- /dev/null +++ b/docs/com/easypost/exception/API/HttpError.html @@ -0,0 +1,184 @@ + + + + +HttpError (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
                  + +
                  +
                  + +
                  + +

                  Class HttpError

                  +
                  + +
                  +
                  +
                  All Implemented Interfaces:
                  +
                  Serializable
                  +
                  +
                  +
                  public class HttpError +extends APIException
                  +
                  +
                  See Also:
                  +
                  + +
                  +
                  +
                  +
                  + +
                  +
                  +
                    + +
                  • +
                    +

                    Constructor Details

                    +
                      +
                    • +
                      +

                      HttpError

                      +
                      public HttpError(String message)
                      +
                      HttpError constructor.
                      +
                      +
                      Parameters:
                      +
                      message - the exception message
                      +
                      +
                      +
                    • +
                    • +
                      +

                      HttpError

                      +
                      public HttpError(String message, + Throwable e)
                      +
                      HttpError constructor with nested exception.
                      +
                      +
                      Parameters:
                      +
                      message - the exception message
                      +
                      e - the nested exception
                      +
                      +
                      +
                    • +
                    +
                    +
                  • +
                  +
                  + +
                  +
                  +
                  + +
                  +
                  +
                  + + diff --git a/docs/com/easypost/exception/API/InternalServerError.html b/docs/com/easypost/exception/API/InternalServerError.html index c15c7e71b..7629a7232 100644 --- a/docs/com/easypost/exception/API/InternalServerError.html +++ b/docs/com/easypost/exception/API/InternalServerError.html @@ -1,12 +1,11 @@ - - -InternalServerError (com.easypost:easypost-api-client 5.10.0 API) + +InternalServerError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
                  @@ -76,35 +73,41 @@

                  Class InternalServerErrorjava.lang.Throwable

                  -
                  + +
                  All Implemented Interfaces:
                  Serializable

                  public class InternalServerError -extends EasyPostException
                  +extends APIException
                  See Also:
                  -
                  Serialized Form
                  +
                  + +
                  • -
                    +

                    Constructor Summary

                    Constructors
                    Constructor
                    Description
                    -
                    InternalServerError​(String message, +
                    InternalServerError(String message, String code, int statusCode, List<Error> errors)
                    @@ -116,16 +119,16 @@

                    Constructor Summary

                  • -
                    +

                    Method Summary

                    -

                    Methods inherited from class com.easypost.exception.EasyPostException

                    -getCode, getErrors, getMessage, getStatusCode
                    +

                    Methods inherited from class com.easypost.exception.APIException

                    +getCode, getErrors, getMessage, getStatusCode
                    -

                    Methods inherited from class java.lang.Object

                    +

                    Methods inherited from class java.lang.Object

                    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
                  • @@ -135,13 +138,13 @@

                    Methods inherited from cl
                    • -
                      +

                      Constructor Details

                      • InternalServerError

                        -
                        public InternalServerError(String message, +
                        public InternalServerError(String message, String code, int statusCode, List<Error> errors)
                        @@ -164,7 +167,7 @@

                        InternalServerError


                        - +
                        diff --git a/docs/com/easypost/exception/API/InvalidRequestError.html b/docs/com/easypost/exception/API/InvalidRequestError.html index f219e3f21..eadc7d14c 100644 --- a/docs/com/easypost/exception/API/InvalidRequestError.html +++ b/docs/com/easypost/exception/API/InvalidRequestError.html @@ -1,12 +1,11 @@ - - -InvalidRequestError (com.easypost:easypost-api-client 5.10.0 API) + +InvalidRequestError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
                        @@ -76,35 +73,41 @@

                        Class InvalidRequestErrorjava.lang.Throwable

                        -
                        + +
                        All Implemented Interfaces:
                        Serializable

                        public class InvalidRequestError -extends EasyPostException
                        +extends APIException
                        See Also:
                        -
                        Serialized Form
                        +
                        + +
                        • -
                          +

                          Constructor Summary

                          Constructors
                          Constructor
                          Description
                          -
                          InvalidRequestError​(String message, +
                          InvalidRequestError(String message, String code, int statusCode, List<Error> errors)
                          @@ -116,16 +119,16 @@

                          Constructor Summary

                        • -
                          +

                          Method Summary

                          -

                          Methods inherited from class com.easypost.exception.EasyPostException

                          -getCode, getErrors, getMessage, getStatusCode
                          +

                          Methods inherited from class com.easypost.exception.APIException

                          +getCode, getErrors, getMessage, getStatusCode
                          -

                          Methods inherited from class java.lang.Object

                          +

                          Methods inherited from class java.lang.Object

                          clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
                        • @@ -135,13 +138,13 @@

                          Methods inherited from cl
                          • -
                            +

                            Constructor Details

                            • InvalidRequestError

                              -
                              public InvalidRequestError(String message, +
                              public InvalidRequestError(String message, String code, int statusCode, List<Error> errors)
                              @@ -164,7 +167,7 @@

                              InvalidRequestError


                              - +
                              diff --git a/docs/com/easypost/exception/API/JsonError.html b/docs/com/easypost/exception/API/JsonError.html new file mode 100644 index 000000000..637bf67b3 --- /dev/null +++ b/docs/com/easypost/exception/API/JsonError.html @@ -0,0 +1,184 @@ + + + + +JsonError (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
                              + +
                              +
                              + +
                              + +

                              Class JsonError

                              +
                              + +
                              +
                              +
                              All Implemented Interfaces:
                              +
                              Serializable
                              +
                              +
                              +
                              public class JsonError +extends APIException
                              +
                              +
                              See Also:
                              +
                              + +
                              +
                              +
                              +
                              + +
                              +
                              +
                                + +
                              • +
                                +

                                Constructor Details

                                +
                                  +
                                • +
                                  +

                                  JsonError

                                  +
                                  public JsonError(String message)
                                  +
                                  JsonError constructor.
                                  +
                                  +
                                  Parameters:
                                  +
                                  message - the exception message
                                  +
                                  +
                                  +
                                • +
                                • +
                                  +

                                  JsonError

                                  +
                                  public JsonError(String message, + Throwable e)
                                  +
                                  JsonError constructor with nested exception.
                                  +
                                  +
                                  Parameters:
                                  +
                                  message - the exception message
                                  +
                                  e - the nested exception
                                  +
                                  +
                                  +
                                • +
                                +
                                +
                              • +
                              +
                              + +
                              +
                              +
                              + +
                              +
                              +
                              + + diff --git a/docs/com/easypost/exception/API/MethodNotAllowedError.html b/docs/com/easypost/exception/API/MethodNotAllowedError.html index 0b04c7347..fca823c6e 100644 --- a/docs/com/easypost/exception/API/MethodNotAllowedError.html +++ b/docs/com/easypost/exception/API/MethodNotAllowedError.html @@ -1,12 +1,11 @@ - - -MethodNotAllowedError (com.easypost:easypost-api-client 5.10.0 API) + +MethodNotAllowedError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
                              @@ -76,35 +73,41 @@

                              Class MethodNotAllowedErro -
                              +

                              +
                              All Implemented Interfaces:
                              Serializable

                              public class MethodNotAllowedError -extends EasyPostException
                              +extends APIException
                              See Also:
                              -
                              Serialized Form
                              +
                              + +
                              • -
                                +

                                Constructor Summary

                                Constructors
                                Constructor
                                Description
                                -
                                MethodNotAllowedError​(String message, +
                                MethodNotAllowedError(String message, String code, int statusCode, List<Error> errors)
                                @@ -116,16 +119,16 @@

                                Constructor Summary

                              • -
                                +

                                Method Summary

                                -

                                Methods inherited from class com.easypost.exception.EasyPostException

                                -getCode, getErrors, getMessage, getStatusCode
                                +

                                Methods inherited from class com.easypost.exception.APIException

                                +getCode, getErrors, getMessage, getStatusCode
                                -

                                Methods inherited from class java.lang.Object

                                +

                                Methods inherited from class java.lang.Object

                                clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
                              • @@ -135,13 +138,13 @@

                                Methods inherited from cl
                                • -
                                  +

                                  Constructor Details

                                  • MethodNotAllowedError

                                    -
                                    public MethodNotAllowedError(String message, +
                                    public MethodNotAllowedError(String message, String code, int statusCode, List<Error> errors)
                                    @@ -164,7 +167,7 @@

                                    MethodNotAllowedError


                                    - +
                                    diff --git a/docs/com/easypost/exception/API/NotFoundError.html b/docs/com/easypost/exception/API/NotFoundError.html index b57aef0dc..de354ff9b 100644 --- a/docs/com/easypost/exception/API/NotFoundError.html +++ b/docs/com/easypost/exception/API/NotFoundError.html @@ -1,12 +1,11 @@ - - -NotFoundError (com.easypost:easypost-api-client 5.10.0 API) + +NotFoundError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
                                    @@ -76,35 +73,41 @@

                                    Class NotFoundError

                                    -
                                    +
                                    +
                                    All Implemented Interfaces:
                                    Serializable

                                    public class NotFoundError -extends EasyPostException
                                    +extends APIException
                                    See Also:
                                    -
                                    Serialized Form
                                    +
                                    + +
                                    • -
                                      +

                                      Constructor Summary

                                      Constructors
                                      Constructor
                                      Description
                                      -
                                      NotFoundError​(String message, +
                                      NotFoundError(String message, String code, int statusCode, List<Error> errors)
                                      @@ -116,16 +119,16 @@

                                      Constructor Summary

                                    • -
                                      +

                                      Method Summary

                                      -

                                      Methods inherited from class com.easypost.exception.EasyPostException

                                      -getCode, getErrors, getMessage, getStatusCode
                                      +

                                      Methods inherited from class com.easypost.exception.APIException

                                      +getCode, getErrors, getMessage, getStatusCode
                                      -

                                      Methods inherited from class java.lang.Object

                                      +

                                      Methods inherited from class java.lang.Object

                                      clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
                                    • @@ -135,13 +138,13 @@

                                      Methods inherited from cl
                                      • -
                                        +

                                        Constructor Details

                                        • NotFoundError

                                          -
                                          public NotFoundError(String message, +
                                          public NotFoundError(String message, String code, int statusCode, List<Error> errors)
                                          @@ -164,7 +167,7 @@

                                          NotFoundError


                                          - +
                                          diff --git a/docs/com/easypost/exception/API/PaymentError.html b/docs/com/easypost/exception/API/PaymentError.html index 05bf8c5df..41b2f0cee 100644 --- a/docs/com/easypost/exception/API/PaymentError.html +++ b/docs/com/easypost/exception/API/PaymentError.html @@ -1,12 +1,11 @@ - - -PaymentError (com.easypost:easypost-api-client 5.10.0 API) + +PaymentError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
                                          @@ -76,35 +73,41 @@

                                          Class PaymentError

                                          -
                                          +
                                          +
                                          All Implemented Interfaces:
                                          Serializable

                                          public class PaymentError -extends EasyPostException
                                          +extends APIException
                                          See Also:
                                          -
                                          Serialized Form
                                          +
                                          + +
                                          • -
                                            +

                                            Constructor Summary

                                            Constructors
                                            Constructor
                                            Description
                                            -
                                            PaymentError​(String message, +
                                            PaymentError(String message, String code, int statusCode, List<Error> errors)
                                            @@ -116,16 +119,16 @@

                                            Constructor Summary

                                          • -
                                            +

                                            Method Summary

                                            -

                                            Methods inherited from class com.easypost.exception.EasyPostException

                                            -getCode, getErrors, getMessage, getStatusCode
                                            +

                                            Methods inherited from class com.easypost.exception.APIException

                                            +getCode, getErrors, getMessage, getStatusCode
                                            -

                                            Methods inherited from class java.lang.Object

                                            +

                                            Methods inherited from class java.lang.Object

                                            clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
                                          • @@ -135,13 +138,13 @@

                                            Methods inherited from cl
                                            • -
                                              +

                                              Constructor Details

                                              • PaymentError

                                                -
                                                public PaymentError(String message, +
                                                public PaymentError(String message, String code, int statusCode, List<Error> errors)
                                                @@ -164,7 +167,7 @@

                                                PaymentError


                                                - +
                                                diff --git a/docs/com/easypost/exception/API/RateLimitError.html b/docs/com/easypost/exception/API/RateLimitError.html index e1a750877..99bb0c7be 100644 --- a/docs/com/easypost/exception/API/RateLimitError.html +++ b/docs/com/easypost/exception/API/RateLimitError.html @@ -1,12 +1,11 @@ - - -RateLimitError (com.easypost:easypost-api-client 5.10.0 API) + +RateLimitError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
                                                @@ -76,35 +73,41 @@

                                                Class RateLimitError

                                                -
                                                +
                                                +
                                                All Implemented Interfaces:
                                                Serializable

                                                public class RateLimitError -extends EasyPostException
                                                +extends APIException
                                                See Also:
                                                -
                                                Serialized Form
                                                +
                                                + +
                                                • -
                                                  +

                                                  Constructor Summary

                                                  Constructors
                                                  Constructor
                                                  Description
                                                  -
                                                  RateLimitError​(String message, +
                                                  RateLimitError(String message, String code, int statusCode, List<Error> errors)
                                                  @@ -116,16 +119,16 @@

                                                  Constructor Summary

                                                • -
                                                  +

                                                  Method Summary

                                                  -

                                                  Methods inherited from class com.easypost.exception.EasyPostException

                                                  -getCode, getErrors, getMessage, getStatusCode
                                                  +

                                                  Methods inherited from class com.easypost.exception.APIException

                                                  +getCode, getErrors, getMessage, getStatusCode
                                                  -

                                                  Methods inherited from class java.lang.Object

                                                  +

                                                  Methods inherited from class java.lang.Object

                                                  clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
                                                • @@ -135,13 +138,13 @@

                                                  Methods inherited from cl
                                                  • -
                                                    +

                                                    Constructor Details

                                                    • RateLimitError

                                                      -
                                                      public RateLimitError(String message, +
                                                      public RateLimitError(String message, String code, int statusCode, List<Error> errors)
                                                      @@ -164,7 +167,7 @@

                                                      RateLimitError


                                                      - +
                                                      diff --git a/docs/com/easypost/exception/API/RedirectError.html b/docs/com/easypost/exception/API/RedirectError.html index 6fb2eadf6..9508b70a0 100644 --- a/docs/com/easypost/exception/API/RedirectError.html +++ b/docs/com/easypost/exception/API/RedirectError.html @@ -1,12 +1,11 @@ - - -RedirectError (com.easypost:easypost-api-client 5.10.0 API) + +RedirectError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
                                                      @@ -76,35 +73,41 @@

                                                      Class RedirectError

                                                      -
                                                      +
                                                      +
                                                      All Implemented Interfaces:
                                                      Serializable

                                                      public class RedirectError -extends EasyPostException
                                                      +extends APIException
                                                      See Also:
                                                      -
                                                      Serialized Form
                                                      +
                                                      + +
                                                      • -
                                                        +

                                                        Constructor Summary

                                                        Constructors
                                                        Constructor
                                                        Description
                                                        -
                                                        RedirectError​(String message, +
                                                        RedirectError(String message, String code, int statusCode, List<Error> errors)
                                                        @@ -116,16 +119,16 @@

                                                        Constructor Summary

                                                      • -
                                                        +

                                                        Method Summary

                                                        -

                                                        Methods inherited from class com.easypost.exception.EasyPostException

                                                        -getCode, getErrors, getMessage, getStatusCode
                                                        +

                                                        Methods inherited from class com.easypost.exception.APIException

                                                        +getCode, getErrors, getMessage, getStatusCode
                                                        -

                                                        Methods inherited from class java.lang.Object

                                                        +

                                                        Methods inherited from class java.lang.Object

                                                        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
                                                      • @@ -135,13 +138,13 @@

                                                        Methods inherited from cl
                                                        • -
                                                          +

                                                          Constructor Details

                                                          • RedirectError

                                                            -
                                                            public RedirectError(String message, +
                                                            public RedirectError(String message, String code, int statusCode, List<Error> errors)
                                                            @@ -164,7 +167,7 @@

                                                            RedirectError


                                                            - +
                                                            diff --git a/docs/com/easypost/exception/API/ServiceUnavailableError.html b/docs/com/easypost/exception/API/ServiceUnavailableError.html new file mode 100644 index 000000000..3cdbf6614 --- /dev/null +++ b/docs/com/easypost/exception/API/ServiceUnavailableError.html @@ -0,0 +1,175 @@ + + + + +ServiceUnavailableError (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
                                                            + +
                                                            +
                                                            + +
                                                            + +

                                                            Class ServiceUnavailableError

                                                            +
                                                            + +
                                                            +
                                                            +
                                                            All Implemented Interfaces:
                                                            +
                                                            Serializable
                                                            +
                                                            +
                                                            +
                                                            public class ServiceUnavailableError +extends APIException
                                                            +
                                                            +
                                                            See Also:
                                                            +
                                                            + +
                                                            +
                                                            +
                                                            +
                                                            + +
                                                            +
                                                            +
                                                              + +
                                                            • +
                                                              +

                                                              Constructor Details

                                                              +
                                                                +
                                                              • +
                                                                +

                                                                ServiceUnavailableError

                                                                +
                                                                public ServiceUnavailableError(String message, + String code, + int statusCode, + List<Error> errors)
                                                                +
                                                                ServiceUnavailablError constructor.
                                                                +
                                                                +
                                                                Parameters:
                                                                +
                                                                message - the exception message
                                                                +
                                                                code - the exception code
                                                                +
                                                                statusCode - the exception status code
                                                                +
                                                                errors - the errors array
                                                                +
                                                                +
                                                                +
                                                              • +
                                                              +
                                                              +
                                                            • +
                                                            +
                                                            + +
                                                            +
                                                            +
                                                            + +
                                                            +
                                                            +
                                                            + + diff --git a/docs/com/easypost/exception/API/TimeoutError.html b/docs/com/easypost/exception/API/TimeoutError.html index f4e4b689b..a3e1296d6 100644 --- a/docs/com/easypost/exception/API/TimeoutError.html +++ b/docs/com/easypost/exception/API/TimeoutError.html @@ -1,12 +1,11 @@ - - -TimeoutError (com.easypost:easypost-api-client 5.10.0 API) + +TimeoutError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
                                                            @@ -76,35 +73,41 @@

                                                            Class TimeoutError

                                                            -
                                                            +
                                                            +
                                                            All Implemented Interfaces:
                                                            Serializable

                                                            public class TimeoutError -extends EasyPostException
                                                            +extends APIException
                                                            See Also:
                                                            -
                                                            Serialized Form
                                                            +
                                                            + +
                                                            • -
                                                              +

                                                              Constructor Summary

                                                              Constructors
                                                              Constructor
                                                              Description
                                                              -
                                                              TimeoutError​(String message, +
                                                              TimeoutError(String message, String code, int statusCode, List<Error> errors)
                                                              @@ -116,16 +119,16 @@

                                                              Constructor Summary

                                                            • -
                                                              +

                                                              Method Summary

                                                              -

                                                              Methods inherited from class com.easypost.exception.EasyPostException

                                                              -getCode, getErrors, getMessage, getStatusCode
                                                              +

                                                              Methods inherited from class com.easypost.exception.APIException

                                                              +getCode, getErrors, getMessage, getStatusCode
                                                              -

                                                              Methods inherited from class java.lang.Object

                                                              +

                                                              Methods inherited from class java.lang.Object

                                                              clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
                                                            • @@ -135,13 +138,13 @@

                                                              Methods inherited from cl
                                                              • -
                                                                +

                                                                Constructor Details

                                                                • TimeoutError

                                                                  -
                                                                  public TimeoutError(String message, +
                                                                  public TimeoutError(String message, String code, int statusCode, List<Error> errors)
                                                                  @@ -164,7 +167,7 @@

                                                                  TimeoutError


                                                                  - +
                                                                  diff --git a/docs/com/easypost/exception/API/UnauthorizedError.html b/docs/com/easypost/exception/API/UnauthorizedError.html index 9532bfc13..538103ab6 100644 --- a/docs/com/easypost/exception/API/UnauthorizedError.html +++ b/docs/com/easypost/exception/API/UnauthorizedError.html @@ -1,12 +1,11 @@ - - -UnauthorizedError (com.easypost:easypost-api-client 5.10.0 API) + +UnauthorizedError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
                                                                  @@ -76,35 +73,41 @@

                                                                  Class UnauthorizedError

                                                                  -
                                                                  +
                                                                  +
                                                                  All Implemented Interfaces:
                                                                  Serializable

                                                                  public class UnauthorizedError -extends EasyPostException
                                                                  +extends APIException
                                                                  See Also:
                                                                  -
                                                                  Serialized Form
                                                                  +
                                                                  + +
                                                                  • -
                                                                    +

                                                                    Constructor Summary

                                                                    Constructors
                                                                    Constructor
                                                                    Description
                                                                    -
                                                                    UnauthorizedError​(String message, +
                                                                    UnauthorizedError(String message, String code, int statusCode, List<Error> errors)
                                                                    @@ -116,16 +119,16 @@

                                                                    Constructor Summary

                                                                  • -
                                                                    +

                                                                    Method Summary

                                                                    -

                                                                    Methods inherited from class com.easypost.exception.EasyPostException

                                                                    -getCode, getErrors, getMessage, getStatusCode
                                                                    +

                                                                    Methods inherited from class com.easypost.exception.APIException

                                                                    +getCode, getErrors, getMessage, getStatusCode
                                                                    -

                                                                    Methods inherited from class java.lang.Object

                                                                    +

                                                                    Methods inherited from class java.lang.Object

                                                                    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
                                                                  • @@ -135,13 +138,13 @@

                                                                    Methods inherited from cl
                                                                    • -
                                                                      +

                                                                      Constructor Details

                                                                      • UnauthorizedError

                                                                        -
                                                                        public UnauthorizedError(String message, +
                                                                        public UnauthorizedError(String message, String code, int statusCode, List<Error> errors)
                                                                        @@ -164,7 +167,7 @@

                                                                        UnauthorizedError


                                                                        - +
                                                                        diff --git a/docs/com/easypost/exception/API/UnknownApiError.html b/docs/com/easypost/exception/API/UnknownApiError.html index 6322d895c..1c8c16933 100644 --- a/docs/com/easypost/exception/API/UnknownApiError.html +++ b/docs/com/easypost/exception/API/UnknownApiError.html @@ -1,12 +1,11 @@ - - -UnknownApiError (com.easypost:easypost-api-client 5.10.0 API) + +UnknownApiError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
                                                                        @@ -76,35 +73,41 @@

                                                                        Class UnknownApiError

                                                                        -
                                                                        +
                                                                        +
                                                                        All Implemented Interfaces:
                                                                        Serializable

                                                                        public class UnknownApiError -extends EasyPostException
                                                                        +extends APIException
                                                                        See Also:
                                                                        -
                                                                        Serialized Form
                                                                        +
                                                                        + +
                                                                        • -
                                                                          +

                                                                          Constructor Summary

                                                                          Constructors
                                                                          Constructor
                                                                          Description
                                                                          -
                                                                          UnknownApiError​(String message, +
                                                                          UnknownApiError(String message, String code, int statusCode, List<Error> errors)
                                                                          @@ -116,16 +119,16 @@

                                                                          Constructor Summary

                                                                        • -
                                                                          +

                                                                          Method Summary

                                                                          -

                                                                          Methods inherited from class com.easypost.exception.EasyPostException

                                                                          -getCode, getErrors, getMessage, getStatusCode
                                                                          +

                                                                          Methods inherited from class com.easypost.exception.APIException

                                                                          +getCode, getErrors, getMessage, getStatusCode
                                                                          -

                                                                          Methods inherited from class java.lang.Object

                                                                          +

                                                                          Methods inherited from class java.lang.Object

                                                                          clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
                                                                        • @@ -135,13 +138,13 @@

                                                                          Methods inherited from cl
                                                                          • -
                                                                            +

                                                                            Constructor Details

                                                                            • UnknownApiError

                                                                              -
                                                                              public UnknownApiError(String message, +
                                                                              public UnknownApiError(String message, String code, int statusCode, List<Error> errors)
                                                                              @@ -164,7 +167,7 @@

                                                                              UnknownApiError


                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/class-use/EncodingError.html b/docs/com/easypost/exception/API/class-use/EncodingError.html new file mode 100644 index 000000000..4c4753dd9 --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/EncodingError.html @@ -0,0 +1,126 @@ + + + + +Uses of Class com.easypost.exception.API.EncodingError (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
                                                                              + +
                                                                              +
                                                                              +
                                                                              +

                                                                              Uses of Class
                                                                              com.easypost.exception.API.EncodingError

                                                                              +
                                                                              +
                                                                              Packages that use EncodingError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              + +
                                                                              +
                                                                              Utility classes for the EasyPost API Java client library.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                              + + diff --git a/docs/com/easypost/exception/API/class-use/ExternalApiError.html b/docs/com/easypost/exception/API/class-use/ExternalApiError.html new file mode 100644 index 000000000..07f328903 --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/ExternalApiError.html @@ -0,0 +1,63 @@ + + + + +Uses of Class com.easypost.exception.API.ExternalApiError (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
                                                                              + +
                                                                              +
                                                                              +
                                                                              +

                                                                              Uses of Class
                                                                              com.easypost.exception.API.ExternalApiError

                                                                              +
                                                                              +No usage of com.easypost.exception.API.ExternalApiError
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                              + + diff --git a/docs/com/easypost/exception/API/class-use/ForbiddenError.html b/docs/com/easypost/exception/API/class-use/ForbiddenError.html index 051003f9f..3cdc88152 100644 --- a/docs/com/easypost/exception/API/class-use/ForbiddenError.html +++ b/docs/com/easypost/exception/API/class-use/ForbiddenError.html @@ -1,12 +1,11 @@ - - -Uses of Class com.easypost.exception.API.ForbiddenError (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Class com.easypost.exception.API.ForbiddenError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@

                                                                              Uses of Class
                                                                              com.easypost.exception.API.ForbiddenError

                                                                              -No usage of com.easypost.exception.API.ForbiddenError
                                                                              +
                                                                              Packages that use ForbiddenError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/class-use/GatewayTimeoutError.html b/docs/com/easypost/exception/API/class-use/GatewayTimeoutError.html index 7a74f692e..37180f63e 100644 --- a/docs/com/easypost/exception/API/class-use/GatewayTimeoutError.html +++ b/docs/com/easypost/exception/API/class-use/GatewayTimeoutError.html @@ -1,12 +1,11 @@ - - -Uses of Class com.easypost.exception.API.GatewayTimeoutError (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Class com.easypost.exception.API.GatewayTimeoutError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@

                                                                              Uses of Class
                                                                              com.easypost.exception.API.GatewayTimeoutError

                                                                              -No usage of com.easypost.exception.API.GatewayTimeoutError
                                                                              +
                                                                              Packages that use GatewayTimeoutError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/class-use/HttpError.html b/docs/com/easypost/exception/API/class-use/HttpError.html new file mode 100644 index 000000000..6107595df --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/HttpError.html @@ -0,0 +1,105 @@ + + + + +Uses of Class com.easypost.exception.API.HttpError (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
                                                                              + +
                                                                              +
                                                                              +
                                                                              +

                                                                              Uses of Class
                                                                              com.easypost.exception.API.HttpError

                                                                              +
                                                                              +
                                                                              Packages that use HttpError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                              + + diff --git a/docs/com/easypost/exception/API/class-use/InternalServerError.html b/docs/com/easypost/exception/API/class-use/InternalServerError.html index 0d6aed8e6..6c238b60a 100644 --- a/docs/com/easypost/exception/API/class-use/InternalServerError.html +++ b/docs/com/easypost/exception/API/class-use/InternalServerError.html @@ -1,12 +1,11 @@ - - -Uses of Class com.easypost.exception.API.InternalServerError (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Class com.easypost.exception.API.InternalServerError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@

                                                                              Uses of Class
                                                                              com.easypost.exception.API.InternalServerError

                                                                              -No usage of com.easypost.exception.API.InternalServerError
                                                                              +
                                                                              Packages that use InternalServerError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/class-use/InvalidRequestError.html b/docs/com/easypost/exception/API/class-use/InvalidRequestError.html index 61befb493..bdd3b653d 100644 --- a/docs/com/easypost/exception/API/class-use/InvalidRequestError.html +++ b/docs/com/easypost/exception/API/class-use/InvalidRequestError.html @@ -1,12 +1,11 @@ - - -Uses of Class com.easypost.exception.API.InvalidRequestError (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Class com.easypost.exception.API.InvalidRequestError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@

                                                                              Uses of Class
                                                                              com.easypost.exception.API.InvalidRequestError

                                                                              -No usage of com.easypost.exception.API.InvalidRequestError
                                                                              +
                                                                              Packages that use InvalidRequestError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/class-use/JsonError.html b/docs/com/easypost/exception/API/class-use/JsonError.html new file mode 100644 index 000000000..081f0ab8b --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/JsonError.html @@ -0,0 +1,105 @@ + + + + +Uses of Class com.easypost.exception.API.JsonError (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
                                                                              + +
                                                                              +
                                                                              +
                                                                              +

                                                                              Uses of Class
                                                                              com.easypost.exception.API.JsonError

                                                                              +
                                                                              +
                                                                              Packages that use JsonError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                              + + diff --git a/docs/com/easypost/exception/API/class-use/MethodNotAllowedError.html b/docs/com/easypost/exception/API/class-use/MethodNotAllowedError.html index 491152cf7..748929a49 100644 --- a/docs/com/easypost/exception/API/class-use/MethodNotAllowedError.html +++ b/docs/com/easypost/exception/API/class-use/MethodNotAllowedError.html @@ -1,12 +1,11 @@ - - -Uses of Class com.easypost.exception.API.MethodNotAllowedError (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Class com.easypost.exception.API.MethodNotAllowedError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@

                                                                              Uses of Class
                                                                              com.easypost.exception.API.MethodNotAllowedError

                                                                              -No usage of com.easypost.exception.API.MethodNotAllowedError
                                                                              +
                                                                              Packages that use MethodNotAllowedError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/class-use/NotFoundError.html b/docs/com/easypost/exception/API/class-use/NotFoundError.html index 73ddaaee6..6ff3042be 100644 --- a/docs/com/easypost/exception/API/class-use/NotFoundError.html +++ b/docs/com/easypost/exception/API/class-use/NotFoundError.html @@ -1,12 +1,11 @@ - - -Uses of Class com.easypost.exception.API.NotFoundError (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Class com.easypost.exception.API.NotFoundError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@

                                                                              Uses of Class
                                                                              com.easypost.exception.API.NotFoundError

                                                                              -No usage of com.easypost.exception.API.NotFoundError
                                                                              +
                                                                              Packages that use NotFoundError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/class-use/PaymentError.html b/docs/com/easypost/exception/API/class-use/PaymentError.html index 878e19960..9dc43947e 100644 --- a/docs/com/easypost/exception/API/class-use/PaymentError.html +++ b/docs/com/easypost/exception/API/class-use/PaymentError.html @@ -1,12 +1,11 @@ - - -Uses of Class com.easypost.exception.API.PaymentError (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Class com.easypost.exception.API.PaymentError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@

                                                                              Uses of Class
                                                                              com.easypost.exception.API.PaymentError

                                                                              -No usage of com.easypost.exception.API.PaymentError
                                                                              +
                                                                              Packages that use PaymentError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/class-use/RateLimitError.html b/docs/com/easypost/exception/API/class-use/RateLimitError.html index fcfd59e2c..9e2c4c2fa 100644 --- a/docs/com/easypost/exception/API/class-use/RateLimitError.html +++ b/docs/com/easypost/exception/API/class-use/RateLimitError.html @@ -1,12 +1,11 @@ - - -Uses of Class com.easypost.exception.API.RateLimitError (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Class com.easypost.exception.API.RateLimitError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@

                                                                              Uses of Class
                                                                              com.easypost.exception.API.RateLimitError

                                                                              -No usage of com.easypost.exception.API.RateLimitError
                                                                              +
                                                                              Packages that use RateLimitError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/class-use/RedirectError.html b/docs/com/easypost/exception/API/class-use/RedirectError.html index d35c89920..c5cf087f7 100644 --- a/docs/com/easypost/exception/API/class-use/RedirectError.html +++ b/docs/com/easypost/exception/API/class-use/RedirectError.html @@ -1,12 +1,11 @@ - - -Uses of Class com.easypost.exception.API.RedirectError (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Class com.easypost.exception.API.RedirectError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@

                                                                              Uses of Class
                                                                              com.easypost.exception.API.RedirectError

                                                                              -No usage of com.easypost.exception.API.RedirectError
                                                                              +
                                                                              Packages that use RedirectError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/class-use/ServiceUnavailableError.html b/docs/com/easypost/exception/API/class-use/ServiceUnavailableError.html new file mode 100644 index 000000000..aefc35cf1 --- /dev/null +++ b/docs/com/easypost/exception/API/class-use/ServiceUnavailableError.html @@ -0,0 +1,111 @@ + + + + +Uses of Class com.easypost.exception.API.ServiceUnavailableError (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
                                                                              + +
                                                                              +
                                                                              +
                                                                              +

                                                                              Uses of Class
                                                                              com.easypost.exception.API.ServiceUnavailableError

                                                                              +
                                                                              +
                                                                              Packages that use ServiceUnavailableError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                              + + diff --git a/docs/com/easypost/exception/API/class-use/TimeoutError.html b/docs/com/easypost/exception/API/class-use/TimeoutError.html index 01d655748..30446baab 100644 --- a/docs/com/easypost/exception/API/class-use/TimeoutError.html +++ b/docs/com/easypost/exception/API/class-use/TimeoutError.html @@ -1,12 +1,11 @@ - - -Uses of Class com.easypost.exception.API.TimeoutError (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Class com.easypost.exception.API.TimeoutError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@

                                                                              Uses of Class
                                                                              com.easypost.exception.API.TimeoutError

                                                                              -No usage of com.easypost.exception.API.TimeoutError
                                                                              +
                                                                              Packages that use TimeoutError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/class-use/UnauthorizedError.html b/docs/com/easypost/exception/API/class-use/UnauthorizedError.html index c94b9cf85..c243e72f9 100644 --- a/docs/com/easypost/exception/API/class-use/UnauthorizedError.html +++ b/docs/com/easypost/exception/API/class-use/UnauthorizedError.html @@ -1,12 +1,11 @@ - - -Uses of Class com.easypost.exception.API.UnauthorizedError (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Class com.easypost.exception.API.UnauthorizedError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@

                                                                              Uses of Class
                                                                              com.easypost.exception.API.UnauthorizedError

                                                                              -No usage of com.easypost.exception.API.UnauthorizedError
                                                                              +
                                                                              Packages that use UnauthorizedError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/class-use/UnknownApiError.html b/docs/com/easypost/exception/API/class-use/UnknownApiError.html index 561c89bc2..104bef3c2 100644 --- a/docs/com/easypost/exception/API/class-use/UnknownApiError.html +++ b/docs/com/easypost/exception/API/class-use/UnknownApiError.html @@ -1,12 +1,11 @@ - - -Uses of Class com.easypost.exception.API.UnknownApiError (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Class com.easypost.exception.API.UnknownApiError (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@

                                                                              Uses of Class
                                                                              com.easypost.exception.API.UnknownApiError

                                                                              -No usage of com.easypost.exception.API.UnknownApiError
                                                                              +
                                                                              Packages that use UnknownApiError
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/package-summary.html b/docs/com/easypost/exception/API/package-summary.html index 174f34858..7521f7cd0 100644 --- a/docs/com/easypost/exception/API/package-summary.html +++ b/docs/com/easypost/exception/API/package-summary.html @@ -1,12 +1,11 @@ - - -com.easypost.exception.API (com.easypost:easypost-api-client 5.10.0 API) + +com.easypost.exception.API (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
                                                                              -

                                                                              Package com.easypost.exception.API

                                                                              +

                                                                              Package com.easypost.exception.API


                                                                              package com.easypost.exception.API
                                                                              -
                                                                              +
                                                                              Custom API exception classes for the EasyPost API.
                                                                              Since:
                                                                              @@ -67,42 +72,73 @@

                                                                              Package com.easypost.exception.API

                                                                              Author:
                                                                              EasyPost developers
                                                                              See Also:
                                                                              -
                                                                              EasyPost API documentation
                                                                              +
                                                                              + +
                                                                              @@ -110,7 +146,7 @@

                                                                              Package com.easypost.exception.API


                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/package-tree.html b/docs/com/easypost/exception/API/package-tree.html index 73cefc094..2bf4b8bf9 100644 --- a/docs/com/easypost/exception/API/package-tree.html +++ b/docs/com/easypost/exception/API/package-tree.html @@ -1,12 +1,11 @@ - - -com.easypost.exception.API Class Hierarchy (com.easypost:easypost-api-client 5.10.0 API) + +com.easypost.exception.API Class Hierarchy (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@
                                                                              @@ -62,27 +59,35 @@

                                                                              Hierarchy For Package com.easypost.exception.API

                                                                              Class Hierarchy


                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/API/package-use.html b/docs/com/easypost/exception/API/package-use.html index 6a1d1beec..f0843cfd0 100644 --- a/docs/com/easypost/exception/API/package-use.html +++ b/docs/com/easypost/exception/API/package-use.html @@ -1,12 +1,11 @@ - - -Uses of Package com.easypost.exception.API (com.easypost:easypost-api-client 5.10.0 API) + +Uses of Package com.easypost.exception.API (com.easypost:easypost-api-client 6.2.0 API) - + @@ -26,9 +25,9 @@

                                                                              Uses of Package
                                                                              com.easypost.exception.API

                                                                              -No usage of com.easypost.exception.API
                                                                              +
                                                                              Packages that use com.easypost.exception.API
                                                                              +
                                                                              +
                                                                              Package
                                                                              +
                                                                              Description
                                                                              + +
                                                                              +
                                                                              Classes for handling requests and responses to the EasyPost API.
                                                                              +
                                                                              + +
                                                                              +
                                                                              Utility classes for the EasyPost API Java client library.
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              - +
                                                                              diff --git a/docs/com/easypost/exception/APIException.html b/docs/com/easypost/exception/APIException.html new file mode 100644 index 000000000..ed69f1f58 --- /dev/null +++ b/docs/com/easypost/exception/APIException.html @@ -0,0 +1,322 @@ + + + + +APIException (com.easypost:easypost-api-client 6.2.0 API) + + + + + + + + + + + + + + + +
                                                                              + +
                                                                              +
                                                                              + +
                                                                              + +

                                                                              Class APIException

                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                              All Implemented Interfaces:
                                                                              +
                                                                              Serializable
                                                                              +
                                                                              +
                                                                              +
                                                                              Direct Known Subclasses:
                                                                              +
                                                                              EncodingError, ExternalApiError, ForbiddenError, GatewayTimeoutError, HttpError, InternalServerError, InvalidRequestError, JsonError, MethodNotAllowedError, NotFoundError, PaymentError, RateLimitError, RedirectError, ServiceUnavailableError, TimeoutError, UnauthorizedError, UnknownApiError
                                                                              +
                                                                              +
                                                                              +
                                                                              public class APIException +extends EasyPostException
                                                                              +
                                                                              +
                                                                              See Also:
                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                                + +
                                                                              • +
                                                                                +

                                                                                Constructor Details

                                                                                +
                                                                                  +
                                                                                • +
                                                                                  +

                                                                                  APIException

                                                                                  +
                                                                                  public APIException(String message)
                                                                                  +
                                                                                  APIException constructor.
                                                                                  +
                                                                                  +
                                                                                  Parameters:
                                                                                  +
                                                                                  message - the exception message
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                • +
                                                                                • +
                                                                                  +

                                                                                  APIException

                                                                                  +
                                                                                  public APIException(String message, + Throwable ex)
                                                                                  +
                                                                                  APIException constructor.
                                                                                  +
                                                                                  +
                                                                                  Parameters:
                                                                                  +
                                                                                  message - the exception message
                                                                                  +
                                                                                  ex - the exception cause
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                • +
                                                                                • +
                                                                                  +

                                                                                  APIException

                                                                                  +
                                                                                  public APIException(String message, + String code, + int statusCode, + List<Error> errors)
                                                                                  +
                                                                                  APIException constructor.
                                                                                  +
                                                                                  +
                                                                                  Parameters:
                                                                                  +
                                                                                  message - the exception message
                                                                                  +
                                                                                  code - the exception code
                                                                                  +
                                                                                  statusCode - the exception status code
                                                                                  +
                                                                                  errors - the errors array
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                • +
                                                                                • +
                                                                                  +

                                                                                  APIException

                                                                                  +
                                                                                  public APIException(String message, + String code, + Integer statusCode, + List<Error> errors, + Throwable ex)
                                                                                  +
                                                                                  APIException constructor.
                                                                                  +
                                                                                  +
                                                                                  Parameters:
                                                                                  +
                                                                                  message - the exception message
                                                                                  +
                                                                                  code - the exception code
                                                                                  +
                                                                                  statusCode - the exception status code
                                                                                  +
                                                                                  errors - the errors array
                                                                                  +
                                                                                  ex - the exception cause
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                • +
                                                                                +
                                                                                +
                                                                              • + +
                                                                              • +
                                                                                +

                                                                                Method Details

                                                                                +
                                                                                  +
                                                                                • +
                                                                                  +

                                                                                  getStatusCode

                                                                                  +
                                                                                  public Integer getStatusCode()
                                                                                  +
                                                                                  Get status code of the error object.
                                                                                  +
                                                                                  +
                                                                                  Returns:
                                                                                  +
                                                                                  statusCode the status code of the error object
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                • +
                                                                                • +
                                                                                  +

                                                                                  getCode

                                                                                  +
                                                                                  public String getCode()
                                                                                  +
                                                                                  Get code of the error object.
                                                                                  +
                                                                                  +
                                                                                  Returns:
                                                                                  +
                                                                                  code the code of the error object
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                • +
                                                                                • +
                                                                                  +

                                                                                  getMessage

                                                                                  +
                                                                                  public String getMessage()
                                                                                  +
                                                                                  Get message of the error object.
                                                                                  +
                                                                                  +
                                                                                  Overrides:
                                                                                  +
                                                                                  getMessage in class Throwable
                                                                                  +
                                                                                  Returns:
                                                                                  +
                                                                                  message the message of the error object
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                • +
                                                                                • +
                                                                                  +

                                                                                  getErrors

                                                                                  +
                                                                                  public List<Error> getErrors()
                                                                                  +
                                                                                  Get errors array of the exception.
                                                                                  +
                                                                                  +
                                                                                  Returns:
                                                                                  +
                                                                                  errors of the exception
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                • +
                                                                                +
                                                                                +
                                                                              • +
                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              +
                                                                              + + diff --git a/docs/com/easypost/exception/EasyPostException.html b/docs/com/easypost/exception/EasyPostException.html index bb62e097b..e54f576f7 100644 --- a/docs/com/easypost/exception/EasyPostException.html +++ b/docs/com/easypost/exception/EasyPostException.html @@ -1,12 +1,11 @@ - - -EasyPostException (com.easypost:easypost-api-client 5.10.0 API) + +EasyPostException (com.easypost:easypost-api-client 6.2.0 API) - + @@ -17,11 +16,7 @@ -