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/.github/CODEOWNERS b/.github/CODEOWNERS index 0b419161c..e390f3f5b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,7 @@ -# Ping the DevEx team for reviews on every PR -* @EasyPost/devex +## These are the standard rules for all EasyPost public repositories. +## + +* @EasyPost/dev-tools @EasyPost/easypost-public-maintainers + +# The devtools team owns the codeowners file, this is for auditing purposes +.github/CODEOWNERS @easypost/dev-tools diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3b484469..0a03926db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,59 +2,102 @@ name: CI on: push: - branches: [ master ] + branches: [master] pull_request: ~ + workflow_dispatch: ~ jobs: build: 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', '20', '21', '22', '23', '24', '25'] steps: - - uses: actions/checkout@v3 - - name: Load Maven dependencies cache - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-build${{ matrix.javaversion }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + - uses: actions/checkout@v6 + - uses: extractions/setup-just@v3 + - uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: '25' # Always use the most recent LTS JDK for building + cache: 'maven' - name: Install dependencies - run: make install + run: just install + - name: Build Library + run: just build - name: Set up Java ${{ matrix.javaversion }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: - distribution: "zulu" + 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 - lint: + cache: 'maven' + - name: Run test with Java ${{ matrix.javaversion }} + run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just test-ci + coverage: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Run CheckStyle checks - uses: nikitasavinov/checkstyle-action@0.5.1 - with: - level: error - fail_on_error: true - checkstyle_config: easypost_java_style.xml - tool_name: "style_enforcer" - security: + - uses: actions/checkout@v6 + - uses: extractions/setup-just@v3 + - uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: '25' # Always use the most recent LTS JDK for building + cache: 'maven' + - name: Install dependencies + run: just install + - name: Test coverage + run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just 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 --version 0.8.13 + - name: Convert coverage report + if: github.ref == 'refs/heads/master' + 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 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: './coverage.lcov' + lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Load Maven dependencies and CVE database cache - uses: actions/cache@v3 - with: - path: ~/.m2/repository # The CVE database is included in the Maven repository folder - key: ${{ runner.os }}-maven-security-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Run security analysis - run: make scan + - uses: actions/checkout@v6 + - uses: extractions/setup-just@v3 + - uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: '25' # Always use the most recent LTS JDK for building + cache: 'maven' + - name: Install checkstyle and style guide + run: just install-checkstyle + - name: Lint + run: just lint - name: Upload Test results uses: actions/upload-artifact@master with: name: DependencyCheck report path: ${{github.workspace}}/target/dependency-check-report.html + docs: + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: extractions/setup-just@v3 + - uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: '25' # Always use the most recent LTS JDK for building + cache: 'maven' + - name: Install Dependencies + run: just install + - name: Generate Docs + run: just docs + - name: Deploy docs + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..62401a45f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,56 @@ +# This workflow will build a Java project with Maven and publish it to Maven Central Repository +# ref: https://github.com/actions/setup-java/blob/v3.11.0/docs/advanced-usage.md#Publishing-using-Apache-Maven + +# Secrets required: +# - MAVEN_USERNAME: Username for Maven Central Repository +# - MAVEN_CENTRAL_TOKEN: Token/password for Maven Central Repository +# - MAVEN_GPG_PRIVATE_KEY: GPG private key to sign the artifacts (string) +# - MAVEN_GPG_PASSPHRASE: Passphrase for the GPG private key + +name: Publish library to Maven Central Repository + +on: + release: + types: [created] + secrets: + MAVEN_USERNAME: + required: true + MAVEN_CENTRAL_TOKEN: + required: true + MAVEN_GPG_PRIVATE_KEY: + required: true + MAVEN_GPG_PASSPHRASE: + required: true + workflow_dispatch: ~ + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: extractions/setup-just@v3 + - uses: actions/setup-java@v5 + with: + distribution: 'zulu' + java-version: '25' # Always use the most recent LTS JDK for building + server-id: 'ossrh' + # define environmental variable names + server-username: MAVEN_USERNAME + server-password: MAVEN_CENTRAL_TOKEN + gpg-passphrase: MAVEN_GPG_PASSPHRASE + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + + - name: Clean, build and publish to Apache Maven Central + run: just install-styleguide publish pass=${{ secrets.MAVEN_GPG_PASSPHRASE }} + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + + - name: Upload output files to release + uses: AButler/upload-release-assets@v3.0.1 + with: + files: 'target/*.jar;target/*.pom;target/*.asc' + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index b2492ce97..4d58b46cc 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,11 @@ *.class *.iml *.jar +*.lcov +docs Icon settings.xml src/scratch target +/easypost_java_style.xml +/style_suppressions.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index bd8c9c32f..378a2fc65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,273 @@ # CHANGELOG +## v8.6.0 (2026-02-03) + +- Adds the following functions usable by child and referral customer users: + - `apiKey.create` + - `apiKey.delete` + - `apiKey.enable` + - `apiKey.disable` +- Adds a `tracker.delete` function + +## v8.5.1 (2026-01-08) + +- Corrects `StatelessRateDeserializer` and `WebhookDeserializer` to treat all camelCase fields like all other models to properly deserialize JSON fields containing underscors + +## v8.5.0 (2025-12-09) + +- Adds the following functions: + - `fedexRegistration.registerAddress` + - `fedexRegistration.requestPin` + - `fedexRegistration.validatePin` + - `fedexRegistration.submitInvoice` +- Adds `details` property of a `Rate` objec + +## v8.4.1 (2025-12-01) + +- Adds missing `apiKeys` field to `BaseUser` +- Removes unecessary `SerializedName` entries in `StatelessRate` + +## v8.4.0 (2025-11-24) + +- Adds the following functions: + - `embeddable.createSession` + - `customerPortal.createAccountLink` + +## v8.3.0 (2025-11-10) + +- Adds support for `UspsShipAccount` +- Adds `tracker.retrieveBatch` function +- Adds `verify_carrier` address param + +## v8.2.0 (2025-06-18) + +- Adds the following functions + - `shipment.createAndBuyLuma` + - `shipment.buyLuma` + - `luma.getPromise` + +## v8.1.0 (2025-05-29) + +- Adds `reference` to Claims + +## v8.0.1 (2025-05-27) + +- Corrects the endpoint used for creating/updating UPS accounts + +## v8.0.0 (2025-04-28) + +See our [Upgrade Guide](UPGRADE_GUIDE.md#upgrading-from-7x-to-80) for more details. + +- Adds `WebhookCustomHeader` model, allowing `custom_headers` to be passed when creating/updating a webhook +- Adds the following functions to assist ReferralCustomers add credit cards and bank accounts: + - `betaReferralCustomer.createCreditCardClientSecret` + - `betaReferralCustomer.createBankAccountClientSecret` + - `referralCustomer.addCreditCardFromStripe` + - `referralCustomer.addBankAccountFromStripe` +- Adds missing tracker props +- Adds `tracking_codes` param to tracker index endpoint +- Routes `AmazonShippingAccount` to the correct endpoint +- Corrects payload wrapping for updating a webhook +- Fixes error parsing + - Allows for alternative format of `errors` field (previously we deserialized the `errors` field into a list of `Error` objects; however, sometimes the errors are simply a list of strings. This change make the `errors` field a list of `Object` allowing for either the new `FieldError` object or a list of strings. Users will need to check for the type of error returned and handle appropriately) + - Removed the unused `Error` model + - Added an explicit `AddressVerificationFieldError` model + - The `BetaPaymentRefund` now uses a list of `FieldError` instead of `Error` for the `errors` field +- Removes deprecated functions + - `paymentMethod.all` (use `billing.retrievePaymentMethods` instead) + - `user.apiKeys` (use `apiKey.retrieveApiKeysForUser` instead) +- Replaces deprecated functions + - `shipment.lowestSmartRate` (3rd param expects a valid `SmartRateAccuracy`) + - `utilities.findLowestSmartRate` (3rd param expects a valid `SmartRateAccuracy`) +- Renames + - `SmartrateAccuracy` is now `SmartRateAccuracy` + - `SmartrateCollection` is now `SmartRateCollection` + - `shipment.smartrates` is now `shipment.smartRates` + - `TimeInTransit.getBySmartrateAccuracy` is now `TimeInTransit.getSmartRateAccuracy` +- Bumps dependencies + +## v7.4.4 (2025-01-03) + +- Fixes how params are passed to the API when buying a pickup and providing a pickup rate (closes #340) + - Removes the unusable buy a pickup overload where no params are specified as `carrier` and `service` are required paramaters when buying a pickup +- Removes the deprecated `create_list` tracker endpoint function as it is no longer available via API + +## v7.4.3 (2024-09-16) + +- Remove the custom DateDeserializer that contained a parsing issue. This change closes the related GitHub issue [#333](https://github.com/EasyPost/easypost-java/issues/333) + +## v7.4.2 (2024-08-09) + +- Fix pagination parameters for `getNextPage` in `User` service + +## v7.4.1 (2024-07-24) + +- Fix bug where response hooks were not being called if an API request failed + +## v7.4.0 (2024-07-24) + +- Add new `Claim` service for filing claims on EasyPost shipments and insurances + +## v7.3.0 (2024-07-16) + +- Adds new `shipment.recommendShipDate`, `smartrate.recommendShipDate`, and `smartrate.estimateDeliveryDate` functions +- Routes `UpsAccount`, `UpsMailInnovationsAccount`, and `UpsSurepostAccount` create/update requests to the new `/ups_oauth_registrations` endpoint + - Starting `2024-08-05`, UPS accounts will require a new payload to register or update. See [UPS OAuth 2.0 Update](https://support.easypost.com/hc/en-us/articles/26635027512717-UPS-OAuth-2-0-Update?utm_medium=email&_hsenc=p2ANqtz-96MmFtWICOzy9sKRbbcZSiMovZSrY3MSX1_bgY9N3f9yLVfWQdLhjAGq-SmNcOnDIS6GYhZ0OApjDBrGkKyLLMx1z6_TFOVp6-wllhEFQINrkuRuc&_hsmi=313130292&utm_content=313130292&utm_source=hs_email) for more details + +## v7.2.1 (2024-04-12) + +- Fix `Fields` serialization bug causing carrier account operations to fail + +## v7.2.0 (2024-04-10) + +- Adds `refund` function in Insurance service for requesting a refund for a standalone insurance +- Fix payment method funding and deletion failures due to undetermined payment method type +- Fix `toString` method for all EasyPost models + +## v7.1.1 (2024-03-21) + +- Fix `EasyPostTimeInTransitData` class and `easypostTimeInTransitData` property of `EstimatedDeliveryDate` class being publicly inaccessible + +## v7.1.0 (2024-01-08) + +- Adds `allChildren` function in User service to get a paginated list of child users +- Adds `getNextPage` function in User service to get next paginated list of child users + +## v7.0.1 (2023-12-08) + +- Adds the `object` field to all models; previously, most models were missing this field. + +## v7.0.0 (2023-12-06) + +See our [Upgrade Guide](UPGRADE_GUIDE.md#upgrading-from-6x-to-70) for more details. + +- Removes `withCarbonOffset` parameter from `create`, `buy`, and `regenerateRates` functions of the Shipment service as EasyPost now offers Carbon Neutral shipments by default for free +- Removes the undocumented `createAndBuy` function from the Batch service. The proper usage is to create a batch first and buy it separately +- Changes return type of `all()` in webhook service from `WebhookCollection` to `a list of webhooks` +- `BetaCarrierMetadata` service has been removed. Please use `CarrierMetadata` instead. + +## v6.9.1 (2023-11-16) + +- Fixes a bug where address verification errors were not being properly deserialized + +## v6.9.0 (2023-10-11) + +- Deprecates `user.apiKeys` which will be removed in a future release, please use the new `apiKey.all` and `apiKey.retrieveApiKeysForUser` functions instead instead +- Fixes various build warnings + +## v6.8.1 (2023-09-05) + +- Fix endpoint for creating a FedEx Smartpost carrier account + +## v6.8.0 (2023-07-28) + +- Adds new `RequestHook` and `ResponseHook` classes. (un)subscribe to them with the new `subscribeToRequestHook`, `subscribeToResponseHook`, `unsubscribeFromRequestHook`, or `unsubscribeFromResponseHook` methods of an `EasyPostClient` +- Maps 400 status codes to the new `BadRequestError` class + +## v6.7.0 (2023-06-06) + +- Retrieving carrier metadata is now generally available via `client.carrierMetadata.retrieve` +- Bump all dependencies + +## v6.6.1 (2023-05-09) + +- Test suite tweaked so EasyVCR is no longer a production dependency + +## v6.6.0 (2023-05-02) + +- Adds `retrieveEstimatedDeliveryDate` function to the Shipment class + +## v6.5.0 (2023-04-18) + +- Adds beta `retrieveCarrierMetadata` function +- Fixes the type for `requestBody` from Map to String for Payload class +- Add `retrieveCarrierMetadata` method to retrieve carrier metadata for carriers + +## v6.4.0 (2023-04-04) + +- Adds `getNextPage` function to each service which retrieves the next page of a collection when the `has_more` key is present in the response (eg: `client.address.getNextPage(addressCollection)`) +- Adds missing Event `status` property + +## v6.3.1 (2023-03-22) + +- Handle edge cases when deseralizing error JSON, closes Github issue [#239](https://github.com/EasyPost/easypost-java/issues/239) + +## v6.3.0 (2023-02-21) + +- Adds beta `retrieveStatelessRates` function to get stateless rates +- Adds `getLowestStatelessRate` function to filter the lowest stateless rate + +## v6.2.0 (2023-01-18) + +- Adds `all` function to `Pickup` to retrieve all pickups +- Adds `retrieveAllPayloads` and `retrievePayload` to retrieve all payloads or a single event payload + +## v6.1.0 (2023-01-11) + +- 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) + +See our [Upgrade Guide](UPGRADE_GUIDE.md#upgrading-from-5x-to-60) for more details. + +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) + +### Breaking Changes + +- Library is now thread-safe + - 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 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 + - 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 +- 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 +- 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 +- 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()` +- 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) - Adds support to pass an `EndShipper ID` when buying a shipment @@ -88,7 +356,7 @@ ## v5.0.0 (2022-01-14) -Upgrading major versions of this project? Refer to the [Upgrade Guide](UPGRADE_GUIDE.md). +See our [Upgrade Guide](UPGRADE_GUIDE.md#upgrading-from-4x-to-50) for more details. - Bump minimum Java version from 1.5 to 8 - Changed PUT/POST request bodies from url-form encoded to JSON encoded 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/Makefile b/Makefile deleted file mode 100644 index 169d79b5d..000000000 --- a/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -## help - Display help about make targets for this Makefile -help: - @cat Makefile | grep '^## ' --color=never | cut -c4- | sed -e "`printf 's/ - /\t- /;'`" | column -s "`printf '\t'`" -t - -## build - Builds the project for development -build: - mvn clean install -DskipTests=true -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true - -## clean - Cleans the project -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 - -## 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 - -## install - Install requirements -install: | install-checkstyle - git submodule init - git submodule update - -## lint - Check if project follows CheckStyle rules (must run install-checkstyle first) -lint: - java -jar checkstyle.jar src -c easypost_java_style.xml -d - -## publish - Publish a release of the project -# @parameters: -# pass= - The GPG password to sign the release -publish: - mvn clean deploy -Dgpg.passphrase=${pass} - -## publish-dry - Build the project as a dry run to publishing -# @parameters: -# pass= - The GPG password to sign the release -publish-dry: - mvn clean install -Dgpg.passphrase=${pass} - -## release - Cuts a release for the project on GitHub (requires GitHub CLI) -# tag = The associated tag title of the release -release: - gh release create ${tag} target/*.jar target/*.asc target/*.pom - -## scan - Scan the project for serious security issues -scan: - mvn verify -DskipTests=true -Dgpg.skip=true -Dcheckstyle.skip=true -Djavadoc.skip=true -Ddependency-check.failBuildOnCVSS=0 -Ddependency-check.junitFailOnCVSS=0 - -## 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 - -.PHONY: help build clean install-checkstyle install lint publish publish-dry release scan scan-strict test diff --git a/README.md b/README.md index cda005e4a..98a5ceefb 100644 --- a/README.md +++ b/README.md @@ -1,7 +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 . @@ -15,10 +16,18 @@ Add this to your project's POM: com.easypost easypost-api-client - 5.10.0 + 8.6.0 ``` +### Gradle + +Add this to your project's build file: + +```groovy +implementation "com.easypost:easypost-api-client:8.6.0" +``` + **NOTE:** [Google Gson](http://code.google.com/p/google-gson/) is required. ## Usage @@ -31,14 +40,15 @@ 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; import java.util.Map; public class CreateShipment { - public static void main(String[] args) { - EasyPost.apiKey = System.getenv("EASYPOST_API_KEY"); + public static void main(String[] args) throws EasyPostException { + EasyPostClient client = new EasyPostClient(System.getenv("EASYPOST_API_KEY")); Map fromAddressMap = new HashMap(); fromAddressMap.put("company", "EasyPost"); @@ -70,44 +80,81 @@ 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.getId(), shipment.lowestRate()); - System.out.println(shipment.prettyPrint()); + System.out.println(boughtShipment.prettyPrint()); } } ``` +## HTTP Hooks + +Users can subscribe to HTTP requests and responses via the `RequestHook` and `ResponseHook` objects. To do so, pass a function to the `subscribeToRequestHook` or `subscribeToResponseHook` methods of an `EasyPostClient` object: + +```java + EasyPostClient client = new EasyPostClient(System.getenv("EASYPOST_API_KEY")); + + // For request hook custom function, make sure you have RequestHookResponses in the parameter + public static Object requestHookFunction(RequestHookResponses data) { + // Pass your code here, the information about the request/response is available within the data parameter. + return true; + } + + client.subscribeToRequestHook(requestHookFunction); // subscribe to request hook by passing your custom function + client.unsubscribeToRequestHook(requestHookFunction); // unsubscribe from request hook + + // For response hook custom function, make sure you have ResponseHookResponses in the parameter + public static Object responseHookFunction(ResponseHookResponses data) { + // Pass your code here, the information about the request/response is available within the data parameter. + return true; + } + + client.subscribeToResponseHook(responseHookFunction); // subscribe to response hook by passing your custom function + client.unsubscribeToResponseHook(responseHookFunction); // unsubscribe from response hook +``` + ## Documentation -API Documentation can be found at: . +API documentation can be found at: . + +Library documentation can be found on the web at: or by building them locally via the `just docs` command. Upgrading major versions of this project? Refer to the [Upgrade Guide](UPGRADE_GUIDE.md). +## Support + +New features and bug fixes are released on the latest major release of this library. If you are on an older major release of this library, we recommend upgrading to the most recent release to take advantage of new features, bug fixes, and security patches. Older versions of this library will continue to work and be available as long as the API version they are tied to remains active; however, they will not receive updates and are considered EOL. + +For additional support, see our [org-wide support policy](https://github.com/EasyPost/.github/blob/main/SUPPORT.md). + ## Development ### Tests ```bash +# Install dependencies +just install + # Build project -make build +just build # Lint project -make lint +just lint # Run tests -EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... make test - -# Run tests with coverage -EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... make coverage +EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... just build test +EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... just coverage # Run security analysis -make scan +just scan + +# Generate library documentation +just docs # Update submodules -git submodule init -git submodule update --remote +just update-examples-submodule ``` ### Testing @@ -133,4 +180,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/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. diff --git a/UPGRADE_GUIDE.md b/UPGRADE_GUIDE.md index 370b617ac..22efd4799 100644 --- a/UPGRADE_GUIDE.md +++ b/UPGRADE_GUIDE.md @@ -2,22 +2,238 @@ 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 7.x to 8.x](#upgrading-from-7x-to-80) +- [Upgrading from 6.x to 7.x](#upgrading-from-6x-to-70) +- [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 7.x to 8.0 + +### 8.0 High Impact Changes + +- [Error Parsing](#80-error-parsing) + +### 8.0 Medium Impact Changes + +- [Deprecations](#80-deprecations) + +## 8.0 Error Parsing + +*Likelihood of Impact: **High*** + +The `errors` key of an error response can return either a list of `FieldError` objects or a list of strings. The error parsing has been expanded to include both formats. As such, you will now need to check for the format of the `errors` field and handle the errors appropriately for the type that is returned. + +The `Error` model has been removed since it is unused and we directly assign properties of an error response to the `ApiError` type. + +The `BetaPaymentRefund` now uses a list of `FieldError` instead of `Error` for the `errors` field. + +See the `CHANGELOG` for more details. + +## 8.0 Deprecations + +*Likelihood of Impact: **Medium*** + +The following functions have changed: + +- Removed deprecated functions + - `paymentMethod.all` (use `billing.retrievePaymentMethods` instead) + - `user.apiKeys` (use `apiKey.retrieveApiKeysForUser` instead) +- Changed deprecated functions + - `shipment.lowestSmartRate` (3rd param expects a valid `SmartRateAccuracy`) + - `utilities.findLowestSmartRate` (3rd param expects a valid `SmartRateAccuracy`) +- Renames + - `SmartrateAccuracy` is now `SmartRateAccuracy` + - `SmartrateCollection` is now `SmartRateCollection` + - `shipment.smartrates` is now `shipment.smartRates` + - `TimeInTransit.getBySmartrateAccuracy` is now `TimeInTransit.getSmartRateAccuracy` + +## Upgrading from 6.x to 7.0 + +**NOTICE:** v7 is deprecated. + +### 7.0 High Impact Changes + +- [Carbon Offset Removed](#70-carbon-offset-removed) + +### 7.0 Low Impact Changes + +- [createAndBuy() Batch Function Removed](#70-createandbuy-batch-function-removed) +- [Change return type of all() function in webhook service](#70-change-return-type-of-all-function-in-webhook-service) + +### 7.0 Carbon Offset Removed + +EasyPost now offers Carbon Neutral shipments by default for free! Because of this, there is no longer a need to specify if you want to offset the carbon footprint of a shipment. The `withCarbonOffset` parameter of the `create`, `buy`, and `regenerateRates` shipment functions have been removed as a result, as well as the overload functions that have `withCarbonOffset` parameter. This is a high-impact change for those using `EndShippers` as the function interfaces have changed. You will need to inspect the callsites to create and buy shipments to ensure that the EndShipper parameter is being passed in the correct place now that the `withCarbonOffset` parameter has been removed. + +### 7.0 createAndBuy Batch Function Removed + +The `createAndBuy` Batch endpoint has been deprecated and removed from the library. The correct procedure is to first create a batch and then purchase it with two separate API calls. + +### 7.0 Change return type of all function in webhook service + +The return type of `all` function in webhook service has been changed from `WebhookCollection` to `a list of webhooks`, the reason of this change is this endpoint returns a unpaginated list of webhooks. Therefore, there is no need to have `WebhookCollection` class which wraps the list of webhooks. + +## Upgrading from 5.x to 6.0 + +**NOTICE:** v6 is deprecated. + +### 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 +**NOTICE:** v5 is deprecated. + +[v5 Docs](https://github.com/EasyPost/examples/tree/master/official/docs/java/v5) + ### 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/VERSION b/VERSION index 509b0b618..acd405b1d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.10.0 +8.6.0 diff --git a/easypost_java_style.xml b/easypost_java_style.xml deleted file mode 100644 index 939b2d774..000000000 --- a/easypost_java_style.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples b/examples index 4c5bab1d6..739f96c80 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 4c5bab1d67fbed8220e9db33751558be46fb7fb8 +Subproject commit 739f96c80fa211060e0a0b8c13e7371c9a09d66f diff --git a/justfile b/justfile new file mode 100644 index 000000000..591f8d820 --- /dev/null +++ b/justfile @@ -0,0 +1,68 @@ +## Builds the project for development +build: + mvn install -DskipTests=true -Dgpg.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true -Djacoco.skip=true + +## Cleans the project +clean: + mvn clean + +## Test (and build) the project to generate a coverage report +coverage: + mvn test -Dgpg.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true jacoco:report + +## Check if project follows CheckStyle rules (must run install-checkstyle first) +checkstyle: + java -jar checkstyle.jar src -c examples/style_guides/java/easypost_java_style.xml -d + +## Generates library documentation +docs: + mvn install -DskipTests=true -Dgpg.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djacoco.skip=true + cp -R target/reports/apidocs/ ./docs/ + +## Install the Checkstyle tool (Unix only) +install-checkstyle: install-styleguide + curl -LJs https://github.com/checkstyle/checkstyle/releases/download/checkstyle-10.3.1/checkstyle-10.3.1-all.jar -o checkstyle.jar + +## Install style guides +install-styleguide: init-examples-submodule + sh examples/symlink_directory_files.sh examples/style_guides/java . + +## Initialize the examples submodule +init-examples-submodule: + git submodule init + git submodule update + +## Install requirements +install: install-checkstyle + +## Lints the project +lint: checkstyle + +## Publish a release of the project (will build the project via the `mvn deploy` command) +# pass= - The GPG password to sign the release +publish pass: + mvn clean deploy -Dgpg.passphrase={{pass}} + +## Build the project as a dry run to publishing (will build the project via the `mvn install` command) +# pass= - The GPG password to sign the release +publish-dry pass: + mvn clean install -Dgpg.passphrase={{pass}} + +## Cuts a release for the project on GitHub (requires GitHub CLI) +# tag = The associated tag title of the release +# target = Target branch or full commit SHA +release tag target: + gh release create {{tag}} target/*.jar target/*.asc target/*.pom --target {{target}} + +## Test the project +test: + mvn test -Dgpg.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true -Djacoco.skip=true + +## Test the project on CI (does not rebuild the project) +test-ci: + mvn surefire:test + +## Update the examples submodule +update-examples-submodule: + git submodule init + git submodule update --remote diff --git a/pom.xml b/pom.xml index 61a210aad..643345c3b 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.easypost easypost-api-client - 5.10.0 + 8.6.0 jar com.easypost:easypost-api-client @@ -36,39 +36,54 @@ + + org.mockito + mockito-inline + + 4.11.0 + test + com.google.code.gson gson - 2.8.9 + 2.12.1 + compile - org.assertj - assertj-core - 3.22.0 - test + com.google.errorprone + error_prone_core + 2.36.0 + provided org.junit.jupiter junit-jupiter - 5.8.2 + 5.11.4 test org.hamcrest hamcrest - 2.2 + 3.0 test org.jetbrains annotations - 23.0.0 + 26.0.2 + compile com.easypost easyvcr - 0.3.0 - compile + 0.5.2 + test + + + org.projectlombok + lombok + 1.18.42 + provided @@ -80,16 +95,17 @@ ossrh - https://oss.sonatype.org/content/repositories/snapshots + https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2 + https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2 UTF-8 UTF-8 + 8 @@ -104,18 +120,23 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M3 + 3.1.0 - junit.jupiter.execution.order.random.seed=99 - + junit.jupiter.execution.order.random.seed=99 org.jacoco jacoco-maven-plugin - 0.8.8 + 0.8.12 + + + + **/model/** + + @@ -129,12 +150,32 @@ report + + jacoco-check + + check + + + + + BUNDLE + + + LINE + COVEREDRATIO + 0.87 + + + + + + org.apache.maven.plugins maven-source-plugin - 3.2.0 + 3.3.1 attach-sources @@ -152,7 +193,7 @@ -html true - 3.3.1 + 3.11.2 attach-javadocs @@ -165,7 +206,14 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 3.2.7 + + + + --pinentry-mode + loopback + + sign-artifacts @@ -179,27 +227,57 @@ org.apache.maven.plugins maven-compiler-plugin - 3.9.0 + 3.13.0 - 1.8 - 1.8 + 8 + UTF-8 + true + + -XDcompilePolicy=simple + -Xplugin:ErrorProne + --should-stop=ifError=FLOW + -Xlint:-options + -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.36.0 + + + org.projectlombok + lombok + 1.18.42 + + + org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.7.0 true ossrh - https://oss.sonatype.org/ + https://ossrh-staging-api.central.sonatype.com true org.codehaus.mojo templating-maven-plugin - 1.0.0 + 3.0.0 filtering-java-templates @@ -212,12 +290,19 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.1.2 + 3.6.0 + + ${basedir}/easypost_java_style.xml + UTF-8 + true + true + com.puppycrawl.tools checkstyle - 9.2.1 + + 9.3 @@ -225,12 +310,6 @@ validate validate - - ${basedir}/easypost_java_style.xml - UTF-8 - true - true - check @@ -240,7 +319,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0 + 3.5.0 enforce-java @@ -257,22 +336,6 @@ - - org.owasp - dependency-check-maven - 7.1.1 - - 7 - 7 - - - - - check - - - - diff --git a/src/main/java-templates/com/easypost/EasyPost.java b/src/main/java-templates/com/easypost/EasyPost.java index 5e30b8773..ffd985099 100644 --- a/src/main/java-templates/com/easypost/EasyPost.java +++ b/src/main/java-templates/com/easypost/EasyPost.java @@ -1,6 +1,7 @@ package com.easypost; -import com.easypost.easyvcr.VCR; +import javax.net.ssl.HttpsURLConnection; +import java.util.function.Function; /** * Hello weary traveler, welcome to the EasyPost Java client library. @@ -8,12 +9,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. @@ -30,15 +32,11 @@ 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. *

* NOTE: This is meant for unit testing purposes only. Do not use in production. */ - public static VCR _vcr = null; + public static Function _vcrUrlFunction = null; } diff --git a/src/main/java/com/easypost/Constants.java b/src/main/java/com/easypost/Constants.java new file mode 100644 index 000000000..cbd00f208 --- /dev/null +++ b/src/main/java/com/easypost/Constants.java @@ -0,0 +1,94 @@ +package com.easypost; + +import java.util.HashMap; +import java.util.List; + +import com.easypost.exception.APIException; +import com.easypost.http.HashMapSerializer; +import com.easypost.model.AddressVerification; +import com.easypost.model.AddressVerificationDeserializer; +import com.easypost.model.ErrorDeserializer; +import com.easypost.model.SmartRateCollection; +import com.easypost.model.SmartRateCollectionDeserializer; +import com.easypost.model.StatelessRate; +import com.easypost.model.StatelessRateDeserializer; +import com.easypost.model.Webhook; +import com.easypost.model.WebhookDeserializer; +import com.google.common.collect.ImmutableList; +import com.google.gson.FieldNamingPolicy; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +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 static final String NO_MORE_PAGES_TO_RETRIEVE = "There are no more pages to retrieve."; + } + + 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 BAD_REQUEST_ERROR = 400; + 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_ACCOUNT_TYPES_WITH_CUSTOM_WORKFLOW = ImmutableList.of( + "FedexAccount", "FedexSmartpostAccount"); + + public static final List CARRIER_ACCOUNT_TYPES_WITH_CUSTOM_OAUTH = ImmutableList.of( + "AmazonShippingAccount", "UpsAccount", "UpsMailInnovationsAccount", "UpsSurepostAccount", + "UspsShipAccount"); + } + + 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() + // Standard model deserializer + .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) + // Core (de)serializers + .registerTypeAdapter(HashMap.class, new HashMapSerializer()) + .registerTypeAdapter(APIException.class, new ErrorDeserializer()) + // Model custom deserializers + .registerTypeAdapter(AddressVerification.class, new AddressVerificationDeserializer()) + .registerTypeAdapter(SmartRateCollection.class, new SmartRateCollectionDeserializer()) + .registerTypeAdapter(StatelessRate[].class, new StatelessRateDeserializer()) + .registerTypeAdapter(Webhook[].class, new WebhookDeserializer()) + .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/API/BadRequestError.java b/src/main/java/com/easypost/exception/API/BadRequestError.java new file mode 100644 index 000000000..becea3047 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/BadRequestError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class BadRequestError extends APIException { + /** + * BadRequestError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public BadRequestError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} 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..772b1daae --- /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.APIException; + +public class EncodingError extends APIException { + /** + * 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/ExternalApiError.java b/src/main/java/com/easypost/exception/API/ExternalApiError.java new file mode 100644 index 000000000..1b39c7450 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/ExternalApiError.java @@ -0,0 +1,14 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +public class ExternalApiError extends APIException { + /** + * ExternalApiError constructor. + * + * @param message the exception message + */ + public ExternalApiError(final String message) { + super(message); + } +} 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..bb6165365 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/ForbiddenError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class ForbiddenError extends APIException { + /** + * ForbiddenError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public ForbiddenError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} 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..3592e218e --- /dev/null +++ b/src/main/java/com/easypost/exception/API/GatewayTimeoutError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class GatewayTimeoutError extends APIException { + /** + * GatewayTimeoutError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public GatewayTimeoutError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} 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..bbb5a5bdb --- /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.APIException; + +public class HttpError extends APIException { + /** + * 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/InternalServerError.java b/src/main/java/com/easypost/exception/API/InternalServerError.java new file mode 100644 index 000000000..a8b6e0769 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/InternalServerError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class InternalServerError extends APIException { + /** + * InternalServerError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public InternalServerError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} 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..69b770831 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/InvalidRequestError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class InvalidRequestError extends APIException { + /** + * InvalidRequestError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public InvalidRequestError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} 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..f33821654 --- /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.APIException; + +public class JsonError extends APIException { + /** + * 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/MethodNotAllowedError.java b/src/main/java/com/easypost/exception/API/MethodNotAllowedError.java new file mode 100644 index 000000000..a72b643eb --- /dev/null +++ b/src/main/java/com/easypost/exception/API/MethodNotAllowedError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class MethodNotAllowedError extends APIException { + /** + * MethodNotAllowedError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public MethodNotAllowedError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} 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..7722d2693 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/NotFoundError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class NotFoundError extends APIException { + /** + * NotFoundError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public NotFoundError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} 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..0ee85bfb0 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/PaymentError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class PaymentError extends APIException { + /** + * PaymentError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public PaymentError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} 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..4e3d67c6a --- /dev/null +++ b/src/main/java/com/easypost/exception/API/RateLimitError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class RateLimitError extends APIException { + /** + * RateLimitError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public RateLimitError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} 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..7de23bf51 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/RedirectError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class RedirectError extends APIException { + /** + * RedirectError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public RedirectError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} diff --git a/src/main/java/com/easypost/exception/API/ServiceUnavailableError.java b/src/main/java/com/easypost/exception/API/ServiceUnavailableError.java new file mode 100644 index 000000000..fe13a6e23 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/ServiceUnavailableError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class ServiceUnavailableError extends APIException { + /** + * ServiceUnavailablError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public ServiceUnavailableError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} 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..239966ad5 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/TimeoutError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class TimeoutError extends APIException { + /** + * TimeoutError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public TimeoutError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} 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..9fcee9262 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/UnauthorizedError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class UnauthorizedError extends APIException { + /** + * UnauthorizedError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public UnauthorizedError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} 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..6a1796b12 --- /dev/null +++ b/src/main/java/com/easypost/exception/API/UnknownApiError.java @@ -0,0 +1,19 @@ +package com.easypost.exception.API; + +import com.easypost.exception.APIException; + +import java.util.List; + +public class UnknownApiError extends APIException { + /** + * UnknownApiError constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public UnknownApiError(final String message, final String code, List errors, final int statusCode) { + super(message, code, errors, statusCode); + } +} 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/APIException.java b/src/main/java/com/easypost/exception/APIException.java new file mode 100644 index 000000000..991a783c1 --- /dev/null +++ b/src/main/java/com/easypost/exception/APIException.java @@ -0,0 +1,108 @@ +package com.easypost.exception; + +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, null, null, 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 errors the errors array + */ + public APIException(final String message, final String code, final List errors) { + this(message, code, errors, null, null); + } + + /** + * APIException constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + */ + public APIException(final String message, final String code, final List errors, final Integer statusCode) { + this(message, code, errors, statusCode, null); + } + + /** + * APIException constructor. + * + * @param message the exception message + * @param code the exception code + * @param errors the errors array + * @param statusCode the exception status code + * @param ex the exception cause + */ + public APIException(final String message, final String code, final List errors, + final Integer statusCode, final Throwable ex) { + super(message); + this.message = message; + this.code = code; + this.errors = errors; + this.statusCode = statusCode; + } + + /** + * 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 + */ + @Override + 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 146e648b7..2e396ad41 100644 --- a/src/main/java/com/easypost/exception/EasyPostException.java +++ b/src/main/java/com/easypost/exception/EasyPostException.java @@ -1,57 +1,14 @@ -/** - * EasyPostException.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; public class EasyPostException extends Exception { - private static final long serialVersionUID = 1L; - private final String param; - - /** - * Get the parameter name. - * - * @return the parameter name - */ - public String getParam() { - return param; - } /** - * Constructor. + * EasyPostException constructor. * * @param message the exception message */ public EasyPostException(final String message) { - super(message, null); - this.param = null; - } - - /** - * Constructor. - * - * @param message the exception message - * @param ex the exception cause - */ - public EasyPostException(final String message, final Throwable ex) { - super(message, ex); - this.param = null; - } - - /** - * Constructor. - * - * @param message the exception message - * @param param the parameter name - * @param ex the exception cause - */ - public EasyPostException(final String message, final String param, final Throwable ex) { - super(message, ex); - this.param = param; + super(message); } } diff --git a/src/main/java/com/easypost/exception/General/EndOfPaginationError.java b/src/main/java/com/easypost/exception/General/EndOfPaginationError.java new file mode 100644 index 000000000..2adbb98df --- /dev/null +++ b/src/main/java/com/easypost/exception/General/EndOfPaginationError.java @@ -0,0 +1,13 @@ +package com.easypost.exception.General; + +import com.easypost.Constants; +import com.easypost.exception.EasyPostException; + +public class EndOfPaginationError extends EasyPostException { + /** + * EndOfPaginationError constructor. + */ + public EndOfPaginationError() { + super(Constants.ErrorMessages.NO_MORE_PAGES_TO_RETRIEVE); + } +} 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..96674e81f --- /dev/null +++ b/src/main/java/com/easypost/exception/General/InvalidParameterError.java @@ -0,0 +1,15 @@ +package com.easypost.exception.General; + +import com.easypost.Constants; +import com.easypost.exception.EasyPostException; + +public class InvalidParameterError extends EasyPostException{ + /** + * InvalidParameterError constructor. + * + * @param parameterName the name of the invalid parameter + */ + public InvalidParameterError(final String parameterName) { + super(String.format(Constants.ErrorMessages.INVALID_PARAMETER, parameterName)); + } +} 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..86786cfb7 --- /dev/null +++ b/src/main/java/com/easypost/exception/General/MissingParameterError.java @@ -0,0 +1,15 @@ +package com.easypost.exception.General; + +import com.easypost.Constants; +import com.easypost.exception.EasyPostException; + +public class MissingParameterError extends EasyPostException { + /** + * MissingParameterError constructor. + * + * @param parameterName the name of the missing parameter + */ + public MissingParameterError(final String parameterName) { + super(String.format(Constants.ErrorMessages.MISSING_REQUIRED_PARAMETER, parameterName)); + } +} 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/hooks/RequestHook.java b/src/main/java/com/easypost/hooks/RequestHook.java new file mode 100644 index 000000000..1b5cafedf --- /dev/null +++ b/src/main/java/com/easypost/hooks/RequestHook.java @@ -0,0 +1,36 @@ +package com.easypost.hooks; + +import java.util.function.Function; +import java.util.ArrayList; +import java.util.List; + +public class RequestHook { + private List> eventHandlers = new ArrayList<>(); + + /** + * Add a function to the list of event handlers. + * @param handler The event handler function to be added. + */ + public void addEventHandler(Function handler) { + eventHandlers.add(handler); + } + + /** + * Remove a function to the list of event handlers. + * @param handler The event handler function to be removed. + */ + public void removeEventHandler(Function handler) { + eventHandlers.remove(handler); + } + + /** + * Execute all the functions from the event handlers. + * @param datas The datas from the hooks. + */ + public void executeEventHandler(RequestHookResponses datas) { + for (Function eventHandler : eventHandlers) { + @SuppressWarnings("unused") + Object result = eventHandler.apply(datas); + } + } +} diff --git a/src/main/java/com/easypost/hooks/RequestHookResponses.java b/src/main/java/com/easypost/hooks/RequestHookResponses.java new file mode 100644 index 000000000..966408ad2 --- /dev/null +++ b/src/main/java/com/easypost/hooks/RequestHookResponses.java @@ -0,0 +1,38 @@ +package com.easypost.hooks; + +import java.util.Map; + +import com.google.gson.JsonObject; + +import lombok.Getter; +import lombok.Setter; + +@Setter @Getter +public class RequestHookResponses { + private Map headers; + private String method; + private String path; + private JsonObject requestBody; + private String requestTimestamp; + private String requestUuid; + + /** + * RequestHookResponses constructor. + * + * @param headers The headers of the request. + * @param method The HTTP method of the request. + * @param path The path of the request. + * @param requestBody The JSON object representing the request body. + * @param requestTimestamp The timestamp of the request. + * @param requestUuid The UUID of the request. + */ + public RequestHookResponses(Map headers, String method, String path, JsonObject requestBody, + String requestTimestamp, String requestUuid) { + this.headers = headers; + this.method = method; + this.path = path; + this.requestBody = requestBody; + this.requestTimestamp = requestTimestamp; + this.requestUuid = requestUuid; + } +} diff --git a/src/main/java/com/easypost/hooks/ResponseHook.java b/src/main/java/com/easypost/hooks/ResponseHook.java new file mode 100644 index 000000000..47d0452c6 --- /dev/null +++ b/src/main/java/com/easypost/hooks/ResponseHook.java @@ -0,0 +1,36 @@ +package com.easypost.hooks; + +import java.util.function.Function; +import java.util.ArrayList; +import java.util.List; + +public class ResponseHook { + private List> eventHandlers = new ArrayList<>(); + + /** + * Add a function to the list of event handlers. + * @param handler The event handler function to be added. + */ + public void addEventHandler(Function handler) { + eventHandlers.add(handler); + } + + /** + * Remove a function to the list of event handlers. + * @param handler The event handler function to be removed. + */ + public void removeEventHandler(Function handler) { + eventHandlers.remove(handler); + } + + /** + * Execute all the functions from the event handlers. + * @param datas The datas from the hooks. + */ + public void executeEventHandler(ResponseHookResponses datas) { + for (Function eventHandler : eventHandlers) { + @SuppressWarnings("unused") + Object result = eventHandler.apply(datas); + } + } +} diff --git a/src/main/java/com/easypost/hooks/ResponseHookResponses.java b/src/main/java/com/easypost/hooks/ResponseHookResponses.java new file mode 100644 index 000000000..8c4e65a65 --- /dev/null +++ b/src/main/java/com/easypost/hooks/ResponseHookResponses.java @@ -0,0 +1,42 @@ +package com.easypost.hooks; + +import java.util.Map; + +import lombok.Getter; +import lombok.Setter; + +@Setter @Getter +public class ResponseHookResponses { + private int httpStatus; + private Map headers; + private String method; + private String path; + private String responseBody; + private String responseTimestamp; + private String requestTimestamp; + private String requestUuid; + + /** + * ResponseHookResponses constructor. + * + * @param httpStatus The HTTP status code of the response. + * @param headers The headers of the response. + * @param method The HTTP method of the request. + * @param path The path of the request. + * @param responseBody The response body as a string. + * @param responseTimestamp The timestamp of the response. + * @param requestTimestamp The timestamp of the corresponding request. + * @param requestUuid The UUID of the corresponding request. + */ + public ResponseHookResponses(int httpStatus, Map headers, String method, String path, + String responseBody, String responseTimestamp, String requestTimestamp, String requestUuid) { + this.httpStatus = httpStatus; + this.headers = headers; + this.method = method; + this.path = path; + this.responseBody = responseBody; + this.responseTimestamp = responseTimestamp; + this.requestTimestamp = requestTimestamp; + this.requestUuid = requestUuid; + } +} diff --git a/src/main/java/com/easypost/model/beta/package-info.java b/src/main/java/com/easypost/hooks/package-info.java similarity index 64% rename from src/main/java/com/easypost/model/beta/package-info.java rename to src/main/java/com/easypost/hooks/package-info.java index 5e3884cde..17ee3aca4 100644 --- a/src/main/java/com/easypost/model/beta/package-info.java +++ b/src/main/java/com/easypost/hooks/package-info.java @@ -1,9 +1,9 @@ /** - * Custom exception classes for the EasyPost API. + * Custom hook classes for the EasyPost API. * * @author EasyPost developers * @version 1.0 * @see EasyPost API documentation * @since 1.0 */ -package com.easypost.model.beta; +package com.easypost.hooks; diff --git a/src/main/java/com/easypost/http/EasyPostResponse.java b/src/main/java/com/easypost/http/EasyPostResponse.java new file mode 100644 index 000000000..b1864924f --- /dev/null +++ b/src/main/java/com/easypost/http/EasyPostResponse.java @@ -0,0 +1,20 @@ +package com.easypost.http; + +import lombok.Getter; + +@Getter +public class EasyPostResponse { + private int responseCode; + private String responseBody; + + /** + * Constructor. + * + * @param responseCode HTTP response code + * @param responseBody HTTP response body + */ + public EasyPostResponse(final int responseCode, final String responseBody) { + this.responseCode = responseCode; + this.responseBody = 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/http/Requestor.java b/src/main/java/com/easypost/http/Requestor.java new file mode 100644 index 000000000..5c3592e7f --- /dev/null +++ b/src/main/java/com/easypost/http/Requestor.java @@ -0,0 +1,770 @@ +package com.easypost.http; + +import com.easypost.Constants; +import com.easypost.EasyPost; +import com.easypost.exception.APIException; +import com.easypost.exception.API.BadRequestError; +import com.easypost.exception.API.EncodingError; +import com.easypost.exception.API.ForbiddenError; +import com.easypost.exception.API.GatewayTimeoutError; +import com.easypost.exception.API.HttpError; +import com.easypost.exception.API.InternalServerError; +import com.easypost.exception.API.InvalidRequestError; +import com.easypost.exception.API.JsonError; +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.ServiceUnavailableError; +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.hooks.RequestHookResponses; +import com.easypost.hooks.ResponseHookResponses; +import com.easypost.model.EasyPostResource; +import com.easypost.service.EasyPostClient; +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; +import java.io.OutputStream; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLEncoder; +import java.net.URLStreamHandler; +import java.nio.charset.Charset; +import java.time.Instant; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Scanner; +import java.util.UUID; + +public abstract class Requestor { + public enum RequestMethod { + GET, + POST, + DELETE, + PUT + } + + 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 String urlEncodePair(final String key, final String value) throws UnsupportedEncodingException { + 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 When the request fails. + */ + private static Map generateHeaders(String apiKey) throws MissingParameterError { + Map headers = new HashMap(); + 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)); + + 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(' ', '-'); + } + + /** + * 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 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, + 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); + Constructor constructor = clazz.getConstructor(); + URLStreamHandler customHandler = constructor.newInstance(); + URL urlObj = new URL(null, url, customHandler); + conn = (javax.net.ssl.HttpsURLConnection) urlObj.openConnection(); + } catch (ClassNotFoundException | SecurityException | NoSuchMethodException | IllegalArgumentException + | InstantiationException | IllegalAccessException | InvocationTargetException e) { + throw new IOException(e); + } + } else if (EasyPost._vcrUrlFunction != null) { + conn = EasyPost._vcrUrlFunction.apply(url); + } else { + URL urlObj = new URL(null, url); + conn = (javax.net.ssl.HttpsURLConnection) urlObj.openConnection(); + } + conn.setConnectTimeout(client.getConnectionTimeoutMilliseconds()); + conn.setRequestMethod(method); + conn.setReadTimeout(client.getReadTimeoutMilliseconds()); + + conn.setUseCaches(false); + 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 When the request fails. + */ + private static javax.net.ssl.HttpsURLConnection writeBody(final javax.net.ssl.HttpsURLConnection conn, + final JsonObject body) throws IOException { + if (body != null) { + conn.setDoOutput(true); + conn.setRequestProperty("Content-Type", "application/json"); + OutputStream output = null; + try { + output = conn.getOutputStream(); + String jsonString = body.toString(); + output.write(jsonString.getBytes(Constants.Http.CHARSET)); + } finally { + if (output != null) { + output.close(); + } + } + } + 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 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) + throws IOException, MissingParameterError { + String getURL = url; + if (query != null) { + getURL = String.format("%s?%s", url, query); + } + return createEasyPostConnection(getURL, client, "GET"); + } + + /** + * 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 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) + 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 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) + throws IOException, MissingParameterError { + String deleteUrl = url; + if (query != null) { + deleteUrl = String.format("%s?%s", url, query); + } + return createEasyPostConnection(deleteUrl, client, "DELETE"); + } + + /** + * 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 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) + 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 = Constants.Http.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 When the request fails. + */ + private static String createQuery(final Map params) throws UnsupportedEncodingException { + Map flatParams = flattenParams(params); + StringBuilder queryStringBuilder = new StringBuilder(); + for (Map.Entry entry : flatParams.entrySet()) { + queryStringBuilder.append("&"); + queryStringBuilder.append(urlEncodePair(entry.getKey(), entry.getValue())); + } + if (queryStringBuilder.length() > 0) { + queryStringBuilder.deleteCharAt(0); + } + return queryStringBuilder.toString(); + } + + private static Map flattenParams(final Map params) { + if (params == null) { + return new HashMap(); + } + Map flatParams = new HashMap(); + for (Map.Entry entry : params.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + if (value instanceof Map) { + Map flatNestedMap = new HashMap(); + Map nestedMap = (Map) value; + for (Map.Entry nestedEntry : nestedMap.entrySet()) { + flatNestedMap.put(String.format("%s[%s]", key, nestedEntry.getKey()), nestedEntry.getValue()); + } + flatParams.putAll(flattenParams(flatNestedMap)); + } else if (value instanceof List) { + Map flatNestedMap = new HashMap(); + List nestedList = (List) value; + for (int i = 0; i < nestedList.size(); i++) { + flatNestedMap.put(String.format("%s[%s]", key, i), nestedList.get(i)); + flatParams.putAll(flattenParams(flatNestedMap)); + } + } else if (value instanceof EasyPostResource) { + flatParams.put(String.format("%s[%s]", key, "id"), value.toString()); + + } else if (value != null) { + flatParams.put(key, value.toString()); + } + } + + return flatParams; + } + + /** + * Get response body from the InputStream. + * + * @param responseStream The InputStream from the response body. + * @return InputStream in string value. + * @throws IOException When the request fails. + */ + 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, Constants.Http.CHARSET).useDelimiter("\\A").next(); + responseStream.close(); + 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 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 HttpError { + javax.net.ssl.HttpsURLConnection conn = null; + try { + switch (method) { + case GET: + conn = createGetConnection(url, query, client); + break; + case POST: + conn = createPostConnection(url, body, client); + break; + case PUT: + conn = createPutConnection(url, body, client); + break; + case DELETE: + conn = createDeleteConnection(url, query, client); + break; + default: + throw new HttpError( + String.format("Unrecognized HTTP method %s. Please contact EasyPost at %s.", method, + Constants.EASYPOST_SUPPORT_EMAIL)); + } + conn.connect(); // This line is crucial for getting VCR to work + // (triggers internal pre-request processing needed for VCR) + int rCode = conn.getResponseCode(); // sends the request + String rBody = null; + if (rCode == HttpURLConnection.HTTP_NO_CONTENT) { + rBody = ""; + } else if (rCode >= HttpURLConnection.HTTP_OK && rCode < HttpURLConnection.HTTP_MULT_CHOICE) { + rBody = getResponseBody(conn.getInputStream()); + } else { + 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 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 { + if (conn != null) { + conn.disconnect(); + } + } + } + + /** + * Send an HTTP request to EasyPost. + * + * @param Any class. + * @param method The method of the API request. + * @param endpoint The endpoint 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 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 MissingParameterError when the request client doesn't have API key. + * @throws TimeoutError when the request times out. + * @throws BadRequestError when the request is bad. + * @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, final String endpoint, final Map params, + final Class clazz, final EasyPostClient client) + throws GatewayTimeoutError, RateLimitError, BadRequestError, InvalidRequestError, NotFoundError, + TimeoutError, EncodingError, + UnauthorizedError, MethodNotAllowedError, InternalServerError, UnknownApiError, ServiceUnavailableError, + ForbiddenError, JsonError, HttpError, RedirectError, PaymentError, MissingParameterError { + String apiVersion = client.getApiVersion(); + return request(method, endpoint, params, clazz, client, apiVersion); + } + + /** + * Send an HTTP request to EasyPost. + * + * @param Any class. + * @param method The method of the API request. + * @param endpoint The endpoint 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. + * @param apiVersion The API version to use for this request. + * @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 MissingParameterError when the request client doesn't have API key. + * @throws TimeoutError when the request times out. + * @throws BadRequestError when the request is bad. + * @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, final String endpoint, final Map params, + final Class clazz, final EasyPostClient client, final String apiVersion) + throws EncodingError, JsonError, RedirectError, UnauthorizedError, ForbiddenError, PaymentError, + NotFoundError, MethodNotAllowedError, TimeoutError, BadRequestError, InvalidRequestError, RateLimitError, + InternalServerError, ServiceUnavailableError, GatewayTimeoutError, UnknownApiError, HttpError, + MissingParameterError { + String originalDNSCacheTTL = null; + boolean allowedToSetTTL = true; + String url = client.getApiBase() + "/" + apiVersion + "/" + endpoint; + + try { + originalDNSCacheTTL = java.security.Security.getProperty(DNS_CACHE_TTL_PROPERTY_NAME); + // disable DNS cache + java.security.Security.setProperty(DNS_CACHE_TTL_PROPERTY_NAME, "0"); + } catch (SecurityException se) { + allowedToSetTTL = false; + } + + try { + return httpRequest(method, url, params, clazz, client); + } finally { + if (allowedToSetTTL) { + if (originalDNSCacheTTL == null) { + // value unspecified by implementation + java.security.Security.setProperty(DNS_CACHE_TTL_PROPERTY_NAME, "-1"); // cache forever + } else { + java.security.Security.setProperty(DNS_CACHE_TTL_PROPERTY_NAME, originalDNSCacheTTL); + } + } + } + } + + /** + * 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 clazz-type object. + * @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 MissingParameterError when the request client doesn't have API key. + * @throws TimeoutError when the request times out. + * @throws BadRequestError when the request is bad. + * @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. + */ + @SuppressWarnings("checkstyle:methodname") + private static T httpRequest(final RequestMethod method, final String url, final Map params, + final Class clazz, final EasyPostClient client) + throws EncodingError, JsonError, RedirectError, UnauthorizedError, ForbiddenError, PaymentError, + NotFoundError, MethodNotAllowedError, TimeoutError, BadRequestError, InvalidRequestError, RateLimitError, + InternalServerError, ServiceUnavailableError, GatewayTimeoutError, UnknownApiError, HttpError, + MissingParameterError { + String query = null; + JsonObject body = null; + if (params != null) { + switch (method) { + case GET: + case DELETE: + try { + query = createQuery(params); + } catch (UnsupportedEncodingException e) { + throw new EncodingError( + String.format("Unable to encode parameters to %s. Please email %s for assistance.", + Constants.Http.CHARSET, Constants.EASYPOST_SUPPORT_EMAIL), + e); + } + break; + case POST: + case PUT: + try { + body = createBody(params); + } catch (Exception e) { + throw new JsonError(String.format( + "Unable to create JSON body from parameters. Please email %s for assistance.", + Constants.EASYPOST_SUPPORT_EMAIL), e); + } + break; + default: + break; + } + } + Instant requestTimestamp = Instant.now(); + UUID requestUuid = UUID.randomUUID(); + Map headers = generateHeaders(client.getApiKey()); + + RequestHookResponses requestResponse = new RequestHookResponses(headers, method.toString(), url, body, + requestTimestamp.toString(), requestUuid.toString()); + + client.getRequestHooks().executeEventHandler(requestResponse); + + EasyPostResponse response; + try { + // HTTPSURLConnection verifies SSL cert by default + 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, client); + } else { + throw ce; + } + } + int rCode = response.getResponseCode(); + String rBody = response.getResponseBody(); + + ResponseHookResponses responseHookResponses = new ResponseHookResponses(rCode, headers, method.toString(), url, + rBody, Instant.now().toString(), requestTimestamp.toString(), requestUuid.toString()); + client.getResponseHooks().executeEventHandler(responseHookResponses); + + if (rCode < HttpURLConnection.HTTP_OK || rCode >= HttpURLConnection.HTTP_MULT_CHOICE) { + handleAPIError(rBody, rCode); + } + + return Constants.Http.GSON.fromJson(rBody, clazz); + } + + /** + * Handles API error based on the error status code. + * + * @param rBody Body of the error message. + * @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 BadRequestError when the request is bad. + * @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 RedirectError, UnauthorizedError, ForbiddenError, PaymentError, NotFoundError, MethodNotAllowedError, + TimeoutError, BadRequestError, InvalidRequestError, RateLimitError, InternalServerError, + ServiceUnavailableError, + GatewayTimeoutError, UnknownApiError { + if (rBody == null || rBody.length() == 0) { + rBody = "{}"; + } + APIException error = Constants.Http.GSON.fromJson(rBody, APIException.class); + String errorMessage = error.getMessage(); + String errorCode = error.getCode(); + List errors = error.getErrors(); + + if (rCode >= Constants.ErrorCodes.REDIRECT_CODE_BEGIN && rCode <= Constants.ErrorCodes.REDIRECT_CODE_END) { + throw new RedirectError(errorMessage, errorCode, errors, rCode); + } + + switch (rCode) { + case Constants.ErrorCodes.UNAUTHORIZED_ERROR: + throw new UnauthorizedError(errorMessage, errorCode, errors, rCode); + case Constants.ErrorCodes.FORBIDDEN_ERROR: + throw new ForbiddenError(errorMessage, errorCode, errors, rCode); + case Constants.ErrorCodes.PAYMENT_ERROR: + throw new PaymentError(errorMessage, errorCode, errors, rCode); + case Constants.ErrorCodes.NOT_FOUND_ERROR: + throw new NotFoundError(errorMessage, errorCode, errors, rCode); + case Constants.ErrorCodes.METHOD_NOT_ALLOWED_ERROR: + throw new MethodNotAllowedError(errorMessage, errorCode, errors, rCode); + case Constants.ErrorCodes.TIMEOUT_ERROR: + throw new TimeoutError(errorMessage, errorCode, errors, rCode); + case Constants.ErrorCodes.BAD_REQUEST_ERROR: + throw new BadRequestError(errorMessage, errorCode, errors, rCode); + case Constants.ErrorCodes.INVALID_REQUEST_ERROR: + throw new InvalidRequestError(errorMessage, errorCode, errors, rCode); + case Constants.ErrorCodes.RATE_LIMIT_ERROR: + throw new RateLimitError(errorMessage, errorCode, errors, rCode); + case Constants.ErrorCodes.INTERNAL_SERVER_ERROR: + throw new InternalServerError(errorMessage, errorCode, errors, rCode); + case Constants.ErrorCodes.SERVICE_UNAVAILABLE_ERROR: + throw new ServiceUnavailableError(errorMessage, errorCode, errors, rCode); + case Constants.ErrorCodes.GATEWAY_TIMEOUT_ERROR: + throw new GatewayTimeoutError(errorMessage, errorCode, errors, rCode); + default: + throw new UnknownApiError(errorMessage, errorCode, errors, rCode); + } + } + + /** + * 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 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); + try { + if ((method == RequestMethod.GET || method == RequestMethod.DELETE) && query != null) { + url = String.format("%s?%s", url, query); + } + URL fetchURL = new URL(url); + + Class requestMethodClass = Class.forName("com.google.appengine.api.urlfetch.HTTPMethod"); + Object httpMethod = requestMethodClass.getDeclaredField(method.name()).get(null); + + Class fetchOptionsBuilderClass = Class.forName("com.google.appengine.api.urlfetch.FetchOptions$Builder"); + Object fetchOptions = null; + try { + fetchOptions = fetchOptionsBuilderClass.getDeclaredMethod("validateCertificate").invoke(null); + } catch (NoSuchMethodException e) { + 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", + Constants.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 + fetchOptionsClass.getDeclaredMethod("setDeadline", java.lang.Double.class) + .invoke(fetchOptions, client.getConnectionTimeoutMilliseconds()); + + Class requestClass = Class.forName("com.google.appengine.api.urlfetch.HTTPRequest"); + + Object request = requestClass.getDeclaredConstructor(URL.class, requestMethodClass, fetchOptionsClass) + .newInstance(fetchURL, httpMethod, fetchOptions); + + if ((method == RequestMethod.POST || method == RequestMethod.PUT) && body != null) { + String bodyString = body.toString(); + requestClass.getDeclaredMethod("setPayload", byte[].class) + .invoke(request, bodyString.getBytes(Charset.defaultCharset())); + } + + 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()); + requestClass.getDeclaredMethod("setHeader", httpHeaderClass).invoke(request, reqHeader); + } + + Class urlFetchFactoryClass = Class.forName("com.google.appengine.api.urlfetch.URLFetchServiceFactory"); + Object urlFetchService = urlFetchFactoryClass.getDeclaredMethod("getURLFetchService").invoke(null); + + Method fetchMethod = urlFetchService.getClass().getDeclaredMethod("fetch", requestClass); + fetchMethod.setAccessible(true); + 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), + Constants.Http.CHARSET); + + return new EasyPostResponse(responseCode, responseBody); + + } 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/net/package-info.java b/src/main/java/com/easypost/http/package-info.java similarity index 58% rename from src/main/java/com/easypost/net/package-info.java rename to src/main/java/com/easypost/http/package-info.java index 6ccdfb779..c6868a1ad 100644 --- a/src/main/java/com/easypost/net/package-info.java +++ b/src/main/java/com/easypost/http/package-info.java @@ -3,7 +3,7 @@ * * @author EasyPost developers * @version 1.0 - * @see EasyPost API + * @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 3de21013f..8fe810e50 100644 --- a/src/main/java/com/easypost/model/Address.java +++ b/src/main/java/com/easypost/model/Address.java @@ -1,340 +1,12 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; - -import java.util.HashMap; -import java.util.Map; +import lombok.Getter; +@Getter public final class Address extends BaseAddress { - - private String mode; 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 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. - * - * @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; - } - - /** - * 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 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 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 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 = - request(RequestMethod.POST, String.format("%s/create_and_verify", classURL(Address.class)), - wrappedParams, AddressVerifyResponse.class, apiKey); - - 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. - * - * @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 = - 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(); - } } diff --git a/src/main/java/com/easypost/model/AddressCollection.java b/src/main/java/com/easypost/model/AddressCollection.java index 40ad5ba8b..0073ef07b 100644 --- a/src/main/java/com/easypost/model/AddressCollection.java +++ b/src/main/java/com/easypost/model/AddressCollection.java @@ -1,46 +1,25 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; +import java.util.Map; + +import lombok.Getter; -public final class AddressCollection extends EasyPostResource { +@Getter +public final class AddressCollection extends PaginatedCollection
{ private List
addresses; - private Boolean hasMore; - /** - * Get a list of addresses. - * - * @return List of Address objects - */ - public List
getAddresses() { - return addresses; - } + @Override + protected Map buildNextPageParameters(List
addresses, Integer pageSize) { + String lastId = addresses.get(addresses.size() - 1).getId(); - /** - * Set a list of addresses. - * - * @param addresses List of Address objects - */ - public void setAddresses(final List
addresses) { - this.addresses = addresses; - } + Map parameters = new java.util.HashMap<>(); + parameters.put("before_id", lastId); - /** - * Get whether there are more addresses to retrieve. - * - * @return whether there are more addresses to retrieve - */ - public Boolean getHasMore() { - return hasMore; - } + if (pageSize != null) { + parameters.put("page_size", pageSize); + } - /** - * 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; + return parameters; } } 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..4853b3d82 100644 --- a/src/main/java/com/easypost/model/AddressVerification.java +++ b/src/main/java/com/easypost/model/AddressVerification.java @@ -1,63 +1,38 @@ package com.easypost.model; import java.util.List; +import lombok.Getter; +@Getter public final class AddressVerification { private Boolean success; - private List errors; + private List errors; private AddressDetail details; /** - * Get the address detail object. + * Set the success of this address verification object. * - * @return AddressDetail object + * @param success The success message. */ - 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; + void setSuccess(final boolean success) { + this.success = success; } /** - * Set the list of errors that occurred during the address verification. + * Set the errors of this address verification object. * - * @param errors list of Error objects + * @param errors The errors. */ - public void setErrors(final List errors) { + void setErrors(final List errors) { this.errors = errors; } /** - * Get whether the address verification was successful. + * Set the details of this address verification object. * - * @return true if the address was successfully verified + * @param details The details. */ - 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; + void setDetails(final AddressDetail details) { + this.details = details; } } diff --git a/src/main/java/com/easypost/model/AddressVerificationDeserializer.java b/src/main/java/com/easypost/model/AddressVerificationDeserializer.java new file mode 100644 index 000000000..2986edd44 --- /dev/null +++ b/src/main/java/com/easypost/model/AddressVerificationDeserializer.java @@ -0,0 +1,74 @@ +package com.easypost.model; + +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 java.lang.reflect.Type; +import java.util.ArrayList; + +public final class AddressVerificationDeserializer implements JsonDeserializer { + /** + * Deserialize an AddressVerification from a JSON object. + * + * @param json JSON object to deserialize. + * @param typeOfT Type of the object to deserialize. + * @param context Deserialization context. + * @return Deserialized AddressVerification object. + * @throws JsonParseException if the JSON object is not a valid + * SmartRateCollection. + */ + @Override + public AddressVerification deserialize(final JsonElement json, final Type typeOfT, + final JsonDeserializationContext context) throws JsonParseException { + JsonObject jo = json.getAsJsonObject(); + + AddressVerification addressVerification = new AddressVerification(); + + boolean success = jo.get("success").getAsBoolean(); + addressVerification.setSuccess(success); + + AddressDetail details = context.deserialize(jo.get("details"), AddressDetail.class); + addressVerification.setDetails(details); + + JsonElement errorsAsJson = jo.get("errors"); + + if (errorsAsJson != null) { + JsonArray errorsAsArray = errorsAsJson.getAsJsonArray(); + ArrayList errors = new ArrayList<>(); + for (JsonElement errorAsJson : errorsAsArray) { + JsonObject errorAsJsonObject = errorAsJson.getAsJsonObject(); + + AddressVerificationFieldError error = new AddressVerificationFieldError(); + + JsonElement code = errorAsJsonObject.get("code"); + if (code != null) { + error.setCode(code.getAsString()); + } + + JsonElement message = errorAsJsonObject.get("message"); + if (message != null) { + error.setMessage(message.getAsString()); + } + + JsonElement field = errorAsJsonObject.get("field"); + if (field != null) { + error.setField(field.getAsString()); + } + + JsonElement suggestion = errorAsJsonObject.get("suggestion"); + if (suggestion != null && !suggestion.isJsonNull()) { + error.setSuggestion(suggestion.getAsString()); + } + + errors.add(error); + } + addressVerification.setErrors(errors); + } + + return addressVerification; + } +} diff --git a/src/main/java/com/easypost/model/AddressVerificationFieldError.java b/src/main/java/com/easypost/model/AddressVerificationFieldError.java new file mode 100644 index 000000000..64b9e86dc --- /dev/null +++ b/src/main/java/com/easypost/model/AddressVerificationFieldError.java @@ -0,0 +1,47 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public final class AddressVerificationFieldError { + private String message; + private String code; + private String field; + private String suggestion; + + /** + * Set the message of this error object. + * + * @param message The error message. + */ + void setMessage(final String message) { + this.message = message; + } + + /** + * Set the code of this error object. + * + * @param code The code. + */ + void setCode(final String code) { + this.code = code; + } + + /** + * Set the field of this error object. + * + * @param field The field. + */ + void setField(final String field) { + this.field = field; + } + + /** + * Set the suggestion of this error object. + * + * @param suggestion The suggestion. + */ + void setSuggestion(final String suggestion) { + this.suggestion = suggestion; + } +} diff --git a/src/main/java/com/easypost/model/AddressVerifications.java b/src/main/java/com/easypost/model/AddressVerifications.java index 1d50d804d..728cb772e 100644 --- a/src/main/java/com/easypost/model/AddressVerifications.java +++ b/src/main/java/com/easypost/model/AddressVerifications.java @@ -1,44 +1,9 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; +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/AiResults.java b/src/main/java/com/easypost/model/AiResults.java new file mode 100644 index 000000000..8bfbdcd1a --- /dev/null +++ b/src/main/java/com/easypost/model/AiResults.java @@ -0,0 +1,14 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public final class AiResults { + private String carrier; + private Boolean meetsRulesetRequirements; + private String predictedDeliverByDate; + private Integer predictedDeliverDays; + private String rateId; + private String rateUsd; + private String service; +} diff --git a/src/main/java/com/easypost/model/ApiKey.java b/src/main/java/com/easypost/model/ApiKey.java index 12660e160..f02f808c2 100644 --- a/src/main/java/com/easypost/model/ApiKey.java +++ b/src/main/java/com/easypost/model/ApiKey.java @@ -1,45 +1,9 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; +import lombok.Getter; +@Getter public final class ApiKey extends EasyPostResource { - private String mode; 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; - } - - /** - * 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; - } + private Boolean active; } - diff --git a/src/main/java/com/easypost/model/ApiKeys.java b/src/main/java/com/easypost/model/ApiKeys.java index 6d2c9794d..d5da4da0c 100644 --- a/src/main/java/com/easypost/model/ApiKeys.java +++ b/src/main/java/com/easypost/model/ApiKeys.java @@ -1,90 +1,10 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - import java.util.List; +import lombok.Getter; +@Getter public final class ApiKeys extends EasyPostResource { - private String id; 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 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. - * - * @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; - } - - /** - * 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 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..9c387d4ef 100644 --- a/src/main/java/com/easypost/model/BaseAddress.java +++ b/src/main/java/com/easypost/model/BaseAddress.java @@ -1,9 +1,9 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; +import lombok.Getter; +@Getter public class BaseAddress extends EasyPostResource { - private String id; private String name; private String company; private String street1; @@ -14,202 +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 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. - * - * @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 fc0b57efb..000000000 --- a/src/main/java/com/easypost/model/BaseCreditCard.java +++ /dev/null @@ -1,146 +0,0 @@ -package com.easypost.model; - -import com.easypost.net.EasyPostResource; - -/** - * 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 id; - 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 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. - * - * @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 4a237c11c..4ccffa8d9 100644 --- a/src/main/java/com/easypost/model/BaseUser.java +++ b/src/main/java/com/easypost/model/BaseUser.java @@ -1,11 +1,10 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; +import lombok.Getter; +@Getter public class BaseUser extends EasyPostResource { - private String id; private String name; private String email; private String phoneNumber; @@ -13,7 +12,6 @@ public class BaseUser extends EasyPostResource { private String rechargeAmount; private String secondaryRechargeAmount; private String rechargeThreshold; - private String object; private String parentId; private boolean verified; private String pricePerShipment; @@ -23,328 +21,5 @@ 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 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. - * - * @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; - } + private List apiKeys; } diff --git a/src/main/java/com/easypost/model/Batch.java b/src/main/java/com/easypost/model/Batch.java index a1108cbda..9c810fb57 100644 --- a/src/main/java/com/easypost/model/Batch.java +++ b/src/main/java/com/easypost/model/Batch.java @@ -1,15 +1,10 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - -import java.util.HashMap; import java.util.List; -import java.util.Map; +import lombok.Getter; +@Getter public final class Batch extends EasyPostResource { - private String id; - private String mode; private String state; private BatchStatus status; private Number numShipments; @@ -17,523 +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; - } - - /** - * 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 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 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 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 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 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. - * - * @return Label URL of this batch.x - */ - 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. - * - * @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. - * - * @param labelUrl Label URL of this batch. - */ - public void setLabelUrl(final String labelUrl) { - this.labelUrl = 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 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 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 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 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. - * - * @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 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); - } - - /** - * Create a scan form for this batch. - * - * @param params Map of parameters. - * @return Batch object. - * @throws EasyPostException when the request fails. - */ - public Batch createScanForm(final Map params) throws EasyPostException { - return this.createScanForm(params, null); - } } diff --git a/src/main/java/com/easypost/model/BatchCollection.java b/src/main/java/com/easypost/model/BatchCollection.java index 1c8c433b9..578c34fd3 100644 --- a/src/main/java/com/easypost/model/BatchCollection.java +++ b/src/main/java/com/easypost/model/BatchCollection.java @@ -1,46 +1,18 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; +import java.util.Map; -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; - } +import com.easypost.exception.General.EndOfPaginationError; +import lombok.Getter; - /** - * Get whether there are more batches to retrieve. - * - * @return true if there are more batches to retrieve, false otherwise. - */ - public Boolean getHasMore() { - return hasMore; - } +@Getter +public final class BatchCollection extends PaginatedCollection { + private List batches; - /** - * 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; + @Override + protected Map buildNextPageParameters(List batches, Integer pageSize) + throws EndOfPaginationError { + throw new EndOfPaginationError(); } } 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/BetaPaymentRefund.java b/src/main/java/com/easypost/model/BetaPaymentRefund.java new file mode 100644 index 000000000..3dc22709f --- /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/model/Billing.java b/src/main/java/com/easypost/model/Billing.java index bdb2e4783..6d20d4f16 100644 --- a/src/main/java/com/easypost/model/Billing.java +++ b/src/main/java/com/easypost/model/Billing.java @@ -1,145 +1,4 @@ package com.easypost.model; -import com.easypost.EasyPost; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - -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. - * @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); - } - - /** - * 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). - * @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 { - 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); - } - - /** - * 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. - * @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); - } - - /** - * 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). - * @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) - 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 - request(RequestMethod.POST, String.format("%s/%s/%s/%s", EasyPost.API_BASE, paymentMethodObject.getEndpoint(), - paymentMethodObject.getId(), "charges"), params, PaymentMethod.class, apiKey); - - return true; - } - - /** - * 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 = - request(RequestMethod.GET, String.format("%s/%s", EasyPost.API_BASE, "payment_methods"), null, - PaymentMethod.class, apiKey); - - if (response.getId() == null) { - throw new EasyPostException("Billing has not been setup for this user. Please add a payment method."); - } - - 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 EasyPostException("The chosen payment method is not set up yet."); - } - - return paymentMethod; - } } diff --git a/src/main/java/com/easypost/model/Brand.java b/src/main/java/com/easypost/model/Brand.java index 7ffbdbe4e..1b2525770 100644 --- a/src/main/java/com/easypost/model/Brand.java +++ b/src/main/java/com/easypost/model/Brand.java @@ -1,7 +1,8 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; +import lombok.Getter; +@Getter public class Brand extends EasyPostResource { private String backgroundColor; private String color; @@ -12,185 +13,4 @@ public class Brand extends EasyPostResource { private String name; private String userID; private String theme; - private String id; - - /** - * 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 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. - * - * @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 deleted file mode 100644 index 231b06631..000000000 --- a/src/main/java/com/easypost/model/CarbonOffset.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.easypost.model; - -import com.easypost.net.EasyPostResource; - -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 0dc030e46..124b707eb 100644 --- a/src/main/java/com/easypost/model/CarrierAccount.java +++ b/src/main/java/com/easypost/model/CarrierAccount.java @@ -1,358 +1,18 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; import java.util.Map; +import lombok.Getter; +@Getter public final class CarrierAccount extends EasyPostResource { - private String id; - private String object; private String type; private Fields fields; private boolean clone; + private String logo; private String readable; private String description; private String reference; 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; - } - - /** - * 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 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 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 = - 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. - */ - 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; - } - - /** - * 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 = - 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. - * - * @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 { - request(RequestMethod.DELETE, instanceURL(CarrierAccount.class, this.getId()), null, CarrierAccount.class, - apiKey); - } } 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/CarrierMetadata.java b/src/main/java/com/easypost/model/CarrierMetadata.java new file mode 100644 index 000000000..6b9b7a025 --- /dev/null +++ b/src/main/java/com/easypost/model/CarrierMetadata.java @@ -0,0 +1,58 @@ +package com.easypost.model; + +import java.util.List; + +import lombok.Getter; + +@Getter +public class CarrierMetadata extends EasyPostResource { + private List carriers; + + @Getter + public static class Carrier { + private String name; + private String humanReadable; + private List predefinedPackages; + private List serviceLevels; + private List shipmentOptions; + private List supportedFeatures; + } + + @Getter + public static class PredefinedPackage { + private String carrier; + private String description; + private List dimensions; + private String humanReadable; + private String maxWeight; + private String name; + } + + @Getter + public static class ServiceLevels { + private String carrier; + private String description; + private List dimensions; + private String humanReadable; + private String maxWeight; + private String name; + } + + @Getter + public static class ShipmentOption { + private String carrier; + private boolean deprecated; + private String description; + private String humanReadable; + private String name; + private String type; + } + + @Getter + public static class SupportedFeatures { + private String carrier; + private String description; + private String name; + private String supported; + } +} diff --git a/src/main/java/com/easypost/model/CarrierType.java b/src/main/java/com/easypost/model/CarrierType.java index 7c5d7af64..45b5ac89c 100644 --- a/src/main/java/com/easypost/model/CarrierType.java +++ b/src/main/java/com/easypost/model/CarrierType.java @@ -1,110 +1,12 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - -import java.util.Arrays; -import java.util.List; 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; - } - - /** - * 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 = - request(RequestMethod.GET, classURL(CarrierType.class), null, CarrierType[].class, apikey); - return Arrays.asList(response); - } } diff --git a/src/main/java/com/easypost/model/ChildUserCollection.java b/src/main/java/com/easypost/model/ChildUserCollection.java new file mode 100644 index 000000000..f0e5027bb --- /dev/null +++ b/src/main/java/com/easypost/model/ChildUserCollection.java @@ -0,0 +1,25 @@ +package com.easypost.model; + +import java.util.List; +import java.util.Map; + +import lombok.Getter; + +@Getter +public final class ChildUserCollection extends PaginatedCollection { + private List children; + + @Override + protected Map buildNextPageParameters(List children, Integer pageSize) { + String lastId = children.get(children.size() - 1).getId(); + + Map parameters = new java.util.HashMap<>(); + parameters.put("after_id", lastId); + + if (pageSize != null) { + parameters.put("page_size", pageSize); + } + + return parameters; + } +} diff --git a/src/main/java/com/easypost/model/Claim.java b/src/main/java/com/easypost/model/Claim.java new file mode 100644 index 000000000..1a55950bf --- /dev/null +++ b/src/main/java/com/easypost/model/Claim.java @@ -0,0 +1,27 @@ +package com.easypost.model; + +import java.util.Date; +import java.util.List; +import lombok.Getter; + +@Getter +public class Claim extends EasyPostResource { + private Date statusTimestamp; + private List history; + private String approvedAmount; + private String checkDeliveryAddress; + private String contactEmail; + private String description; + private String insuranceAmount; + private String insuranceId; + private String paymentMethod; + private String recipientName; + private String reference; + private String requestedAmount; + private String salvageValue; + private String shipmentId; + private String status; + private String statusDetail; + private String trackingCode; + private String type; +} diff --git a/src/main/java/com/easypost/model/ClaimCollection.java b/src/main/java/com/easypost/model/ClaimCollection.java new file mode 100644 index 000000000..de842214c --- /dev/null +++ b/src/main/java/com/easypost/model/ClaimCollection.java @@ -0,0 +1,34 @@ +package com.easypost.model; + +import java.util.List; +import java.util.Map; + +import com.easypost.exception.General.EndOfPaginationError; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class ClaimCollection extends PaginatedCollection { + private List claims; + + @Setter + private String type; + private String status; + + @Override + protected Map buildNextPageParameters(List claims, Integer pageSize) + throws EndOfPaginationError { + String lastId = claims.get(claims.size() - 1).getId(); + + Map parameters = new java.util.HashMap<>(); + parameters.put("before_id", lastId); + parameters.put("type", type); + parameters.put("status", status); + + if (pageSize != null) { + parameters.put("page_size", pageSize); + } + + return parameters; + } +} diff --git a/src/main/java/com/easypost/model/ClaimHistoryEntry.java b/src/main/java/com/easypost/model/ClaimHistoryEntry.java new file mode 100644 index 000000000..6083dc1ee --- /dev/null +++ b/src/main/java/com/easypost/model/ClaimHistoryEntry.java @@ -0,0 +1,11 @@ +package com.easypost.model; + +import java.util.Date; +import lombok.Getter; + +@Getter +public class ClaimHistoryEntry { + private String status; + private String statusDetail; + private Date statusTimestamp; +} diff --git a/src/main/java/com/easypost/model/ClientSecret.java b/src/main/java/com/easypost/model/ClientSecret.java new file mode 100644 index 000000000..cde3d932e --- /dev/null +++ b/src/main/java/com/easypost/model/ClientSecret.java @@ -0,0 +1,8 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public final class ClientSecret { + private String clientSecret; +} 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 bf3adb1f8..000000000 --- a/src/main/java/com/easypost/model/CreditCard.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.easypost.model; - -import com.easypost.EasyPost; -import com.easypost.exception.EasyPostException; - -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("The chosen payment method is not a credit card. Please try again."); - } - - Map params = new HashMap<>(); - 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); - - 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 { - 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/CustomerPortalAccountLink.java b/src/main/java/com/easypost/model/CustomerPortalAccountLink.java new file mode 100644 index 000000000..73687d126 --- /dev/null +++ b/src/main/java/com/easypost/model/CustomerPortalAccountLink.java @@ -0,0 +1,12 @@ +package com.easypost.model; + +import java.util.Date; +import lombok.Getter; + +@Getter +public class CustomerPortalAccountLink { + private String object; + private String link; + private Date createdAt; + private Date expiresAt; +} diff --git a/src/main/java/com/easypost/model/CustomsInfo.java b/src/main/java/com/easypost/model/CustomsInfo.java index db6c885f4..79f8f5a88 100644 --- a/src/main/java/com/easypost/model/CustomsInfo.java +++ b/src/main/java/com/easypost/model/CustomsInfo.java @@ -1,14 +1,10 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - -import java.util.HashMap; import java.util.List; -import java.util.Map; +import lombok.Getter; +@Getter public final class CustomsInfo extends EasyPostResource { - private String id; private String contentsType; private String contentsExplanation; private boolean customsCertify; @@ -19,251 +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 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. - * - * @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; - } - - /** - * 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 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 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..a0308becb 100644 --- a/src/main/java/com/easypost/model/CustomsItem.java +++ b/src/main/java/com/easypost/model/CustomsItem.java @@ -1,13 +1,9 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - -import java.util.HashMap; -import java.util.Map; +import lombok.Getter; +@Getter public final class CustomsItem extends EasyPostResource { - private String id; private String description; private String hsTariffNumber; private String originCountry; @@ -16,215 +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 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. - * - * @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; - } - - /** - * 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 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 request(RequestMethod.GET, instanceURL(CustomsItem.class, id), null, CustomsItem.class, apiKey); - } } diff --git a/src/main/java/com/easypost/model/DeliveryDateForZipPairEstimate.java b/src/main/java/com/easypost/model/DeliveryDateForZipPairEstimate.java new file mode 100644 index 000000000..4a72f5a18 --- /dev/null +++ b/src/main/java/com/easypost/model/DeliveryDateForZipPairEstimate.java @@ -0,0 +1,10 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public class DeliveryDateForZipPairEstimate { + private String carrier; + private String service; + private TimeInTransitDetailsForDeliveryDate easypostTimeInTransitData; +} 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..c8873a936 --- /dev/null +++ b/src/main/java/com/easypost/model/EasyPostResource.java @@ -0,0 +1,63 @@ +package com.easypost.model; + +import java.util.Date; + +import com.easypost.Constants; +import lombok.Getter; + +@Getter +public abstract class EasyPostResource { + private String id; + private String mode; + private String object; + private Date createdAt; + private Date updatedAt; + + /** + * Returns a string representation of the object. + * + * @return String of the object. + */ + @Override + public String toString() { + if (this.id == null) { + return String.format("<%s@%s>", this.getClass().getName(), System.identityHashCode(this)); + } + return String.format("<%s@%s id=%s>", this.getClass().getName(), System.identityHashCode(this), this.id); + } + + /** + * Pretty print the JSON representation of the object. + * + * @return the JSON representation of the object. + */ + public String prettyPrint() { + String identifier = this.toString(); + String json = Constants.Http.PRETTY_PRINT_GSON.toJson(this); + return String.format("%s JSON: %s", identifier, json); + } + + /** + * Override the hashCode method because it is needed when overriding equals(). + * + * @return The hashcode of current object. + */ + @Override + public int hashCode() { + return Constants.Http.GSON.toJson(this).hashCode(); + } + + /** + * 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 = 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/EasyPostTimeInTransitData.java b/src/main/java/com/easypost/model/EasyPostTimeInTransitData.java new file mode 100644 index 000000000..bd5bb7cda --- /dev/null +++ b/src/main/java/com/easypost/model/EasyPostTimeInTransitData.java @@ -0,0 +1,10 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public class EasyPostTimeInTransitData { + private TimeInTransit daysInTransit; + private String easypostEstimatedDeliveryDate; + private String plannedShipDate; +} diff --git a/src/main/java/com/easypost/model/EmbeddablesSession.java b/src/main/java/com/easypost/model/EmbeddablesSession.java new file mode 100644 index 000000000..40f77fc2d --- /dev/null +++ b/src/main/java/com/easypost/model/EmbeddablesSession.java @@ -0,0 +1,12 @@ +package com.easypost.model; + +import java.util.Date; +import lombok.Getter; + +@Getter +public class EmbeddablesSession { + private String object; + private String sessionId; + private Date createdAt; + private Date expiresAt; +} diff --git a/src/main/java/com/easypost/model/EndShipper.java b/src/main/java/com/easypost/model/EndShipper.java index 460804d5c..4b7af078a 100644 --- a/src/main/java/com/easypost/model/EndShipper.java +++ b/src/main/java/com/easypost/model/EndShipper.java @@ -1,117 +1,4 @@ package com.easypost.model; -import com.easypost.EasyPost; -import com.easypost.exception.EasyPostException; - -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 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 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 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 = 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/EndShipperCollection.java b/src/main/java/com/easypost/model/EndShipperCollection.java index c252af835..05363bc4f 100644 --- a/src/main/java/com/easypost/model/EndShipperCollection.java +++ b/src/main/java/com/easypost/model/EndShipperCollection.java @@ -1,44 +1,18 @@ package com.easypost.model; import java.util.List; +import java.util.Map; -public class EndShipperCollection { - private List endShippers; - private Boolean hasMore; - - /** - * Get a list of EndShippers. - * - * @return List of EndShipper objects - */ - public List getEndShippers() { - return endShippers; - } +import com.easypost.exception.General.EndOfPaginationError; +import lombok.Getter; - /** - * 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; - } +@Getter +public final class EndShipperCollection extends PaginatedCollection { + private List endShippers; - /** - * 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; + @Override + protected Map buildNextPageParameters(List endShippers, Integer pageSize) + throws EndOfPaginationError { + throw new EndOfPaginationError(); } } diff --git a/src/main/java/com/easypost/model/Error.java b/src/main/java/com/easypost/model/Error.java deleted file mode 100644 index 24ba1db25..000000000 --- a/src/main/java/com/easypost/model/Error.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.easypost.model; - -public final class Error { - private String field; - private String message; - private String suggestion; - private String code; - - /** - * Get the error code. - * - * @return code - */ - public String getCode() { - return code; - } - - /** - * Set the error code. - * - * @param code code - */ - public void setCode(final String code) { - this.code = code; - } - - /** - * Get the field that caused the error. - * - * @return field - */ - public String getField() { - return field; - } - - /** - * Set the field that caused the error. - * - * @param field field - */ - public void setField(final String field) { - this.field = field; - } - - /** - * 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; - } - - /** - * Get the suggestion for the error. - * - * @return suggestion - */ - public String getSuggestion() { - return suggestion; - } - - /** - * Set the suggestion for the error. - * - * @param suggestion suggestion - */ - public void setSuggestion(final String suggestion) { - this.suggestion = suggestion; - } -} 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..a2f0583de --- /dev/null +++ b/src/main/java/com/easypost/model/ErrorDeserializer.java @@ -0,0 +1,119 @@ +package com.easypost.model; + +import com.easypost.Constants; +import com.easypost.exception.APIException; +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 java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.List; +import java.util.Map.Entry; + +public final class ErrorDeserializer implements JsonDeserializer { + /** + * Recursively traverse an error JSON element and its sub-element(s), and + * extracts all + * error string values found into the specified string list. + * + * @param element the JSON element to traverse + * @param messagesList the list of strings to append found values to + */ + private void traverseJsonElement(JsonElement element, ArrayList messagesList) { + if (element.isJsonPrimitive()) { + messagesList.add(element.getAsString()); + } else if (element.isJsonArray()) { + JsonArray array = element.getAsJsonArray(); + for (JsonElement arrayElement : array) { + traverseJsonElement(arrayElement, messagesList); + } + } else if (element.isJsonObject()) { + JsonObject object = element.getAsJsonObject(); + for (Entry entry : object.entrySet()) { + traverseJsonElement(entry.getValue(), messagesList); + } + } + } + + /** + * Deserialize an APIException from a JSON object. + * + * @param json JSON object to deserialize. + * @param typeOfT Type of the object to deserialize. + * @param context Deserialization context. + * @return Deserialized APIException object. + * @throws JsonParseException if the JSON object is not a valid + * SmartRateCollection. + */ + @Override + public APIException deserialize(final JsonElement json, final Type typeOfT, + final JsonDeserializationContext context) throws JsonParseException { + JsonObject jo = json.getAsJsonObject(); + + String message = null; + String code = null; + List errors = new ArrayList<>(); + + JsonElement errorResponse = jo.get("error"); + if (errorResponse == null) { + message = Constants.ErrorMessages.API_DID_NOT_RETURN_ERROR_DETAILS; + code = "NO RESPONSE CODE"; + return new APIException(message, code, null); + } + JsonObject errorData = errorResponse.getAsJsonObject(); + + JsonElement codeElement = errorData.get("code"); + if (codeElement != null) { + code = codeElement.getAsString(); + } + + JsonElement messageElement = errorData.get("message"); + if (messageElement != null) { + if (messageElement.isJsonPrimitive()) { + message = messageElement.getAsString(); + } else if (messageElement.isJsonObject() || messageElement.isJsonArray()) { + ArrayList messagesList = new ArrayList<>(); + traverseJsonElement(messageElement, messagesList); + message = String.join(", ", messagesList); + } else { + throw new JsonParseException("Invalid message format"); + } + } + + JsonElement errorsAsJson = errorData.get("errors"); + if (errorsAsJson != null) { + JsonArray errorsAsArray = errorsAsJson.getAsJsonArray(); + for (JsonElement errorAsJson : errorsAsArray) { + if (errorAsJson.isJsonObject()) { + JsonObject errorAsJsonObject = errorAsJson.getAsJsonObject(); + FieldError fieldError = new FieldError(); + + JsonElement field = errorAsJsonObject.get("field"); + if (field != null) { + fieldError.setField(field.getAsString()); + } + + JsonElement fieldMessage = errorAsJsonObject.get("message"); + if (fieldMessage != null) { + fieldError.setMessage(fieldMessage.getAsString()); + } + + JsonElement suggestion = errorAsJsonObject.get("suggestion"); + if (suggestion != null && !suggestion.isJsonNull()) { + fieldError.setSuggestion(suggestion.getAsString()); + } + + errors.add(fieldError); + } else { + errors.add(errorAsJson.getAsString()); + } + } + } + + return new APIException(message, code, errors); + } +} diff --git a/src/main/java/com/easypost/model/EstimateDeliveryDateForZipPairResult.java b/src/main/java/com/easypost/model/EstimateDeliveryDateForZipPairResult.java new file mode 100644 index 000000000..aa38c20a1 --- /dev/null +++ b/src/main/java/com/easypost/model/EstimateDeliveryDateForZipPairResult.java @@ -0,0 +1,14 @@ +package com.easypost.model; + +import java.util.List; +import lombok.Getter; + +@Getter +public class EstimateDeliveryDateForZipPairResult { + private Boolean saturdayDelivery; + private List results; + private List carriersWithoutTintEstimates; + private String desiredDeliveryDate; + private String fromZip; + private String toZip; +} diff --git a/src/main/java/com/easypost/model/EstimatedDeliveryDate.java b/src/main/java/com/easypost/model/EstimatedDeliveryDate.java new file mode 100644 index 000000000..563051411 --- /dev/null +++ b/src/main/java/com/easypost/model/EstimatedDeliveryDate.java @@ -0,0 +1,10 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public class EstimatedDeliveryDate { + private EasyPostTimeInTransitData easypostTimeInTransitData; + private Rate rate; +} + diff --git a/src/main/java/com/easypost/model/EstimatedDeliveryDateResponse.java b/src/main/java/com/easypost/model/EstimatedDeliveryDateResponse.java new file mode 100644 index 000000000..1fdc1ca13 --- /dev/null +++ b/src/main/java/com/easypost/model/EstimatedDeliveryDateResponse.java @@ -0,0 +1,9 @@ +package com.easypost.model; + +import java.util.List; +import lombok.Getter; + +@Getter +public class EstimatedDeliveryDateResponse { + private List rates; +} diff --git a/src/main/java/com/easypost/model/Event.java b/src/main/java/com/easypost/model/Event.java index 47f1c8724..4dc0a56cb 100644 --- a/src/main/java/com/easypost/model/Event.java +++ b/src/main/java/com/easypost/model/Event.java @@ -1,150 +1,15 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - +import java.util.List; import java.util.Map; +import lombok.Getter; +@Getter public final class Event extends EasyPostResource { - private String id; private String description; - private String mode; - private EasyPostResource result; + private Map result; + private String status; private Map previousAttributes; - - /** - * 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 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. - * - * @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 EasyPostResource getResult() { - return result; - } - - /** - * Set the result of this Event. - * - * @param result Event's result - */ - public void setResult(final EasyPostResource result) { - this.result = result; - } - - /** - * 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 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 request(RequestMethod.GET, classURL(Event.class), params, EventCollection.class, apiKey); - } + private List pendingUrls; + private List completedUrls; } diff --git a/src/main/java/com/easypost/model/EventCollection.java b/src/main/java/com/easypost/model/EventCollection.java index fb3f28acb..1c683d9f6 100644 --- a/src/main/java/com/easypost/model/EventCollection.java +++ b/src/main/java/com/easypost/model/EventCollection.java @@ -1,46 +1,27 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; +import java.util.Map; + +import com.easypost.exception.General.EndOfPaginationError; +import lombok.Getter; -public final class EventCollection extends EasyPostResource { +@Getter +public final class EventCollection extends PaginatedCollection { private List events; - private Boolean hasMore; - /** - * Get a list of events. - * - * @return List of Event objects. - */ - public List getEvents() { - return events; - } + @Override + protected Map buildNextPageParameters(List events, Integer pageSize) + throws EndOfPaginationError { + String lastId = events.get(events.size() - 1).getId(); - /** - * Set a list of events. - * - * @param events List of Event objects. - */ - public void setEvents(final List events) { - this.events = events; - } + Map parameters = new java.util.HashMap<>(); + parameters.put("before_id", lastId); - /** - * Get whether there are more events to retrieve. - * - * @return whether there are more events to retrieve. - */ - public Boolean getHasMore() { - return hasMore; - } + if (pageSize != null) { + parameters.put("page_size", pageSize); + } - /** - * 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; + return parameters; } } diff --git a/src/main/java/com/easypost/model/EventData.java b/src/main/java/com/easypost/model/EventData.java index b0c085566..b2c490255 100644 --- a/src/main/java/com/easypost/model/EventData.java +++ b/src/main/java/com/easypost/model/EventData.java @@ -1,46 +1,9 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - 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/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/model/FedExAccountValidationResponse.java b/src/main/java/com/easypost/model/FedExAccountValidationResponse.java new file mode 100644 index 000000000..3fdb09a48 --- /dev/null +++ b/src/main/java/com/easypost/model/FedExAccountValidationResponse.java @@ -0,0 +1,19 @@ +package com.easypost.model; + +import java.util.List; +import java.util.Map; +import lombok.Getter; + +@Getter +public final class FedExAccountValidationResponse { + // If the response contains the following, one must complete pin or invoice validation next + private String emailAddress; + private List options; + private String phoneNumber; + + // If the response contains the following, pre-validation has been completed + private String id; + private String object; + private String type; + private Map credentials; +} diff --git a/src/main/java/com/easypost/model/FedExRequestPinResponse.java b/src/main/java/com/easypost/model/FedExRequestPinResponse.java new file mode 100644 index 000000000..1c53db0c1 --- /dev/null +++ b/src/main/java/com/easypost/model/FedExRequestPinResponse.java @@ -0,0 +1,8 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public class FedExRequestPinResponse { + private String message; +} 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 4de06f360..119ea847a 100644 --- a/src/main/java/com/easypost/model/Field.java +++ b/src/main/java/com/easypost/model/Field.java @@ -1,74 +1,10 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; +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/FieldError.java b/src/main/java/com/easypost/model/FieldError.java new file mode 100644 index 000000000..134f273a7 --- /dev/null +++ b/src/main/java/com/easypost/model/FieldError.java @@ -0,0 +1,37 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public final class FieldError { + private String field; + private String message; + private String suggestion; + + /** + * Set the field of this error object. + * + * @param field The field. + */ + void setField(final String field) { + this.field = field; + } + + /** + * Set the message of this error object. + * + * @param message The error message. + */ + void setMessage(final String message) { + this.message = message; + } + + /** + * Set the suggestion of this error object. + * + * @param suggestion The suggestion. + */ + void setSuggestion(final String suggestion) { + this.suggestion = suggestion; + } +} diff --git a/src/main/java/com/easypost/model/Fields.java b/src/main/java/com/easypost/model/Fields.java index ed6224eb5..c700389de 100644 --- a/src/main/java/com/easypost/model/Fields.java +++ b/src/main/java/com/easypost/model/Fields.java @@ -1,74 +1,13 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; +import lombok.Getter; +import java.util.Map; + +@Getter public class Fields extends EasyPostResource { - private Field credentials; - private Field testCredentials; + private Map credentials; + private Map 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; - } - - /** - * 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; - } } diff --git a/src/main/java/com/easypost/model/Form.java b/src/main/java/com/easypost/model/Form.java index b997bc211..54937b540 100644 --- a/src/main/java/com/easypost/model/Form.java +++ b/src/main/java/com/easypost/model/Form.java @@ -1,99 +1,10 @@ package com.easypost.model; -public final class Form { - private String id; - private String mode; +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 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. - * - * @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 b223247f4..b55637508 100644 --- a/src/main/java/com/easypost/model/Insurance.java +++ b/src/main/java/com/easypost/model/Insurance.java @@ -1,15 +1,10 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - -import java.util.HashMap; import java.util.List; -import java.util.Map; +import lombok.Getter; +@Getter public final class Insurance extends EasyPostResource { - private String id; - private String mode; private String reference; private Address toAddress; private Address fromAddress; @@ -19,358 +14,6 @@ public final class Insurance extends EasyPostResource { private String trackingCode; private String status; private String shipmentId; - private Float amount; + private String amount; private List messages; - - /** - * Get the amount of this Insurance. - * - * @return the amount of the Insurance - */ - public Float getAmount() { - return amount; - } - - /** - * Set the amount of this Insurance. - * - * @param amount the amount of the Insurance - */ - public void setAmount(final Float 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; - } - - /** - * 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 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 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 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 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; - } - - /** - * 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; - } - - /** - * 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/InsuranceCollection.java b/src/main/java/com/easypost/model/InsuranceCollection.java index 7d5df92c2..8c7a1463e 100644 --- a/src/main/java/com/easypost/model/InsuranceCollection.java +++ b/src/main/java/com/easypost/model/InsuranceCollection.java @@ -1,46 +1,27 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; +import java.util.Map; + +import com.easypost.exception.General.EndOfPaginationError; +import lombok.Getter; -public final class InsuranceCollection extends EasyPostResource { +@Getter +public final class InsuranceCollection extends PaginatedCollection { private List insurances; - private Boolean hasMore; - /** - * Get whether there are more insurances. - * - * @return true if there are more insurances. - */ - public Boolean getHasMore() { - return hasMore; - } + @Override + protected Map buildNextPageParameters(List insurances, Integer pageSize) + throws EndOfPaginationError { + String lastId = insurances.get(insurances.size() - 1).getId(); - /** - * Set whether there are more insurances. - * - * @param hasMore true if there are more insurances. - */ - public void setHasMore(final Boolean hasMore) { - this.hasMore = hasMore; - } + Map parameters = new java.util.HashMap<>(); + parameters.put("before_id", lastId); - /** - * Get the list of insurances. - * - * @return List of Insurance objects. - */ - public List getInsurances() { - return insurances; - } + if (pageSize != null) { + parameters.put("page_size", pageSize); + } - /** - * Set the list of insurances. - * - * @param insurances List of Insurance objects. - */ - public void setInsurances(final List insurances) { - this.insurances = insurances; + return parameters; } } diff --git a/src/main/java/com/easypost/model/LumaInfo.java b/src/main/java/com/easypost/model/LumaInfo.java new file mode 100644 index 000000000..d9004a63a --- /dev/null +++ b/src/main/java/com/easypost/model/LumaInfo.java @@ -0,0 +1,12 @@ +package com.easypost.model; + +import java.util.List; +import lombok.Getter; + +@Getter +public final class LumaInfo { + private List aiResults; + private Integer matchingRuleIdx; + private String rulesetDescription; + private Rate lumaSelectedRate; +} diff --git a/src/main/java/com/easypost/model/LumaPromiseResponse.java b/src/main/java/com/easypost/model/LumaPromiseResponse.java new file mode 100644 index 000000000..7d1ff68bb --- /dev/null +++ b/src/main/java/com/easypost/model/LumaPromiseResponse.java @@ -0,0 +1,8 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public class LumaPromiseResponse { + private LumaInfo lumaInfo; +} diff --git a/src/main/java/com/easypost/model/Order.java b/src/main/java/com/easypost/model/Order.java index b20626dd3..94d14aa4e 100644 --- a/src/main/java/com/easypost/model/Order.java +++ b/src/main/java/com/easypost/model/Order.java @@ -1,15 +1,15 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - -import java.util.HashMap; import java.util.List; import java.util.Map; +import com.easypost.exception.EasyPostException; +import com.easypost.utils.Utilities; + +import lombok.Getter; + +@Getter public final class Order extends EasyPostResource { - private String id; - private String mode; private String service; private String reference; private Boolean isReturn; @@ -24,466 +24,10 @@ public final class Order extends EasyPostResource { 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; - } - - /** - * 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 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 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 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. - * - * @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; - } - - /** - * 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 = - 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 = - 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 + * @return Lowest Rate object * @throws EasyPostException when the request fails. */ public Rate lowestRate() throws EasyPostException { @@ -493,19 +37,20 @@ public Rate lowestRate() throws EasyPostException { /** * 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 + * @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); + 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. + * @param carriers The carriers to use in the query. * @return Rate object * @throws EasyPostException when the request fails. */ diff --git a/src/main/java/com/easypost/model/OrderCollection.java b/src/main/java/com/easypost/model/OrderCollection.java deleted file mode 100644 index c47eb97ba..000000000 --- a/src/main/java/com/easypost/model/OrderCollection.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.easypost.model; - -import com.easypost.net.EasyPostResource; - -import java.util.List; - -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/PaginatedCollection.java b/src/main/java/com/easypost/model/PaginatedCollection.java new file mode 100644 index 000000000..4686c83b5 --- /dev/null +++ b/src/main/java/com/easypost/model/PaginatedCollection.java @@ -0,0 +1,65 @@ +package com.easypost.model; + +import com.easypost.exception.General.EndOfPaginationError; +import lombok.Getter; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + +@Getter +public abstract class PaginatedCollection extends EasyPostResource { + + private Boolean hasMore; + + /** + * Get the next page of a paginated collection. + * + * @param apiCallFunction The function to call to get the next page. + * @param currentEntries The current entries in the collection. Needed to determine the next page parameters. + * @param The type of the collection to retrieve. + * @return The next page of the collection. + * @throws EndOfPaginationError If there are no more pages to retrieve. + */ + public final > TCollection getNextPage( + Function, TCollection> apiCallFunction, List currentEntries) + throws EndOfPaginationError { + + return getNextPage(apiCallFunction, currentEntries, null); + } + + /** + * Get the next page of a paginated collection with a custom page size. + * + * @param apiCallFunction The function to call to get the next page. + * @param currentEntries The current entries in the collection. Needed to determine the next page parameters. + * @param pageSize The page size to use for the next page. + * @param The type of the collection to retrieve. + * @return The next page of the collection. + * @throws EndOfPaginationError If there are no more pages to retrieve. + */ + public final > TCollection getNextPage( + Function, TCollection> apiCallFunction, List currentEntries, Integer pageSize) + throws EndOfPaginationError { + if (currentEntries == null || currentEntries.size() == 0) { + throw new EndOfPaginationError(); + } + + if (!this.hasMore) { + throw new EndOfPaginationError(); + } + + Map parameters = buildNextPageParameters(currentEntries, pageSize); + + return apiCallFunction.apply(parameters); + } + + /** + * Build the parameters for retrieving the next page of a paginated collection. + * + * @param entries The current entries in the collection. Needed to determine the next page parameters. + * @param pageSize The page size to use for the next page. + * @return The parameters for retrieving the next page of a paginated collection. + */ + protected abstract Map buildNextPageParameters( + List entries, Integer pageSize) throws EndOfPaginationError; +} diff --git a/src/main/java/com/easypost/model/Parcel.java b/src/main/java/com/easypost/model/Parcel.java index 350787f4f..732dffe49 100644 --- a/src/main/java/com/easypost/model/Parcel.java +++ b/src/main/java/com/easypost/model/Parcel.java @@ -1,173 +1,12 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - -import java.util.HashMap; -import java.util.Map; +import lombok.Getter; +@Getter public final class Parcel extends EasyPostResource { - private String id; 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 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. - * - * @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; - } - - /** - * 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 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 request(RequestMethod.GET, instanceURL(Parcel.class, id), null, Parcel.class, apiKey); - } } 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..e5e366a87 --- /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 int responseCode; + private int totalTime; + private Map requestHeaders; + private Map responseHeaders; + private String requestBody; + private String requestUrl; + private String responseBody; +} 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/model/PaymentMethod.java b/src/main/java/com/easypost/model/PaymentMethod.java index 2f8366f21..44b08711b 100644 --- a/src/main/java/com/easypost/model/PaymentMethod.java +++ b/src/main/java/com/easypost/model/PaymentMethod.java @@ -1,9 +1,8 @@ package com.easypost.model; -import com.easypost.EasyPost; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import lombok.Getter; +@Getter public class PaymentMethod extends EasyPostResource { public enum Priority { @@ -11,115 +10,6 @@ public enum Priority { SECONDARY } - private String id; - 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; - } - - /** - * 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 = - request(RequestMethod.GET, String.format("%s/%s", EasyPost.API_BASE, "payment_methods"), null, - PaymentMethod.class, apiKey); - - if (response.getId() == null) { - throw new EasyPostException("Billing has not been setup for this user. Please add a payment method."); - } - - return response; - } - - /** - * 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; - } - - /** - * 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..e978134be 100644 --- a/src/main/java/com/easypost/model/PaymentMethodObject.java +++ b/src/main/java/com/easypost/model/PaymentMethodObject.java @@ -1,7 +1,8 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; +import lombok.Getter; +@Getter public class PaymentMethodObject extends EasyPostResource { public enum PaymentMethodType { @@ -42,114 +43,13 @@ String getEndpoint() { // credit_card private int expYear; // both - private String id; - // both private String last4; // credit_card private String name; - // both - private String object; // 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 ID of this PaymentMethodObject object. - * - * @return ID of this PaymentMethodObject. - */ - public String getId() { - return id; - } - - /** - * 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; - } + // both + private boolean requiresMandateCollection; /** * Get the type of this PaymentMethodObject object. @@ -161,9 +61,10 @@ public PaymentMethodType getType() { if (getId() == null) { return null; } - if (getId().startsWith("card_")) { + String objectType = getObject(); + if (objectType != null && objectType.equals("CreditCard")) { type = PaymentMethodType.CREDIT_CARD; - } else if (getId().startsWith("bank_")) { + } else if (objectType != null && objectType.equals("BankAccount")) { type = PaymentMethodType.BANK_ACCOUNT; } return type; @@ -174,7 +75,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 3d680fdd2..c21dfc664 100644 --- a/src/main/java/com/easypost/model/Pickup.java +++ b/src/main/java/com/easypost/model/Pickup.java @@ -1,17 +1,16 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - import java.util.ArrayList; import java.util.Date; -import java.util.HashMap; import java.util.List; -import java.util.Map; +import com.easypost.exception.EasyPostException; +import com.easypost.utils.Utilities; + +import lombok.Getter; + +@Getter public final class Pickup extends EasyPostResource { - private String id; - private String mode; private String status; private String reference; private Date minDatetime; @@ -24,424 +23,6 @@ public final class Pickup extends EasyPostResource { 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; - } - - /** - * 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 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 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 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; - } - - /** - * 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; - } - - /** - * 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 = - 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. - * - * @param params Map of parameters. - * @return Pickup object. - * @throws EasyPostException when the request fails. - */ - 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 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. * @@ -455,12 +36,13 @@ public PickupRate lowestRate() throws EasyPostException { /** * 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 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 { + public PickupRate lowestRate(final List carriers, final List services) + throws EasyPostException { List rates = new ArrayList(); for (PickupRate rate : this.getPickupRates()) { @@ -470,28 +52,10 @@ public PickupRate lowestRate(final List carriers, final List ser return (PickupRate) Utilities.getLowestObjectRate(rates, carriers, services); } - /** - * Get the pickup rates of this Pickup. - * - * @return List of PickupRate objects. - */ - public List getPickupRates() { - return pickupRates; - } - - /** - * Set the pickup rates of this Pickup. - * - * @param pickupRates List of PickupRate objects. - */ - 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. + * @param carriers The carriers to use in the query. * @return PickupRate object * @throws EasyPostException when the request fails. */ diff --git a/src/main/java/com/easypost/model/PickupCollection.java b/src/main/java/com/easypost/model/PickupCollection.java index 23a9bf2a0..d4a5921e0 100644 --- a/src/main/java/com/easypost/model/PickupCollection.java +++ b/src/main/java/com/easypost/model/PickupCollection.java @@ -1,46 +1,27 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; +import java.util.Map; + +import com.easypost.exception.General.EndOfPaginationError; +import lombok.Getter; -public final class PickupCollection extends EasyPostResource { +@Getter +public final class PickupCollection extends PaginatedCollection { 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; - } + @Override + protected Map buildNextPageParameters(List pickups, Integer pageSize) + throws EndOfPaginationError { + String lastId = pickups.get(pickups.size() - 1).getId(); - /** - * 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; - } + Map parameters = new java.util.HashMap<>(); + parameters.put("before_id", lastId); - /** - * Get this PickupCollection's Pickup objects. - * - * @return List of Pickup objects. - */ - public List getPickups() { - return pickups; - } + if (pageSize != null) { + parameters.put("page_size", pageSize); + } - /** - * Set this PickupCollection's Pickup objects. - * - * @param pickups List of Pickup objects. - */ - public void setPickups(final List pickups) { - this.pickups = pickups; + return parameters; } } 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 b868c1bf6..27ec33790 100644 --- a/src/main/java/com/easypost/model/PostageLabel.java +++ b/src/main/java/com/easypost/model/PostageLabel.java @@ -1,9 +1,9 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; +import lombok.Getter; +@Getter public final class PostageLabel extends EasyPostResource { - private String id; private int dateAdvance; private String integratedForm; private int labelResolution; @@ -24,382 +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 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. - * - * @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 df4e4148a..ca069612a 100644 --- a/src/main/java/com/easypost/model/Rate.java +++ b/src/main/java/com/easypost/model/Rate.java @@ -1,13 +1,13 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; +import java.util.Map; +import lombok.Getter; + +@Getter 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; @@ -21,355 +21,5 @@ public class Rate extends EasyPostResource { private String shipmentId; 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 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. - * - * @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; - } - - /** - * 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. - * - * @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 = request(RequestMethod.GET, instanceURL(Rate.class, id), null, Rate.class, apiKey); - - return response; - } + private Map details; } 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/model/RecommendShipDateForShipmentResult.java b/src/main/java/com/easypost/model/RecommendShipDateForShipmentResult.java new file mode 100644 index 000000000..6a9e73366 --- /dev/null +++ b/src/main/java/com/easypost/model/RecommendShipDateForShipmentResult.java @@ -0,0 +1,9 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public class RecommendShipDateForShipmentResult { + private TimeInTransitDetailsForShipDateRecommendation easypostTimeInTransitData; + private Rate rate; +} diff --git a/src/main/java/com/easypost/model/RecommendShipDateForZipPairResult.java b/src/main/java/com/easypost/model/RecommendShipDateForZipPairResult.java new file mode 100644 index 000000000..cfb87e5a2 --- /dev/null +++ b/src/main/java/com/easypost/model/RecommendShipDateForZipPairResult.java @@ -0,0 +1,15 @@ +package com.easypost.model; + +import java.util.List; + +import lombok.Getter; + +@Getter +public class RecommendShipDateForZipPairResult { + private Boolean saturdayDelivery; + private List results; + private List carriersWithoutTintEstimates; + private String desiredDeliveryDate; + private String fromZip; + private String toZip; +} diff --git a/src/main/java/com/easypost/model/RecommendShipDateResponse.java b/src/main/java/com/easypost/model/RecommendShipDateResponse.java new file mode 100644 index 000000000..15b5061e0 --- /dev/null +++ b/src/main/java/com/easypost/model/RecommendShipDateResponse.java @@ -0,0 +1,9 @@ +package com.easypost.model; + +import java.util.List; +import lombok.Getter; + +@Getter +public class RecommendShipDateResponse { + private List rates; +} diff --git a/src/main/java/com/easypost/model/ReferralCustomer.java b/src/main/java/com/easypost/model/ReferralCustomer.java index 3151b4bd9..b80518585 100644 --- a/src/main/java/com/easypost/model/ReferralCustomer.java +++ b/src/main/java/com/easypost/model/ReferralCustomer.java @@ -1,257 +1,7 @@ package com.easypost.model; -import com.easypost.EasyPost; -import com.easypost.exception.EasyPostException; - -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; +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; - } - - /** - * 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 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. - * @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.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.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 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.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.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..6dcbb2a9c 100644 --- a/src/main/java/com/easypost/model/ReferralCustomerCollection.java +++ b/src/main/java/com/easypost/model/ReferralCustomerCollection.java @@ -1,46 +1,27 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; +import java.util.Map; + +import com.easypost.exception.General.EndOfPaginationError; +import lombok.Getter; -public final class ReferralCustomerCollection extends EasyPostResource { +@Getter +public final class ReferralCustomerCollection extends PaginatedCollection { private List referralCustomers; - private boolean hasMore; - /** - * Get a list of ReferralCustomers. - * - * @return List of ReferralCustomers objects - */ - public List getReferralCustomers() { - return referralCustomers; - } + @Override + protected Map buildNextPageParameters(List referralCustomers, Integer pageSize) + throws EndOfPaginationError { + String lastId = referralCustomers.get(referralCustomers.size() - 1).getId(); - /** - * Set a list of ReferralCustomers. - * - * @param referralCustomers List of ReferralCustomers objects - */ - public void setReferralCustomers(final List referralCustomers) { - this.referralCustomers = referralCustomers; - } + Map parameters = new java.util.HashMap<>(); + parameters.put("before_id", lastId); - /** - * Get whether there are more ReferralCustomers to retrieve. - * - * @return whether there are more ReferralCustomers to retrieve - */ - public boolean getHasMore() { - return hasMore; - } + if (pageSize != null) { + parameters.put("page_size", pageSize); + } - /** - * 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; + return parameters; } } diff --git a/src/main/java/com/easypost/model/Refund.java b/src/main/java/com/easypost/model/Refund.java index 7f1d42703..841d0bfec 100644 --- a/src/main/java/com/easypost/model/Refund.java +++ b/src/main/java/com/easypost/model/Refund.java @@ -1,199 +1,12 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import lombok.Getter; +@Getter public final class Refund extends EasyPostResource { - private String id; 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 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. - * - * @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; - } - - /** - * 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 = 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 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 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..b336bc235 100644 --- a/src/main/java/com/easypost/model/RefundCollection.java +++ b/src/main/java/com/easypost/model/RefundCollection.java @@ -1,46 +1,27 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; +import java.util.Map; + +import com.easypost.exception.General.EndOfPaginationError; +import lombok.Getter; -public final class RefundCollection extends EasyPostResource { +@Getter +public final class RefundCollection extends PaginatedCollection { 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; - } + @Override + protected Map buildNextPageParameters(List refunds, Integer pageSize) + throws EndOfPaginationError { + String lastId = refunds.get(refunds.size() - 1).getId(); - /** - * 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; - } + Map parameters = new java.util.HashMap<>(); + parameters.put("before_id", lastId); - /** - * Get this RefundCollection's Refund objects. - * - * @return a List of Refund objects. - */ - public List getRefunds() { - return refunds; - } + if (pageSize != null) { + parameters.put("page_size", pageSize); + } - /** - * Set this RefundCollection's Refund objects. - * - * @param refunds a List of Refund objects. - */ - public void setRefunds(final List refunds) { - this.refunds = refunds; + return parameters; } } diff --git a/src/main/java/com/easypost/model/Report.java b/src/main/java/com/easypost/model/Report.java index 44cd44305..bde4fb708 100644 --- a/src/main/java/com/easypost/model/Report.java +++ b/src/main/java/com/easypost/model/Report.java @@ -1,258 +1,14 @@ package com.easypost.model; -import com.easypost.EasyPost; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - -import java.net.URLEncoder; import java.util.Date; -import java.util.HashMap; -import java.util.Map; +import lombok.Getter; +@Getter 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; 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 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. - * - * @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; - } - - /** - * 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 request(RequestMethod.POST, reportURL((String) params.get("type")), paramsWithoutType, Report.class, - apiKey); - } else { - throw new EasyPostException("Report type is required."); - } - } - - /** - * 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 EasyPostException("Undetermined Report Type"); - } - } - - /** - * 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 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 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..ad791c01b 100644 --- a/src/main/java/com/easypost/model/ReportCollection.java +++ b/src/main/java/com/easypost/model/ReportCollection.java @@ -1,46 +1,32 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; +import java.util.Map; + +import com.easypost.exception.General.EndOfPaginationError; +import lombok.Getter; +import lombok.Setter; -public final class ReportCollection extends EasyPostResource { +@Getter +public final class ReportCollection extends PaginatedCollection { 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; - } + @Setter + private String type; - /** - * Get this ReportCollection's Report objects. - * - * @return List of Report objects. - */ - public List getReports() { - return reports; - } + @Override + protected Map buildNextPageParameters(List reports, Integer pageSize) + throws EndOfPaginationError { + String lastId = reports.get(reports.size() - 1).getId(); + + Map parameters = new java.util.HashMap<>(); + parameters.put("before_id", lastId); + parameters.put("type", type); + + if (pageSize != null) { + parameters.put("page_size", pageSize); + } - /** - * Set this ReportCollection's Report objects. - * - * @param reports List of Report objects. - */ - public void setReports(final List reports) { - this.reports = reports; + return parameters; } } diff --git a/src/main/java/com/easypost/model/ScanForm.java b/src/main/java/com/easypost/model/ScanForm.java index e7dfbaaab..52ae55cb4 100644 --- a/src/main/java/com/easypost/model/ScanForm.java +++ b/src/main/java/com/easypost/model/ScanForm.java @@ -1,13 +1,10 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - import java.util.List; -import java.util.Map; +import lombok.Getter; +@Getter public class ScanForm extends EasyPostResource { - private String id; private String status; private String message; private Address fromAddress; @@ -16,254 +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 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. - * - * @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; - } - - /** - * 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 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 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 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..6fb7312b6 100644 --- a/src/main/java/com/easypost/model/ScanFormCollection.java +++ b/src/main/java/com/easypost/model/ScanFormCollection.java @@ -1,46 +1,27 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; +import java.util.Map; + +import com.easypost.exception.General.EndOfPaginationError; +import lombok.Getter; -public final class ScanFormCollection extends EasyPostResource { +@Getter +public final class ScanFormCollection extends PaginatedCollection { 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; - } + @Override + protected Map buildNextPageParameters(List scanForms, Integer pageSize) + throws EndOfPaginationError { + String lastId = scanForms.get(scanForms.size() - 1).getId(); - /** - * 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; - } + Map parameters = new java.util.HashMap<>(); + parameters.put("before_id", lastId); - /** - * Get this ScanFormCollection's ScanForm objects. - * - * @return List of ScanForm objects. - */ - public List getScanForms() { - return scanForms; - } + if (pageSize != null) { + parameters.put("page_size", pageSize); + } - /** - * Set this ScanFormCollection's ScanForm objects. - * - * @param scanForms List of ScanForm objects. - */ - public void setScanForms(final List scanForms) { - this.scanForms = scanForms; + return parameters; } } 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/ShipDateForZipPairRecommendation.java b/src/main/java/com/easypost/model/ShipDateForZipPairRecommendation.java new file mode 100644 index 000000000..524a9d8f2 --- /dev/null +++ b/src/main/java/com/easypost/model/ShipDateForZipPairRecommendation.java @@ -0,0 +1,10 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public class ShipDateForZipPairRecommendation { + private String carrier; + private String service; + private TimeInTransitDetailsForShipDate easypostTimeInTransitData; +} diff --git a/src/main/java/com/easypost/model/Shipment.java b/src/main/java/com/easypost/model/Shipment.java index 76f3e6c49..4c14dc23d 100644 --- a/src/main/java/com/easypost/model/Shipment.java +++ b/src/main/java/com/easypost/model/Shipment.java @@ -1,15 +1,15 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - -import java.util.HashMap; import java.util.List; import java.util.Map; -public final class Shipment extends EasyPostResource { - private String id; - private String mode; +import com.easypost.exception.EasyPostException; +import com.easypost.utils.Utilities; + +import lombok.Getter; + +@Getter +public class Shipment extends EasyPostResource { private String reference; private Boolean isReturn; private Address toAddress; @@ -38,1356 +38,39 @@ 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. - * - * @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. + * Get the lowest rate for this Shipment. * - * @return ScanForm object + * @return lowest Rate object + * @throws EasyPostException when the request fails. */ - public ScanForm getScanForm() { - return scanForm; + public Rate lowestRate() throws EasyPostException { + return this.lowestRate(null, null); } /** - * Set the scan form of this Shipment. + * Get the lowest rate for this Shipment. * - * @param scanForm the scan form of this Shipment. + * @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 void setScanForm(final ScanForm scanForm) { - this.scanForm = scanForm; + public Rate lowestRate(final List carriers, final List services) + throws EasyPostException { + return Utilities.getLowestObjectRate(this.getRates(), carriers, services); } /** - * Get the selected rate of this Shipment. + * Get the lowest rate for this shipment. * + * @param carriers the carriers to use in the query. * @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; - } - - /** - * 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 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 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 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 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 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; - } - - /** - * 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; - } - - /** - * 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 = - 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 = - 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 = - 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 request(RequestMethod.GET, 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 = - 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 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 EasyPostException("No rates found."); - } - - return lowestSmartrate; - } - - /** - * Get the lowest rate for this Shipment. - * - * @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 Shipment. - * - * @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 shipment. - * - * @param carriers the carriers to use in the query. - * @return Rate object - * @throws EasyPostException when the request fails. + * @throws EasyPostException when the request fails. */ 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 = - 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..c73db327f 100644 --- a/src/main/java/com/easypost/model/ShipmentCollection.java +++ b/src/main/java/com/easypost/model/ShipmentCollection.java @@ -1,46 +1,42 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; +import java.util.Map; + +import com.easypost.exception.General.EndOfPaginationError; +import lombok.Getter; +import lombok.Setter; -public final class ShipmentCollection extends EasyPostResource { +@Getter +public class ShipmentCollection extends PaginatedCollection { 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; - } + @Setter + private Boolean purchased; - /** - * Get this ShipmentCollection's Shipment objects. - * - * @return List of Shipment objects. - */ - public List getShipments() { - return shipments; - } + @Setter + private Boolean includeChildren; + + @Override + protected final Map buildNextPageParameters(List shipments, Integer pageSize) + throws EndOfPaginationError { + String lastId = shipments.get(shipments.size() - 1).getId(); + + Map parameters = new java.util.HashMap<>(); + parameters.put("before_id", lastId); + + if (pageSize != null) { + parameters.put("page_size", pageSize); + } + + // We only want to include these parameters if they are set (versus defaulting to false; anti-pattern) + if (purchased != null) { + parameters.put("purchased", purchased); + } + if (includeChildren != null) { + parameters.put("include_children", includeChildren); + } - /** - * Set this ShipmentCollection's Shipment objects. - * - * @param shipments List of Shipment objects. - */ - public void setShipments(final List shipments) { - this.shipments = shipments; + return parameters; } } 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 new file mode 100644 index 000000000..f45f07bae --- /dev/null +++ b/src/main/java/com/easypost/model/SmartRate.java @@ -0,0 +1,8 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public class SmartRate extends Rate { + private TimeInTransit timeInTransit; +} diff --git a/src/main/java/com/easypost/model/SmartrateAccuracy.java b/src/main/java/com/easypost/model/SmartRateAccuracy.java similarity index 56% rename from src/main/java/com/easypost/model/SmartrateAccuracy.java rename to src/main/java/com/easypost/model/SmartRateAccuracy.java index ef3863fbf..c08b6645d 100644 --- a/src/main/java/com/easypost/model/SmartrateAccuracy.java +++ b/src/main/java/com/easypost/model/SmartRateAccuracy.java @@ -1,6 +1,12 @@ package com.easypost.model; -public enum SmartrateAccuracy { +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.InvalidParameterError; + +import lombok.Getter; + +@Getter +public enum SmartRateAccuracy { Percentile50("percentile_50"), Percentile75("percentile_75"), Percentile85("percentile_85"), @@ -16,32 +22,23 @@ public enum SmartrateAccuracy { * * @param keyName the internal key name */ - SmartrateAccuracy(String keyName) { + SmartRateAccuracy(String keyName) { 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. * * @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 { - for (SmartrateAccuracy smartrateAccuracy : values()) { + 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("smartrateAccuracy"); } } diff --git a/src/main/java/com/easypost/model/SmartRateCollection.java b/src/main/java/com/easypost/model/SmartRateCollection.java new file mode 100644 index 000000000..60b5eef58 --- /dev/null +++ b/src/main/java/com/easypost/model/SmartRateCollection.java @@ -0,0 +1,51 @@ +package com.easypost.model; + +import java.util.ArrayList; +import java.util.List; + +public final class SmartRateCollection { + private List smartRates; + + /** + * Get this SmartRateCollection's Smartrate objects. + * + * @return List of Smartrate objects. + */ + public List getSmartRates() { + return this.smartRates; + } + + /** + * Set this SmartRateCollection's Smartrate objects. + * + * @param smartRates List of Smartrate objects. + */ + public void setSmartRates(final List smartRates) { + this.smartRates = smartRates; + } + + /** + * Constructor. + */ + public SmartRateCollection() { + this.smartRates = new ArrayList(); + } + + /** + * Create a SmartRateCollection from a list of rates. + * + * @param smartRates List of Smartrate objects + */ + public SmartRateCollection(final List smartRates) { + setSmartRates(smartRates); + } + + /** + * Add a SmartRate object to this SmartRateCollection. + * + * @param rate Rate object + */ + 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 similarity index 66% rename from src/main/java/com/easypost/model/SmartrateCollectionDeserializer.java rename to src/main/java/com/easypost/model/SmartRateCollectionDeserializer.java index 04ba6baec..18715c89e 100644 --- a/src/main/java/com/easypost/model/SmartrateCollectionDeserializer.java +++ b/src/main/java/com/easypost/model/SmartRateCollectionDeserializer.java @@ -8,32 +8,34 @@ import java.lang.reflect.Type; -public final class SmartrateCollectionDeserializer implements JsonDeserializer { +public final class SmartRateCollectionDeserializer implements JsonDeserializer { /** - * Deserialize a SmartrateCollection from a JSON object. + * Deserialize a SmartRateCollection from a JSON object. * * @param json JSON object to deserialize. * @param typeOfT Type of the object to deserialize. * @param context Deserialization context. - * @return Deserialized SmartrateCollection object. - * @throws JsonParseException if the JSON object is not a valid SmartrateCollection. + * @return Deserialized SmartRateCollection object. + * @throws JsonParseException if the JSON object is not a valid + * SmartRateCollection. */ @Override - public SmartrateCollection deserialize(final JsonElement json, final Type typeOfT, - final JsonDeserializationContext context) throws JsonParseException { - SmartrateCollection smartrateCollection = new SmartrateCollection(); + public SmartRateCollection deserialize(final JsonElement json, final Type typeOfT, + final JsonDeserializationContext context) throws JsonParseException { + SmartRateCollection smartrateCollection = new SmartRateCollection(); JsonObject jo = (JsonObject) json; JsonElement results = jo.get("result"); if (results == null || !results.isJsonArray()) { return smartrateCollection; - // return empty collection if "results" key does not exist or corresponding value is not an array + // return empty collection if "results" key does not exist or corresponding + // value is not an array } // 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/model/Smartrate.java b/src/main/java/com/easypost/model/Smartrate.java deleted file mode 100644 index 04fe1c670..000000000 --- a/src/main/java/com/easypost/model/Smartrate.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.easypost.model; - -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/SmartrateCollection.java b/src/main/java/com/easypost/model/SmartrateCollection.java deleted file mode 100644 index fc4e8b35f..000000000 --- a/src/main/java/com/easypost/model/SmartrateCollection.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.easypost.model; - -import java.util.ArrayList; -import java.util.List; - -public final class SmartrateCollection { - private List smartrates; - - /** - * Get this SmartrateCollection's Smartrate objects. - * - * @return List of Smartrate objects. - */ - public List getSmartrates() { - return this.smartrates; - } - - /** - * Set this SmartrateCollection's Smartrate objects. - * - * @param smartrates List of Smartrate objects. - */ - public void setSmartrates(final List smartrates) { - this.smartrates = smartrates; - } - - /** - * Constructor. - */ - public SmartrateCollection() { - this.smartrates = new ArrayList(); - } - - /** - * Create a SmartrateCollection from a list of rates. - * - * @param smartrates List of Smartrate objects - */ - public SmartrateCollection(final List smartrates) { - setSmartrates(smartrates); - } - - /** - * Add a SmartRate object to this SmartrateCollection. - * - * @param rate Rate object - */ - public void addRate(final Smartrate rate) { - smartrates.add(rate); - } -} diff --git a/src/main/java/com/easypost/model/StatelessRate.java b/src/main/java/com/easypost/model/StatelessRate.java new file mode 100644 index 000000000..fd8f092a9 --- /dev/null +++ b/src/main/java/com/easypost/model/StatelessRate.java @@ -0,0 +1,23 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public class StatelessRate { + private Boolean deliveryDateGuaranteed; + private Integer deliveryDays; + private Integer estDeliveryDays; + private String billingType; + private String carrier; + private String carrierAccountId; + private String currency; + private String deliveryDate; + private String listCurrency; + private String listRate; + private String mode; + private String object; + private String rate; + private String retailCurrency; + private String retailRate; + private String service; +} diff --git a/src/main/java/com/easypost/model/StatelessRateDeserializer.java b/src/main/java/com/easypost/model/StatelessRateDeserializer.java new file mode 100644 index 000000000..029020154 --- /dev/null +++ b/src/main/java/com/easypost/model/StatelessRateDeserializer.java @@ -0,0 +1,42 @@ +package com.easypost.model; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.List; + +import com.easypost.Constants; +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; + +public final class StatelessRateDeserializer implements JsonDeserializer { + /** + * Deserialize a StatelessRate from a JSON object. + * + * @param json JSON object to deserialize. + * @param typeOfT Type of the object to deserialize. + * @param context Deserialization context. + * @return Deserialized StatelessRate object. + * @throws JsonParseException if the JSON object is not a valid StatelessRate. + */ + @Override + public StatelessRate[] deserialize(final JsonElement json, final Type typeOfT, + final JsonDeserializationContext context) throws JsonParseException { + JsonObject jo = json.getAsJsonObject(); + JsonElement results = jo.get("rates"); + + if (results == null || !results.isJsonArray()) { + return new StatelessRate[0]; + } + + List ratesList = new ArrayList<>(); + for (JsonElement element : results.getAsJsonArray()) { + StatelessRate rate = Constants.Http.GSON.fromJson(element, StatelessRate.class); + ratesList.add(rate); + } + + return ratesList.toArray(new StatelessRate[0]); + } +} diff --git a/src/main/java/com/easypost/model/TaxIdentifier.java b/src/main/java/com/easypost/model/TaxIdentifier.java index cee78713c..3c9b21a58 100644 --- a/src/main/java/com/easypost/model/TaxIdentifier.java +++ b/src/main/java/com/easypost/model/TaxIdentifier.java @@ -1,83 +1,11 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; +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 b228798a4..927c162a9 100644 --- a/src/main/java/com/easypost/model/TimeInTransit.java +++ b/src/main/java/com/easypost/model/TimeInTransit.java @@ -1,190 +1,37 @@ package com.easypost.model; import com.easypost.exception.EasyPostException; +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. - * - * @param percentile the percentile to find the corresponding accuracy for - * @return the delivery accuracy of the specified percentile - * @throws EasyPostException when the percentile is not valid - * @deprecated Use {@link #getBySmartrateAccuracy(SmartrateAccuracy)} instead. - * Deprecated: v5.5.0 - v7.0.0 - */ - @Deprecated - public int getSmartRateAccuracy(final String percentile) throws EasyPostException { - switch (percentile) { - case "percentile_50": - return this.percentile50; - case "percentile_75": - return this.percentile75; - case "percentile_85": - return this.percentile85; - case "percentile_90": - return this.percentile90; - case "percentile_95": - return this.percentile95; - case "percentile_97": - return this.percentile97; - case "percentile_99": - return this.percentile99; - default: - throw new EasyPostException("Invalid percentile value"); - } - } - /** * Get the delivery accuracy of a specific percentile of this TimeInTransit. * - * @param accuracy the SmartrateAccuracy to find the corresponding accuracy for + * @param accuracy the SmartRateAccuracy to find the corresponding accuracy for * @return the delivery accuracy of the specified percentile * @throws EasyPostException when the percentile is not valid */ - public int getBySmartrateAccuracy(SmartrateAccuracy accuracy) throws EasyPostException { + public int getSmartRateAccuracy(SmartRateAccuracy accuracy) throws EasyPostException { switch (accuracy) { case Percentile50: return this.percentile50; @@ -201,7 +48,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/model/TimeInTransitDetailsForDeliveryDate.java b/src/main/java/com/easypost/model/TimeInTransitDetailsForDeliveryDate.java new file mode 100644 index 000000000..203f74250 --- /dev/null +++ b/src/main/java/com/easypost/model/TimeInTransitDetailsForDeliveryDate.java @@ -0,0 +1,10 @@ +package com.easypost.model; + +import java.util.Date; +import lombok.Getter; + +@Getter +public class TimeInTransitDetailsForDeliveryDate { + private Date easypostEstimatedDeliveryDate; + private TimeInTransit daysInTransit; +} diff --git a/src/main/java/com/easypost/model/TimeInTransitDetailsForShipDate.java b/src/main/java/com/easypost/model/TimeInTransitDetailsForShipDate.java new file mode 100644 index 000000000..214c02ebc --- /dev/null +++ b/src/main/java/com/easypost/model/TimeInTransitDetailsForShipDate.java @@ -0,0 +1,12 @@ +package com.easypost.model; + +import java.util.Date; +import lombok.Getter; + +@Getter +public class TimeInTransitDetailsForShipDate { + private Date shipOnDate; + private Float deliveryDateConfidence; + private int estimatedTransitDays; + private TimeInTransit daysInTransit; +} diff --git a/src/main/java/com/easypost/model/TimeInTransitDetailsForShipDateRecommendation.java b/src/main/java/com/easypost/model/TimeInTransitDetailsForShipDateRecommendation.java new file mode 100644 index 000000000..12e266800 --- /dev/null +++ b/src/main/java/com/easypost/model/TimeInTransitDetailsForShipDateRecommendation.java @@ -0,0 +1,13 @@ +package com.easypost.model; + +import java.util.Date; +import lombok.Getter; + +@Getter +public class TimeInTransitDetailsForShipDateRecommendation { + private Date desiredDeliveryDate; + private Float deliveryDateConfidence; + private String estimatedTransitDays; + private String shipOnDate; + private TimeInTransit daysInTransit; +} diff --git a/src/main/java/com/easypost/model/Tracker.java b/src/main/java/com/easypost/model/Tracker.java index e4c8c7514..0e90b4911 100644 --- a/src/main/java/com/easypost/model/Tracker.java +++ b/src/main/java/com/easypost/model/Tracker.java @@ -1,16 +1,12 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - import java.util.Date; -import java.util.HashMap; import java.util.List; -import java.util.Map; -public final class Tracker extends EasyPostResource { - private String id; - private String mode; +import lombok.Getter; + +@Getter +public class Tracker extends EasyPostResource { private String trackingCode; private String status; private String shipmentId; @@ -22,360 +18,6 @@ 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 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. - * - * @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 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. - * - * @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; - } - - /** - * 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 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 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 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. - * @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); - } - - /** - * 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). - * @return whether the creation was successful. - * @throws EasyPostException when the request fails. - */ - public static boolean 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; - } + private Boolean finalized; + private Boolean isReturn; } diff --git a/src/main/java/com/easypost/model/TrackerCollection.java b/src/main/java/com/easypost/model/TrackerCollection.java index eb27ac1d5..843abd1f1 100644 --- a/src/main/java/com/easypost/model/TrackerCollection.java +++ b/src/main/java/com/easypost/model/TrackerCollection.java @@ -1,46 +1,48 @@ package com.easypost.model; -import com.easypost.net.EasyPostResource; - import java.util.List; +import java.util.Map; + +import com.easypost.exception.General.EndOfPaginationError; +import lombok.Getter; +import lombok.Setter; -public final class TrackerCollection extends EasyPostResource { +@Getter +public class TrackerCollection extends PaginatedCollection { 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; - } + @Setter + private String trackingCode; - /** - * Get this TrackerCollection's Tracker objects. - * - * @return List of Tracker objects. - */ - public List getTrackers() { - return trackers; - } + @Setter + private List trackingCodes; + + @Setter + private String carrier; + + @Override + protected final Map buildNextPageParameters(List trackers, Integer pageSize) + throws EndOfPaginationError { + String lastId = trackers.get(trackers.size() - 1).getId(); + + Map parameters = new java.util.HashMap<>(); + parameters.put("before_id", lastId); + + if (pageSize != null) { + parameters.put("page_size", pageSize); + } + + // We only want to include these parameters if they are set (versus defaulting to false; anti-pattern) + if (trackingCode != null) { + parameters.put("tracking_code", trackingCode); + } + if (trackingCodes != null) { + parameters.put("tracking_codes", trackingCodes); + } + if (carrier != null) { + parameters.put("carrier", carrier); + } - /** - * Set this TrackerCollection's Tracker objects. - * - * @param trackers List of Tracker objects. - */ - public void setTrackers(final List trackers) { - this.trackers = trackers; + return parameters; } } diff --git a/src/main/java/com/easypost/model/TrackingDetail.java b/src/main/java/com/easypost/model/TrackingDetail.java index 83ad37243..e9af665d0 100644 --- a/src/main/java/com/easypost/model/TrackingDetail.java +++ b/src/main/java/com/easypost/model/TrackingDetail.java @@ -2,101 +2,17 @@ import java.util.Date; +import lombok.Getter; + +@Getter public final class TrackingDetail { - private String status; private String message; + private String description; + private String status; + private String statusDetail; private Date datetime; + private String source; + private String carrierCode; 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; - } - + private String estDeliveryDate; } 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/User.java b/src/main/java/com/easypost/model/User.java index 077bb2196..2778292e0 100644 --- a/src/main/java/com/easypost/model/User.java +++ b/src/main/java/com/easypost/model/User.java @@ -1,189 +1,4 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; - -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 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 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 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 = - 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 { - 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 EasyPostException( - String.format("Unable to find api key. Please contact %s.", EasyPostResource.EASYPOST_SUPPORT_EMAIL)); - } - - /** - * 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 request(RequestMethod.PUT, updateBrandUrl, wrappedParams, Brand.class, apiKey); - } } diff --git a/src/main/java/com/easypost/model/Utilities.java b/src/main/java/com/easypost/model/Utilities.java deleted file mode 100644 index 16d18f678..000000000 --- a/src/main/java/com/easypost/model/Utilities.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.easypost.model; - -import com.easypost.exception.EasyPostException; - -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"); - } - - /** - * Get the lowest rate from a list of rates. - * - * @param rates the list of rates. - * @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 static Rate getLowestObjectRate(List rates, List carriers, List services) - throws EasyPostException { - Rate lowestRate = null; - - if (carriers != null) { - for (int i = 0; i < carriers.size(); i++) { - carriers.set(i, carriers.get(i).toLowerCase()); - } - } - - if (services != null) { - for (int i = 0; i < services.size(); i++) { - services.set(i, services.get(i).toLowerCase()); - } - } - - for (Rate rate : rates) { - if ((carriers != null && !carriers.contains(rate.getCarrier().toLowerCase())) || - (services != null && !services.contains(rate.getService().toLowerCase()))) { - continue; - } - - if (lowestRate == null || rate.getRate() < lowestRate.getRate()) { - lowestRate = rate; - } - } - - if (lowestRate == null) { - throw new EasyPostException("Unable to find lowest rate matching required criteria."); - } - - return lowestRate; - } - - /** - * 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 Exception - */ - public static String getEncodedURL(Map params, String parentKey) throws Exception { - 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 Exception("Something went wrong during the URL encoding."); - } - - return result.toString(); - } -} diff --git a/src/main/java/com/easypost/model/Webhook.java b/src/main/java/com/easypost/model/Webhook.java index 8c54bb299..4e6ca3218 100644 --- a/src/main/java/com/easypost/model/Webhook.java +++ b/src/main/java/com/easypost/model/Webhook.java @@ -1,275 +1,12 @@ package com.easypost.model; -import com.easypost.exception.EasyPostException; -import com.easypost.net.EasyPostResource; -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; +import java.util.List; +import lombok.Getter; +@Getter public final class Webhook extends EasyPostResource { - private String id; - private String mode; 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; - } - - /** - * 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 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 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 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 { - 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; - } - - /** - * 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 = - 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 GSON.fromJson(json, Event.class); - } else { - throw new EasyPostException( - "Webhook received did not originate from EasyPost or had a webhook secret mismatch."); - } - } else { - throw new EasyPostException("Webhook received does not contain an HMAC signature."); - } - } + private List customHeaders; } diff --git a/src/main/java/com/easypost/model/WebhookCollection.java b/src/main/java/com/easypost/model/WebhookCollection.java deleted file mode 100644 index a7c760969..000000000 --- a/src/main/java/com/easypost/model/WebhookCollection.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.easypost.model; - -import com.easypost.net.EasyPostResource; - -import java.util.List; - -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/model/WebhookCustomHeader.java b/src/main/java/com/easypost/model/WebhookCustomHeader.java new file mode 100644 index 000000000..ebe359938 --- /dev/null +++ b/src/main/java/com/easypost/model/WebhookCustomHeader.java @@ -0,0 +1,9 @@ +package com.easypost.model; + +import lombok.Getter; + +@Getter +public final class WebhookCustomHeader { + private String name; + private String value; +} diff --git a/src/main/java/com/easypost/model/WebhookDeserializer.java b/src/main/java/com/easypost/model/WebhookDeserializer.java new file mode 100644 index 000000000..9e1a02d1e --- /dev/null +++ b/src/main/java/com/easypost/model/WebhookDeserializer.java @@ -0,0 +1,42 @@ +package com.easypost.model; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.List; + +import com.easypost.Constants; +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; + +public final class WebhookDeserializer implements JsonDeserializer { + /** + * Deserialize a list of Webhook from a JSON object. + * + * @param json JSON object to deserialize. + * @param typeOfT Type of the object to deserialize. + * @param context Deserialization context. + * @return Deserialized Webhook object. + * @throws JsonParseException if the JSON object is not a valid Webhook. + */ + @Override + public Webhook[] deserialize(final JsonElement json, final Type typeOfT, + final JsonDeserializationContext context) throws JsonParseException { + JsonObject jo = json.getAsJsonObject(); + JsonElement results = jo.get("webhooks"); + + if (results == null || !results.isJsonArray()) { + return new Webhook[0]; + } + + List webhooksList = new ArrayList<>(); + for (JsonElement element : results.getAsJsonArray()) { + Webhook webhook = Constants.Http.GSON.fromJson(element, Webhook.class); + webhooksList.add(webhook); + } + + return webhooksList.toArray(new Webhook[0]); + } +} 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/net/EasyPostResource.java b/src/main/java/com/easypost/net/EasyPostResource.java deleted file mode 100644 index f65e6d864..000000000 --- a/src/main/java/com/easypost/net/EasyPostResource.java +++ /dev/null @@ -1,880 +0,0 @@ -/** - * 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.net; - -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.Rate; -import com.easypost.model.RateDeserializer; -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; - -import javax.net.ssl.HttpsURLConnection; -import java.io.IOException; -import java.io.InputStream; -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 { - 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(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) - .registerTypeAdapter(Event.class, new EventDeserializer()).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; - - /** - * 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; - } - - /** - * @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. - * - * @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; - } - - /** - * @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)); - } - - static Map getHeaders(String apiKey) { - Map headers = new HashMap(); - headers.put("Accept-Charset", 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")))); - - if (apiKey == null) { - apiKey = EasyPost.apiKey; - } - - headers.put("Authorization", String.format("Bearer %s", apiKey)); - - return headers; - } - - 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 { - 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); - Constructor constructor = clazz.getConstructor(); - 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) { - throw new IOException(e); - } - } else if (EasyPost._vcr != null) { - try { - conn = EasyPost._vcr.getHttpUrlConnection(url).openConnectionSecure(); - } catch (Exception vcrException) { - throw new IOException(vcrException); - } - } else { - URL urlObj = new URL(null, url); - conn = (javax.net.ssl.HttpsURLConnection) urlObj.openConnection(); - } - conn.setConnectTimeout(getConnectTimeoutMilliseconds()); - conn.setRequestMethod(method); - - int readTimeout; - if (EasyPost.readTimeout != 0) { - readTimeout = EasyPost.readTimeout; - } else { - readTimeout = getReadTimeoutMilliseconds(); - } - conn.setReadTimeout(readTimeout); - - conn.setUseCaches(false); - for (Map.Entry header : getHeaders(apiKey).entrySet()) { - conn.setRequestProperty(header.getKey(), header.getValue()); - } - - return conn; - } - - private static javax.net.ssl.HttpsURLConnection writeBody(final javax.net.ssl.HttpsURLConnection conn, - final JsonObject body) throws IOException { - if (body != null) { - conn.setDoOutput(true); - conn.setRequestProperty("Content-Type", "application/json"); - OutputStream output = null; - try { - output = conn.getOutputStream(); - String jsonString = body.toString(); - output.write(jsonString.getBytes(CHARSET)); - } finally { - if (output != null) { - output.close(); - } - } - } - return conn; - } - - private static javax.net.ssl.HttpsURLConnection createGetConnection(final String url, final String query, - final String apiKey) throws IOException { - String getURL = url; - if (query != null) { - getURL = String.format("%s?%s", url, query); - } - javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(getURL, apiKey, "GET"); - return conn; - } - - 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"); - conn = writeBody(conn, body); - return conn; - } - - private static javax.net.ssl.HttpsURLConnection createDeleteConnection(final String url, final String query, - final String apiKey) throws IOException { - String deleteUrl = url; - if (query != null) { - deleteUrl = String.format("%s?%s", url, query); - } - javax.net.ssl.HttpsURLConnection conn = createEasyPostConnection(deleteUrl, apiKey, "DELETE"); - return conn; - } - - 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"); - 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)); - JsonObject jsonObject = jsonElement.getAsJsonObject(); - return jsonObject; - } - - private static String createQuery(final Map params) throws UnsupportedEncodingException { - Map flatParams = flattenParams(params); - StringBuilder queryStringBuilder = new StringBuilder(); - for (Map.Entry entry : flatParams.entrySet()) { - queryStringBuilder.append("&"); - queryStringBuilder.append(urlEncodePair(entry.getKey(), entry.getValue())); - } - if (queryStringBuilder.length() > 0) { - queryStringBuilder.deleteCharAt(0); - } - return queryStringBuilder.toString(); - } - - private static Map flattenParams(final Map params) { - if (params == null) { - return new HashMap(); - } - Map flatParams = new HashMap(); - for (Map.Entry entry : params.entrySet()) { - String key = entry.getKey(); - Object value = entry.getValue(); - if (value instanceof Map) { - Map flatNestedMap = new HashMap(); - Map nestedMap = (Map) value; - for (Map.Entry nestedEntry : nestedMap.entrySet()) { - flatNestedMap.put(String.format("%s[%s]", key, nestedEntry.getKey()), nestedEntry.getValue()); - } - flatParams.putAll(flattenParams(flatNestedMap)); - } else if (value instanceof List) { - Map flatNestedMap = new HashMap(); - List nestedList = (List) value; - for (int i = 0; i < nestedList.size(); i++) { - flatNestedMap.put(String.format("%s[%s]", key, i), nestedList.get(i)); - flatParams.putAll(flattenParams(flatNestedMap)); - } - } else if (value instanceof EasyPostResource) { - flatParams.put(String.format("%s[%s]", key, "id"), value.toString()); - - } else if (value != null) { - flatParams.put(key, value.toString()); - } - } - - return flatParams; - } - - private static String getResponseBody(final InputStream responseStream) throws IOException { - @SuppressWarnings ("resource") String rBody = new Scanner(responseStream, 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) - throws EasyPostException { - javax.net.ssl.HttpsURLConnection conn = null; - try { - switch (method) { - case GET: - conn = createGetConnection(url, query, apiKey); - break; - case POST: - conn = createPostConnection(url, body, apiKey); - break; - case PUT: - conn = createPutConnection(url, body, apiKey); - break; - case DELETE: - conn = createDeleteConnection(url, query, apiKey); - break; - default: - throw new EasyPostException( - String.format("Unrecognized HTTP method %s. Please contact EasyPost at %s.", method, - EasyPostResource.EASYPOST_SUPPORT_EMAIL)); - } - conn.connect(); // This line is crucial for getting VCR to work - // (triggers internal pre-request processing needed for VCR) - int rCode = conn.getResponseCode(); // sends the request - String rBody = null; - if (rCode == HttpURLConnection.HTTP_NO_CONTENT) { - rBody = ""; - } else if (rCode >= HttpURLConnection.HTTP_OK && rCode < HttpURLConnection.HTTP_MULT_CHOICE) { - rBody = getResponseBody(conn.getInputStream()); - } else { - rBody = getResponseBody(conn.getErrorStream()); - } - return new EasyPostResponse(rCode, rBody); - } 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); - } finally { - if (conn != null) { - conn.disconnect(); - } - } - } - - protected static T request(final EasyPostResource.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 { - String originalDNSCacheTTL = null; - boolean allowedToSetTTL = true; - try { - originalDNSCacheTTL = java.security.Security.getProperty(DNS_CACHE_TTL_PROPERTY_NAME); - // disable DNS cache - java.security.Security.setProperty(DNS_CACHE_TTL_PROPERTY_NAME, "0"); - } catch (SecurityException se) { - allowedToSetTTL = false; - } - - try { - return _request(method, url, params, clazz, apiKey, apiKeyRequired); - } finally { - if (allowedToSetTTL) { - if (originalDNSCacheTTL == null) { - // value unspecified by implementation - java.security.Security.setProperty(DNS_CACHE_TTL_PROPERTY_NAME, "-1"); // cache forever - } else { - java.security.Security.setProperty(DNS_CACHE_TTL_PROPERTY_NAME, originalDNSCacheTTL); - } - } - } - } - - @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 { - 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)); - - } - } - - if (apiKey == null) { - apiKey = EasyPost.apiKey; - } - - String query = null; - JsonObject body = null; - if (params != null) { - switch (method) { - case GET: - case DELETE: - try { - query = createQuery(params); - } 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); - } - break; - case POST: - case PUT: - try { - body = createBody(params); - } 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); - } - break; - default: - break; - } - } - - - EasyPostResponse response; - try { - // HTTPSURLConnection verifies SSL cert by default - response = makeURLConnectionRequest(method, url, query, body, apiKey); - } catch (ClassCastException ce) { - // appengine - String appEngineEnv = System.getProperty("com.google.appengine.runtime.environment", null); - if (appEngineEnv != null) { - response = makeAppEngineRequest(method, url, query, body, apiKey); - } else { - throw ce; - } - } - int rCode = response.getResponseCode(); - String rBody = response.getResponseBody(); - if (rCode < HttpURLConnection.HTTP_OK || rCode >= HttpURLConnection.HTTP_MULT_CHOICE) { - handleAPIError(rBody, rCode); - } - - 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)); - } - } - - private static EasyPostResponse makeAppEngineRequest(final RequestMethod method, String url, final String query, - 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); - try { - if ((method == RequestMethod.GET || method == RequestMethod.DELETE) && query != null) { - url = String.format("%s?%s", url, query); - } - URL fetchURL = new URL(url); - - Class requestMethodClass = Class.forName("com.google.appengine.api.urlfetch.HTTPMethod"); - Object httpMethod = requestMethodClass.getDeclaredField(method.name()).get(null); - - Class fetchOptionsBuilderClass = Class.forName("com.google.appengine.api.urlfetch.FetchOptions$Builder"); - Object fetchOptions = null; - try { - fetchOptions = fetchOptionsBuilderClass.getDeclaredMethod("validateCertificate").invoke(null); - } catch (NoSuchMethodException e) { - 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); - 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 - fetchOptionsClass.getDeclaredMethod("setDeadline", java.lang.Double.class) - .invoke(fetchOptions, getAppEngineTimeoutSeconds()); - - Class requestClass = Class.forName("com.google.appengine.api.urlfetch.HTTPRequest"); - - Object request = requestClass.getDeclaredConstructor(URL.class, requestMethodClass, fetchOptionsClass) - .newInstance(fetchURL, httpMethod, fetchOptions); - - if ((method == RequestMethod.POST || method == RequestMethod.PUT) && body != null) { - String bodyString = body.toString(); - requestClass.getDeclaredMethod("setPayload", byte[].class).invoke(request, bodyString.getBytes()); - } - - for (Map.Entry header : getHeaders(apiKey).entrySet()) { - Class httpHeaderClass = Class.forName("com.google.appengine.api.urlfetch.HTTPHeader"); - Object reqHeader = httpHeaderClass.getDeclaredConstructor(String.class, String.class) - .newInstance(header.getKey(), header.getValue()); - requestClass.getDeclaredMethod("setHeader", httpHeaderClass).invoke(request, reqHeader); - } - - Class urlFetchFactoryClass = Class.forName("com.google.appengine.api.urlfetch.URLFetchServiceFactory"); - Object urlFetchService = urlFetchFactoryClass.getDeclaredMethod("getURLFetchService").invoke(null); - - Method fetchMethod = urlFetchService.getClass().getDeclaredMethod("fetch", requestClass); - fetchMethod.setAccessible(true); - 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); - - 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); - } - } - - /** - * 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 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; - } - } - -} diff --git a/src/main/java/com/easypost/net/EasyPostResponse.java b/src/main/java/com/easypost/net/EasyPostResponse.java deleted file mode 100644 index 27619ec6f..000000000 --- a/src/main/java/com/easypost/net/EasyPostResponse.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * EasyPostResponse.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.net; - -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. - * - * @param responseCode HTTP response code - * @param responseBody HTTP response body - */ - public EasyPostResponse(final int responseCode, final String responseBody) { - this.responseCode = responseCode; - this.responseBody = responseBody; - } -} 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..1ad0697c5 --- /dev/null +++ b/src/main/java/com/easypost/service/AddressService.java @@ -0,0 +1,150 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +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 lombok.SneakyThrows; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; + +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")); + } + + if (params.containsKey("verify_carrier")) { + wrappedParams.put("verify_carrier", params.remove("verify_carrier")); + } + + wrappedParams.put("address", params); + + String endpoint = "addresses"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "addresses/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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 { + String endpoint = "addresses"; + + return Requestor.request(RequestMethod.GET, endpoint, params, AddressCollection.class, client); + } + + /** + * Get the next page of an AddressCollection. + * + * @param collection AddressCollection to get next page of. + * @return AddressCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public AddressCollection getNextPage(AddressCollection collection) throws EndOfPaginationError { + return getNextPage(collection, null); + } + + /** + * Get the next page of an AddressCollection. + * + * @param collection AddressCollection to get next page of. + * @param pageSize The number of results to return on the next page. + * @return AddressCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public AddressCollection getNextPage(AddressCollection collection, Integer pageSize) throws EndOfPaginationError { + return collection.getNextPage(new Function, AddressCollection>() { + @Override @SneakyThrows + public AddressCollection apply(Map parameters) { + return all(parameters); + } + }, collection.getAddresses(), pageSize); + } + + /** + * 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(); + + if (params.containsKey("verify_carrier")) { + wrappedParams.put("verify_carrier", params.remove("verify_carrier")); + } + + wrappedParams.put("address", params); + + String endpoint = "addresses/create_and_verify"; + + AddressVerifyResponse response = + Requestor.request(RequestMethod.POST, endpoint, 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 endpoint = "addresses/" + id + "/verify"; + + AddressVerifyResponse response = + Requestor.request(RequestMethod.GET, endpoint, 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..20ca357a3 --- /dev/null +++ b/src/main/java/com/easypost/service/ApiKeyService.java @@ -0,0 +1,114 @@ +package com.easypost.service; + +import com.easypost.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 java.util.List; +import java.util.Objects; + +public class ApiKeyService { + private final EasyPostClient client; + + /** + * ApiKeyService constructor. + * + * @param client The client object. + */ + ApiKeyService(EasyPostClient client) { + this.client = 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 retrieveApiKeysForUser(final String id) throws EasyPostException { + ApiKeys parentKeys = 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.ErrorMessages.NO_OBJECT_FOUND, "API keys")); + } + + /** + * Get all API keys. + * + * @return ApiKeys object. + * @throws EasyPostException when the request fails. + */ + public ApiKeys all() throws EasyPostException { + String endpoint = "api_keys"; + + return Requestor.request(RequestMethod.GET, endpoint, null, ApiKeys.class, client); + } + + /** + * Create an API key for a child or referral customer user. + * + * @param mode The mode of the API key (production or test). + * @return ApiKey object. + * @throws EasyPostException when the request fails. + */ + public ApiKey create(final String mode) throws EasyPostException { + String endpoint = "api_keys"; + + java.util.Map params = new java.util.HashMap<>(); + params.put("mode", mode); + + return Requestor.request(RequestMethod.POST, endpoint, params, ApiKey.class, client); + } + + /** + * Delete an API key for a child or referral customer user. + * + * @param id The ID of the API key to delete. + * @throws EasyPostException when the request fails. + */ + public void delete(final String id) throws EasyPostException { + String endpoint = String.format("api_keys/%s", id); + + Requestor.request(RequestMethod.DELETE, endpoint, null, ApiKey.class, client); + } + + /** + * Enable a child or referral customer API key. + * + * @param id The ID of the API key to enable. + * @return ApiKey object. + * @throws EasyPostException when the request fails. + */ + public ApiKey enable(final String id) throws EasyPostException { + String endpoint = String.format("api_keys/%s/enable", id); + + return Requestor.request(RequestMethod.POST, endpoint, null, ApiKey.class, client); + } + + /** + * Disable a child or referral customer API key. + * + * @param id The ID of the API key to disable. + * @return ApiKey object. + * @throws EasyPostException when the request fails. + */ + public ApiKey disable(final String id) throws EasyPostException { + String endpoint = String.format("api_keys/%s/disable", id); + + return Requestor.request(RequestMethod.POST, endpoint, null, ApiKey.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..979bdbe81 --- /dev/null +++ b/src/main/java/com/easypost/service/BatchService.java @@ -0,0 +1,202 @@ +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 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); + + String endpoint = "batches"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "batches/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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 { + String endpoint = "batches"; + + return Requestor.request(RequestMethod.GET, endpoint, params, BatchCollection.class, client); + } + + // TODO: Add getNextPage function when Batches are sorted newest to oldest. + + /** + * 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 endpoint = "batches/" + id + "/label"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 endpoint = "batches/" + id + "/add_shipments"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 endpoint = "batches/" + id + "/remove_shipments"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 endpoint = "batches/" + id + "/buy"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 endpoint = "batches/" + id + "/scan_form"; + + return Requestor.request(RequestMethod.POST, endpoint, params, Batch.class, client); + } +} diff --git a/src/main/java/com/easypost/service/BetaRateService.java b/src/main/java/com/easypost/service/BetaRateService.java new file mode 100644 index 000000000..7650f6a7f --- /dev/null +++ b/src/main/java/com/easypost/service/BetaRateService.java @@ -0,0 +1,40 @@ +package com.easypost.service; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.StatelessRate; + +public class BetaRateService { + private final EasyPostClient client; + + /** + * BetaRateService constructor. + * + * @param client The client object. + */ + BetaRateService(EasyPostClient client) { + this.client = client; + } + + /** + * List all StatelessRate objects. + * + * @param params Map of parameters. + * @return List of StatelessRate objects. + * @throws EasyPostException when the request fails. + */ + public List retrieveStatelessRates(HashMap params) throws EasyPostException { + HashMap wrappedParams = new HashMap(); + wrappedParams.put("shipment", params); + + StatelessRate[] statelessRates = Requestor.request(RequestMethod.POST, "rates", wrappedParams, + StatelessRate[].class, client, "beta"); + + return Arrays.asList(statelessRates); + } +} 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..e76704b8d --- /dev/null +++ b/src/main/java/com/easypost/service/BetaReferralCustomerService.java @@ -0,0 +1,136 @@ +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.ClientSecret; +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 When the request fails. + */ + 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 When the request fails. + */ + 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); + + String endpoint = "referral_customers/payment_method"; + + return Requestor.request(RequestMethod.POST, endpoint, wrappedParams, + PaymentMethodObject.class, client, "beta"); + } + + /** + * Refund by amount for a recent payment. + * + * @param refundAmount Amount to be refunded by cents. + * @return BetaPaymentRefund object. + * @throws EasyPostException When the request fails. + */ + public BetaPaymentRefund refundByAmount(int refundAmount) throws EasyPostException { + HashMap params = new HashMap<>(); + params.put("refund_amount", refundAmount); + + String endpoint = "referral_customers/refunds"; + + return Requestor.request(RequestMethod.POST, endpoint, params, + BetaPaymentRefund.class, client, "beta"); + } + + /** + * Refund a payment by a payment log ID. + * + * @param paymentLogId ID of the payment log. + * @return BetaPaymentRefund object. + * @throws EasyPostException When the request fails. + */ + public BetaPaymentRefund refundByPaymentLog(String paymentLogId) throws EasyPostException { + HashMap params = new HashMap<>(); + params.put("payment_log_id", paymentLogId); + + String endpoint = "referral_customers/refunds"; + + return Requestor.request(RequestMethod.POST, endpoint, params, + BetaPaymentRefund.class, client, "beta"); + } + + /** + * Creates a client secret to use with Stripe when adding a credit card. + * + * @return ClientSecret containing the client secret. + * @throws EasyPostException When the request fails. + */ + public ClientSecret createCreditCardClientSecret() throws EasyPostException { + String endpoint = "setup_intents"; + + return Requestor.request(RequestMethod.POST, endpoint, null, ClientSecret.class, client, "beta"); + } + + /** + * Creates a client secret to use with Stripe when adding a bank account. + * + * @return ClientSecret containing the client secret. + * @throws EasyPostException When the request fails. + */ + public ClientSecret createBankAccountClientSecret() throws EasyPostException { + return createBankAccountClientSecret(null); + } + + /** + * Creates a client secret to use with Stripe when adding a bank account. + * + * @param returnUrl Optional return URL for the bank account setup. + * @return ClientSecret containing the client secret. + * @throws EasyPostException When the request fails. + */ + public ClientSecret createBankAccountClientSecret(String returnUrl) throws EasyPostException { + HashMap params = new HashMap<>(); + if (returnUrl != null) { + params.put("return_url", returnUrl); + } + + String endpoint = "financial_connections_sessions"; + + return Requestor.request(RequestMethod.POST, endpoint, params, ClientSecret.class, client, "beta"); + } +} 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..03561e90d --- /dev/null +++ b/src/main/java/com/easypost/service/BillingService.java @@ -0,0 +1,116 @@ +package com.easypost.service; + +import com.easypost.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 endpoint = paymentMethodObject.getEndpoint() + "/" + paymentMethodObject.getId(); + + // will attempt to serialize empty JSON to a PaymentMethod.class, that's fine + Requestor.request(RequestMethod.DELETE, endpoint, 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 endpoint = paymentMethodObject.getEndpoint() + "/" + paymentMethodObject.getId() + "/charges"; + + // will attempt to serialize empty JSON to a PaymentMethod.class, that's fine + Requestor.request(RequestMethod.POST, endpoint, 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 endpoint = "payment_methods"; + + PaymentMethod response = Requestor.request(RequestMethod.GET, endpoint, null, PaymentMethod.class, client); + + if (response.getId() == null) { + throw new InvalidObjectError(Constants.ErrorMessages.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.getPrimaryPaymentMethod(); + break; + case SECONDARY: + paymentMethod = paymentMethods.getSecondaryPaymentMethod(); + break; + default: + break; + } + + if (paymentMethod == null || paymentMethod.getId() == null) { + throw new InvalidObjectError(Constants.ErrorMessages.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..9c4329188 --- /dev/null +++ b/src/main/java/com/easypost/service/CarrierAccountService.java @@ -0,0 +1,148 @@ +package com.easypost.service; + +import com.easypost.Constants; +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 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 { + String type = (String) params.get("type"); + Map wrappedParams = new HashMap(); + wrappedParams.put(selectTopLayerKey(type), params); + String endpoint = selectCarrierAccountCreationEndpoint(type); + + return Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "carrier_accounts/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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 { + String endpoint = "carrier_accounts"; + + CarrierAccount[] response = + Requestor.request(RequestMethod.GET, endpoint, params, CarrierAccount[].class, client); + + return Arrays.asList(response); + } + + /** + * Update this carrier account. + * + * @param id The ID of carrier account + * @param params parameters to update. + * @return updated CarrierAccount object. + * @throws EasyPostException when the request fails. + */ + public CarrierAccount update(String id, final Map params) throws EasyPostException { + String endpoint = "carrier_accounts/" + id; + Map wrappedParams = new HashMap(); + wrappedParams.put("carrier_account", params); + + return Requestor.request(RequestMethod.PUT, endpoint, wrappedParams, CarrierAccount.class, + client); + } + + /** + * Delete this carrier account. + * + * @param id The ID of carrier account. + * @throws EasyPostException when the request fails. + */ + public void delete(String id) throws EasyPostException { + String endpoint = "carrier_accounts/" + id; + + Requestor.request(RequestMethod.DELETE, endpoint, 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_ACCOUNT_TYPES_WITH_CUSTOM_WORKFLOW.contains(carrierAccountType)) { + return "carrier_accounts/register"; + } else if (Constants.CarrierAccountTypes.CARRIER_ACCOUNT_TYPES_WITH_CUSTOM_OAUTH.contains(carrierAccountType)) { + return "carrier_accounts/register_oauth"; + } else { + return "carrier_accounts"; + } + } + + /** + * Select the top-layer key for the carrier account creation/update request based on the + * carrier type. + * + * @param carrierAccountType The type of carrier account to create. + * @return The top-layer key for the carrier account creation/update request. + * @throws MissingParameterError when the request fails. + */ + private static String selectTopLayerKey(final String carrierAccountType) throws MissingParameterError { + if (carrierAccountType == null) { + throw new MissingParameterError( + String.format(Constants.ErrorMessages.MISSING_REQUIRED_PARAMETER, "carrier account type")); + } + + if (Constants.CarrierAccountTypes.CARRIER_ACCOUNT_TYPES_WITH_CUSTOM_OAUTH.contains(carrierAccountType)) { + return "carrier_account_oauth_registrations"; + } else { + return "carrier_account"; + } + } +} diff --git a/src/main/java/com/easypost/service/CarrierMetadataService.java b/src/main/java/com/easypost/service/CarrierMetadataService.java new file mode 100644 index 000000000..df3466d7b --- /dev/null +++ b/src/main/java/com/easypost/service/CarrierMetadataService.java @@ -0,0 +1,66 @@ +package com.easypost.service; + +import java.util.HashMap; +import java.util.List; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.CarrierMetadata; + +public class CarrierMetadataService { + private final EasyPostClient client; + + /** + * CarrierMetadataService constructor. + * + * @param client The client object. + */ + CarrierMetadataService(EasyPostClient client) { + this.client = client; + } + + /** + * Retrieves all carrier metadata. + * + * @return CarrierMetadata object + * @throws EasyPostException When the request fails. + */ + public CarrierMetadata retrieve() throws EasyPostException { + return retrieve(null); + } + + /** + * Retrieves carrier metadata for given carriers. + * + * @param carriers The list of carriers in string. + * @return CarrierMetadata object + * @throws EasyPostException When the request fails. + */ + public CarrierMetadata retrieve(List carriers) throws EasyPostException { + return retrieve(carriers, null); + } + + /** + * Retrieves carrier metadata for given carriers and types. + * + * @param carriers The list of carriers in string. + * @param types The list of types in string. + * @return CarrierMetadata object + * @throws EasyPostException When the request fails. + */ + public CarrierMetadata retrieve(List carriers, List types) throws EasyPostException { + HashMap params = new HashMap<>(); + + if (carriers != null && !carriers.isEmpty()) { + params.put("carriers", String.join(",", carriers)); + } + + if (types != null && !types.isEmpty()) { + params.put("types", String.join(",", types)); + } + + return Requestor.request(RequestMethod.GET, "metadata/carriers", params, + CarrierMetadata.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..c937cc898 --- /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 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 { + String endpoint = "carrier_types"; + + CarrierType[] response = Requestor.request(RequestMethod.GET, endpoint, null, CarrierType[].class, client); + return Arrays.asList(response); + } +} diff --git a/src/main/java/com/easypost/service/ClaimService.java b/src/main/java/com/easypost/service/ClaimService.java new file mode 100644 index 000000000..e16a008b2 --- /dev/null +++ b/src/main/java/com/easypost/service/ClaimService.java @@ -0,0 +1,116 @@ +package com.easypost.service; + +import java.util.Map; +import java.util.function.Function; + +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Claim; +import com.easypost.model.ClaimCollection; + +import lombok.SneakyThrows; + +public class ClaimService { + private final EasyPostClient client; + + /** + * ClaimService constructor. + * + * @param client The client object. + */ + ClaimService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a new claim object from a map of parameters. + * + * @param params Map of parameters. + * @return Claim object + * @throws EasyPostException when the request fails. + */ + public Claim create(final Map params) throws EasyPostException { + String endpoint = "claims"; + + return Requestor.request(RequestMethod.POST, endpoint, params, Claim.class, client); + } + + /** + * Retrieve an Claim from the API. + * + * @param id The ID of the Claim to retrieve. + * @return Claim object + * @throws EasyPostException when the request fails. + */ + public Claim retrieve(final String id) throws EasyPostException { + String endpoint = "claims/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, null, Claim.class, client); + } + + /** + * Get a list of Claims. + * + * @param params a map of parameters + * @return ClaimCollection object + * @throws EasyPostException when the request fails. + */ + public ClaimCollection all(final Map params) throws EasyPostException { + String type = (String) params.get("type"); + String status = (String) params.get("status"); + params.remove(type); + params.remove(status); + String endpoint = "claims"; + + ClaimCollection claimCollection = + Requestor.request(RequestMethod.GET, endpoint, params, ClaimCollection.class, client); + claimCollection.setType(type); + claimCollection.setType(status); + + return claimCollection; + } + + /** + * Cancel an Claim from the API. + * + * @param id The ID of the Claim to cancel. + * @return Claim object + * @throws EasyPostException when the request fails. + */ + public Claim cancel(final String id) throws EasyPostException { + String endpoint = String.format("claims/%s/cancel", id); + + return Requestor.request(RequestMethod.POST, endpoint, null, Claim.class, client); + } + + /** + * Get the next page of an ClaimCollection. + * + * @param collection ClaimCollection to get next page of. + * @return ClaimCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public ClaimCollection getNextPage(ClaimCollection collection) throws EndOfPaginationError { + return getNextPage(collection, null); + } + + /** + * Get the next page of an ClaimCollection. + * + * @param collection ClaimCollection to get next page of. + * @param pageSize The number of results to return on the next page. + * @return ClaimCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public ClaimCollection getNextPage( + ClaimCollection collection, Integer pageSize) throws EndOfPaginationError { + return collection.getNextPage(new Function, ClaimCollection>() { + @Override @SneakyThrows + public ClaimCollection apply(Map parameters) { + return all(parameters); + } + }, collection.getClaims(), pageSize); + } +} diff --git a/src/main/java/com/easypost/service/CustomerPortalService.java b/src/main/java/com/easypost/service/CustomerPortalService.java new file mode 100644 index 000000000..b5b5488a6 --- /dev/null +++ b/src/main/java/com/easypost/service/CustomerPortalService.java @@ -0,0 +1,34 @@ +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.CustomerPortalAccountLink; + +public class CustomerPortalService { + private final EasyPostClient client; + + /** + * CustomerPortalService constructor. + * + * @param client The client object. + */ + CustomerPortalService(EasyPostClient client) { + this.client = client; + } + + /** + * Create a CustomerPortalAccountLink from the API. + * + * @param params Map of parameters. + * @return CustomerPortalAccountLink object + * @throws EasyPostException when the request fails. + */ + public CustomerPortalAccountLink createAccountLink(final Map params) throws EasyPostException { + String endpoint = "customer_portal/account_link"; + + return Requestor.request(RequestMethod.POST, endpoint, params, CustomerPortalAccountLink.class, client); + } +} 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..965da8206 --- /dev/null +++ b/src/main/java/com/easypost/service/CustomsInfoService.java @@ -0,0 +1,51 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.CustomsInfo; + +import java.util.HashMap; +import java.util.Map; + +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); + + String endpoint = "customs_infos"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "customs_infos/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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..89394c824 --- /dev/null +++ b/src/main/java/com/easypost/service/CustomsItemService.java @@ -0,0 +1,51 @@ +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 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); + + String endpoint = "customs_items"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "customs_items/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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..8b21287f9 --- /dev/null +++ b/src/main/java/com/easypost/service/EasyPostClient.java @@ -0,0 +1,218 @@ +package com.easypost.service; + +import java.util.function.Function; + +import com.easypost.Constants; +import com.easypost.exception.General.MissingParameterError; +import com.easypost.hooks.RequestHook; +import com.easypost.hooks.RequestHookResponses; +import com.easypost.hooks.ResponseHook; +import com.easypost.hooks.ResponseHookResponses; + +import lombok.Getter; + +public class EasyPostClient { + private final int connectTimeoutMilliseconds; + private final int readTimeoutMilliseconds; + private final String clientApiKey; // API key for all EasyPost API requests + private final String apiVersion = "v2"; + private final String apiBase; + // Services + public final AddressService address = new AddressService(this); + public final ApiKeyService apiKey = new ApiKeyService(this); + public final BatchService batch = new BatchService(this); + public final BetaRateService betaRate = new BetaRateService(this); + public final BetaReferralCustomerService betaReferralCustomer = new BetaReferralCustomerService(this); + public final BillingService billing = new BillingService(this); + public final CarrierAccountService carrierAccount = new CarrierAccountService(this); + public final CarrierMetadataService carrierMetadata = new CarrierMetadataService(this); + public final FedExRegistrationService fedexRegistration = new FedExRegistrationService(this); + public final CarrierTypeService carrierType = new CarrierTypeService(this); + public final ClaimService claim = new ClaimService(this); + public final CustomerPortalService customerPortal = new CustomerPortalService(this); + public final CustomsInfoService customsInfo = new CustomsInfoService(this); + public final CustomsItemService customsItem = new CustomsItemService(this); + public final EmbeddableService embeddable = new EmbeddableService(this); + public final EndShipperService endShipper = new EndShipperService(this); + public final EventService event = new EventService(this); + public final InsuranceService insurance = new InsuranceService(this); + public final LumaService luma = new LumaService(this); + public final OrderService order = new OrderService(this); + public final ParcelService parcel = new ParcelService(this); + public final PaymentMethodService paymentMethod = new PaymentMethodService(this); + public final PickupService pickup = new PickupService(this); + public final RateService rate = new RateService(this); + public final ReferralCustomerService referralCustomer = new ReferralCustomerService(this); + public final RefundService refund = new RefundService(this); + public final ReportService report = new ReportService(this); + public final ScanformService scanForm = new ScanformService(this); + public final ShipmentService shipment = new ShipmentService(this); + public final SmartRateService smartRate = new SmartRateService(this); + public final TrackerService tracker = new TrackerService(this); + public final UserService user = new UserService(this); + public final WebhookService webhook = new WebhookService(this); + @Getter + private RequestHook requestHooks = new RequestHook(); + @Getter + private ResponseHook responseHooks = new ResponseHook(); + + /** + * EasyPostClient constructor. + * + * @param apiKey API key for API calls. + * @throws MissingParameterError When the request fails. + */ + public EasyPostClient(String apiKey) throws MissingParameterError { + this(apiKey, Constants.Http.DEFAULT_CONNECT_TIMEOUT_MILLISECONDS); + } + + /** + * EasyPostClient constructor. + * + * @param apiKey API key for API calls. + * @param apiBase API base for API calls. + * @throws MissingParameterError When the request fails. + */ + public EasyPostClient(String apiKey, String apiBase) throws MissingParameterError { + this(apiKey, Constants.Http.DEFAULT_CONNECT_TIMEOUT_MILLISECONDS, + Constants.Http.DEFAULT_READ_TIMEOUT_MILLISECONDS, apiBase); + } + + /** + * EasyPostClient constructor. + * + * @param apiKey API key for API calls. + * @param connectTimeoutMilliseconds Timeout for connection. + * @throws MissingParameterError When the request fails. + */ + public EasyPostClient(String apiKey, int connectTimeoutMilliseconds) throws MissingParameterError { + this(apiKey, connectTimeoutMilliseconds, Constants.Http.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 When the request fails. + */ + public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, String apiBase) throws MissingParameterError { + this(apiKey, connectTimeoutMilliseconds, Constants.Http.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 When the request fails. + */ + public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTimeoutMilliseconds) + throws MissingParameterError { + this(apiKey, connectTimeoutMilliseconds, readTimeoutMilliseconds, Constants.Http.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 When the request fails. + */ + public EasyPostClient(String apiKey, int connectTimeoutMilliseconds, int readTimeoutMilliseconds, String apiBase) + throws MissingParameterError { + if (apiKey == null || apiKey.isEmpty()) { + throw new MissingParameterError("apiKey"); + } + + this.apiBase = apiBase; + this.clientApiKey = apiKey; + this.connectTimeoutMilliseconds = connectTimeoutMilliseconds; + this.readTimeoutMilliseconds = readTimeoutMilliseconds; + } + + /** + * Subscribes to a request hook from the given function. + * + * @param function The function to be subscribed to the request hook + */ + public void subscribeToRequestHook(Function function) { + this.requestHooks.addEventHandler(function); + } + + /** + * Unsubscribes to a request hook from the given function. + * + * @param function The function to be unsubscribed from the request hook + */ + public void unsubscribeFromRequestHook(Function function) { + this.requestHooks.removeEventHandler(function); + } + + /** + * Subscribes to a response hook from the given function. + * + * @param function The function to be subscribed to the response hook + */ + public void subscribeToResponseHook(Function function) { + this.responseHooks.addEventHandler(function); + } + + /** + * Unubscribes to a response hook from the given function. + * + * @param function The function to be unsubscribed from the response hook + */ + public void unsubscribeFromResponseHook(Function function) { + this.responseHooks.removeEventHandler(function); + } + + /** + * 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 clientApiKey; + } + + /** + * 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/EmbeddableService.java b/src/main/java/com/easypost/service/EmbeddableService.java new file mode 100644 index 000000000..af04f5b83 --- /dev/null +++ b/src/main/java/com/easypost/service/EmbeddableService.java @@ -0,0 +1,34 @@ +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.EmbeddablesSession; + +public class EmbeddableService { + private final EasyPostClient client; + + /** + * EmbeddableService constructor. + * + * @param client The client object. + */ + EmbeddableService(EasyPostClient client) { + this.client = client; + } + + /** + * Create an EmbeddablesSession from the API. + * + * @param params Map of parameters. + * @return EmbeddablesSession object + * @throws EasyPostException when the request fails. + */ + public EmbeddablesSession createSession(final Map params) throws EasyPostException { + String endpoint = "embeddables/session"; + + return Requestor.request(RequestMethod.POST, endpoint, params, EmbeddablesSession.class, client); + } +} 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..6a99f0c47 --- /dev/null +++ b/src/main/java/com/easypost/service/EndShipperService.java @@ -0,0 +1,86 @@ +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 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 endpoint = "end_shippers"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 endpoint = "end_shippers/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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 { + String endpoint = "end_shippers"; + + return Requestor.request(RequestMethod.GET, endpoint, params, EndShipperCollection.class, client); + } + + // TODO: Add getNextPage function when "before_id" is available for EndShipper All endpoint. + + /** + * Update an EndShipper object. + * + * @param id The ID of endshipper. + * @param params Map of parameters. + * @return EndShipper object. + * @throws EasyPostException when the request fails. + */ + public EndShipper update(final String id, final Map params) throws EasyPostException { + Map wrappedParams = new HashMap(); + + wrappedParams.put("address", params); + + String endpoint = "end_shippers/" + id; + + return Requestor.request(RequestMethod.PUT, endpoint, 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..3981f996b --- /dev/null +++ b/src/main/java/com/easypost/service/EventService.java @@ -0,0 +1,114 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.EventCollection; +import com.easypost.model.Event; +import com.easypost.model.Payload; +import com.easypost.model.PayloadCollection; +import lombok.SneakyThrows; + +import java.util.List; +import java.util.Map; +import java.util.function.Function; + +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 { + String endpoint = "events/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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 { + String endpoint = "events"; + + return Requestor.request(RequestMethod.GET, endpoint, params, EventCollection.class, client); + } + + /** + * Get the next page of an EventCollection. + * + * @param collection EventCollection to get next page of. + * @return EventCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public EventCollection getNextPage(EventCollection collection) throws EndOfPaginationError { + return getNextPage(collection, null); + } + + /** + * Get the next page of an EventCollection. + * + * @param collection EventCollection to get next page of. + * @param pageSize The number of results to return on the next page. + * @return EventCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public EventCollection getNextPage(EventCollection collection, Integer pageSize) throws EndOfPaginationError { + return collection.getNextPage(new Function, EventCollection>() { + @Override @SneakyThrows + public EventCollection apply(Map parameters) { + return all(parameters); + } + }, collection.getEvents(), pageSize); + } + + /** + * 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 { + String endpoint = "events/" + eventId + "/payloads"; + + PayloadCollection payloads = + Requestor.request(RequestMethod.GET, endpoint, 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 { + String endpoint = "events/" + eventId + "/payloads/" + payloadId; + + return Requestor.request(RequestMethod.GET, endpoint, null, Payload.class, + client); + } +} diff --git a/src/main/java/com/easypost/service/FedExRegistrationService.java b/src/main/java/com/easypost/service/FedExRegistrationService.java new file mode 100644 index 000000000..3b92e220e --- /dev/null +++ b/src/main/java/com/easypost/service/FedExRegistrationService.java @@ -0,0 +1,188 @@ +package com.easypost.service; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.FedExAccountValidationResponse; +import com.easypost.model.FedExRequestPinResponse; + +public class FedExRegistrationService { + private final EasyPostClient client; + + /** + * FedExRegistrationService constructor. + * + * @param client The client object. + */ + FedExRegistrationService(EasyPostClient client) { + this.client = client; + } + + /** + * Register the billing address for a FedEx account. + * Advanced method for custom parameter structures. + * + * @param fedexAccountNumber The FedEx account number. + * @param params Map of parameters. + * @return FedExAccountValidationResponse object with next steps (PIN or invoice + * validation). + * @throws EasyPostException when the request fails. + */ + public FedExAccountValidationResponse registerAddress(final String fedexAccountNumber, + final Map params) throws EasyPostException { + Map wrappedParams = wrapAddressValidation(params); + String endpoint = String.format("fedex_registrations/%s/address", fedexAccountNumber); + + return Requestor.request(RequestMethod.POST, endpoint, wrappedParams, FedExAccountValidationResponse.class, + client); + } + + /** + * Request a PIN for FedEx account verification. + * + * @param fedexAccountNumber The FedEx account number. + * @param pinMethodOption The PIN delivery method: "SMS", "CALL", or "EMAIL". + * @return FedExRequestPinResponse object confirming PIN was sent. + * @throws EasyPostException when the request fails. + */ + public FedExRequestPinResponse requestPin(final String fedexAccountNumber, final String pinMethodOption) + throws EasyPostException { + Map wrappedParams = new HashMap<>(); + Map pinMethodMap = new HashMap<>(); + pinMethodMap.put("option", pinMethodOption); + wrappedParams.put("pin_method", pinMethodMap); + String endpoint = String.format("fedex_registrations/%s/pin", fedexAccountNumber); + + return Requestor.request(RequestMethod.POST, endpoint, wrappedParams, FedExRequestPinResponse.class, client); + } + + /** + * Validate the PIN entered by the user for FedEx account verification. + * + * @param fedexAccountNumber The FedEx account number. + * @param params Map of parameters. + * @return FedExAccountValidationResponse object. + * @throws EasyPostException when the request fails. + */ + public FedExAccountValidationResponse validatePin(final String fedexAccountNumber, final Map params) + throws EasyPostException { + Map wrappedParams = wrapPinValidation(params); + String endpoint = String.format("fedex_registrations/%s/pin/validate", fedexAccountNumber); + + return Requestor.request(RequestMethod.POST, endpoint, wrappedParams, FedExAccountValidationResponse.class, + client); + } + + /** + * Submit invoice information to complete FedEx account registration. + * + * @param fedexAccountNumber The FedEx account number. + * @param params Map of parameters. + * @return FedExAccountValidationResponse object. + * @throws EasyPostException when the request fails. + */ + public FedExAccountValidationResponse submitInvoice(final String fedexAccountNumber, + final Map params) + throws EasyPostException { + Map wrappedParams = wrapInvoiceValidation(params); + String endpoint = String.format("fedex_registrations/%s/invoice", fedexAccountNumber); + + return Requestor.request(RequestMethod.POST, endpoint, wrappedParams, FedExAccountValidationResponse.class, + client); + } + + /** + * Wraps address validation parameters and ensures the "name" field exists. + * If not present, generates a UUID (with hyphens removed) as the name. + * + * @param params The original parameters map. + * @return A new map with properly wrapped address_validation and + * easypost_details. + */ + @SuppressWarnings("unchecked") + private Map wrapAddressValidation(final Map params) { + Map wrappedParams = new HashMap<>(); + + if (params.containsKey("address_validation")) { + Map addressValidation = new HashMap<>( + (Map) params.get("address_validation")); + ensureNameField(addressValidation); + wrappedParams.put("address_validation", addressValidation); + } + + if (params.containsKey("easypost_details")) { + wrappedParams.put("easypost_details", params.get("easypost_details")); + } + + return wrappedParams; + } + + /** + * Wraps PIN validation parameters and ensures the "name" field exists. + * If not present, generates a UUID (with hyphens removed) as the name. + * + * @param params The original parameters map. + * @return A new map with properly wrapped pin_validation and easypost_details. + */ + @SuppressWarnings("unchecked") + private Map wrapPinValidation(final Map params) { + Map wrappedParams = new HashMap<>(); + + if (params.containsKey("pin_validation")) { + Map pinValidation = new HashMap<>( + (Map) params.get("pin_validation")); + ensureNameField(pinValidation); + wrappedParams.put("pin_validation", pinValidation); + } + + if (params.containsKey("easypost_details")) { + wrappedParams.put("easypost_details", params.get("easypost_details")); + } + + return wrappedParams; + } + + /** + * Wraps invoice validation parameters and ensures the "name" field exists. + * If not present, generates a UUID (with hyphens removed) as the name. + * + * @param params The original parameters map. + * @return A new map with properly wrapped invoice_validation and + * easypost_details. + */ + @SuppressWarnings("unchecked") + private Map wrapInvoiceValidation(final Map params) { + Map wrappedParams = new HashMap<>(); + + if (params.containsKey("invoice_validation")) { + Map invoiceValidation = new HashMap<>( + (Map) params.get("invoice_validation")); + ensureNameField(invoiceValidation); + wrappedParams.put("invoice_validation", invoiceValidation); + } + + if (params.containsKey("easypost_details")) { + wrappedParams.put("easypost_details", params.get("easypost_details")); + } + + return wrappedParams; + } + + /** + * Ensures the "name" field exists in the provided map. + * If not present, generates a UUID (with hyphens removed) as the name. + * This follows the pattern used in the web UI implementation. + * + * @param map The map to ensure the "name" field in. + */ + private void ensureNameField(final Map map) { + if (!map.containsKey("name") || map.get("name") == null) { + String uuid = UUID.randomUUID().toString().replace("-", ""); + map.put("name", uuid); + } + } +} 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..2c54b87bd --- /dev/null +++ b/src/main/java/com/easypost/service/InsuranceService.java @@ -0,0 +1,110 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.InsuranceCollection; +import com.easypost.model.Insurance; +import lombok.SneakyThrows; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; + +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); + + String endpoint = "insurances"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "insurances/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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 { + String endpoint = "insurances"; + + return Requestor.request(RequestMethod.GET, endpoint, params, InsuranceCollection.class, client); + } + + /** + * Refund an Insurance from the API. + * + * @param id The ID of the Insurance to refund. + * @return Insurance object + * @throws EasyPostException when the request fails. + */ + public Insurance refund(final String id) throws EasyPostException { + String endpoint = String.format("insurances/%s/refund", id); + + return Requestor.request(RequestMethod.POST, endpoint, null, Insurance.class, client); + } + + /** + * Get the next page of an InsuranceCollection. + * + * @param collection InsuranceCollection to get next page of. + * @return InsuranceCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public InsuranceCollection getNextPage(InsuranceCollection collection) throws EndOfPaginationError { + return getNextPage(collection, null); + } + + /** + * Get the next page of an InsuranceCollection. + * + * @param collection InsuranceCollection to get next page of. + * @param pageSize The number of results to return on the next page. + * @return InsuranceCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public InsuranceCollection getNextPage( + InsuranceCollection collection, Integer pageSize) throws EndOfPaginationError { + return collection.getNextPage(new Function, InsuranceCollection>() { + @Override @SneakyThrows + public InsuranceCollection apply(Map parameters) { + return all(parameters); + } + }, collection.getInsurances(), pageSize); + } +} diff --git a/src/main/java/com/easypost/service/LumaService.java b/src/main/java/com/easypost/service/LumaService.java new file mode 100644 index 000000000..b2e67912f --- /dev/null +++ b/src/main/java/com/easypost/service/LumaService.java @@ -0,0 +1,41 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.LumaPromiseResponse; +import com.easypost.model.LumaInfo; + +import java.util.HashMap; +import java.util.Map; + +public class LumaService { + private final EasyPostClient client; + + /** + * LumaService constructor. + * + * @param client The client object. + */ + LumaService(EasyPostClient client) { + this.client = client; + } + + /** + * Get service recommendations from Luma that meet the criteria of your ruleset. + * + * @param params The map of parameters. + * @return LumaInfo object. + * @throws EasyPostException When the request fails. + */ + public LumaInfo getPromise(final Map params) + throws EasyPostException { + Map wrappedParams = new HashMap<>(); + wrappedParams.put("shipment", params); + String endpoint = "luma/promise"; + + LumaPromiseResponse response = Requestor.request(RequestMethod.POST, endpoint, wrappedParams, + LumaPromiseResponse.class, client); + return response.getLumaInfo(); + } +} 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..6b011eb52 --- /dev/null +++ b/src/main/java/com/easypost/service/OrderService.java @@ -0,0 +1,107 @@ +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 java.util.HashMap; +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 parameters. + * + * @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); + + String endpoint = "orders"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "orders/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, null, 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 { + String endpoint = "orders/" + id + "/rates"; + + return Requestor.request(RequestMethod.GET, endpoint, 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 { + String endpoint = "orders/" + id + "/buy"; + + return Requestor.request(RequestMethod.POST, endpoint, 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); + } +} 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..89a29fd2a --- /dev/null +++ b/src/main/java/com/easypost/service/ParcelService.java @@ -0,0 +1,51 @@ +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 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); + + String endpoint = "parcels"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "parcels/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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..8216ee6c8 --- /dev/null +++ b/src/main/java/com/easypost/service/PaymentMethodService.java @@ -0,0 +1,14 @@ +package com.easypost.service; + +public class PaymentMethodService { + private final EasyPostClient client; + + /** + * PaymentMethodService constructor. + * + * @param client The client object. + */ + PaymentMethodService(EasyPostClient client) { + this.client = client; + } +} 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..a5f974b26 --- /dev/null +++ b/src/main/java/com/easypost/service/PickupService.java @@ -0,0 +1,152 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.PickupCollection; +import com.easypost.model.Pickup; +import com.easypost.model.PickupRate; +import lombok.SneakyThrows; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; + +public class PickupService { + private final EasyPostClient client; + + /** + * PickupService constructor. + * + * @param client The client object. + */ + PickupService(EasyPostClient client) { + 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 { + String endpoint = "pickups"; + + return Requestor.request(RequestMethod.GET, endpoint, params, PickupCollection.class, client); + } + + /** + * Get the next page of an PickupCollection. + * + * @param collection PickupCollection to get next page of. + * @return PickupCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public PickupCollection getNextPage(PickupCollection collection) throws EndOfPaginationError { + return getNextPage(collection, null); + } + + /** + * Get the next page of an PickupCollection. + * + * @param collection PickupCollection to get next page of. + * @param pageSize The number of results to return on the next page. + * @return PickupCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public PickupCollection getNextPage(PickupCollection collection, Integer pageSize) throws EndOfPaginationError { + return collection.getNextPage(new Function, PickupCollection>() { + @Override @SneakyThrows + public PickupCollection apply(Map parameters) { + return all(parameters); + } + }, collection.getPickups(), pageSize); + } + + /** + * 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); + + String endpoint = "pickups"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "pickups/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, null, Pickup.class, client); + } + + /** + * 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 endpoint = "pickups/" + id + "/buy"; + + return Requestor.request(RequestMethod.POST, endpoint, 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("carrier", pickupRate.getCarrier()); + params.put("service", pickupRate.getService()); + + 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 endpoint = "pickups/" + id + "/cancel"; + + return Requestor.request(RequestMethod.POST, endpoint, params, Pickup.class, client); + } +} 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..84507ba8a --- /dev/null +++ b/src/main/java/com/easypost/service/RateService.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.Rate; + +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 { + String endpoint = "rates/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, null, Rate.class, client); + } +} 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..e21f2320f --- /dev/null +++ b/src/main/java/com/easypost/service/ReferralCustomerService.java @@ -0,0 +1,324 @@ +package com.easypost.service; + +import com.easypost.Constants; +import com.easypost.EasyPost; +import com.easypost.exception.API.EncodingError; +import com.easypost.exception.API.ExternalApiError; +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.ReferralCustomerCollection; +import com.easypost.model.PaymentMethod; +import com.easypost.model.PaymentMethodObject; +import com.easypost.model.ReferralCustomer; +import com.easypost.utils.InternalUtilities; +import lombok.SneakyThrows; + +import java.io.BufferedReader; +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; +import java.util.function.Function; + +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 endpoint = "referral_customers"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 endpoint = "referral_customers/" + userId; + + Requestor.request(RequestMethod.PUT, endpoint, 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 endpoint = "referral_customers"; + + return Requestor.request(RequestMethod.GET, endpoint, params, ReferralCustomerCollection.class, + client); + } + + /** + * Get the next page of an ReferralCustomerCollection. + * + * @param collection ReferralCustomerCollection to get next page of. + * @return ReferralCustomerCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public ReferralCustomerCollection getNextPage(ReferralCustomerCollection collection) throws EndOfPaginationError { + return getNextPage(collection, null); + } + + /** + * Get the next page of an ReferralCustomerCollection. + * + * @param collection ReferralCustomerCollection to get next page of. + * @param pageSize The number of results to return on the next page. + * @return ReferralCustomerCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public ReferralCustomerCollection getNextPage( + ReferralCustomerCollection collection, Integer pageSize) throws EndOfPaginationError { + return collection.getNextPage(new Function, ReferralCustomerCollection>() { + @Override @SneakyThrows + public ReferralCustomerCollection apply(Map parameters) { + return all(parameters); + } + }, collection.getReferralCustomers(), pageSize); + } + + /** + * 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 EasyPostException when the request fails. + */ + public PaymentMethodObject addCreditCardToUser(final String referralApiKey, final String number, + final int expirationMonth, final int expirationYear, + final String cvc) throws EasyPostException { + 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 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 EasyPostException { + String easypostStripeApiKey = retrieveEasypostStripeApiKey(); + String stripeToken; + + try { + stripeToken = createStripeToken(number, expirationMonth, expirationYear, cvc, easypostStripeApiKey); + } catch (Exception e) { + throw new ExternalApiError(String.format(Constants.ErrorMessages.EXTERNAL_API_CALL_FAILED, "Stripe")); + } + + return createEasypostCreditCard(referralApiKey, stripeToken, priority.toString().toLowerCase()); + } + + /** + * Add a credit card to EasyPost for a ReferralCustomer with a payment method ID from Stripe. + * This function requires the ReferralCustomer User's API key. + * + * @param referralApiKey API key of the referral user. + * @param paymentMethodId Payment method ID from Stripe. + * @param priority Priority of the credit card (e.g., "primary" or "secondary"). + * @return PaymentMethodObject object. + * @throws EasyPostException when the request fails. + */ + public PaymentMethodObject addCreditCardFromStripe(final String referralApiKey, final String paymentMethodId, + final PaymentMethod.Priority priority) throws EasyPostException { + Map params = new HashMap<>(); + Map creditCardParams = new HashMap<>(); + creditCardParams.put("payment_method_id", paymentMethodId); + creditCardParams.put("priority", priority.toString().toLowerCase()); + params.put("credit_card", creditCardParams); + + EasyPostClient referralClient = new EasyPostClient(referralApiKey); + + String endpoint = "credit_cards"; + + return Requestor.request(RequestMethod.POST, endpoint, params, PaymentMethodObject.class, referralClient); + } + + /** + * Add a bank account to EasyPost for a ReferralCustomer. + * This function requires the ReferralCustomer User's API key. + * + * @param referralApiKey API key of the referral user. + * @param financialConnectionsId Financial connections ID from Stripe. + * @param mandateData Mandate data for the bank account. + * @param priority Priority of the bank account (e.g., "primary" or "secondary"). + * @return PaymentMethodObject object. + * @throws EasyPostException when the request fails. + */ + public PaymentMethodObject addBankAccountFromStripe(final String referralApiKey, + final String financialConnectionsId, + final Map mandateData, + final PaymentMethod.Priority priority) + throws EasyPostException { + Map params = new HashMap<>(); + params.put("financial_connections_id", financialConnectionsId); + params.put("mandate_data", mandateData); + params.put("priority", priority.toString().toLowerCase()); + + EasyPostClient referralClient = new EasyPostClient(referralApiKey); + + String endpoint = "bank_accounts"; + + return Requestor.request(RequestMethod.POST, endpoint, params, PaymentMethodObject.class, referralClient); + } + + /** + * Retrieve EasyPost Stripe API key. + * + * @return EasyPost Stripe API key. + * @throws EasyPostException when the request fails. + */ + private String retrieveEasypostStripeApiKey() throws EasyPostException { + String endpoint = "partners/stripe_public_key"; + + @SuppressWarnings ("unchecked") Map response = + Requestor.request(RequestMethod.GET, endpoint, 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 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 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); + + String encodedURL = InternalUtilities.getEncodedURL(params, "card"); + URL stripeUrl = new URL("https://api.stripe.com/v1/tokens?" + encodedURL); + + HttpURLConnection conn; + if (EasyPost._vcrUrlFunction != null) { + conn = EasyPost._vcrUrlFunction.apply(stripeUrl.toString()); + } else { + conn = (HttpURLConnection) stripeUrl.openConnection(); + } + + conn.setRequestMethod("POST"); + conn.setRequestProperty("Authorization", apiToken); + conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + conn.setDoOutput(true); + + StringBuilder response; + + try (BufferedReader br = new BufferedReader( + new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8))) { + 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 = + Constants.Http.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 endpoint = "credit_cards"; + + return Requestor.request(RequestMethod.POST, endpoint, 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..49ac2638f --- /dev/null +++ b/src/main/java/com/easypost/service/RefundService.java @@ -0,0 +1,100 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.RefundCollection; +import com.easypost.model.Refund; +import lombok.SneakyThrows; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + +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); + + String endpoint = "refunds"; + + Refund[] response = Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "refunds/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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 { + String endpoint = "refunds"; + + return Requestor.request(RequestMethod.GET, endpoint, params, RefundCollection.class, client); + } + + /** + * Get the next page of an RefundCollection. + * + * @param collection RefundCollection to get next page of. + * @return RefundCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public RefundCollection getNextPage(RefundCollection collection) throws EndOfPaginationError { + return getNextPage(collection, null); + } + + /** + * Get the next page of an RefundCollection. + * + * @param collection RefundCollection to get next page of. + * @param pageSize The number of results to return on the next page. + * @return RefundCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public RefundCollection getNextPage(RefundCollection collection, Integer pageSize) throws EndOfPaginationError { + return collection.getNextPage(new Function, RefundCollection>() { + @Override @SneakyThrows + public RefundCollection apply(Map parameters) { + return all(parameters); + } + }, collection.getRefunds(), pageSize); + } +} 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..1e029eb83 --- /dev/null +++ b/src/main/java/com/easypost/service/ReportService.java @@ -0,0 +1,128 @@ +package com.easypost.service; + +import com.easypost.Constants; +import com.easypost.exception.API.EncodingError; +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.exception.General.MissingParameterError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.ReportCollection; +import com.easypost.model.Report; +import lombok.SneakyThrows; + +import java.net.URLEncoder; +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; + +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 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")) { + String type = (String) params.get("type"); + HashMap paramsWithoutType = new HashMap<>(params); + paramsWithoutType.remove("type"); + String endpoint = reportURL(type); + return Requestor.request(RequestMethod.POST, endpoint, paramsWithoutType, Report.class, client); + } else { + throw new MissingParameterError("type"); + } + } + + /** + * Generate a report URL. + * + * @param type the type of report to generate. + * @return the URL to generate the report. + * @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 "reports/" + urlType; + } catch (java.io.UnsupportedEncodingException e) { + throw new EncodingError(String.format(Constants.ErrorMessages.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 { + String endpoint = "reports/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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"); + params.remove(type); + String endpoint = reportURL(type); + + ReportCollection collection = + Requestor.request(RequestMethod.GET, endpoint, params, ReportCollection.class, client); + // we store the type of reports in this collection, for use in pagination + collection.setType(type); + return collection; + + } + + /** + * Get the next page of an ReportCollection. + * + * @param collection ReportCollection to get next page of. + * @return ReportCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public ReportCollection getNextPage(ReportCollection collection) throws EndOfPaginationError { + return getNextPage(collection, null); + } + + /** + * Get the next page of an ReportCollection. + * + * @param collection ReportCollection to get next page of. + * @param pageSize The number of results to return on the next page. + * @return ReportCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public ReportCollection getNextPage(ReportCollection collection, Integer pageSize) throws EndOfPaginationError { + return collection.getNextPage(new Function, ReportCollection>() { + @Override @SneakyThrows + public ReportCollection apply(Map parameters) { + return all(parameters); + } + }, collection.getReports(), pageSize); + } +} 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..a3f95e07a --- /dev/null +++ b/src/main/java/com/easypost/service/ScanformService.java @@ -0,0 +1,92 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.ScanFormCollection; +import com.easypost.model.ScanForm; +import lombok.SneakyThrows; + +import java.util.Map; +import java.util.function.Function; + +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 { + String endpoint = "scan_forms"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "scan_forms/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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 { + String endpoint = "scan_forms"; + + return Requestor.request(RequestMethod.GET, endpoint, params, ScanFormCollection.class, client); + } + + /** + * Get the next page of an ScanFormCollection. + * + * @param collection ScanFormCollection to get next page of. + * @return ScanFormCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public ScanFormCollection getNextPage(ScanFormCollection collection) throws EndOfPaginationError { + return getNextPage(collection, null); + } + + /** + * Get the next page of an ScanFormCollection. + * + * @param collection ScanFormCollection to get next page of. + * @param pageSize The number of results to return on the next page. + * @return ScanFormCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public ScanFormCollection getNextPage(ScanFormCollection collection, Integer pageSize) throws EndOfPaginationError { + return collection.getNextPage(new Function, ScanFormCollection>() { + @Override @SneakyThrows + public ScanFormCollection apply(Map parameters) { + return all(parameters); + } + }, collection.getScanForms(), pageSize); + } +} 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..8c8b80c9b --- /dev/null +++ b/src/main/java/com/easypost/service/ShipmentService.java @@ -0,0 +1,447 @@ +package com.easypost.service; + +import com.easypost.Constants; +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.exception.General.FilteringError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.ShipmentCollection; +import com.easypost.model.EstimatedDeliveryDate; +import com.easypost.model.EstimatedDeliveryDateResponse; +import com.easypost.model.Rate; +import com.easypost.model.RecommendShipDateForShipmentResult; +import com.easypost.model.RecommendShipDateResponse; +import com.easypost.model.Shipment; +import com.easypost.model.SmartRate; +import com.easypost.model.SmartRateAccuracy; +import com.easypost.model.SmartRateCollection; +import com.easypost.utils.InternalUtilities; +import lombok.SneakyThrows; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + +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 { + Map wrappedParams = new HashMap<>(); + wrappedParams.put("shipment", params); + + String endpoint = "shipments"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "shipments/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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 { + String endpoint = "shipments"; + + ShipmentCollection shipmentCollection = Requestor.request(RequestMethod.GET, endpoint, params, + ShipmentCollection.class, client); + // we store the params in the collection so that we can use them to get the next + // page + + shipmentCollection.setPurchased(InternalUtilities.getOrDefault(params, "purchased", null)); + shipmentCollection.setIncludeChildren(InternalUtilities.getOrDefault(params, "include_children", null)); + + return shipmentCollection; + } + + /** + * Get the next page of an ShipmentCollection. + * + * @param collection ShipmentCollection to get next page of. + * @return ShipmentCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public ShipmentCollection getNextPage(ShipmentCollection collection) throws EndOfPaginationError { + return getNextPage(collection, null); + } + + /** + * Get the next page of an ShipmentCollection. + * + * @param collection ShipmentCollection to get next page of. + * @param pageSize The number of results to return on the next page. + * @return ShipmentCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public ShipmentCollection getNextPage(ShipmentCollection collection, Integer pageSize) throws EndOfPaginationError { + return collection.getNextPage(new Function, ShipmentCollection>() { + @Override + @SneakyThrows + public ShipmentCollection apply(Map parameters) { + return all(parameters); + } + }, collection.getShipments(), pageSize); + } + + /** + * 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()); + } + + /** + * 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 { + String endpoint = "shipments/" + id + "/rerate"; + + return Requestor.request(RequestMethod.POST, endpoint, params, Shipment.class, client); + } + + /** + * Get SmartRate 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 endpoint = "shipments/" + id + "/smartrate"; + + SmartRateCollection smartRateCollection = Requestor.request(RequestMethod.GET, endpoint, 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, 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, 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, endShipperId); + } + + /** + * Buy this Shipment. + * + * @param id The ID of shipment. + * @param params The options for the query. + * @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 String endShipperId) + throws EasyPostException { + if (endShipperId != null && !endShipperId.isEmpty()) { + params.put("end_shipper_id", endShipperId); + } + + String endpoint = "shipments/" + id + "/buy"; + + return Requestor.request(RequestMethod.POST, endpoint, 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(id, null); + } + + /** + * Refund 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 refund(final String id, final Map params) throws EasyPostException { + String endpoint = "shipments/" + id + "/refund"; + + return Requestor.request(RequestMethod.POST, endpoint, params, Shipment.class, client); + } + + /** + * 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 String id, final Map params) throws EasyPostException { + String endpoint = "shipments/" + id + "/label"; + + return Requestor.request(RequestMethod.GET, endpoint, params, Shipment.class, client); + } + + /** + * 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 String id, final Map params) throws EasyPostException { + String endpoint = "shipments/" + id + "/insure"; + + return Requestor.request(RequestMethod.POST, endpoint, 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. + */ + 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; + } + + /** + * 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().getSmartRateAccuracy(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; + } + + /** + * Generate a form 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 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. + * @return Return a shipment object. + * @throws EasyPostException when the request fails. + */ + public Shipment generateForm(final String id, final String formType, final Map formOptions) + throws EasyPostException { + HashMap params = new HashMap<>(); + HashMap wrappedParams = new HashMap<>(); + + params.put("type", formType); + params.putAll(formOptions); + wrappedParams.put("form", params); + + String endpoint = "shipments/" + id + "/forms"; + + return Requestor.request(RequestMethod.POST, endpoint, wrappedParams, Shipment.class, + client); + } + + /** + * Retrieves the estimated delivery date of each Rate via SmartRate. + * + * @param id The id of the shipment. + * @param plannedShipDate The planned shipment date. + * @return List of EstimatedDeliveryDate objects. + * @throws EasyPostException When the request fails. + */ + public List retrieveEstimatedDeliveryDate(final String id, final String plannedShipDate) + throws EasyPostException { + HashMap params = new HashMap<>(); + params.put("planned_ship_date", plannedShipDate); + String endpoint = "shipments/" + id + "/smartrate/delivery_date"; + + EstimatedDeliveryDateResponse response = Requestor.request(RequestMethod.GET, endpoint, params, + EstimatedDeliveryDateResponse.class, client); + return response.getRates(); + } + + /** + * Retrieve a recommended ship date for an existing Shipment via the Precision + * Shipping API, + * based on a specific desired delivery date. + * + * @param id The id of the shipment. + * @param desiredDeliveryDate The desired delivery date. + * @return List of RecommendShipDateForShipmentResult objects. + * @throws EasyPostException When the request fails. + */ + public List recommendShipDate(final String id, final String desiredDeliveryDate) + throws EasyPostException { + HashMap params = new HashMap<>(); + params.put("desired_delivery_date", desiredDeliveryDate); + String endpoint = "shipments/" + id + "/smartrate/precision_shipping"; + + RecommendShipDateResponse response = Requestor.request(RequestMethod.GET, endpoint, params, + RecommendShipDateResponse.class, client); + return response.getRates(); + } + + /** + * Create and buy a Luma Shipment in one call. + * + * @param params The map of parameters. + * @return Shipment object. + * @throws EasyPostException When the request fails. + */ + public Shipment createAndBuyLuma(final Map params) + throws EasyPostException { + Map wrappedParams = new HashMap<>(); + wrappedParams.put("shipment", params); + String endpoint = "shipments/luma"; + + Shipment response = Requestor.request(RequestMethod.POST, endpoint, wrappedParams, + Shipment.class, client); + return response; + } + + /** + * Buy a Shipment with Luma. + * + * @param id The ID of shipment. + * @param params The map of parameters. + * @return Shipment object. + * @throws EasyPostException When the request fails. + */ + public Shipment buyLuma(final String id, final Map params) + throws EasyPostException { + String endpoint = "shipments/" + id + "/luma"; + + Shipment response = Requestor.request(RequestMethod.POST, endpoint, params, + Shipment.class, client); + return response; + } +} diff --git a/src/main/java/com/easypost/service/SmartRateService.java b/src/main/java/com/easypost/service/SmartRateService.java new file mode 100644 index 000000000..fdd92a169 --- /dev/null +++ b/src/main/java/com/easypost/service/SmartRateService.java @@ -0,0 +1,53 @@ +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.EstimateDeliveryDateForZipPairResult; +import com.easypost.model.RecommendShipDateForZipPairResult; + +public class SmartRateService { + private final EasyPostClient client; + + /** + * TrackerService constructor. + * + * @param client The client object. + */ + SmartRateService(EasyPostClient client) { + this.client = client; + } + + /** + * Retrieve a recommended ship date for an existing Shipment via the Precision Shipping API, + * based on a specific desired delivery date. + * + * @param params Parameters to include on the API call. + * @return EstimatedDeliveryDate object. + * @throws EasyPostException When the request fails. + */ + public RecommendShipDateForZipPairResult recommendShipDate(final Map params) + throws EasyPostException { + String endpoint = "smartrate/deliver_on"; + + return Requestor.request(RequestMethod.POST, endpoint, params, RecommendShipDateForZipPairResult.class, client); + } + + /** + * Retrieve the estimated delivery date of each carrier-service level combination via the + * Smart Deliver By API, based on a specific ship date and origin-destination postal code pair. + * + * @param params Parameters to include on the API call. + * @return EstimatedDeliveryDate object. + * @throws EasyPostException When the request fails. + */ + public EstimateDeliveryDateForZipPairResult estimateDeliveryDate(final Map params) + throws EasyPostException { + String endpoint = "smartrate/deliver_by"; + + return Requestor.request(RequestMethod.POST, endpoint, params, + EstimateDeliveryDateForZipPairResult.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..9b2f73d2a --- /dev/null +++ b/src/main/java/com/easypost/service/TrackerService.java @@ -0,0 +1,131 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.TrackerCollection; +import com.easypost.model.Tracker; +import com.easypost.utils.InternalUtilities; +import lombok.SneakyThrows; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; + +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); + + String endpoint = "trackers"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "trackers/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, 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 { + String endpoint = "trackers"; + + TrackerCollection trackerCollection = + Requestor.request(RequestMethod.GET, endpoint, params, TrackerCollection.class, client); + // we store the params in the collection so that we can use them to get the next page + trackerCollection.setTrackingCode(InternalUtilities.getOrDefault(params, "tracking_code", null)); + trackerCollection.setCarrier(InternalUtilities.getOrDefault(params, "carrier", null)); + + return trackerCollection; + } + + /** + * Get the next page of an TrackerCollection. + * + * @param collection TrackerCollection to get next page of. + * @return TrackerCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public TrackerCollection getNextPage(TrackerCollection collection) throws EndOfPaginationError { + return getNextPage(collection, null); + } + + /** + * Get the next page of an TrackerCollection. + * + * @param collection TrackerCollection to get next page of. + * @param pageSize The number of results to return on the next page. + * @return TrackerCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public TrackerCollection getNextPage(TrackerCollection collection, Integer pageSize) throws EndOfPaginationError { + return collection.getNextPage(new Function, TrackerCollection>() { + @Override @SneakyThrows + public TrackerCollection apply(Map parameters) { + return all(parameters); + } + }, collection.getTrackers(), pageSize); + } + + /** + * Retrieve a batch of 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 retrieveBatch(final Map params) throws EasyPostException { + String endpoint = "trackers/batch"; + + TrackerCollection trackerCollection = + Requestor.request(RequestMethod.POST, endpoint, params, TrackerCollection.class, client); + + return trackerCollection; + } + + /** + * Delete a Tracker object. + * + * @param id ID of the Tracker to delete. + * @throws EasyPostException when the request fails. + */ + public void delete(final String id) throws EasyPostException { + String endpoint = String.format("trackers/%s", id); + + Requestor.request(RequestMethod.DELETE, endpoint, null, Tracker.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..d437b73d5 --- /dev/null +++ b/src/main/java/com/easypost/service/UserService.java @@ -0,0 +1,146 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Brand; +import com.easypost.model.ChildUserCollection; +import com.easypost.model.User; + +import lombok.SneakyThrows; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; + +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 { + String endpoint = "users/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, null, User.class, client); + } + + /** + * Retrieve your User from the API. + * + * @return User object. + * @throws EasyPostException when the request fails. + */ + public User retrieveMe() throws EasyPostException { + String endpoint = "users"; + + return Requestor.request(RequestMethod.GET, endpoint, 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); + + String endpoint = "users"; + + return Requestor.request(RequestMethod.POST, endpoint, 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); + + String endpoint = "users/" + id; + + return Requestor.request(RequestMethod.PUT, endpoint, 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 { + String endpoint = "users/" + id; + + Requestor.request(RequestMethod.DELETE, endpoint, null, User.class, client); + } + + /** + * 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 { + Map wrappedParams = new HashMap(); + wrappedParams.put("brand", params); + + String endpoint = "users/" + id + "/brand"; + + return Requestor.request(RequestMethod.PUT, endpoint, wrappedParams, Brand.class, client); + } + + /** + * Retrieve the paginated list of child users for the authenticated user. + * + * @param params Map of parameters. + * @return ChildUserCollection object. + * @throws EasyPostException when the request fails. + */ + public ChildUserCollection allChildren(final Map params) throws EasyPostException { + String endpoint = "users/children"; + + return Requestor.request(RequestMethod.GET, endpoint, params, ChildUserCollection.class, client); + } + + /** + * Get the next page of a ChildUserCollection. + * + * @param collection ChildUserCollection to get next page of. + * @param pageSize The number of results to return on the next page. + * @return ChildUserCollection object. + * @throws EndOfPaginationError when there are no more pages to retrieve. + */ + public ChildUserCollection getNextPage(ChildUserCollection collection, Integer pageSize) + throws EndOfPaginationError { + return collection.getNextPage(new Function, ChildUserCollection>() { + @Override @SneakyThrows + public ChildUserCollection apply(Map parameters) { + return allChildren(parameters); + } + }, collection.getChildren(), pageSize); + } +} 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..19c2d5032 --- /dev/null +++ b/src/main/java/com/easypost/service/WebhookService.java @@ -0,0 +1,115 @@ +package com.easypost.service; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.Webhook; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.List; + +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); + + String endpoint = "webhooks"; + + return Requestor.request(RequestMethod.POST, endpoint, 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 { + String endpoint = "webhooks/" + id; + + return Requestor.request(RequestMethod.GET, endpoint, null, Webhook.class, client); + } + + /** + * Get a list of all Webhook objects. + * + * @return List of Webhook objects. + * @throws EasyPostException when the request fails. + */ + public List all() throws EasyPostException { + return all(null); + } + + /** + * Get a list of all Webhook objects. + * + * @param params params for request + * @return List of Webhook objects. + * @throws EasyPostException when the request fails. + */ + public List all(final Map params) throws EasyPostException { + String endpoint = "webhooks"; + + Webhook[] response = Requestor.request(RequestMethod.GET, endpoint, params, Webhook[].class, client); + return Arrays.asList(response); + } + + /** + * Delete this Webhook. + * + * @param id The ID of webhook. + * @throws EasyPostException when the request fails. + */ + public void delete(final String id) throws EasyPostException { + String endpoint = "webhooks/" + id; + + Requestor.request(RequestMethod.DELETE, endpoint, 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 { + String endpoint = "webhooks/" + id; + + return Requestor.request(RequestMethod.PUT, endpoint, params, Webhook.class, client); + } +} diff --git a/src/test/java/com/easypost/beta/package-info.java b/src/main/java/com/easypost/service/package-info.java similarity index 51% rename from src/test/java/com/easypost/beta/package-info.java rename to src/main/java/com/easypost/service/package-info.java index 796682206..ee3b8a066 100644 --- a/src/test/java/com/easypost/beta/package-info.java +++ b/src/main/java/com/easypost/service/package-info.java @@ -1,9 +1,9 @@ /** - * Unit tests for the EasyPost API Java client library. + * Interact with the EasyPost API in Java. * * @author EasyPost developers - * @version 1.0 + * @version 6.0 * @see EasyPost API documentation - * @since 1.0 + * @since 6.0 */ -package com.easypost.beta; +package com.easypost.service; 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..c5baa3259 --- /dev/null +++ b/src/main/java/com/easypost/utils/ApachePatch.java @@ -0,0 +1,105 @@ +package com.easypost.utils; + +/** + * 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.binary.Hex, + * released under the Apache License 2.0. + */ + public static class Hex { + private static final char[] DIGITS_LOWER; + private static final char[] DIGITS_UPPER; + + /** + * 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 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 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; + } + + static { + 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 6f3536c64..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; @@ -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. * @@ -75,7 +56,7 @@ public static char[] hexEncode(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); } @@ -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/main/java/com/easypost/utils/InternalUtilities.java b/src/main/java/com/easypost/utils/InternalUtilities.java new file mode 100644 index 000000000..7c42c73ca --- /dev/null +++ b/src/main/java/com/easypost/utils/InternalUtilities.java @@ -0,0 +1,55 @@ +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(); + } + + /** + * Extract a value from a Map, or return a default value if the key is not present. + * @param map Map to extract from + * @param key Key to extract + * @param defaultValue Default value to return if the key is not present + * @return Value from the map, or the default value if the key is not present + * @param Type of the value to extract + */ + @SuppressWarnings("unchecked") + public static TElement getOrDefault(Map map, String key, TElement defaultValue) { + // The built-in Map.getOrDefault() method extracts a value of type Object, + // so this handles the cast. + return (TElement) map.getOrDefault(key, defaultValue); + } +} diff --git a/src/main/java/com/easypost/utils/Utilities.java b/src/main/java/com/easypost/utils/Utilities.java new file mode 100644 index 000000000..80d6545d9 --- /dev/null +++ b/src/main/java/com/easypost/utils/Utilities.java @@ -0,0 +1,171 @@ +package com.easypost.utils; + +import com.easypost.Constants; +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 com.easypost.model.SmartRate; +import com.easypost.model.SmartRateAccuracy; +import com.easypost.model.StatelessRate; + +import java.util.List; +import java.util.Map; +import java.nio.charset.StandardCharsets; +import java.text.Normalizer; + +public abstract class Utilities { + /** + * Get the lowest stateless rate from a list of stateless rates. + * + * @param rates the list of stateless rates. + * @param carriers the carriers to use in the filter. + * @param services the services to use in the filter. + * @return lowest StatelessRate object + * @throws FilteringError when the filters could not be applied. + */ + public static StatelessRate getLowestStatelessRate(List rates, List carriers, + List services) + throws FilteringError, NumberFormatException { + StatelessRate lowestRate = null; + + if (carriers != null) { + carriers.replaceAll(String::toLowerCase); + } + + if (services != null) { + services.replaceAll(String::toLowerCase); + } + + for (StatelessRate rate : rates) { + if ((carriers != null && !carriers.contains(rate.getCarrier().toLowerCase())) || + (services != null && !services.contains(rate.getService().toLowerCase()))) { + continue; + } + + if (lowestRate == null || Float.parseFloat(rate.getRate()) < Float.parseFloat(lowestRate.getRate())) { + lowestRate = rate; + } + } + + if (lowestRate == null) { + throw new FilteringError(String.format( + Constants.ErrorMessages.NO_OBJECT_FOUND, "rates")); + } + + return lowestRate; + } + + /** + * Get the lowest rate from a list of rates. + * + * @param rates the list of rates. + * @param carriers the carriers to use in the filter. + * @param services the services to use in the filter. + * @return lowest Rate object + * @throws FilteringError when the filters could not be applied. + */ + public static Rate getLowestObjectRate(List rates, List carriers, List services) + throws FilteringError { + Rate lowestRate = null; + + if (carriers != null) { + carriers.replaceAll(String::toLowerCase); + } + + if (services != null) { + services.replaceAll(String::toLowerCase); + } + + for (Rate rate : rates) { + if ((carriers != null && !carriers.contains(rate.getCarrier().toLowerCase())) || + (services != null && !services.contains(rate.getService().toLowerCase()))) { + continue; + } + + if (lowestRate == null || rate.getRate() < lowestRate.getRate()) { + lowestRate = rate; + } + } + + if (lowestRate == null) { + throw new FilteringError(String.format( + Constants.ErrorMessages.NO_OBJECT_FOUND, "rates")); + } + + return lowestRate; + } + + /** + * 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 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); + } + } + + /** + * 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().getSmartRateAccuracy(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/main/java/com/easypost/utils/package-info.java b/src/main/java/com/easypost/utils/package-info.java index 9adfdf5c9..d4b3b19f8 100644 --- a/src/main/java/com/easypost/utils/package-info.java +++ b/src/main/java/com/easypost/utils/package-info.java @@ -3,7 +3,7 @@ * * @author EasyPost developers * @version 1.0 - * @see EasyPost API + * @see EasyPost API * @since 1.0 */ package com.easypost.utils; diff --git a/src/test/cassettes/address/all.json b/src/test/cassettes/address/all.json index 50adfb562..aa7e2af0c 100644 --- a/src/test/cassettes/address/all.json +++ b/src/test/cassettes/address/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456581, + "recordedAt": 1723823868, "request": { "body": "", "method": "GET", @@ -12,69 +12,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/addresses?page_size\u003d5" + "uri": "https://api.easypost.com/v2/addresses?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, "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\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"created_at\": \"2024-08-16T15:57:48+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": false,\n \"details\": {},\n \"errors\": [\n {\n \"code\": \"E.ADDRESS.NOT_FOUND\",\n \"field\": \"address\",\n \"suggestion\": null,\n \"message\": \"Address not found\"\n }\n ]\n },\n \"zip4\": {\n \"success\": false,\n \"details\": null,\n \"errors\": [\n {\n \"code\": \"E.ADDRESS.NOT_FOUND\",\n \"field\": \"address\",\n \"suggestion\": null,\n \"message\": \"Address not found\"\n }\n ]\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2024-08-16T15:57:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"id\": \"adr_48a452065be811efa361ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"id\": \"adr_486606135be811efa22bac1f6bc53342\",\n \"street2\": null,\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_3eff5a295be811efa09cac1f6bc539ae\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_3e2c6e065be811ef9b30ac1f6bc53342\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_3e29d0d95be811ef9c55ac1f6bc539aa\",\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": [ "HTTP/1.1 200 OK" ], "content-length": [ - "2972" + "2807" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb39nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d0c5f7cb08da0008a166" + "8a4bf43e66bf76fce786bd450035cf4d" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.038679" - ], - "etag": [ - "W/\"c46285c9d51caf86817a3ce87a0adc49\"" + "0.038266" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +81,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/addresses?page_size\u003d5" + "uri": "https://api.easypost.com/v2/addresses?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, - "duration": 160 + "duration": 240 } ] \ No newline at end of file diff --git a/src/test/cassettes/address/create.json b/src/test/cassettes/address/create.json index adb91ff49..2b1f4a5cd 100644 --- a/src/test/cassettes/address/create.json +++ b/src/test/cassettes/address/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456583, + "recordedAt": 1723823871, "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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4ab82e265be811efa827ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,56 +31,53 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d0c7f7a6296a0008a25c" + "8a4bf43c66bf76ffe786c07a0035d1fe" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.026567" + "0.101153" ], - "etag": [ - "W/\"4dc1d34d3879de8fb59e1ab47e399d27\"" + "location": [ + "/api/v2/addresses/adr_4ab82e265be811efa827ac1f6bc539ae" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/addresses/adr_222befd324ae11edb291ac1f6bc7b362" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +87,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses" }, - "duration": 154 + "duration": 315 } ] \ 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..dfabd9a16 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": 1723823869, "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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4958dfd85be811ef926b3cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -31,56 +31,56 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d0c5f7b97c370008a193" + "8a4bf44066bf76fde786bd470035cfb7" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.051402" + "0.065712" ], - "etag": [ - "W/\"a8b4bab036cfb9badba55a405581b591\"" + "location": [ + "/api/v2/addresses/adr_4958dfd85be811ef926b3cecef1b359e" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/addresses/adr_213b9ce924ae11ed9e83ac1f6b0a0d1e" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +90,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses/create_and_verify" }, - "duration": 176 + "duration": 282 } ] \ No newline at end of file diff --git a/src/test/cassettes/address/create_and_verify_carrier.json b/src/test/cassettes/address/create_and_verify_carrier.json new file mode 100644 index 000000000..eced704d3 --- /dev/null +++ b/src/test/cassettes/address/create_and_verify_carrier.json @@ -0,0 +1,94 @@ +[ + { + "recordedAt": 1762540176, + "request": { + "body": "{\n \"address\": {\n \"zip\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"phone\": \"REDACTED\",\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\"\n },\n \"verify_carrier\": \"UPS\"\n}", + "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 \"address\": {\n \"zip\": \"00001\",\n \"country\": \"US\",\n \"city\": \"NOT A CITY\",\n \"created_at\": \"2025-11-07T18:29:36Z\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": null,\n \"time_zone\": null,\n \"longitude\": null\n },\n \"errors\": [\n {\n \"code\": \"E.ADDRESS.NOT_FOUND\",\n \"field\": \"address\",\n \"suggestion\": null,\n \"message\": \"Address not found\"\n }\n ]\n },\n \"verify_carrier\": \"ups\",\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": [\n {\n \"code\": \"E.ADDRESS.NOT_FOUND\",\n \"field\": \"address\",\n \"suggestion\": null,\n \"message\": \"Address not found\"\n }\n ]\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2025-11-07T18:29:36Z\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EASYPOST\",\n \"street1\": \"000 UNKNOWN STREET\",\n \"id\": \"adr_b6c1cfd0bc0711f0ac45ac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"ZZ\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "820" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb42nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "bcd43725690e3a8fe786bc4002abc67c" + ], + "x-proxied": [ + "intlb6nuq c0061e0a2e", + "extlb2nuq cbbd141214" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.795785" + ], + "location": [ + "/api/v2/addresses/adr_b6c1cfd0bc0711f0ac45ac1f6bc539ae" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202511071754-85836cab32-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/addresses/create_and_verify" + }, + "duration": 968 + } +] \ 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..196183145 100644 --- a/src/test/cassettes/address/create_verify.json +++ b/src/test/cassettes/address/create_verify.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456581, + "recordedAt": 1723823867, "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}", + "body": "{\n \"address\": {\n \"zip\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"phone\": \"REDACTED\",\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,69 +18,161 @@ "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\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"id\": \"adr_486606135be811efa22bac1f6bc53342\",\n \"street2\": null,\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "907" + "453" ], "expires": [ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb39nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" ], "strict-transport-security": [ "max-age\u003d31536000; includeSubDomains; preload" ], - "pragma": [ - "no-cache" + "x-xss-protection": [ + "1; mode\u003dblock" ], "x-content-type-options": [ "nosniff" ], + "x-ep-request-uuid": [ + "8a4bf44066bf76fbe786bd290035ce40" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.036976" + ], + "location": [ + "/api/v2/addresses/adr_486606135be811efa22bac1f6bc53342" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/addresses" + }, + "duration": 237 + }, + { + "recordedAt": 1723823868, + "request": { + "body": "{\n \"address\": {\n \"zip\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"phone\": \"REDACTED\",\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\"\n },\n \"verify\": true\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\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"created_at\": \"2024-08-16T15:57:48+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": false,\n \"details\": {},\n \"errors\": [\n {\n \"code\": \"E.ADDRESS.NOT_FOUND\",\n \"field\": \"address\",\n \"suggestion\": null,\n \"message\": \"Address not found\"\n }\n ]\n },\n \"zip4\": {\n \"success\": false,\n \"details\": null,\n \"errors\": [\n {\n \"code\": \"E.ADDRESS.NOT_FOUND\",\n \"field\": \"address\",\n \"suggestion\": null,\n \"message\": \"Address not found\"\n }\n ]\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2024-08-16T15:57:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"id\": \"adr_48a452065be811efa361ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "750" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb43nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d0c5e68d49ac0008a152" + "8a4bf43b66bf76fce786bd420035cea9" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.043356" + "0.061490" ], - "etag": [ - "W/\"9d42b1fab31f80f4252f071b9fa5d26f\"" + "location": [ + "/api/v2/addresses/adr_48a452065be811efa361ac1f6bc539aa" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/addresses/adr_20ea4a3224ae11ed9de6ac1f6b0a0d1e" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +182,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses" }, - "duration": 172 + "duration": 265 } ] \ 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..53a7c3550 100644 --- a/src/test/cassettes/address/create_verify_array.json +++ b/src/test/cassettes/address/create_verify_array.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456583, + "recordedAt": 1723823870, "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}", + "body": "{\n \"address\": {\n \"zip\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"phone\": \"REDACTED\",\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,69 +18,158 @@ "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\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"id\": \"adr_4a30f2475be811efa41cac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "907" + "453" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb38nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" ], "strict-transport-security": [ "max-age\u003d31536000; includeSubDomains; preload" ], - "pragma": [ - "no-cache" + "x-xss-protection": [ + "1; mode\u003dblock" ], "x-content-type-options": [ "nosniff" ], + "x-ep-request-uuid": [ + "8a4bf43b66bf76fee786c05f0035d125" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.033907" + ], + "location": [ + "/api/v2/addresses/adr_4a30f2475be811efa41cac1f6bc539aa" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/addresses" + }, + "duration": 229 + }, + { + "recordedAt": 1723823871, + "request": { + "body": "{\n \"address\": {\n \"zip\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"phone\": \"REDACTED\",\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\"\n },\n \"verify\": [\n true\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\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"created_at\": \"2024-08-16T15:57:51+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": false,\n \"details\": {},\n \"errors\": [\n {\n \"code\": \"E.ADDRESS.NOT_FOUND\",\n \"field\": \"address\",\n \"suggestion\": null,\n \"message\": \"Address not found\"\n }\n ]\n },\n \"zip4\": {\n \"success\": false,\n \"details\": null,\n \"errors\": [\n {\n \"code\": \"E.ADDRESS.NOT_FOUND\",\n \"field\": \"address\",\n \"suggestion\": null,\n \"message\": \"Address not found\"\n }\n ]\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2024-08-16T15:57:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"id\": \"adr_4a6efddb5be811efa440ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "750" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d0c7f7ee93d60008a228" + "8a4bf44066bf76ffe786c0610035d191" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.040272" + "0.058390" ], - "etag": [ - "W/\"59c0b5b942019eb8a6ea6b8e1720e642\"" + "location": [ + "/api/v2/addresses/adr_4a6efddb5be811efa440ac1f6bc539aa" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/addresses/adr_21fa894224ae11ed82e6ac1f6bc72124" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +179,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses" }, - "duration": 173 + "duration": 318 } ] \ No newline at end of file diff --git a/src/test/cassettes/address/create_verify_carrier.json b/src/test/cassettes/address/create_verify_carrier.json new file mode 100644 index 000000000..c68a1aa0e --- /dev/null +++ b/src/test/cassettes/address/create_verify_carrier.json @@ -0,0 +1,94 @@ +[ + { + "recordedAt": 1762540174, + "request": { + "body": "{\n \"address\": {\n \"zip\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"phone\": \"REDACTED\",\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\"\n },\n \"verify\": true,\n \"verify_carrier\": \"UPS\"\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\": \"00001\",\n \"country\": \"US\",\n \"city\": \"NOT A CITY\",\n \"created_at\": \"2025-11-07T18:29:35Z\",\n \"verifications\": {\n \"delivery\": {\n \"success\": true,\n \"details\": {\n \"latitude\": null,\n \"time_zone\": null,\n \"longitude\": null\n },\n \"errors\": [\n {\n \"code\": \"E.ADDRESS.NOT_FOUND\",\n \"field\": \"address\",\n \"suggestion\": null,\n \"message\": \"Address not found\"\n }\n ]\n },\n \"verify_carrier\": \"ups\",\n \"zip4\": {\n \"success\": true,\n \"details\": null,\n \"errors\": [\n {\n \"code\": \"E.ADDRESS.NOT_FOUND\",\n \"field\": \"address\",\n \"suggestion\": null,\n \"message\": \"Address not found\"\n }\n ]\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2025-11-07T18:29:35Z\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EASYPOST\",\n \"street1\": \"000 UNKNOWN STREET\",\n \"id\": \"adr_b5db9a37bc0711f0967fac1f6bc53342\",\n \"street2\": \"\",\n \"state\": \"ZZ\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "808" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "bcd43726690e3a8ee786bc3b02abc094" + ], + "x-proxied": [ + "intlb6nuq c0061e0a2e", + "extlb2nuq cbbd141214" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.780863" + ], + "location": [ + "/api/v2/addresses/adr_b5db9a37bc0711f0967fac1f6bc53342" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202511071754-85836cab32-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/addresses" + }, + "duration": 998 + } +] \ 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..21349d8d0 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": 1723823869, "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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_499784985be811ef92833cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,56 +31,53 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d0c6f7bba5590008a1b2" + "8a4bf43b66bf76fde786bd4a0035d018" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.051439" + "0.068571" ], - "etag": [ - "W/\"64fec571130a3644f7cf3849689a8799\"" + "location": [ + "/api/v2/addresses/adr_499784985be811ef92833cecef1b359e" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/addresses/adr_2170c9ce24ae11edb0e9ac1f6bc7b362" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +87,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses" }, - "duration": 185 + "duration": 271 } ] \ 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 new file mode 100644 index 000000000..9d777e7e1 --- /dev/null +++ b/src/test/cassettes/address/error_address_creation.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1762540339, + "request": { + "body": "{\n \"address\": {}\n}", + "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": [ + "bigweb67nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "bcd43726690e3b33e786c9e602acee37" + ], + "x-proxied": [ + "intlb4nuq c0061e0a2e", + "extlb2nuq cbbd141214" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.018362" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202511071754-85836cab32-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": 199 + } +] \ No newline at end of file diff --git a/src/test/cassettes/address/get_next_page.json b/src/test/cassettes/address/get_next_page.json new file mode 100644 index 000000000..b616b9212 --- /dev/null +++ b/src/test/cassettes/address/get_next_page.json @@ -0,0 +1,177 @@ +[ + { + "recordedAt": 1723823868, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/addresses?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"addresses\": [\n {\n \"zip\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"created_at\": \"2024-08-16T15:57:48+00:00\",\n \"verifications\": {\n \"delivery\": {\n \"success\": false,\n \"details\": {},\n \"errors\": [\n {\n \"code\": \"E.ADDRESS.NOT_FOUND\",\n \"field\": \"address\",\n \"suggestion\": null,\n \"message\": \"Address not found\"\n }\n ]\n },\n \"zip4\": {\n \"success\": false,\n \"details\": null,\n \"errors\": [\n {\n \"code\": \"E.ADDRESS.NOT_FOUND\",\n \"field\": \"address\",\n \"suggestion\": null,\n \"message\": \"Address not found\"\n }\n ]\n }\n },\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2024-08-16T15:57:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"id\": \"adr_48a452065be811efa361ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"00001\",\n \"country\": \"US\",\n \"city\": \"Not A City\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"EasyPost\",\n \"street1\": \"000 unknown street\",\n \"id\": \"adr_486606135be811efa22bac1f6bc53342\",\n \"street2\": null,\n \"state\": \"ZZ\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_3eff5a295be811efa09cac1f6bc539ae\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_3e2c6e065be811ef9b30ac1f6bc53342\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_3e29d0d95be811ef9c55ac1f6bc539aa\",\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": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2807" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44066bf76fce786bd430035cee6" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.034749" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/addresses?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 242 + }, + { + "recordedAt": 1723823868, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/addresses?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%61%64%72%5F%33%65%32%39%64%30%64%39%35%62%65%38%31%31%65%66%39%63%35%35%61%63%31%66%36%62%63%35%33%39%61%61" + }, + "response": { + "body": "{\n \"addresses\": [\n {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:29+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_3d90bd935be811ef9fc3ac1f6bc539ae\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_3cac30125be811ef9a64ac1f6bc53342\",\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\": \"2024-08-16T15:57:28+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\": \"2024-08-16T15:57:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_3ca9d5f95be811ef8a453cecef1b359e\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_3a8de5545be811ef993dac1f6bc53342\",\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\": \"2024-08-16T15: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\": \"2024-08-16T15:57:23+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_39b43bf05be811ef88a33cecef1b359e\",\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": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2524" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44066bf76fce786bd440035cf1e" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.039206" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/addresses?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%61%64%72%5F%33%65%32%39%64%30%64%39%35%62%65%38%31%31%65%66%39%63%35%35%61%63%31%66%36%62%63%35%33%39%61%61" + }, + "duration": 248 + } +] \ No newline at end of file diff --git a/src/test/cassettes/address/retrieve.json b/src/test/cassettes/address/retrieve.json index 75e292026..6a7fcc7a4 100644 --- a/src/test/cassettes/address/retrieve.json +++ b/src/test/cassettes/address/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456582, + "recordedAt": 1723823870, "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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_49d21efa5be811efa3f2ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,56 +31,56 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d0c6f7c8b9300008a1e3" + "8a4bf43f66bf76fee786c05b0035d086" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.038710" + "0.058309" ], - "etag": [ - "W/\"b855277dcadd238b41b536446942a5f0\"" + "location": [ + "/api/v2/addresses/adr_49d21efa5be811efa3f2ac1f6bc539aa" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/addresses/adr_21a7bd9224ae11edaeccac1f6bc7bdc6" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +90,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses" }, - "duration": 175 + "duration": 264 }, { - "recordedAt": 1661456582, + "recordedAt": 1723823870, "request": { "body": "", "method": "GET", @@ -108,10 +107,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/addresses/adr_21a7bd9224ae11edaeccac1f6bc7bdc6" + "uri": "https://api.easypost.com/v2/addresses/adr_49d21efa5be811efa3f2ac1f6bc539aa" }, "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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_49d21efa5be811efa3f2ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,53 +123,50 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d0c6f7a64bbc0008a1f2" + "8a4bf44166bf76fee786c05d0035d0ca" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.024402" - ], - "etag": [ - "W/\"b855277dcadd238b41b536446942a5f0\"" + "0.030323" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +176,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/addresses/adr_21a7bd9224ae11edaeccac1f6bc7bdc6" + "uri": "https://api.easypost.com/v2/addresses/adr_49d21efa5be811efa3f2ac1f6bc539aa" }, - "duration": 147 + "duration": 231 } ] \ No newline at end of file diff --git a/src/test/cassettes/address/verify.json b/src/test/cassettes/address/verify.json index b20a78d2a..e425dfd97 100644 --- a/src/test/cassettes/address/verify.json +++ b/src/test/cassettes/address/verify.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456583, + "recordedAt": 1723823872, "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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4af720155be811ef93383cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,56 +31,53 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb34nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d0c7f7f030fd0008a27c" + "8a4bf43b66bf76ffe786c07c0035d27d" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.030231" + "0.038375" ], - "etag": [ - "W/\"e6fd0a4f435f2aeb4264cb5e0c7d4877\"" + "location": [ + "/api/v2/addresses/adr_4af720155be811ef93383cecef1b359e" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/addresses/adr_225f114424ae11edb302ac1f6bc7b362" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/addresses" }, - "duration": 167 + "duration": 239 }, { - "recordedAt": 1661456583, + "recordedAt": 1723823872, "request": { "body": "", "method": "GET", @@ -108,10 +104,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/addresses/adr_225f114424ae11edb302ac1f6bc7b362/verify" + "uri": "https://api.easypost.com/v2/addresses/adr_4af720155be811ef93383cecef1b359e/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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4b20eb305be811efa4afac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n }\n}", "httpVersion": null, "headers": { "null": [ @@ -124,56 +120,53 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d0c7f7ba84df0008a29f" + "8a4bf44066bf7700e786c07d0035d2c5" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.051407" + "0.079549" ], - "etag": [ - "W/\"1ab71edb7d06b9aace6b8e27f514c20f\"" + "location": [ + "/api/v2/addresses/adr_4b20eb305be811efa4afac1f6bc539aa" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/addresses/adr_228151e824ae11ed8402ac1f6bc72124" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,9 +176,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_4af720155be811ef93383cecef1b359e/verify" }, - "duration": 182 + "duration": 277 } ] \ No newline at end of file diff --git a/src/test/cassettes/api_key/all_api_keys.json b/src/test/cassettes/api_key/all_api_keys.json new file mode 100644 index 000000000..7355579d2 --- /dev/null +++ b/src/test/cassettes/api_key/all_api_keys.json @@ -0,0 +1,88 @@ +[ + { + "recordedAt": 1723823856, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/api_keys" + }, + "response": { + "body": "{\n \"children\": [\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_af930e9bd27a4445bc2741fac37850cc\"\n }\n ],\n \"keys\": [],\n \"id\": \"user_04ad194774a54f6c97d1385715721091\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "926" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb42nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43b66bf76f0e786bcc10035c2cc" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.086966" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/api_keys" + }, + "duration": 296 + } +] \ No newline at end of file diff --git a/src/test/cassettes/user/api_keys.json b/src/test/cassettes/api_key/api_keys.json similarity index 61% rename from src/test/cassettes/user/api_keys.json rename to src/test/cassettes/api_key/api_keys.json index 63ad79c19..61e64abf1 100644 --- a/src/test/cassettes/user/api_keys.json +++ b/src/test/cassettes/api_key/api_keys.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456586, + "recordedAt": 1770070890, "request": { "body": "{\n \"user\": {\n \"name\": \"Test User\"\n }\n}", "method": "POST", @@ -18,66 +18,63 @@ "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\": \"2026-02-02T22:21:30Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_ff4fd488b4e545c98a14a4caa598b41e\",\n \"api_keys\": [],\n \"has_elevate_access\": false,\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "634" + "691" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb38nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d0caf7efbd9c0008a3b9" + "2e56ccec6981236ae2bcd1da02e3ef84" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb5nuq d9379ca146", + "extlb2nuq cbbd141214" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.797932" - ], - "etag": [ - "W/\"2501f329dc6ca090e92f55f4273dfc03\"" + "0.456456" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202602022023-e2aafa4ad5-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +84,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 956 + "duration": 571 }, { - "recordedAt": 1661456587, + "recordedAt": 1770070890, "request": { "body": "", "method": "GET", @@ -108,66 +104,63 @@ "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_af930e9bd27a4445bc2741fac37850cc\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_ff4fd488b4e545c98a14a4caa598b41e\"\n }\n ],\n \"keys\": [],\n \"id\": \"user_04ad194774a54f6c97d1385715721091\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "7422" + "1390" ], "expires": [ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb66nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d0cbf7ee18de0008a425" + "2e56ccf06981236ae2bcd1df02e3f0a2" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb5nuq d9379ca146", + "extlb2nuq cbbd141214" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.092333" - ], - "etag": [ - "W/\"7913de4869c074f93f2a7e85c3d5c7bf\"" + "0.036304" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202602022023-e2aafa4ad5-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +170,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/api_keys" }, - "duration": 222 + "duration": 143 }, { - "recordedAt": 1661456587, + "recordedAt": 1770070891, "request": { "body": "", "method": "GET", @@ -195,72 +187,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_4ff450caf3d447ff89279ada248b76ec" + "uri": "https://api.easypost.com/v2/users/user_ff4fd488b4e545c98a14a4caa598b41e" }, "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\": \"2026-02-02T22:21:30Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_ff4fd488b4e545c98a14a4caa598b41e\",\n \"has_elevate_access\": false,\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "227" + "284" ], "expires": [ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb59nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d0cbf7df2d1e0008a443" + "2e56cced6981236be2bcd1f702e3f0d9" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq d9379ca146", + "extlb2nuq cbbd141214" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.035699" - ], - "etag": [ - "W/\"2ab073d79aada42b1fe030ec6996b0b9\"" + "0.047953" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202602022023-e2aafa4ad5-master" ], "cache-control": [ "private, no-cache, no-store" @@ -270,13 +256,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_4ff450caf3d447ff89279ada248b76ec" + "uri": "https://api.easypost.com/v2/users/user_ff4fd488b4e545c98a14a4caa598b41e" }, - "duration": 161 + "duration": 152 }, { - "recordedAt": 1661456587, + "recordedAt": 1770070891, "request": { "body": "", "method": "DELETE", @@ -288,7 +273,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_4ff450caf3d447ff89279ada248b76ec" + "uri": "https://api.easypost.com/v2/users/user_ff4fd488b4e545c98a14a4caa598b41e" }, "response": { "body": "", @@ -301,47 +286,47 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d0cbf7ca7c190008a456" + "2e56ccef6981236be2bcd1f802e3f120" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq d9379ca146", + "extlb2nuq cbbd141214" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.185161" + "0.100315" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202602022023-e2aafa4ad5-master" ], "cache-control": [ "private, no-cache, no-store" @@ -351,9 +336,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_ff4fd488b4e545c98a14a4caa598b41e" }, - "duration": 310 + "duration": 207 } ] \ No newline at end of file diff --git a/src/test/cassettes/api_key/lifecycle.json b/src/test/cassettes/api_key/lifecycle.json new file mode 100644 index 000000000..32de0f860 --- /dev/null +++ b/src/test/cassettes/api_key/lifecycle.json @@ -0,0 +1,349 @@ +[ + { + "recordedAt": 1738528358, + "request": { + "body": "{\n \"mode\": \"production\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/api_keys" + }, + "response": { + "body": "{\"object\":\"ApiKey\",\"key\":\"REDACTED\",\"mode\":\"production\",\"created_at\":\"2026-02-02T20:32:38Z\",\"active\":true,\"id\":\"ak_2df46e55f8434c3882b40f7c99c8b64f\"}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "199" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb66nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age=31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "cfd5bd42698109e6e2b988370270e6e6" + ], + "x-proxied": [ + "intlb5nuq d9379ca146", + "extlb1nuq cbbd141214" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.119875" + ], + "content-type": [ + "application/json; charset=utf-8" + ], + "x-version-label": [ + "easypost-202602021944-8c5966c6f9-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/api_keys" + }, + "duration": 295 + }, + { + "recordedAt": 1738528359, + "request": { + "body": "", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/api_keys/ak_2df46e55f8434c3882b40f7c99c8b64f/disable" + }, + "response": { + "body": "{\"object\":\"ApiKey\",\"key\":\"REDACTED\",\"mode\":\"production\",\"created_at\":\"2026-02-02T20:32:38Z\",\"active\":false,\"id\":\"ak_2df46e55f8434c3882b40f7c99c8b64f\"}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "200" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb33nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age=31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "cfd5bd41698109e6e2b988380270e748" + ], + "x-proxied": [ + "intlb4nuq d9379ca146", + "extlb1nuq cbbd141214" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.143682" + ], + "content-type": [ + "application/json; charset=utf-8" + ], + "x-version-label": [ + "easypost-202602021944-8c5966c6f9-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/api_keys/ak_2df46e55f8434c3882b40f7c99c8b64f/disable" + }, + "duration": 258 + }, + { + "recordedAt": 1738528360, + "request": { + "body": "", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/api_keys/ak_2df46e55f8434c3882b40f7c99c8b64f/enable" + }, + "response": { + "body": "{\"object\":\"ApiKey\",\"key\":\"REDACTED\",\"mode\":\"production\",\"created_at\":\"2026-02-02T20:32:38Z\",\"active\":true,\"id\":\"ak_2df46e55f8434c3882b40f7c99c8b64f\"}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "199" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb42nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age=31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "cfd5bd41698109e6e2b988390270e7ae" + ], + "x-proxied": [ + "intlb5nuq d9379ca146", + "extlb1nuq cbbd141214" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.116097" + ], + "content-type": [ + "application/json; charset=utf-8" + ], + "x-version-label": [ + "easypost-202602021944-8c5966c6f9-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/api_keys/ak_2df46e55f8434c3882b40f7c99c8b64f/enable" + }, + "duration": 227 + }, + { + "recordedAt": 1738528361, + "request": { + "body": "", + "method": "DELETE", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/api_keys/ak_2df46e55f8434c3882b40f7c99c8b64f" + }, + "response": { + "body": "", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 204 No Content" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age=31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode=block" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "cfd5bd44698109e6e2b9883a0270e816" + ], + "x-proxied": [ + "intlb3nuq d9379ca146", + "extlb1nuq cbbd141214" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.259319" + ], + "x-version-label": [ + "easypost-202602021944-8c5966c6f9-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 204, + "message": "No Content" + }, + "uri": "https://api.easypost.com/v2/api_keys/ak_2df46e55f8434c3882b40f7c99c8b64f" + }, + "duration": 359 + } +] diff --git a/src/test/cassettes/api_key/retrieve_child_user_api_keys.json b/src/test/cassettes/api_key/retrieve_child_user_api_keys.json new file mode 100644 index 000000000..15e43e09a --- /dev/null +++ b/src/test/cassettes/api_key/retrieve_child_user_api_keys.json @@ -0,0 +1,343 @@ +[ + { + "recordedAt": 1723823854, + "request": { + "body": "{\n \"user\": {\n \"name\": \"Test User\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "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\": \"2024-08-16T15:57:34Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_be3e8e064b094079b60311d3b310f738\",\n \"api_keys\": [],\n \"has_elevate_access\": false,\n \"object\": \"User\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "691" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb38nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43d66bf76eee786bca40035c092" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.554784" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/users" + }, + "duration": 771 + }, + { + "recordedAt": 1723823855, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/api_keys" + }, + "response": { + "body": "{\n \"children\": [\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_af930e9bd27a4445bc2741fac37850cc\"\n },\n {\n \"children\": [],\n \"keys\": [],\n \"id\": \"user_be3e8e064b094079b60311d3b310f738\"\n }\n ],\n \"keys\": [],\n \"id\": \"user_04ad194774a54f6c97d1385715721091\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1390" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44066bf76efe786bcbd0035c19d" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.082161" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/api_keys" + }, + "duration": 277 + }, + { + "recordedAt": 1723823855, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/users/user_be3e8e064b094079b60311d3b310f738" + }, + "response": { + "body": "{\n \"children\": [],\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"Test User\",\n \"verified\": true,\n \"created_at\": \"2024-08-16T15:57:34Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_be3e8e064b094079b60311d3b310f738\",\n \"has_elevate_access\": false,\n \"object\": \"User\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "284" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb35nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf76efe786bcbe0035c1d4" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.241655" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/users/user_be3e8e064b094079b60311d3b310f738" + }, + "duration": 444 + }, + { + "recordedAt": 1723823856, + "request": { + "body": "", + "method": "DELETE", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/users/user_be3e8e064b094079b60311d3b310f738" + }, + "response": { + "body": "", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 204 No Content" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb40nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf76f0e786bcbf0035c241" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.137383" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 204, + "message": "No Content" + }, + "uri": "https://api.easypost.com/v2/users/user_be3e8e064b094079b60311d3b310f738" + }, + "duration": 351 + } +] \ 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 deleted file mode 100644 index 8fd3a0061..000000000 --- a/src/test/cassettes/batch/add_remove_shipment.json +++ /dev/null @@ -1,377 +0,0 @@ -[ - { - "recordedAt": 1661456470, - "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", - "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.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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 201 Created" - ], - "content-length": [ - "7077" - ], - "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": [ - "07323c3a6307d055f7a8fc9c00086817" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "1.125717" - ], - "etag": [ - "W/\"07f8a0f62f8ffaa01b6c17a69f67a83f\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "location": [ - "/api/v2/shipments/shp_9486c62690b14875b499927e19a2b58b" - ], - "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments" - }, - "duration": 1276 - }, - { - "recordedAt": 1661456470, - "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-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}", - "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": [ - "07323c396307d056f7cc197f000868c6" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.035073" - ], - "etag": [ - "W/\"198a9818d00146a0ee9c740609875174\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches" - }, - "duration": 169 - }, - { - "recordedAt": 1661456471, - "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}", - "method": "POST", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ], - "Content-Type": [ - "application/json" - ] - }, - "uri": "https://api.easypost.com/v2/batches/batch_74dcf81c3113434b98c33530416f8e0d/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}", - "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": [ - "07323c386307d057e68aa989000868e3" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.043716" - ], - "etag": [ - "W/\"93a85d0d32bc621c1ae9601418cac9ce\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches/batch_74dcf81c3113434b98c33530416f8e0d/add_shipments" - }, - "duration": 185 - }, - { - "recordedAt": 1661456471, - "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}", - "method": "POST", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ], - "Content-Type": [ - "application/json" - ] - }, - "uri": "https://api.easypost.com/v2/batches/batch_74dcf81c3113434b98c33530416f8e0d/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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 200 OK" - ], - "content-length": [ - "385" - ], - "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": [ - "07323c386307d057f7bb87d500086914" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.047725" - ], - "etag": [ - "W/\"eabdd253095cf4fcbf90b7b9e5309c94\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches/batch_74dcf81c3113434b98c33530416f8e0d/remove_shipments" - }, - "duration": 185 - } -] \ 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..7f3ea6820 --- /dev/null +++ b/src/test/cassettes/batch/add_remove_shipment_with_list.json @@ -0,0 +1,361 @@ +[ + { + "recordedAt": 1723823998, + "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\": \"GroundAdvantage\",\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.93000\",\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\": \"2024-08-16T15:59:57Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:58Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:57Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:57Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_dfebcd01b0d644f294cd3db8dad5d6b0\",\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\": \"2024-08-16T15:59:58Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"tracking_code\": \"9400100105807076063423\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzQyYWM4NzkyOWUzOTRkMzA5Zjc4MmY1YTQzZGYxNGEx\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:58Z\",\n \"signed_by\": null,\n \"id\": \"trk_42ac87929e394d309f782f5a43df14a1\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_95b568985be811ef8afbac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_95b568985be811ef8afbac1f6bc539aa\",\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\": \"2024-08-16T15:59:57Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e82f9cd9f4b8d447589005f569e021af98.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:58Z\",\n \"id\": \"pl_efda2a9245f24edcb9602a90e3565860\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:59:57Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:57Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:57Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_86cce04bea5d427faa79d20d58d04690\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_95b313315be811ef8e49ac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:57Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:57Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0a7a1343ccb94890b38c91cbdd8f6a83\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:57Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:57Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_52fa488dca8c432195b39c25056b10ef\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:57Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:57Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_dfebcd01b0d644f294cd3db8dad5d6b0\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_95b313315be811ef8e49ac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063423\",\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": [ + "6549" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb35nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44066bf777de786c9e900365668" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.996851" + ], + "location": [ + "/api/v2/shipments/shp_209960eee8504245ae2b6669c5dca941" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1198 + }, + { + "recordedAt": 1723823998, + "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\": \"2024-08-16T15:59:58Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2024-08-16T15:59:58Z\",\n \"id\": \"batch_32532c59d9be47a49d2e6049b4c41cd0\",\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": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44066bf777ee786c9eb003657f6" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.035130" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches" + }, + "duration": 234 + }, + { + "recordedAt": 1723823999, + "request": { + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_86cce04bea5d427faa79d20d58d04690\",\n \"height\": 4.0,\n \"object\": \"Parcel\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.93,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.5,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 1.0,\n \"listRate\": 33.1,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 33.1,\n \"deliveryDays\": 1.0,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"currency\": \"USD\",\n \"id\": \"rate_0a7a1343ccb94890b38c91cbdd8f6a83\",\n \"retailRate\": 37.9,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.25,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 6.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"currency\": \"USD\",\n \"id\": \"rate_52fa488dca8c432195b39c25056b10ef\",\n \"retailRate\": 9.8,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"currency\": \"USD\",\n \"id\": \"rate_dfebcd01b0d644f294cd3db8dad5d6b0\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n }\n ],\n \"trackingCode\": \"9400100105807076063423\",\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 15, 2024, 6:00:00 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_95b313315be811ef8e49ac1f6bc539ae\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_95b568985be811ef8afbac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"currency\": \"USD\",\n \"id\": \"rate_dfebcd01b0d644f294cd3db8dad5d6b0\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 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 15, 2024, 6:00:00 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_95b313315be811ef8e49ac1f6bc539ae\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"tracker\": {\n \"weight\": 0.0,\n \"trackingCode\": \"9400100105807076063423\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzQyYWM4NzkyOWUzOTRkMzA5Zjc4MmY1YTQzZGYxNGEx\",\n \"trackingDetails\": [],\n \"id\": \"trk_42ac87929e394d309f782f5a43df14a1\",\n \"status\": \"unknown\",\n \"object\": \"Tracker\",\n \"updatedAt\": \"Aug 15, 2024, 6:00: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 15, 2024, 6:00:00 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_95b568985be811ef8afbac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"id\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_efda2a9245f24edcb9602a90e3565860\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e82f9cd9f4b8d447589005f569e021af98.png\",\n \"object\": \"PostageLabel\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 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_32532c59d9be47a49d2e6049b4c41cd0/add_shipments" + }, + "response": { + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2024-08-16T15:59:58Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"tracking_code\": \"9400100105807076063423\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:59:58Z\",\n \"id\": \"batch_32532c59d9be47a49d2e6049b4c41cd0\",\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": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf777fe786ca040036584a" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.070567" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches/batch_32532c59d9be47a49d2e6049b4c41cd0/add_shipments" + }, + "duration": 300 + }, + { + "recordedAt": 1723823999, + "request": { + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_86cce04bea5d427faa79d20d58d04690\",\n \"height\": 4.0,\n \"object\": \"Parcel\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.93,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.5,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 1.0,\n \"listRate\": 33.1,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 33.1,\n \"deliveryDays\": 1.0,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"currency\": \"USD\",\n \"id\": \"rate_0a7a1343ccb94890b38c91cbdd8f6a83\",\n \"retailRate\": 37.9,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.25,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 6.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"currency\": \"USD\",\n \"id\": \"rate_52fa488dca8c432195b39c25056b10ef\",\n \"retailRate\": 9.8,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"currency\": \"USD\",\n \"id\": \"rate_dfebcd01b0d644f294cd3db8dad5d6b0\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n }\n ],\n \"trackingCode\": \"9400100105807076063423\",\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 15, 2024, 6:00:00 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_95b313315be811ef8e49ac1f6bc539ae\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_95b568985be811ef8afbac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"currency\": \"USD\",\n \"id\": \"rate_dfebcd01b0d644f294cd3db8dad5d6b0\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 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 15, 2024, 6:00:00 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_95b313315be811ef8e49ac1f6bc539ae\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"tracker\": {\n \"weight\": 0.0,\n \"trackingCode\": \"9400100105807076063423\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzQyYWM4NzkyOWUzOTRkMzA5Zjc4MmY1YTQzZGYxNGEx\",\n \"trackingDetails\": [],\n \"id\": \"trk_42ac87929e394d309f782f5a43df14a1\",\n \"status\": \"unknown\",\n \"object\": \"Tracker\",\n \"updatedAt\": \"Aug 15, 2024, 6:00: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 15, 2024, 6:00:00 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_95b568985be811ef8afbac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"id\": \"shp_209960eee8504245ae2b6669c5dca941\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_efda2a9245f24edcb9602a90e3565860\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e82f9cd9f4b8d447589005f569e021af98.png\",\n \"object\": \"PostageLabel\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 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_32532c59d9be47a49d2e6049b4c41cd0/remove_shipments" + }, + "response": { + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2024-08-16T15:59:58Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2024-08-16T15:59:59Z\",\n \"id\": \"batch_32532c59d9be47a49d2e6049b4c41cd0\",\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": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf777fe786ca06003658cd" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.047641" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches/batch_32532c59d9be47a49d2e6049b4c41cd0/remove_shipments" + }, + "duration": 248 + } +] \ 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..0af6e5819 --- /dev/null +++ b/src/test/cassettes/batch/add_remove_shipment_with_map.json @@ -0,0 +1,361 @@ +[ + { + "recordedAt": 1723823973, + "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\": \"GroundAdvantage\",\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.93000\",\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\": \"2024-08-16T15:59:31Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:32Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:32Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6f187941cc744ddeba300caed1f517d7\",\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\": \"2024-08-16T15:59:33Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"tracking_code\": \"9400100105807076063324\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzMxZDFiMWZhOTNlZjQ2ZDk5YmNiM2M4MWNkZTRhZjAy\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:33Z\",\n \"signed_by\": null,\n \"id\": \"trk_31d1b1fa93ef46d99bcb3c81cde4af02\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_868370035be811ef8236ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_868370035be811ef8236ac1f6bc539aa\",\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\": \"2024-08-16T15:59:32Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8df39525deb9a48a9bee2a3e38a617c82.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:32Z\",\n \"id\": \"pl_34f9fa2c9a254ba4b2fe7659d0a68772\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:59:32Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:31Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:31Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_3dc3ae89dbbf4f6f8275bce8f2cf9db7\",\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\": \"2024-08-16T15:59:31+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\": \"2024-08-16T15:59:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_86811cde5be811ef8234ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:32Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6f187941cc744ddeba300caed1f517d7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:32Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_37285dab027f4ba88387b382cb30703f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:32Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e24f25fa6dba4dda9b4ab9ee2bbe497b\",\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\": \"2024-08-16T15:59:31+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\": \"2024-08-16T15:59:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_86811cde5be811ef8234ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063324\",\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": [ + "6549" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf7763e786c9250036362b" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.158487" + ], + "location": [ + "/api/v2/shipments/shp_82dc86571c3b41029c4c3cd15d5c9e97" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1356 + }, + { + "recordedAt": 1723823973, + "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\": \"2024-08-16T15:59:33Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2024-08-16T15:59:33Z\",\n \"id\": \"batch_905dc7cc141d416c901a58d570018cb0\",\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": [ + "bigweb35nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44166bf7765e786c966003637d8" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.168914" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches" + }, + "duration": 369 + }, + { + "recordedAt": 1723823973, + "request": { + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_3dc3ae89dbbf4f6f8275bce8f2cf9db7\",\n \"height\": 4.0,\n \"object\": \"Parcel\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.93,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.5,\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\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"currency\": \"USD\",\n \"id\": \"rate_6f187941cc744ddeba300caed1f517d7\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 1.0,\n \"listRate\": 33.1,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 33.1,\n \"deliveryDays\": 1.0,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"currency\": \"USD\",\n \"id\": \"rate_37285dab027f4ba88387b382cb30703f\",\n \"retailRate\": 37.9,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.25,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 6.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"currency\": \"USD\",\n \"id\": \"rate_e24f25fa6dba4dda9b4ab9ee2bbe497b\",\n \"retailRate\": 9.8,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n }\n ],\n \"trackingCode\": \"9400100105807076063324\",\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 15, 2024, 6:00:00 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_86811cde5be811ef8234ac1f6bc539aa\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_868370035be811ef8236ac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"currency\": \"USD\",\n \"id\": \"rate_6f187941cc744ddeba300caed1f517d7\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 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 15, 2024, 6:00:00 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_86811cde5be811ef8234ac1f6bc539aa\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"tracker\": {\n \"weight\": 0.0,\n \"trackingCode\": \"9400100105807076063324\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzMxZDFiMWZhOTNlZjQ2ZDk5YmNiM2M4MWNkZTRhZjAy\",\n \"trackingDetails\": [],\n \"id\": \"trk_31d1b1fa93ef46d99bcb3c81cde4af02\",\n \"status\": \"unknown\",\n \"object\": \"Tracker\",\n \"updatedAt\": \"Aug 15, 2024, 6:00: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 15, 2024, 6:00:00 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_868370035be811ef8236ac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"id\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_34f9fa2c9a254ba4b2fe7659d0a68772\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8df39525deb9a48a9bee2a3e38a617c82.png\",\n \"object\": \"PostageLabel\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 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_905dc7cc141d416c901a58d570018cb0/add_shipments" + }, + "response": { + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2024-08-16T15:59:33Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"tracking_code\": \"9400100105807076063324\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:59:33Z\",\n \"id\": \"batch_905dc7cc141d416c901a58d570018cb0\",\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": [ + "bigweb40nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf7765e786c9820036387d" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.054066" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches/batch_905dc7cc141d416c901a58d570018cb0/add_shipments" + }, + "duration": 253 + }, + { + "recordedAt": 1723823974, + "request": { + "body": "{\n \"shipments\": [\n {\n \"insurance\": \"50.00\",\n \"isReturn\": false,\n \"parcel\": {\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_3dc3ae89dbbf4f6f8275bce8f2cf9db7\",\n \"height\": 4.0,\n \"object\": \"Parcel\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.93,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.5,\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\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"currency\": \"USD\",\n \"id\": \"rate_6f187941cc744ddeba300caed1f517d7\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 1.0,\n \"listRate\": 33.1,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 33.1,\n \"deliveryDays\": 1.0,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"currency\": \"USD\",\n \"id\": \"rate_37285dab027f4ba88387b382cb30703f\",\n \"retailRate\": 37.9,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.25,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 6.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"currency\": \"USD\",\n \"id\": \"rate_e24f25fa6dba4dda9b4ab9ee2bbe497b\",\n \"retailRate\": 9.8,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n }\n ],\n \"trackingCode\": \"9400100105807076063324\",\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 15, 2024, 6:00:00 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_86811cde5be811ef8234ac1f6bc539aa\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_868370035be811ef8236ac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"currency\": \"USD\",\n \"id\": \"rate_6f187941cc744ddeba300caed1f517d7\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 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 15, 2024, 6:00:00 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_86811cde5be811ef8234ac1f6bc539aa\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"tracker\": {\n \"weight\": 0.0,\n \"trackingCode\": \"9400100105807076063324\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzMxZDFiMWZhOTNlZjQ2ZDk5YmNiM2M4MWNkZTRhZjAy\",\n \"trackingDetails\": [],\n \"id\": \"trk_31d1b1fa93ef46d99bcb3c81cde4af02\",\n \"status\": \"unknown\",\n \"object\": \"Tracker\",\n \"updatedAt\": \"Aug 15, 2024, 6:00: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 15, 2024, 6:00:00 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_868370035be811ef8236ac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"id\": \"shp_82dc86571c3b41029c4c3cd15d5c9e97\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_34f9fa2c9a254ba4b2fe7659d0a68772\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8df39525deb9a48a9bee2a3e38a617c82.png\",\n \"object\": \"PostageLabel\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 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_905dc7cc141d416c901a58d570018cb0/remove_shipments" + }, + "response": { + "body": "{\n \"scan_form\": null,\n \"created_at\": \"2024-08-16T15:59:33Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 0.0,\n \"updated_at\": \"2024-08-16T15:59:33Z\",\n \"id\": \"batch_905dc7cc141d416c901a58d570018cb0\",\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": [ + "bigweb35nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44166bf7766e786c984003638ed" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.058040" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches/batch_905dc7cc141d416c901a58d570018cb0/remove_shipments" + }, + "duration": 262 + } +] \ No newline at end of file diff --git a/src/test/cassettes/batch/all.json b/src/test/cassettes/batch/all.json index b3b3c0004..b9167aded 100644 --- a/src/test/cassettes/batch/all.json +++ b/src/test/cassettes/batch/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456471, + "recordedAt": 1723823970, "request": { "body": "", "method": "GET", @@ -12,69 +12,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/batches?page_size\u003d5" + "uri": "https://api.easypost.com/v2/batches?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, "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\": null,\n \"created_at\": \"2024-07-24T22:21:27Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": \"USPS does not offer service First for this shipment.\",\n \"batch_status\": \"postage_purchase_failed\",\n \"id\": \"shp_6b935070283e4a4e8cdf55677d2dd086\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-07-24T22:21:27Z\",\n \"id\": \"batch_6abcdca312c5424f8599c648d8ca0c35\",\n \"state\": \"purchase_failed\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 1.0,\n \"creation_failed\": 0.0\n }\n },\n {\n \"scan_form\": null,\n \"created_at\": \"2024-07-24T22:21:28Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": \"USPS does not offer service First for this shipment.\",\n \"batch_status\": \"postage_purchase_failed\",\n \"id\": \"shp_1be5051c63f7403d851092c64ba0e213\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-07-24T22:21:29Z\",\n \"id\": \"batch_2076c41e12864aa9b438e18eacebe0c1\",\n \"state\": \"purchase_failed\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 1.0,\n \"creation_failed\": 0.0\n }\n },\n {\n \"scan_form\": null,\n \"created_at\": \"2024-07-24T22:21:39Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": \"USPS does not offer service First for this shipment.\",\n \"batch_status\": \"postage_purchase_failed\",\n \"id\": \"shp_ef47049f32724f51ab82aad43194e33c\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-07-24T22:21:39Z\",\n \"id\": \"batch_3e9ce59f09034312bb60cd13145574ae\",\n \"state\": \"purchase_failed\",\n \"object\": \"Batch\",\n \"status\": {\n \"postage_purchased\": 0.0,\n \"queued_for_purchase\": 0.0,\n \"created\": 0.0,\n \"postage_purchase_failed\": 1.0,\n \"creation_failed\": 0.0\n }\n },\n {\n \"scan_form\": null,\n \"created_at\": \"2024-07-24T22:21:50Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"created\",\n \"id\": \"shp_0da23c3065634446bce64f6db7292a5c\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-07-24T22:21:50Z\",\n \"id\": \"batch_51dd8920014c49569f710db7aa0881ea\",\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\": \"2024-07-24T22:21:51Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"created\",\n \"id\": \"shp_516d97578c504a40bc05f6f4a00d5f89\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-07-24T22:21:51Z\",\n \"id\": \"batch_04b64176ffc44dd78052db5253c1cef4\",\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}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "2207" + "2816" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d057f7dd07320008692f" + "8a4bf43e66bf7762e786c920003634ec" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.054775" - ], - "etag": [ - "W/\"33383c0871df679832ee47a5bd04a6e3\"" + "0.121264" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +81,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches?page_size\u003d5" + "uri": "https://api.easypost.com/v2/batches?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, - "duration": 186 + "duration": 350 } ] \ No newline at end of file diff --git a/src/test/cassettes/batch/buy.json b/src/test/cassettes/batch/buy.json index 3b2e0acf6..304e9660a 100644 --- a/src/test/cassettes/batch/buy.json +++ b/src/test/cassettes/batch/buy.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456472, + "recordedAt": 1723823971, "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}", + "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\": \"GroundAdvantage\",\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", "headers": { "Accept-Charset": [ @@ -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\": \"2024-08-16T15:59:31Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:59:31Z\",\n \"id\": \"batch_0b0335aea46d4e4bbdacca9633c286a5\",\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,53 +31,50 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d058f7c8b98c00086976" + "8a4bf44066bf7763e786c92200363572" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.103143" - ], - "etag": [ - "W/\"cafd0972197f5eeaa179cfdf768da752\"" + "0.044899" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +84,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 240 + "duration": 247 }, { - "recordedAt": 1661456472, + "recordedAt": 1723823971, "request": { "body": "", "method": "POST", @@ -105,10 +101,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_05b48e468fd04e5aa8f5c3ccbf10edcf/buy" + "uri": "https://api.easypost.com/v2/batches/batch_0b0335aea46d4e4bbdacca9633c286a5/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\": \"2024-08-16T15:59:31Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"queued_for_purchase\",\n \"id\": \"shp_d927805e6e3e4fd3be839a732c102ca4\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:59:31Z\",\n \"id\": \"batch_0b0335aea46d4e4bbdacca9633c286a5\",\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,53 +117,50 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb36nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d058f7a6c2d300086994" + "8a4bf43b66bf7763e786c923003635b5" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.073609" - ], - "etag": [ - "W/\"d9e27acf09c2173526e8eb1b85726a30\"" + "0.114827" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,9 +170,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_0b0335aea46d4e4bbdacca9633c286a5/buy" }, - "duration": 214 + "duration": 311 } ] \ No newline at end of file diff --git a/src/test/cassettes/batch/create.json b/src/test/cassettes/batch/create.json index 9bd20c4b3..b6e9828e5 100644 --- a/src/test/cassettes/batch/create.json +++ b/src/test/cassettes/batch/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456495, + "recordedAt": 1723823999, "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\": \"2024-08-16T15:59:59Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:59:59Z\",\n \"id\": \"batch_4d0fb517d86c4977bb299c25c4ef0b83\",\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,53 +31,50 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d06ff7a521f300087514" + "8a4bf43e66bf777fe786ca0800365941" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037300" - ], - "etag": [ - "W/\"a8fa4a4f3f1fc4b997b71f17bca5bea5\"" + "0.046577" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +84,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 179 + "duration": 243 } ] \ 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 deleted file mode 100644 index 08447f6c4..000000000 --- a/src/test/cassettes/batch/create_and_buy.json +++ /dev/null @@ -1,95 +0,0 @@ -[ - { - "recordedAt": 1661456495, - "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", - "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-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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 200 OK" - ], - "content-length": [ - "384" - ], - "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": [ - "07323c3c6307d06ff7dc00760008753e" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.043812" - ], - "etag": [ - "W/\"e5100bf4941c188ad394e35589dbce74\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches" - }, - "duration": 177 - } -] \ 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..99af1e377 100644 --- a/src/test/cassettes/batch/create_scanform.json +++ b/src/test/cassettes/batch/create_scanform.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456472, + "recordedAt": 1723823974, "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}", + "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\": \"GroundAdvantage\",\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", "headers": { "Accept-Charset": [ @@ -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\": \"2024-08-16T15:59:34Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:59:34Z\",\n \"id\": \"batch_5e771df3d7cd47d2a9710fa069146f28\",\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,53 +31,50 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d058e68a0700000869d3" + "8a4bf43c66bf7766e786c9860036395b" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037600" - ], - "etag": [ - "W/\"f6805857f08345a4feacecee1197e2c1\"" + "0.048454" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +84,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 172 + "duration": 246 }, { - "recordedAt": 1661456473, + "recordedAt": 1723823975, "request": { "body": "", "method": "POST", @@ -105,10 +101,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_c97ca77dc6d646b0b7f0680426282d0e/buy" + "uri": "https://api.easypost.com/v2/batches/batch_5e771df3d7cd47d2a9710fa069146f28/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\": \"2024-08-16T15:59:34Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"queued_for_purchase\",\n \"id\": \"shp_424ccb82964d434ea6806b14905811aa\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:59:34Z\",\n \"id\": \"batch_5e771df3d7cd47d2a9710fa069146f28\",\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,53 +117,50 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d059f7cb7b0d000869eb" + "8a4bf43c66bf7766e786c987003639a4" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.058362" - ], - "etag": [ - "W/\"f70a5d959f25a0f388db51590d90b404\"" + "0.063973" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +170,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_5e771df3d7cd47d2a9710fa069146f28/buy" }, - "duration": 185 + "duration": 260 }, { - "recordedAt": 1661456483, + "recordedAt": 1723823985, "request": { "body": "", "method": "POST", @@ -195,10 +187,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_c97ca77dc6d646b0b7f0680426282d0e/scan_form" + "uri": "https://api.easypost.com/v2/batches/batch_5e771df3d7cd47d2a9710fa069146f28/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\": \"2024-08-16T15:59:45Z\",\n \"form_url\": null,\n \"form_file_type\": null,\n \"batch_id\": \"batch_5e771df3d7cd47d2a9710fa069146f28\",\n \"created_at\": \"2024-08-16T15:59:45Z\",\n \"id\": \"sf_6eaa7fc503d54c268f98f9bfc867c05d\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [],\n \"object\": \"ScanForm\",\n \"status\": \"creating\"\n },\n \"created_at\": \"2024-08-16T15:59:34Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_424ccb82964d434ea6806b14905811aa\",\n \"tracking_code\": \"9400100105807076063331\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:59:45Z\",\n \"id\": \"batch_5e771df3d7cd47d2a9710fa069146f28\",\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,53 +203,50 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb41nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d063f7df3de000086f07" + "8a4bf43a66bf7771e786c9a1003646c4" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.104396" - ], - "etag": [ - "W/\"e8aaaba039bc8a404a8a4bb6b56bfa9b\"" + "0.078079" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -267,9 +256,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_5e771df3d7cd47d2a9710fa069146f28/scan_form" }, - "duration": 236 + "duration": 303 } ] \ No newline at end of file diff --git a/src/test/cassettes/batch/label.json b/src/test/cassettes/batch/label.json index c01316986..8892f1ca7 100644 --- a/src/test/cassettes/batch/label.json +++ b/src/test/cassettes/batch/label.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456483, + "recordedAt": 1723823985, "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}", + "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\": \"GroundAdvantage\",\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", "headers": { "Accept-Charset": [ @@ -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\": \"2024-08-16T15:59:45Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:59:45Z\",\n \"id\": \"batch_ca23e4ea94e0452295bb39e8806f1870\",\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,53 +31,50 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d063f7b6baf200086f35" + "8a4bf44166bf7771e786c9a30036475b" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.100026" - ], - "etag": [ - "W/\"d5875f887193936b84a6804d07fde803\"" + "0.041031" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +84,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 237 + "duration": 249 }, { - "recordedAt": 1661456484, + "recordedAt": 1723823985, "request": { "body": "", "method": "POST", @@ -105,10 +101,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_5379b920aaa740318012b21a751b42a7/buy" + "uri": "https://api.easypost.com/v2/batches/batch_ca23e4ea94e0452295bb39e8806f1870/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\": \"2024-08-16T15:59:45Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"queued_for_purchase\",\n \"id\": \"shp_2999a3973d6348258e336164f9caeaee\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:59:45Z\",\n \"id\": \"batch_ca23e4ea94e0452295bb39e8806f1870\",\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,53 +117,50 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d064e68bbd4800086f55" + "8a4bf43c66bf7771e786c9a4003647ae" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.054735" - ], - "etag": [ - "W/\"9bb024082dc586d8d0a6d503097f1c19\"" + "0.057373" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +170,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_ca23e4ea94e0452295bb39e8806f1870/buy" }, - "duration": 188 + "duration": 251 }, { - "recordedAt": 1661456494, + "recordedAt": 1723823996, "request": { "body": "{\n \"file_format\": \"ZPL\"\n}", "method": "POST", @@ -198,10 +190,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_5379b920aaa740318012b21a751b42a7/label" + "uri": "https://api.easypost.com/v2/batches/batch_ca23e4ea94e0452295bb39e8806f1870/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\": \"2024-08-16T15:59:45Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"postage_purchased\",\n \"id\": \"shp_2999a3973d6348258e336164f9caeaee\",\n \"tracking_code\": \"9400100105807076063379\"\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:59:56Z\",\n \"id\": \"batch_ca23e4ea94e0452295bb39e8806f1870\",\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,53 +206,53 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d06ef7dac90500087494" + "8a4bf43c66bf777ce786c9e4003654fd" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.039156" - ], - "etag": [ - "W/\"c5af8632b8e3585e34e329d5cec4ff75\"" + "0.055082" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -270,9 +262,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_ca23e4ea94e0452295bb39e8806f1870/label" }, - "duration": 172 + "duration": 277 } ] \ No newline at end of file diff --git a/src/test/cassettes/batch/retrieve.json b/src/test/cassettes/batch/retrieve.json index 7d23a2c7d..f0d62d058 100644 --- a/src/test/cassettes/batch/retrieve.json +++ b/src/test/cassettes/batch/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456494, + "recordedAt": 1723823996, "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\": \"2024-08-16T15:59:56Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:59:56Z\",\n \"id\": \"batch_2a9d80a7c2414978bf8437dbb1814668\",\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,53 +31,50 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d06ef7dc0839000874b1" + "8a4bf43e66bf777ce786c9e6003655a8" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.130214" - ], - "etag": [ - "W/\"ee556d5d49c09c4f64fc573407015fbd\"" + "0.043709" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +84,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/batches" }, - "duration": 267 + "duration": 253 }, { - "recordedAt": 1661456495, + "recordedAt": 1723823997, "request": { "body": "", "method": "GET", @@ -105,10 +101,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/batches/batch_6e4ea32b6a9d4ad698a85c5114bb4d5c" + "uri": "https://api.easypost.com/v2/batches/batch_2a9d80a7c2414978bf8437dbb1814668" }, "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\": \"2024-08-16T15:59:56Z\",\n \"pickup\": null,\n \"shipments\": [\n {\n \"reference\": null,\n \"batch_message\": null,\n \"batch_status\": \"created\",\n \"id\": \"shp_d39f50cc35b147f1a3d36b472654b704\",\n \"tracking_code\": null\n }\n ],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:59:56Z\",\n \"id\": \"batch_2a9d80a7c2414978bf8437dbb1814668\",\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,53 +117,50 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c396307d06fe68c4101000874e2" + "8a4bf43b66bf777ce786c9e700365604" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.022897" - ], - "etag": [ - "W/\"73a9115f8021bcf7b4f1c603ad54663f\"" + "0.027883" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,9 +170,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/batches/batch_6e4ea32b6a9d4ad698a85c5114bb4d5c" + "uri": "https://api.easypost.com/v2/batches/batch_2a9d80a7c2414978bf8437dbb1814668" }, - "duration": 150 + "duration": 231 } ] \ No newline at end of file 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_customer/add_payment_method.json b/src/test/cassettes/beta_referral_customer/add_payment_method.json new file mode 100644 index 000000000..929b3f55d --- /dev/null +++ b/src/test/cassettes/beta_referral_customer/add_payment_method.json @@ -0,0 +1,94 @@ +[ + { + "recordedAt": 1723823830, + "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 connect integration.\",\n \"errors\": []\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 422 Unprocessable Entity" + ], + "content-length": [ + "115" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb36nuq" + ], + "vary": [ + "Origin" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44166bf76d6e786bc210035a7c5" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.051163" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-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": 269 + } +] \ No newline at end of file diff --git a/src/test/cassettes/report/create_report_no_type.json b/src/test/cassettes/beta_referral_customer/create_bank_account_client_secret.json similarity index 69% rename from src/test/cassettes/report/create_report_no_type.json rename to src/test/cassettes/beta_referral_customer/create_bank_account_client_secret.json index b33e67815..b884ece5c 100644 --- a/src/test/cassettes/report/create_report_no_type.json +++ b/src/test/cassettes/beta_referral_customer/create_bank_account_client_secret.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456541, + "recordedAt": 1742502951, "request": { "body": "{}", "method": "POST", @@ -15,78 +15,80 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/reports/test/" + "uri": "https://api.easypost.com/beta/financial_connections_sessions" }, "response": { - "body": null, + "body": "{\n \"client_secret\": \"fcsess_client_secret_TGjLr3f2VIuNe5Nm7otCKq4a\"\n}", "httpVersion": null, "headers": { "null": [ - "HTTP/1.1 404 Not Found" + "HTTP/1.1 201 Created" ], "content-length": [ - "97" + "65" ], "expires": [ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb53nuq" + ], + "vary": [ + "Origin" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d09de689723600088c41" + "64f5803467dc7c26e2ba8772002bb9ad" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq 284c5d344a", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.018655" + "0.463688" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202503202010-5de35d6868-master" ], "cache-control": [ "private, no-cache, no-store" ] }, "status": { - "code": 404, - "message": "Not Found" + "code": 201, + "message": "Created" }, - "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/" + "uri": "https://api.easypost.com/beta/financial_connections_sessions" }, - "duration": 155 + "duration": 580 } ] \ No newline at end of file diff --git a/src/test/cassettes/tracker/create_list.json b/src/test/cassettes/beta_referral_customer/create_credit_card_client_secret.json similarity index 64% rename from src/test/cassettes/tracker/create_list.json rename to src/test/cassettes/beta_referral_customer/create_credit_card_client_secret.json index d86942b23..d8e427da9 100644 --- a/src/test/cassettes/tracker/create_list.json +++ b/src/test/cassettes/beta_referral_customer/create_credit_card_client_secret.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456539, + "recordedAt": 1742502952, "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}", + "body": "", "method": "POST", "headers": { "Accept-Charset": [ @@ -10,74 +10,71 @@ ], "User-Agent": [ "REDACTED" - ], - "Content-Type": [ - "application/json" ] }, - "uri": "https://api.easypost.com/v2/trackers/create_list" + "uri": "https://api.easypost.com/beta/setup_intents" }, "response": { - "body": "{}", + "body": "{\n \"client_secret\": \"seti_0R4pohDqT4huGUvdzzsjybrJ_secret_RynPW651kwMzuL7DNOr8EdW7vvLqQJ8\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "2" + "88" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb53nuq" + ], + "vary": [ + "Origin" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d09bf7dd1d3b00088b60" + "64f5803467dc7c27e2ba8776002bbab8" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq 284c5d344a", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.036207" - ], - "etag": [ - "W/\"44136fa355b3678a1146ad16f7e8649e\"" + "0.586783" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202503202010-5de35d6868-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +84,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/trackers/create_list" + "uri": "https://api.easypost.com/beta/setup_intents" }, - "duration": 171 + "duration": 697 } ] \ 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..03fbcb3ef --- /dev/null +++ b/src/test/cassettes/beta_referral_customer/refund_by_amount.json @@ -0,0 +1,94 @@ +[ + { + "recordedAt": 1723823829, + "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": [ + "bigweb39nuq" + ], + "vary": [ + "Origin" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43b66bf76d4e786bc1d0035a64a" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.457739" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 422, + "message": "Unprocessable Entity" + }, + "uri": "https://api.easypost.com/beta/referral_customers/refunds" + }, + "duration": 662 + } +] \ 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..dde6e4c36 --- /dev/null +++ b/src/test/cassettes/beta_referral_customer/refund_by_payment_log_id.json @@ -0,0 +1,94 @@ +[ + { + "recordedAt": 1723823829, + "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": [ + "bigweb38nuq" + ], + "vary": [ + "Origin" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf76d5e786bc1f0035a756" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.025786" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 422, + "message": "Unprocessable Entity" + }, + "uri": "https://api.easypost.com/beta/referral_customers/refunds" + }, + "duration": 227 + } +] \ No newline at end of file diff --git a/src/test/cassettes/beta_stateless_rate/retrieve_lowest_stateless_rate.json b/src/test/cassettes/beta_stateless_rate/retrieve_lowest_stateless_rate.json new file mode 100644 index 000000000..92ff1ec1f --- /dev/null +++ b/src/test/cassettes/beta_stateless_rate/retrieve_lowest_stateless_rate.json @@ -0,0 +1,94 @@ +[ + { + "recordedAt": 1723823795, + "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/beta/rates" + }, + "response": { + "body": "{\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"object\": \"Rate\"\n }\n ],\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\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_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_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_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 \"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 \"object\": \"Address\"\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 \"object\": \"Address\"\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2816" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb34nuq" + ], + "vary": [ + "Origin" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf76b2e786b7fe00358441" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.569245" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/beta/rates" + }, + "duration": 778 + } +] \ No newline at end of file diff --git a/src/test/cassettes/beta_stateless_rate/retrieve_stateless_rates.json b/src/test/cassettes/beta_stateless_rate/retrieve_stateless_rates.json new file mode 100644 index 000000000..3478293e2 --- /dev/null +++ b/src/test/cassettes/beta_stateless_rate/retrieve_stateless_rates.json @@ -0,0 +1,97 @@ +[ + { + "recordedAt": 1723823796, + "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/beta/rates" + }, + "response": { + "body": "{\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"object\": \"Rate\"\n }\n ],\n \"options\": {\n \"date_advance\": 0.0,\n \"currency\": \"USD\",\n \"payment\": {\n \"type\": \"SENDER\"\n }\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_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 \"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_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\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 \"object\": \"Address\"\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 \"object\": \"Address\"\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2816" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "vary": [ + "Origin" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43d66bf76b3e786b80000358520" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.498125" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/beta/rates" + }, + "duration": 704 + } +] \ 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..6a9b6d131 100644 --- a/src/test/cassettes/carrier_account/all.json +++ b/src/test/cassettes/carrier_account/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456575, + "recordedAt": 1723823786, "request": { "body": "", "method": "GET", @@ -22,62 +22,56 @@ "HTTP/1.1 200 OK" ], "content-length": [ - "5511" + "7287" ], "expires": [ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d0bff7ef285400089e45" + "8a4bf43f66bf76a9e786b49e00357a3f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.200455" - ], - "etag": [ - "W/\"9a7664ede6fee21d32d9a27cfd30144a\"" + "0.165513" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +81,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/carrier_accounts" }, - "duration": 327 + "duration": 387 } ] \ 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..3ea4b902c 100644 --- a/src/test/cassettes/carrier_account/create.json +++ b/src/test/cassettes/carrier_account/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456577, + "recordedAt": 1723823791, "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\": \"2024-08-16T15:56:31Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2024-08-16T15:56:31Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_fa4318d6a2744659b1e0e5be7ecd5f3a\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,53 +31,53 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d0c1f7cd291400089f4e" + "8a4bf43b66bf76afe786b7d800358043" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.112914" - ], - "etag": [ - "W/\"05176cd79e94f82b4125ab31f4d513b3\"" + "0.065530" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/carrier_accounts" }, - "duration": 248 + "duration": 276 }, { - "recordedAt": 1661456577, + "recordedAt": 1723823791, "request": { "body": "", "method": "GET", @@ -105,10 +104,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_56bedf5c7c554ebea53d9684ffc83ddc" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_fa4318d6a2744659b1e0e5be7ecd5f3a" }, "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\": \"2024-08-16T15:56:31Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2024-08-16T15:56:31Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_fa4318d6a2744659b1e0e5be7ecd5f3a\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ @@ -121,53 +120,53 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d0c1f7bba0f500089f6e" + "8a4bf44066bf76afe786b7d900358095" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.027070" - ], - "etag": [ - "W/\"05176cd79e94f82b4125ab31f4d513b3\"" + "0.034806" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +176,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_fa4318d6a2744659b1e0e5be7ecd5f3a" }, - "duration": 140 + "duration": 243 }, { - "recordedAt": 1661456577, + "recordedAt": 1723823791, "request": { "body": "", "method": "DELETE", @@ -195,7 +193,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_56bedf5c7c554ebea53d9684ffc83ddc" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_fa4318d6a2744659b1e0e5be7ecd5f3a" }, "response": { "body": "{}", @@ -211,53 +209,50 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d0c1f7ca5e3000089f81" + "8a4bf44166bf76afe786b7da003580df" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.121117" - ], - "etag": [ - "W/\"44136fa355b3678a1146ad16f7e8649e\"" + "0.055079" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -267,9 +262,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_fa4318d6a2744659b1e0e5be7ecd5f3a" }, - "duration": 248 + "duration": 251 } ] \ No newline at end of file diff --git a/src/test/cassettes/carrier_account/create_with_amazon.json b/src/test/cassettes/carrier_account/create_with_amazon.json new file mode 100644 index 000000000..070044b8d --- /dev/null +++ b/src/test/cassettes/carrier_account/create_with_amazon.json @@ -0,0 +1,263 @@ +[ + { + "recordedAt": 1744665939, + "request": { + "body": "{\n \"carrier_account_oauth_registrations\": {\n \"type\": \"AmazonShippingAccount\"\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_oauth" + }, + "response": { + "body": "{\n \"readable\": \"Amazon Shipping\",\n \"credentials\": {},\n \"created_at\": \"2025-04-14T21:25:39Z\",\n \"description\": null,\n \"type\": \"AmazonShippingAccount\",\n \"reference\": null,\n \"updated_at\": \"2025-04-14T21:25:39Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_490363c69ed34e26a8b8e74a5238170a\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "1432" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb54nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "1a43adb967fd7d53e2bc3d1c003c98d6" + ], + "x-proxied": [ + "intlb4nuq 284c5d344a", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.074536" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202504111751-33c61fb414-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/register_oauth" + }, + "duration": 185 + }, + { + "recordedAt": 1744665939, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_490363c69ed34e26a8b8e74a5238170a" + }, + "response": { + "body": "{\n \"readable\": \"Amazon Shipping\",\n \"credentials\": {},\n \"created_at\": \"2025-04-14T21:25:39Z\",\n \"description\": null,\n \"type\": \"AmazonShippingAccount\",\n \"reference\": null,\n \"updated_at\": \"2025-04-14T21:25:39Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_490363c69ed34e26a8b8e74a5238170a\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1432" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "1a43adb967fd7d53e2bc3d1d003c991e" + ], + "x-proxied": [ + "intlb4nuq 284c5d344a", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.032996" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202504111751-33c61fb414-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_490363c69ed34e26a8b8e74a5238170a" + }, + "duration": 140 + }, + { + "recordedAt": 1744665939, + "request": { + "body": "", + "method": "DELETE", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_490363c69ed34e26a8b8e74a5238170a" + }, + "response": { + "body": "{}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "1a43adb967fd7d53e2bc3d35003c994c" + ], + "x-proxied": [ + "intlb4nuq 284c5d344a", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.052300" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202504111751-33c61fb414-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_490363c69ed34e26a8b8e74a5238170a" + }, + "duration": 164 + } +] \ No newline at end of file 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..aa82d0448 --- /dev/null +++ b/src/test/cassettes/carrier_account/create_with_custom_workflow.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1723823789, + "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": [ + "bigweb42nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf76ade786b4c400357e8f" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.025001" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 422, + "message": "Unprocessable Entity" + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/register" + }, + "duration": 229 + } +] \ No newline at end of file diff --git a/src/test/cassettes/carrier_account/create_with_ups.json b/src/test/cassettes/carrier_account/create_with_ups.json new file mode 100644 index 000000000..84c28fdf4 --- /dev/null +++ b/src/test/cassettes/carrier_account/create_with_ups.json @@ -0,0 +1,263 @@ +[ + { + "recordedAt": 1748029863, + "request": { + "body": "{\n \"carrier_account_oauth_registrations\": {\n \"account_number\": \"123456789\",\n \"type\": \"UpsAccount\"\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_oauth" + }, + "response": { + "body": "{\n \"readable\": \"UPS\",\n \"credentials\": {},\n \"created_at\": \"2025-05-23T19:51:03Z\",\n \"description\": null,\n \"type\": \"UpsAccount\",\n \"reference\": null,\n \"updated_at\": \"2025-05-23T19:51:03Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_4e02b530040d413399f4c5d4216632ea\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "1404" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb55nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "6be4a8f76830d1a7e787bc810049d1d5" + ], + "x-proxied": [ + "intlb4nuq 668d3fc830", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.093783" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202505231841-d89645a184-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/register_oauth" + }, + "duration": 301 + }, + { + "recordedAt": 1748029863, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_4e02b530040d413399f4c5d4216632ea" + }, + "response": { + "body": "{\n \"readable\": \"UPS\",\n \"credentials\": {},\n \"created_at\": \"2025-05-23T19:51:03Z\",\n \"description\": null,\n \"type\": \"UpsAccount\",\n \"reference\": null,\n \"updated_at\": \"2025-05-23T19:51:03Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_4e02b530040d413399f4c5d4216632ea\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1404" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb41nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "6be4a8f36830d1a7e787bc820049d225" + ], + "x-proxied": [ + "intlb3nuq 668d3fc830", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.030623" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202505231841-d89645a184-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_4e02b530040d413399f4c5d4216632ea" + }, + "duration": 255 + }, + { + "recordedAt": 1748029864, + "request": { + "body": "", + "method": "DELETE", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_4e02b530040d413399f4c5d4216632ea" + }, + "response": { + "body": "{}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb41nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "6be4a8f66830d1a7e787bc830049d25e" + ], + "x-proxied": [ + "intlb3nuq 668d3fc830", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.074559" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202505231841-d89645a184-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_4e02b530040d413399f4c5d4216632ea" + }, + "duration": 282 + } +] \ 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..c09cc3811 100644 --- a/src/test/cassettes/carrier_account/delete.json +++ b/src/test/cassettes/carrier_account/delete.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456578, + "recordedAt": 1723823792, "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\": \"2024-08-16T15:56:32Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2024-08-16T15:56:32Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_720352f88fce4ebbb7e8fb4306826bbf\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,53 +31,53 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d0c1f7ef3a0100089fc0" + "8a4bf44066bf76b0e786b7dc00358160" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.113760" - ], - "etag": [ - "W/\"90f4bf267bd3ae52f1142790e4da781a\"" + "0.066992" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/carrier_accounts" }, - "duration": 252 + "duration": 284 }, { - "recordedAt": 1661456578, + "recordedAt": 1723823792, "request": { "body": "", "method": "DELETE", @@ -105,7 +104,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_16de04b2f3cf483186a4a6f0c768001f" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_720352f88fce4ebbb7e8fb4306826bbf" }, "response": { "body": "{}", @@ -121,53 +120,50 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb36nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c396307d0c2f80134fb00089ff8" + "8a4bf43e66bf76b0e786b7dd003581b4" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.113977" - ], - "etag": [ - "W/\"44136fa355b3678a1146ad16f7e8649e\"" + "0.088331" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +173,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_720352f88fce4ebbb7e8fb4306826bbf" }, - "duration": 245 + "duration": 298 }, { - "recordedAt": 1661456578, + "recordedAt": 1723823792, "request": { "body": "", "method": "GET", @@ -195,10 +190,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_16de04b2f3cf483186a4a6f0c768001f" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_720352f88fce4ebbb7e8fb4306826bbf" }, "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,50 +206,50 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb39nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d0c2f7a636100008a011" + "8a4bf43c66bf76b0e786b7de003581fb" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.040628" + "0.040782" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -264,9 +259,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_720352f88fce4ebbb7e8fb4306826bbf" }, - "duration": 173 + "duration": 247 } ] \ 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..043a21bb8 100644 --- a/src/test/cassettes/carrier_account/retrieve.json +++ b/src/test/cassettes/carrier_account/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456576, + "recordedAt": 1723823788, "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\": \"2024-08-16T15:56:28Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2024-08-16T15:56:28Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_c1e538cb1abd4566923eec60ff6e62d7\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,53 +31,50 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb38nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d0bff7dcfaae00089eaa" + "8a4bf43a66bf76ace786b4bf00357d09" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.112260" - ], - "etag": [ - "W/\"2c01b8d5c38fd5b1cadcfcc9bbc00ba8\"" + "0.086179" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +84,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/carrier_accounts" }, - "duration": 243 + "duration": 294 }, { - "recordedAt": 1661456576, + "recordedAt": 1723823789, "request": { "body": "", "method": "GET", @@ -105,10 +101,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_459e8455379b4677b4555d9b20d50311" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_c1e538cb1abd4566923eec60ff6e62d7" }, "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\": \"2024-08-16T15:56:28Z\",\n \"description\": \"DHL eCommerce Solutions Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2024-08-16T15:56:28Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_c1e538cb1abd4566923eec60ff6e62d7\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ @@ -121,53 +117,50 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d0c0f7ff215d00089ee2" + "8a4bf43b66bf76ade786b4c100357db6" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.028098" - ], - "etag": [ - "W/\"2c01b8d5c38fd5b1cadcfcc9bbc00ba8\"" + "0.040342" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +170,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_c1e538cb1abd4566923eec60ff6e62d7" }, - "duration": 148 + "duration": 247 }, { - "recordedAt": 1661456576, + "recordedAt": 1723823789, "request": { "body": "", "method": "DELETE", @@ -195,7 +187,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_459e8455379b4677b4555d9b20d50311" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_c1e538cb1abd4566923eec60ff6e62d7" }, "response": { "body": "{}", @@ -211,53 +203,50 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb36nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d0c0f7cdac9000089f0e" + "8a4bf43e66bf76ade786b4c200357e11" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.114576" - ], - "etag": [ - "W/\"44136fa355b3678a1146ad16f7e8649e\"" + "0.059900" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -267,9 +256,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_c1e538cb1abd4566923eec60ff6e62d7" }, - "duration": 250 + "duration": 265 } ] \ 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..216f68d39 100644 --- a/src/test/cassettes/carrier_account/types.json +++ b/src/test/cassettes/carrier_account/types.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456575, + "recordedAt": 1723823786, "request": { "body": "", "method": "GET", @@ -15,66 +15,63 @@ "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\": \"Accurate\",\n \"logo\": null,\n \"type\": \"AccurateAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\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\",\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 \"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\": \"Bluestreak\",\n \"logo\": null,\n \"type\": \"BluestreakAccount\",\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\": \"CSLogistics\",\n \"logo\": null,\n \"type\": \"CSLogisticsAccount\",\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 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 Paket\",\n \"logo\": null,\n \"type\": \"DhlPaketAccount\",\n \"fields\": {\n \"test_credentials\": {},\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\": \"DoorDash\",\n \"logo\": null,\n \"type\": \"DoorDashAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Douglas\",\n \"logo\": null,\n \"type\": \"DouglasAccount\",\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\": \"DPD NL\",\n \"logo\": null,\n \"type\": \"DpdNlAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"EPost Global V2\",\n \"logo\": null,\n \"type\": \"EPostGlobalV2Account\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Estafeta\",\n \"logo\": null,\n \"type\": \"EstafetaAccount\",\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 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 Choice\",\n \"logo\": null,\n \"type\": \"FirstChoiceAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\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\": \"Flexport\",\n \"logo\": null,\n \"type\": \"FlexportAccount\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Gio\",\n \"logo\": null,\n \"type\": \"GioAccount\",\n \"fields\": {\n \"test_credentials\": {},\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\": \"Hailify\",\n \"logo\": null,\n \"type\": \"HailifyAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Henry\",\n \"logo\": null,\n \"type\": \"HenryAccount\",\n \"fields\": {\n \"test_credentials\": {},\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\": \"Jet\",\n \"logo\": null,\n \"type\": \"JetAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Jitsu\",\n \"logo\": null,\n \"type\": \"JitsuAccount\",\n \"fields\": {\n \"test_credentials\": {},\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\": \"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\": \"OnTrac V3\",\n \"logo\": null,\n \"type\": \"OntracV3Account\",\n \"fields\": {\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\": \"Pandion\",\n \"logo\": null,\n \"type\": \"PandionAccount\",\n \"fields\": {\n \"test_credentials\": {},\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\": \"Cirro E-Commerce\",\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\": \"Quick\",\n \"logo\": null,\n \"type\": \"QuickAccount\",\n \"fields\": {\n \"test_credentials\": {},\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\": \"SmartKargo\",\n \"logo\": null,\n \"type\": \"SmartKargoAccount\",\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\": \"Swyft\",\n \"logo\": null,\n \"type\": \"SwyftAccount\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierType\"\n },\n {\n \"readable\": \"Tcc\",\n \"logo\": null,\n \"type\": \"TccAccount\",\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\": \"Toll\",\n \"logo\": null,\n \"type\": \"TollAccount\",\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]", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "32708" + "41628" ], "expires": [ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb35nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d0bff7b7b1b100089e7c" + "8a4bf43e66bf76aae786b49f00357aa1" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.034258" - ], - "etag": [ - "W/\"520345ce7fba75ebc602d7f8070d61c7\"" + "0.067673" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +81,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/carrier_types" }, - "duration": 164 + "duration": 268 } ] \ 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..237bdeb4e 100644 --- a/src/test/cassettes/carrier_account/update.json +++ b/src/test/cassettes/carrier_account/update.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456579, + "recordedAt": 1748029864, "request": { "body": "{\n \"carrier_account\": {\n \"test_credentials\": {},\n \"credentials\": {},\n \"type\": \"DhlEcsAccount\"\n }\n}", "method": "POST", @@ -18,66 +18,66 @@ "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\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2025-05-23T19:51:04Z\",\n \"description\": \"DHL eCommerce Account\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2025-05-23T19:51:04Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_4aee2085dbb2411e9c77740c63ea548d\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "1469" + "1369" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d0c3f7ff07300008a06f" + "6be4a8f16830d1a8e787bf960049d31a" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq 668d3fc830", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.175086" - ], - "etag": [ - "W/\"eacbd52093063d79d1cd7af0d72246aa\"" + "0.062564" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202505231841-d89645a184-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/carrier_accounts" }, - "duration": 403 + "duration": 269 }, { - "recordedAt": 1661456579, + "recordedAt": 1748029865, "request": { "body": "{\n \"carrier_account\": {\n \"description\": \"My custom description\"\n }\n}", "method": "PUT", @@ -108,69 +107,66 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_98cc747e399a41ab92abbf54f49711a7" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_4aee2085dbb2411e9c77740c63ea548d" }, "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\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2025-05-23T19:51:04Z\",\n \"description\": \"My custom description\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2025-05-23T19:51:05Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_4aee2085dbb2411e9c77740c63ea548d\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "1459" + "1369" ], "expires": [ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb41nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d0c3f7dbe62e0008a097" + "6be4a8f16830d1a9e787bf980049d393" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq 668d3fc830", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.122649" - ], - "etag": [ - "W/\"8fa2158af6f19c4f54aa9dc0a658628d\"" + "0.090270" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202505231841-d89645a184-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,13 +176,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_4aee2085dbb2411e9c77740c63ea548d" }, - "duration": 256 + "duration": 316 }, { - "recordedAt": 1661456579, + "recordedAt": 1748029865, "request": { "body": "", "method": "GET", @@ -198,69 +193,69 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_98cc747e399a41ab92abbf54f49711a7" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_4aee2085dbb2411e9c77740c63ea548d" }, "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\",\n \"test_credentials\": {},\n \"credentials\": {},\n \"created_at\": \"2025-05-23T19:51:04Z\",\n \"description\": \"My custom description\",\n \"type\": \"DhlEcsAccount\",\n \"reference\": null,\n \"updated_at\": \"2025-05-23T19:51:05Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_4aee2085dbb2411e9c77740c63ea548d\",\n \"fields\": {\n \"test_credentials\": {},\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "1459" + "1369" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d0c3f7ca66f50008a0c7" + "6be4a8f26830d1a9e787bf9a0049d410" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq 668d3fc830", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.029444" - ], - "etag": [ - "W/\"8fa2158af6f19c4f54aa9dc0a658628d\"" + "0.033165" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202505231841-d89645a184-master" ], "cache-control": [ "private, no-cache, no-store" @@ -270,13 +265,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_4aee2085dbb2411e9c77740c63ea548d" }, - "duration": 153 + "duration": 242 }, { - "recordedAt": 1661456580, + "recordedAt": 1748029865, "request": { "body": "", "method": "DELETE", @@ -288,7 +282,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/carrier_accounts/ca_98cc747e399a41ab92abbf54f49711a7" + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_4aee2085dbb2411e9c77740c63ea548d" }, "response": { "body": "{}", @@ -304,53 +298,50 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb55nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d0c4f7a499950008a0db" + "6be4a8f46830d1a9e787bf9b0049d449" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq 668d3fc830", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.107952" - ], - "etag": [ - "W/\"44136fa355b3678a1146ad16f7e8649e\"" + "0.054416" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202505231841-d89645a184-master" ], "cache-control": [ "private, no-cache, no-store" @@ -360,9 +351,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_4aee2085dbb2411e9c77740c63ea548d" }, - "duration": 236 + "duration": 258 } ] \ No newline at end of file diff --git a/src/test/cassettes/carrier_account/update_ups.json b/src/test/cassettes/carrier_account/update_ups.json new file mode 100644 index 000000000..52977e65b --- /dev/null +++ b/src/test/cassettes/carrier_account/update_ups.json @@ -0,0 +1,352 @@ +[ + { + "recordedAt": 1748029861, + "request": { + "body": "{\n \"carrier_account_oauth_registrations\": {\n \"account_number\": \"123456789\",\n \"type\": \"UpsAccount\"\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_oauth" + }, + "response": { + "body": "{\n \"readable\": \"UPS\",\n \"credentials\": {},\n \"created_at\": \"2025-05-23T19:51:01Z\",\n \"description\": null,\n \"type\": \"UpsAccount\",\n \"reference\": null,\n \"updated_at\": \"2025-05-23T19:51:01Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_ee686a5ce36748d7b8af5f15097d13d4\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "1404" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb54nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "6be4a8f36830d1a5e787bc610049cfde" + ], + "x-proxied": [ + "intlb3nuq 668d3fc830", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.083741" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202505231841-d89645a184-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/register_oauth" + }, + "duration": 297 + }, + { + "recordedAt": 1748029862, + "request": { + "body": "{\n \"carrier_account\": {\n \"account_number\": \"987654321\"\n }\n}", + "method": "PUT", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_ee686a5ce36748d7b8af5f15097d13d4" + }, + "response": { + "body": "{\n \"readable\": \"UPS\",\n \"credentials\": {},\n \"created_at\": \"2025-05-23T19:51:01Z\",\n \"description\": null,\n \"type\": \"UpsAccount\",\n \"reference\": null,\n \"updated_at\": \"2025-05-23T19:51:02Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_ee686a5ce36748d7b8af5f15097d13d4\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1404" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb42nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "6be4a8f16830d1a5e787bc630049d05b" + ], + "x-proxied": [ + "intlb4nuq 668d3fc830", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.076048" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202505231841-d89645a184-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_ee686a5ce36748d7b8af5f15097d13d4" + }, + "duration": 292 + }, + { + "recordedAt": 1748029862, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_ee686a5ce36748d7b8af5f15097d13d4" + }, + "response": { + "body": "{\n \"readable\": \"UPS\",\n \"credentials\": {},\n \"created_at\": \"2025-05-23T19:51:01Z\",\n \"description\": null,\n \"type\": \"UpsAccount\",\n \"reference\": null,\n \"updated_at\": \"2025-05-23T19:51:02Z\",\n \"clone\": false,\n \"billing_type\": \"carrier\",\n \"logo\": null,\n \"id\": \"ca_ee686a5ce36748d7b8af5f15097d13d4\",\n \"fields\": {\n \"credentials\": {}\n },\n \"object\": \"CarrierAccount\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1404" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "6be4a8f26830d1a6e787bc640049d0af" + ], + "x-proxied": [ + "intlb4nuq 668d3fc830", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.029771" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202505231841-d89645a184-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_ee686a5ce36748d7b8af5f15097d13d4" + }, + "duration": 245 + }, + { + "recordedAt": 1748029862, + "request": { + "body": "", + "method": "DELETE", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_ee686a5ce36748d7b8af5f15097d13d4" + }, + "response": { + "body": "{}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "6be4a8f46830d1a6e787bc650049d0eb" + ], + "x-proxied": [ + "intlb4nuq 668d3fc830", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.193067" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202505231841-d89645a184-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/carrier_accounts/ca_ee686a5ce36748d7b8af5f15097d13d4" + }, + "duration": 408 + } +] \ No newline at end of file diff --git a/src/test/cassettes/carrier_metadata/retrieve_carrier_metadata.json b/src/test/cassettes/carrier_metadata/retrieve_carrier_metadata.json new file mode 100644 index 000000000..b92a4a0d0 --- /dev/null +++ b/src/test/cassettes/carrier_metadata/retrieve_carrier_metadata.json @@ -0,0 +1,88 @@ +[ + { + "recordedAt": 1723823830, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/metadata/carriers" + }, + "response": { + "body": "{\n \"carriers\": [\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"accurate\",\n \"max_weight\": null,\n \"name\": \"Route\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"accurate\",\n \"human_readable\": \"Accurate\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"amazonmws\",\n \"max_weight\": null,\n \"name\": \"UPS Rates\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"amazonmws\",\n \"max_weight\": null,\n \"name\": \"USPS Rates\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"amazonmws\",\n \"max_weight\": null,\n \"name\": \"FedEx Rates\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"amazonmws\",\n \"max_weight\": null,\n \"name\": \"UPS Labels\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"amazonmws\",\n \"max_weight\": null,\n \"name\": \"USPS Labels\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"amazonmws\",\n \"max_weight\": null,\n \"name\": \"FedEx Labels\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"amazonmws\",\n \"max_weight\": null,\n \"name\": \"UPS Tracking\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"amazonmws\",\n \"max_weight\": null,\n \"name\": \"USPS Tracking\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"amazonmws\",\n \"max_weight\": null,\n \"name\": \"FedEx Tracking\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"amazonmws\",\n \"human_readable\": \"Amazon MWS\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"apc\",\n \"max_weight\": null,\n \"name\": \"parcelConnectBookService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"apc\",\n \"max_weight\": null,\n \"name\": \"parcelConnectExpeditedDDP\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"apc\",\n \"max_weight\": null,\n \"name\": \"parcelConnectExpeditedDDU\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"apc\",\n \"max_weight\": null,\n \"name\": \"parcelConnectPriorityDDP\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"apc\",\n \"max_weight\": null,\n \"name\": \"parcelConnectPriorityDDPDelcon\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"apc\",\n \"max_weight\": null,\n \"name\": \"parcelConnectPriorityDDU\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"apc\",\n \"max_weight\": null,\n \"name\": \"parcelConnectPriorityDDUDelcon\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"apc\",\n \"max_weight\": null,\n \"name\": \"parcelConnectPriorityDDUPQW\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"apc\",\n \"max_weight\": null,\n \"name\": \"parcelConnectStandardDDU\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"apc\",\n \"max_weight\": null,\n \"name\": \"parcelConnectStandardDDUPQW\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"apc\",\n \"max_weight\": null,\n \"name\": \"parcelConnectPacketDDU\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"apc\",\n \"human_readable\": \"APC\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ADS\",\n \"description\": null,\n \"human_readable\": \"ADS\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AirFreightInbound\",\n \"description\": null,\n \"human_readable\": \"Air Freight Inbound\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AirFreightOutbound\",\n \"description\": null,\n \"human_readable\": \"Air Freight Outbound\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AsendiaDomesticBoundPrinterMatterExpedited\",\n \"description\": null,\n \"human_readable\": \"Asendia Domestic Bound Printed Matter Expedited\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AsendiaDomesticBoundPrinterMatterGround\",\n \"description\": null,\n \"human_readable\": \"Asendia Domestic Bound Printed Matter Ground\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AsendiaDomesticFlatsExpedited\",\n \"description\": null,\n \"human_readable\": \"Asendia Domestic Flats Expedited\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AsendiaDomesticFlatsGround\",\n \"description\": null,\n \"human_readable\": \"Asendia Domestic Flats Ground\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AsendiaDomesticParcelGroundOver1lb\",\n \"description\": null,\n \"human_readable\": \"Asendia Domestic Parcel Ground Over 1 Lb\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AsendiaDomesticParcelGroundUnder1lb\",\n \"description\": null,\n \"human_readable\": \"Asendia Domestic Parcel Ground Under 1 Lb\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AsendiaDomesticParcelMAXOver1lb\",\n \"description\": null,\n \"human_readable\": \"Asendia Domestic Parcel MAX Over 1 Lb\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AsendiaDomesticParcelMAXUnder1lb\",\n \"description\": null,\n \"human_readable\": \"Asendia Domestic Parcel MAX Under 1 Lb\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AsendiaDomesticParcelOver1lbExpedited\",\n \"description\": null,\n \"human_readable\": \"Asendia Domestic Parcel Over 1 Lb Expedited\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AsendiaDomesticParcelUnder1lbExpedited\",\n \"description\": null,\n \"human_readable\": \"Asendia Domestic Parcel Under 1 Lb Expedited\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AsendiaDomesticPromoParcelExpedited\",\n \"description\": null,\n \"human_readable\": \"Asendia Domestic Promo Parcel Expedited\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"AsendiaDomesticPromoParcelGround\",\n \"description\": null,\n \"human_readable\": \"Asendia Domestic Promo Parcel Ground\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"BulkFreight\",\n \"description\": null,\n \"human_readable\": \"Bulk Freight\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"BusinessMailCanadaLettermail\",\n \"description\": null,\n \"human_readable\": \"Business Mail Canada Lettermail\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"BusinessMailCanadaLettermailMachineable\",\n \"description\": null,\n \"human_readable\": \"Business Mail Canada Lettermail Machineable\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"BusinessMailEconomy\",\n \"description\": null,\n \"human_readable\": \"Business Mail Economy\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"BusinessMailEconomyLPWholesale\",\n \"description\": null,\n \"human_readable\": \"Business Mail Economy LP Wholesale\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"BusinessMailEconomySPWholesale\",\n \"description\": null,\n \"human_readable\": \"Business Mail Economy SP Wholesale\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"BusinessMailIPA\",\n \"description\": null,\n \"human_readable\": \"Business Mail International Priority Airmail\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"BusinessMailISAL\",\n \"description\": null,\n \"human_readable\": \"Business Mail International Surface Air Lift\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"BusinessMailPriority\",\n \"description\": null,\n \"human_readable\": \"Business Mail Priority\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"BusinessMailPriorityLPWholesale\",\n \"description\": null,\n \"human_readable\": \"Business Mail Priority LP Wholesale\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"BusinessMailPrioritySPWholesale\",\n \"description\": null,\n \"human_readable\": \"Business Mail Priority SP Wholesale\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"MarketingMailCanadaPersonalizedLCP\",\n \"description\": null,\n \"human_readable\": \"Marketing Mail Canada Personalized Letter Carrier Presort\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"MarketingMailCanadaPersonalizedMachineable\",\n \"description\": null,\n \"human_readable\": \"Marketing Mail Canada Personalized Machineable\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"MarketingMailCanadaPersonalizedNDG\",\n \"description\": null,\n \"human_readable\": \"Marketing Mail Canada Personalized Non-Dangerous Goods\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"MarketingMailEconomy\",\n \"description\": null,\n \"human_readable\": \"Marketing Mail Economy\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"MarketingMailIPA\",\n \"description\": null,\n \"human_readable\": \"Marketing Mail International Priority Airmail\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"MarketingMailISAL\",\n \"description\": null,\n \"human_readable\": \"MarketingMail International Surface Air Lift\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"MarketingMailPriority\",\n \"description\": null,\n \"human_readable\": \"Marketing Mail Priority\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"PublicationsCanadaLCP\",\n \"description\": null,\n \"human_readable\": \"Publications Canada Letter Carrier Presort\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"PublicationsCanadaNDG\",\n \"description\": null,\n \"human_readable\": \"Publications Canada Non-Dangerous Goods\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"PublicationsEconomy\",\n \"description\": null,\n \"human_readable\": \"Publications Economy\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"PublicationsIPA\",\n \"description\": null,\n \"human_readable\": \"Publications International Priority Airmail\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"PublicationsISAL\",\n \"description\": null,\n \"human_readable\": \"Publications International Surface Air Lift\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"PublicationsPriority\",\n \"description\": null,\n \"human_readable\": \"Publications Priority\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQElite\",\n \"description\": null,\n \"human_readable\": \"ePAQ Elite\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQEliteCustom\",\n \"description\": null,\n \"human_readable\": \"ePAQ Elite Custom\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQEliteDAP\",\n \"description\": null,\n \"human_readable\": \"ePAQElite Delivered At Place\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQEliteDDP\",\n \"description\": null,\n \"human_readable\": \"ePAQ Elite Delivered Duty Paid\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQEliteDDPOversized\",\n \"description\": null,\n \"human_readable\": \"ePAQ Elite Delivered Duty Paid Oversized\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQEliteDPD\",\n \"description\": null,\n \"human_readable\": \"ePAQ Elite DPD\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQEliteDirectAccessCanadaDDP\",\n \"description\": null,\n \"human_readable\": \"ePAQ Elite Direct Access Canada Delivered Duty Paid\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQEliteOversized\",\n \"description\": null,\n \"human_readable\": \"ePAQ Elite Oversized\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQPlus\",\n \"description\": null,\n \"human_readable\": \"ePAQ Plus\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQPlusCustom\",\n \"description\": null,\n \"human_readable\": \"ePAQ Plus Custom\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQPlusCustomsPrepaid\",\n \"description\": null,\n \"human_readable\": \"ePAQ Plus Customs Pre-Paid\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQPlusDAP\",\n \"description\": null,\n \"human_readable\": \"ePAQ Plus Delivered At Place\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQPlusDDP\",\n \"description\": null,\n \"human_readable\": \"ePAQ Plus Delivered Duty Paid\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQPlusEconomy\",\n \"description\": null,\n \"human_readable\": \"ePAQ Plus Economy\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQPlusWholesale\",\n \"description\": null,\n \"human_readable\": \"ePAQ Plus Wholesale\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQPlusePacket\",\n \"description\": null,\n \"human_readable\": \"ePAQ Plus ePacket\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQPlusePacketCanadaCustomsPrePaid\",\n \"description\": null,\n \"human_readable\": \"ePAQ Plus ePacket Canada Customs Pre-Paid\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQPlusePacketCanadaDDP\",\n \"description\": null,\n \"human_readable\": \"ePAQ Plus ePacket Canada Delivered Duty Paid\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQReturnsDomestic\",\n \"description\": null,\n \"human_readable\": \"ePAQ Returns Domestic\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQReturnsInternational\",\n \"description\": null,\n \"human_readable\": \"ePAQ Returns International\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelect\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectCustom\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Custom\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectCustomsPrepaidByShopper\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Customs Pre-Paid By Shopper\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectDAP\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Delivered At Place\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectDDP\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Delivered Duty Paid\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectDDPDirectAccess\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Delivered Duty Paid Direct Access\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectDirectAccess\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Direct Access\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectDirectAccessCanadaDDP\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Direct Access Canada Delivered Duty Paid\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectEconomy\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Economy\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectOversized\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Oversized\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectOversizedDDP\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Oversized Delivered Duty Paid\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectPMEI\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select PMEI\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectPMEICanadaCustomsPrePaid\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select PMEI Canada Customs Pre-Paid\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectPMEIPCPostage\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select PMEIPC Postage\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectPMI\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Priority Mail International\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectPMICanadaCustomsPrepaid\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Priority Mail International Canada Customs Pre-Paid\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectPMICanadaDDP\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Priority Mail International Canada Delivered Duty Paid\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectPMINonPresort\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select Priority Mail International Non-Presort\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectPMIPCPostage\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select PMIPC Postage\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQStandard\",\n \"description\": null,\n \"human_readable\": \"ePAQ Standard\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQStandardCustom\",\n \"description\": null,\n \"human_readable\": \"ePAQ Standard Custom\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQStandardEconomy\",\n \"description\": null,\n \"human_readable\": \"ePAQ Standard Economy\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQStandardIPA\",\n \"description\": null,\n \"human_readable\": \"ePAQ Standard International Priority Airmail\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQStandardISAL\",\n \"description\": null,\n \"human_readable\": \"ePAQ Standard International Surface Air Lift\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePaqSelectPMEINonPresort\",\n \"description\": null,\n \"human_readable\": \"ePaq Select PMEI Non-Presort\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"asendiausa\",\n \"max_weight\": null,\n \"name\": \"ePAQSelectDDPDG\",\n \"description\": null,\n \"human_readable\": \"ePAQ Select DDP DG\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"asendiausa\",\n \"human_readable\": \"Asendia USA\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"australiapost\",\n \"max_weight\": null,\n \"name\": \"ParcelPost\",\n \"description\": \"Specific service availability is determined by your AustraliaPost account.\",\n \"human_readable\": \"Parcel Post\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"australiapost\",\n \"max_weight\": null,\n \"name\": \"ExpressPost\",\n \"description\": \"Specific service availability is determined by your AustraliaPost account.\",\n \"human_readable\": \"Express Post\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"australiapost\",\n \"max_weight\": null,\n \"name\": \"International\",\n \"description\": \"Specific service availability is determined by your AustraliaPost account.International returns not supported.\",\n \"human_readable\": \"International\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"australiapost\",\n \"max_weight\": null,\n \"name\": \"Commercial\",\n \"description\": \"Specific service availability is determined by your AustraliaPost account.\",\n \"human_readable\": \"Commercial\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"australiapost\",\n \"max_weight\": null,\n \"name\": \"CARTON\",\n \"description\": null,\n \"human_readable\": \"Carton\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"australiapost\",\n \"max_weight\": null,\n \"name\": \"PALLET\",\n \"description\": null,\n \"human_readable\": \"Pallet\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"australiapost\",\n \"max_weight\": null,\n \"name\": \"SATCHEL\",\n \"description\": null,\n \"human_readable\": \"Satchel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"australiapost\",\n \"max_weight\": null,\n \"name\": \"BAG\",\n \"description\": null,\n \"human_readable\": \"Bag\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"australiapost\",\n \"max_weight\": null,\n \"name\": \"ENVELOPE\",\n \"description\": null,\n \"human_readable\": \"Envelope\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"australiapost\",\n \"max_weight\": null,\n \"name\": \"ITEM\",\n \"description\": null,\n \"human_readable\": \"Item\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"australiapost\",\n \"max_weight\": null,\n \"name\": \"JIFFYBAG\",\n \"description\": null,\n \"human_readable\": \"Jiffy Bag\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"australiapost\",\n \"max_weight\": null,\n \"name\": \"SKID\",\n \"description\": \"Up to 500kg\",\n \"human_readable\": \"Skid\",\n \"dimensions\": []\n }\n ],\n \"supported_features\": [\n {\n \"carrier\": \"australiapost\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"bill_on_label_purchase\",\n \"description\": \"Not available with Print as You Go.\",\n \"supported\": true\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"bill_on_manifest\",\n \"description\": \"Daily manifesting when using Print as You Go.\",\n \"supported\": true\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"bill_on_scan\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"delivers_to_po_box\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"returns\",\n \"description\": \"Domestic only.\",\n \"supported\": true\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"australiapost\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": true\n }\n ],\n \"name\": \"australiapost\",\n \"human_readable\": \"Australia Post\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"bettertrucks\",\n \"max_weight\": null,\n \"name\": \"NEXT_DAY\",\n \"description\": null,\n \"human_readable\": \"Next Day\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"bettertrucks\",\n \"max_weight\": null,\n \"name\": \"EXPRESS\",\n \"description\": null,\n \"human_readable\": \"Express\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"bettertrucks\",\n \"human_readable\": \"Better Trucks\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"bluestreak\",\n \"max_weight\": null,\n \"name\": \"N5\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"bluestreak\",\n \"human_readable\": \"Bluestreak\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"RegularParcel\",\n \"description\": \"Up to 3 days for local delivery, up to 6 days for regional delivery and up to 10 days for national delivery\",\n \"human_readable\": \"Regular Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"ExpeditedParcel\",\n \"description\": \"Up to 2 days for local delivery, up to 4 days for regional delivery and up to 8 days for national delivery\",\n \"human_readable\": \"Expedited Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"Xpresspost\",\n \"description\": \"Next-day and 2-day delivery\",\n \"human_readable\": \"Xpresspost\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"Priority\",\n \"description\": \"Next-day delivery with signature\",\n \"human_readable\": \"Priority\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"ExpeditedParcelUSA\",\n \"description\": \"Delivery in as little as 4 business days for larger parcels\",\n \"human_readable\": \"Expedited Parcel USA\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"SmallPacketUSAAir\",\n \"description\": \"Delivery in as little as 5 business days for small and lightweight items\",\n \"human_readable\": \"Small Packet USA Air\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"TrackedPacketUSA\",\n \"description\": \"Delivery in as little as 4 business days for small and lightweight items\",\n \"human_readable\": \"Tracked Packet USA\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"TrackedPacketUSALVM\",\n \"description\": null,\n \"human_readable\": \"Tracked Packet USA LVM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"XpresspostUSA\",\n \"description\": \"Delivery in 2 and 3 business days\",\n \"human_readable\": \"Xpresspost USA\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"XpresspostInternational\",\n \"description\": \"Delivery in as little as 4 business days\",\n \"human_readable\": \"Xpresspost International\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"InternationalParcelAir\",\n \"description\": \"Delivery in as little as 6 business days for larger parcels\",\n \"human_readable\": \"International Parcel Air\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"InternationalParcelSurface\",\n \"description\": \"Delivery in 1 month and up to 3 months\",\n \"human_readable\": \"International Parcel Surface\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"SmallPacketInternationalAir\",\n \"description\": \"Delivery in as little as 6 business days for small and lightweight items\",\n \"human_readable\": \"Small Packet International Air\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"SmallPacketInternationalSurface\",\n \"description\": \"Delivery in 1 month and up to 3 months for small and lightweight items\",\n \"human_readable\": \"Small Packet International Surface\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"TrackedPacketInternational\",\n \"description\": \"Delivery in as little as 6 business days\",\n \"human_readable\": \"Tracked Packet International\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canadapost\",\n \"max_weight\": null,\n \"name\": \"ExpeditedParcelPlus\",\n \"description\": \"Up to 3 days for local delivery, up to 6 days for regional delivery and up to 10 days for national delivery\",\n \"human_readable\": \"Expedited Parcel Plus\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"canadapost\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"bill_on_label_purchase\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"bill_on_manifest\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"bill_on_scan\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"delivers_to_po_box\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"canadapost\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": true\n }\n ],\n \"name\": \"canadapost\",\n \"human_readable\": \"Canada Post\"\n },\n {\n \"shipment_options\": [\n {\n \"carrier\": \"canpar\",\n \"deprecated\": false,\n \"name\": \"additional_handling\",\n \"description\": null,\n \"human_readable\": \"Additional Handling\",\n \"type\": \"boolean\"\n },\n {\n \"carrier\": \"canpar\",\n \"deprecated\": false,\n \"name\": \"carrier_insurance_amount\",\n \"description\": null,\n \"human_readable\": \"Carrier Insurance Amount\",\n \"type\": \"float\"\n },\n {\n \"carrier\": \"canpar\",\n \"deprecated\": false,\n \"name\": \"handling_instructions\",\n \"description\": null,\n \"human_readable\": \"Handling Instructions\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"canpar\",\n \"deprecated\": false,\n \"name\": \"label_format\",\n \"description\": null,\n \"human_readable\": \"Label Format\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"canpar\",\n \"deprecated\": false,\n \"name\": \"label_size\",\n \"description\": null,\n \"human_readable\": \"Label Size\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"canpar\",\n \"deprecated\": false,\n \"name\": \"delivery_confirmation\",\n \"description\": null,\n \"human_readable\": \"Delivery Confirmation\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"canpar\",\n \"deprecated\": false,\n \"name\": \"cod_amount\",\n \"description\": null,\n \"human_readable\": \"Cod Amount\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"canpar\",\n \"deprecated\": false,\n \"name\": \"cod_method\",\n \"description\": null,\n \"human_readable\": \"Cod Method\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"canpar\",\n \"deprecated\": true,\n \"name\": \"date_advance\",\n \"description\": null,\n \"human_readable\": \"Date Advance\",\n \"type\": \"integer\"\n },\n {\n \"carrier\": \"canpar\",\n \"deprecated\": false,\n \"name\": \"billing_ref\",\n \"description\": null,\n \"human_readable\": \"Billing Ref\",\n \"type\": \"string\"\n }\n ],\n \"service_levels\": [\n {\n \"carrier\": \"canpar\",\n \"max_weight\": null,\n \"name\": \"Ground\",\n \"description\": null,\n \"human_readable\": \"Ground\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canpar\",\n \"max_weight\": null,\n \"name\": \"USA\",\n \"description\": null,\n \"human_readable\": \"USA\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canpar\",\n \"max_weight\": null,\n \"name\": \"SelectLetter\",\n \"description\": null,\n \"human_readable\": \"Select Letter\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canpar\",\n \"max_weight\": null,\n \"name\": \"SelectPak\",\n \"description\": null,\n \"human_readable\": \"Select Pak\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canpar\",\n \"max_weight\": null,\n \"name\": \"Select\",\n \"description\": null,\n \"human_readable\": \"Select\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canpar\",\n \"max_weight\": null,\n \"name\": \"OvernightLetter\",\n \"description\": null,\n \"human_readable\": \"Overnight Letter\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canpar\",\n \"max_weight\": null,\n \"name\": \"OvernightPak\",\n \"description\": null,\n \"human_readable\": \"Overnight Pak\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canpar\",\n \"max_weight\": null,\n \"name\": \"Overnight\",\n \"description\": null,\n \"human_readable\": \"Overnight\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canpar\",\n \"max_weight\": null,\n \"name\": \"USALetter\",\n \"description\": null,\n \"human_readable\": \"USA Letter\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canpar\",\n \"max_weight\": null,\n \"name\": \"USAPak\",\n \"description\": null,\n \"human_readable\": \"USA Pak\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canpar\",\n \"max_weight\": null,\n \"name\": \"SelectUSA\",\n \"description\": null,\n \"human_readable\": \"Select USA\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"canpar\",\n \"max_weight\": null,\n \"name\": \"International\",\n \"description\": null,\n \"human_readable\": \"International\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"canpar\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"bill_on_label_purchase\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"bill_on_manifest\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"bill_on_scan\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"delivers_to_po_box\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"returns\",\n \"description\": \"Subject to regular pricing.\",\n \"supported\": false\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"canpar\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": true\n }\n ],\n \"name\": \"canpar\",\n \"human_readable\": \"Canpar\"\n },\n {\n \"shipment_options\": [\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"deprecated\": false,\n \"name\": \"delivery_max_datetime\",\n \"description\": null,\n \"human_readable\": \"Delivery Max Datetime\",\n \"type\": \"datetime\"\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"deprecated\": false,\n \"name\": \"delivery_min_datetime\",\n \"description\": null,\n \"human_readable\": \"Delivery Min Datetime\",\n \"type\": \"datetime\"\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"deprecated\": false,\n \"name\": \"handling_instructions\",\n \"description\": null,\n \"human_readable\": \"Handling Instructions\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"deprecated\": false,\n \"name\": \"invoice_number\",\n \"description\": null,\n \"human_readable\": \"Invoice Number\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"deprecated\": false,\n \"name\": \"label_format\",\n \"description\": null,\n \"human_readable\": \"Label Format\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"deprecated\": false,\n \"name\": \"pickup_max_datetime\",\n \"description\": null,\n \"human_readable\": \"Pickup Max Datetime\",\n \"type\": \"datetime\"\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"deprecated\": false,\n \"name\": \"pickup_min_datetime\",\n \"description\": null,\n \"human_readable\": \"Pickup Min Datetime\",\n \"type\": \"datetime\"\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"deprecated\": true,\n \"name\": \"print_custom_1\",\n \"description\": null,\n \"human_readable\": \"Print Custom 1\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"deprecated\": true,\n \"name\": \"print_custom_1_barcode\",\n \"description\": null,\n \"human_readable\": \"Print Custom 1 Barcode\",\n \"type\": \"boolean\"\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"deprecated\": true,\n \"name\": \"print_custom_2\",\n \"description\": null,\n \"human_readable\": \"Print Custom 2\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"deprecated\": true,\n \"name\": \"print_custom_2_barcode\",\n \"description\": null,\n \"human_readable\": \"Print Custom 2 Barcode\",\n \"type\": \"boolean\"\n }\n ],\n \"service_levels\": [\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"max_weight\": null,\n \"name\": \"DISTRIBUTION\",\n \"description\": null,\n \"human_readable\": \"DISTRIBUTION\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"max_weight\": null,\n \"name\": \"Same Day\",\n \"description\": null,\n \"human_readable\": \"Same Day\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"bill_on_label_purchase\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"bill_on_manifest\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"bill_on_scan\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"delivers_to_po_box\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"cdllastmilesolutions\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": null\n }\n ],\n \"name\": \"cdllastmilesolutions\",\n \"human_readable\": \"CDL Last Mile Solutions\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"chronopost\",\n \"human_readable\": \"Chronopost\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"CADOECOEA (CA Domestic Economy East)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"CADOECOWE (CA Domestic Economy West)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"CAECOCE (US to CA Economy)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"CAECONE (US to CA Economy)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"CAECOWE (US to CA Economy)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"ECOCE (Economy Central)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"ECOEA (Economy East)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"ECONE (Economy Northeast)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"ECOSO (Economy South)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"ECOWE (Economy West)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"EUECOWE (US to Europe Economy)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"EXPBNE (Expedited Northeast)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"EXPWE (Expedited West)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"REGCE (Regional Central)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"REGEA (Regional East)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"REGNE (Regional Northeast)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"REGSO (Regional South)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cirroecommerce\",\n \"max_weight\": null,\n \"name\": \"REGWE (Regional West)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"cirroecommerce\",\n \"human_readable\": \"Cirro E-Commerce\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"courierexpress\",\n \"max_weight\": null,\n \"name\": \"BASIC_PARCEL\",\n \"description\": null,\n \"human_readable\": \"Basic Parcel\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"courierexpress\",\n \"human_readable\": \"Courier Express\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"RoadExpress\",\n \"description\": null,\n \"human_readable\": \"Road Express\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggExpAtlP10\",\n \"description\": null,\n \"human_readable\": \"Agg Exp Authority To Leave P10\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggExpAtlP25\",\n \"description\": null,\n \"human_readable\": \"Agg Exp Authority To Leave P25\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggExpAtlBaseandKilo\",\n \"description\": null,\n \"human_readable\": \"Agg Exp Authority To Leave Base \\u0026 Kilo\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggExpAtlP0\",\n \"description\": null,\n \"human_readable\": \"Agg Exp Authority To Leave 09\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggExpAtlP1\",\n \"description\": null,\n \"human_readable\": \"Agg Exp Authority To Leave P1\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggExpAtlP3\",\n \"description\": null,\n \"human_readable\": \"Agg Exp Authority To Leave P3\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggExpAtlP5\",\n \"description\": null,\n \"human_readable\": \"Agg Exp Authority To Leave P5\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggDropOffHubbedBaseandKilo\",\n \"description\": null,\n \"human_readable\": \"Agg Drop Off Hubbed Based \\u0026 Kilo\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggDropOffHubbedP0\",\n \"description\": null,\n \"human_readable\": \"Agg Drop Off Hubbed P0\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggDropOffHubbedP1\",\n \"description\": null,\n \"human_readable\": \"Agg Drop Off Hubbed P1\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggDropOffHubbedP3\",\n \"description\": null,\n \"human_readable\": \"Agg Drop Off Hubbed P3\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggDropOffHubbedP5\",\n \"description\": null,\n \"human_readable\": \"Agg Drop Off Hubbed P5\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggStdAtlP10\",\n \"description\": null,\n \"human_readable\": \"Agg STD Authority To Leave P10\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggStdAtlBaseandKilo\",\n \"description\": null,\n \"human_readable\": \"Agg STD Authority To Leave Base \\u0026 Kilo\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggStdAtlP0\",\n \"description\": null,\n \"human_readable\": \"Agg STD Authority To Leave P0\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggStdAtlP1\",\n \"description\": null,\n \"human_readable\": \"Agg STD Authority To Leave P1\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggStdAtlP3\",\n \"description\": null,\n \"human_readable\": \"Agg STD Authority To Leave P3\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggStdAtlP5\",\n \"description\": null,\n \"human_readable\": \"Agg STD Authority To Leave P5\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggEcomBaseandKilo\",\n \"description\": null,\n \"human_readable\": \"Agg Ecommerce Base \\u0026 Kilo\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggEcomP0\",\n \"description\": null,\n \"human_readable\": \"Agg Ecommerce Base \\u0026 Kilo\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggEcomP1\",\n \"description\": null,\n \"human_readable\": \"Agg Ecommerce P1\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggEcomP3\",\n \"description\": null,\n \"human_readable\": \"Agg Ecommerce P3\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggEcomP5\",\n \"description\": null,\n \"human_readable\": \"Agg Ecommerce P5\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggDropOffHubbedP10\",\n \"description\": null,\n \"human_readable\": \"Agg Drop Off Hubbed P10\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggDropOffHubbedP25\",\n \"description\": null,\n \"human_readable\": \"Agg Drop Off Hubbed P25\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggStdAtlP25\",\n \"description\": null,\n \"human_readable\": \"Agg STD Authority To Leave P25\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggEcomP10\",\n \"description\": null,\n \"human_readable\": \"Agg Ecommerce P10\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AggEcomP25\",\n \"description\": null,\n \"human_readable\": \"Agg Ecommerce P25\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AustralianCityExpress\",\n \"description\": null,\n \"human_readable\": \"Australian City Express\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"DropShip500GramParcel\",\n \"description\": null,\n \"human_readable\": \"Drop Ship 500 Gram Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"DropShip1KgParcel\",\n \"description\": null,\n \"human_readable\": \"Drop Ship 1 Kilogram Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"DropShip3KgParcel\",\n \"description\": null,\n \"human_readable\": \"Drop Ship 3Kilogram Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"DropShip5KgParcel\",\n \"description\": null,\n \"human_readable\": \"Drop Ship 5 Kilogram Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"DomesticPriority\",\n \"description\": null,\n \"human_readable\": \"Domestic Priority\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"DropShip10KgParcel\",\n \"description\": null,\n \"human_readable\": \"Drop Ship 10 Kilogram Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"DropShip20KgParcel\",\n \"description\": null,\n \"human_readable\": \"Drop Ship 20 Kilogram Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"DomesticPrioritySignature\",\n \"description\": null,\n \"human_readable\": \"Domestic Priority Signature\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"GoldDomestic\",\n \"description\": null,\n \"human_readable\": \"Gold Domestic\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"RoadExpressNoDelivery\",\n \"description\": null,\n \"human_readable\": \"Road Express No Delivery\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"RoadExpressNoPickUp\",\n \"description\": null,\n \"human_readable\": \"Road Express No Pick Up\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"500GramParcel\",\n \"description\": null,\n \"human_readable\": \"500 Gram Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"500GramParcelATL\",\n \"description\": null,\n \"human_readable\": \"500 Gram Parcel Authority To Leave\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"10KgParcel\",\n \"description\": null,\n \"human_readable\": \"10 Kilogram Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"10KgParcelATL\",\n \"description\": null,\n \"human_readable\": \"10 Kilogram Parcel Authority To Leave\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"15KgParcel\",\n \"description\": null,\n \"human_readable\": \"15 Kilogram Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"15KgParcelATL\",\n \"description\": null,\n \"human_readable\": \"15 Kilogram Authority To Leave\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"1KgParcelATL\",\n \"description\": null,\n \"human_readable\": \"1 Kilogram Parcel Authority To Leave\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"2KgParcel\",\n \"description\": null,\n \"human_readable\": \"2 Kilogram Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"25KgParcel\",\n \"description\": null,\n \"human_readable\": \"25 Kilogram Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"25KgParcelATL\",\n \"description\": null,\n \"human_readable\": \"25 Kilogram Parcel Authority To Leaave\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"2KgParcelATL\",\n \"description\": null,\n \"human_readable\": \"2 Kilogram Parcel Authority To Leave\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"3KgParcelATL\",\n \"description\": null,\n \"human_readable\": \"3 Kilogram Parcel Authority To Leave\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"5Kg Parcel ATL\",\n \"description\": null,\n \"human_readable\": \"5 Kilogram Parcel Authority To Leave\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"AustralianCityExpressSignature\",\n \"description\": null,\n \"human_readable\": \"Australian City Express Signature\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"DomesticSaverSignature\",\n \"description\": null,\n \"human_readable\": \"Domestic Saver Signature\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"DomesticOffPeak\",\n \"description\": null,\n \"human_readable\": \"Domestic Off Peak\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"DomesticSaver\",\n \"description\": null,\n \"human_readable\": \"Domestic Saver\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"DomesticOffPeakSignature\",\n \"description\": null,\n \"human_readable\": \"Dometic Off Peak Signature\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"GoldDomesticSignature\",\n \"description\": null,\n \"human_readable\": \"Gold Domestic Signature\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"1KgSatchelATL\",\n \"description\": null,\n \"human_readable\": \"1 Kilogram Satchel Authority To Leave\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"1KgSatchel\",\n \"description\": null,\n \"human_readable\": \"1 Kilogram Satchel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"3KgSatchel\",\n \"description\": null,\n \"human_readable\": \"3 Kilogram Satchel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"5KgSatchel\",\n \"description\": null,\n \"human_readable\": \"5 Kilogram Satchel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"3KgSatchelATL\",\n \"description\": null,\n \"human_readable\": \"3 Kilogram Satchel Authority To Leave\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"5KgSatchelATL\",\n \"description\": null,\n \"human_readable\": \"5 Kilogram Satchel Authority To Leave\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"500GramSatchelATL\",\n \"description\": null,\n \"human_readable\": \"500 Gram Satchel Authority To Leave\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"500GramSatchel\",\n \"description\": null,\n \"human_readable\": \"500 Gram Satchel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"5KSatchel\",\n \"description\": null,\n \"human_readable\": \"5 Kilogram Satchel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"ExpressInternationalPriority\",\n \"description\": null,\n \"human_readable\": \"Express International Priority\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"InternationalSaver\",\n \"description\": null,\n \"human_readable\": \"International Saver\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"InternationalExpressImport\",\n \"description\": null,\n \"human_readable\": \"International Express Import\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"InternationalExpress\",\n \"description\": null,\n \"human_readable\": \"International Express\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"500gmParcel\",\n \"description\": null,\n \"human_readable\": \"500gm Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"1KgParcel\",\n \"description\": null,\n \"human_readable\": \"1kg Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"3KgParcel\",\n \"description\": null,\n \"human_readable\": \"3kg Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"couriersplease\",\n \"max_weight\": null,\n \"name\": \"5KgParcel\",\n \"description\": null,\n \"human_readable\": \"5kg Parcel\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"couriersplease\",\n \"human_readable\": \"Couriers Please\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"cslogistics\",\n \"max_weight\": null,\n \"name\": \"Distribution\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cslogistics\",\n \"max_weight\": null,\n \"name\": \"ASAP\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cslogistics\",\n \"max_weight\": null,\n \"name\": \"Freight Priority\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cslogistics\",\n \"max_weight\": null,\n \"name\": \"Freight Regular\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cslogistics\",\n \"max_weight\": null,\n \"name\": \"Priority\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cslogistics\",\n \"max_weight\": null,\n \"name\": \"Regular\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"cslogistics\",\n \"max_weight\": null,\n \"name\": \"Scheduled\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"cslogistics\",\n \"human_readable\": \"CSLogistics\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"daipost\",\n \"max_weight\": null,\n \"name\": \"ParcelMax\",\n \"description\": null,\n \"human_readable\": \"Parcel Epacket\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"daipost\",\n \"max_weight\": null,\n \"name\": \"InternationalEconomy\",\n \"description\": null,\n \"human_readable\": \"International Economy\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"daipost\",\n \"max_weight\": null,\n \"name\": \"InternationalStandard\",\n \"description\": null,\n \"human_readable\": \"International Standard\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"daipost\",\n \"max_weight\": null,\n \"name\": \"InternationalExpress\",\n \"description\": null,\n \"human_readable\": \"International Express\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"daipost\",\n \"max_weight\": null,\n \"name\": \"DomesticTracked\",\n \"description\": null,\n \"human_readable\": \"Domestic Tracked\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"daipost\",\n \"max_weight\": null,\n \"name\": \"ParcelRight\",\n \"description\": null,\n \"human_readable\": \"Parcel Right\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"daipost\",\n \"human_readable\": \"DAI Post\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"deliverit\",\n \"max_weight\": null,\n \"name\": \"Saturday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"deliverit\",\n \"max_weight\": null,\n \"name\": \"Economy\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"deliverit\",\n \"max_weight\": null,\n \"name\": \"Noon-It\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"deliverit\",\n \"max_weight\": null,\n \"name\": \"Early-It\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"deliverit\",\n \"max_weight\": null,\n \"name\": \"Afternoon\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"deliverit\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"deliverit\",\n \"name\": \"bill_on_label_purchase\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deliverit\",\n \"name\": \"bill_on_manifest\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deliverit\",\n \"name\": \"bill_on_scan\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deliverit\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deliverit\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"deliverit\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deliverit\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deliverit\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"deliverit\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"deliverit\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deliverit\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deliverit\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deliverit\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": false\n }\n ],\n \"name\": \"deliverit\",\n \"human_readable\": \"Deliver-It\"\n },\n {\n \"shipment_options\": [\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": false,\n \"name\": \"additional_handling\",\n \"description\": null,\n \"human_readable\": \"Additional Handling\",\n \"type\": \"boolean\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": true,\n \"name\": \"bill_third_party_account\",\n \"description\": null,\n \"human_readable\": \"Bill Third Party Account\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": false,\n \"name\": \"carrier_insurance_amount\",\n \"description\": null,\n \"human_readable\": \"Carrier Insurance Amount\",\n \"type\": \"float\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": false,\n \"name\": \"cod_amount\",\n \"description\": null,\n \"human_readable\": \"Cod Amount\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": false,\n \"name\": \"cod_method\",\n \"description\": null,\n \"human_readable\": \"Cod Method\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": false,\n \"name\": \"cost_center\",\n \"description\": null,\n \"human_readable\": \"Cost Center\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": true,\n \"name\": \"delivered_duty_paid\",\n \"description\": null,\n \"human_readable\": \"Delivered Duty Paid\",\n \"type\": \"boolean\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": false,\n \"name\": \"delivery_confirmation\",\n \"description\": null,\n \"human_readable\": \"Delivery Confirmation\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": false,\n \"name\": \"handling_instructions\",\n \"description\": null,\n \"human_readable\": \"Handling Instructions\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": false,\n \"name\": \"invoice_number\",\n \"description\": null,\n \"human_readable\": \"Invoice Number\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": false,\n \"name\": \"label_date\",\n \"description\": null,\n \"human_readable\": \"Label Date\",\n \"type\": \"datetime\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": false,\n \"name\": \"label_format\",\n \"description\": null,\n \"human_readable\": \"Label Format\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": false,\n \"name\": \"label_size\",\n \"description\": null,\n \"human_readable\": \"Label Size\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": true,\n \"name\": \"print_custom_1\",\n \"description\": null,\n \"human_readable\": \"Print Custom 1\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": true,\n \"name\": \"print_custom_2\",\n \"description\": null,\n \"human_readable\": \"Print Custom 2\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"deutschepost\",\n \"deprecated\": false,\n \"name\": \"return_service\",\n \"description\": null,\n \"human_readable\": \"Return Service\",\n \"type\": \"string\"\n }\n ],\n \"service_levels\": [\n {\n \"carrier\": \"deutschepost\",\n \"max_weight\": null,\n \"name\": \"PacketPlus\",\n \"description\": null,\n \"human_readable\": \"Packet Plus\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"bill_on_label_purchase\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"bill_on_manifest\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"bill_on_scan\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"delivers_to_po_box\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"deutschepost\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": false\n }\n ],\n \"name\": \"deutschepost\",\n \"human_readable\": \"Deutsche Post\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"deutschepostuk\",\n \"max_weight\": null,\n \"name\": \"PriorityPacketPlus\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"deutschepostuk\",\n \"max_weight\": null,\n \"name\": \"PriorityPacket\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"deutschepostuk\",\n \"max_weight\": null,\n \"name\": \"PriorityPacketTracked\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"deutschepostuk\",\n \"max_weight\": null,\n \"name\": \"BusinessMailRegistered\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"deutschepostuk\",\n \"max_weight\": null,\n \"name\": \"StandardPacket\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"deutschepostuk\",\n \"max_weight\": null,\n \"name\": \"BusinessMailStandard\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"deutschepostuk\",\n \"human_readable\": \"Deutsche Post UK\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"dhlecommercesolutions\",\n \"max_weight\": null,\n \"name\": \"DHLParcelExpedited\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlecommercesolutions\",\n \"max_weight\": null,\n \"name\": \"DHLParcelExpeditedMax\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlecommercesolutions\",\n \"max_weight\": null,\n \"name\": \"DHLParcelGround\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlecommercesolutions\",\n \"max_weight\": null,\n \"name\": \"DHLBPMExpedited\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlecommercesolutions\",\n \"max_weight\": null,\n \"name\": \"DHLBPMGround\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlecommercesolutions\",\n \"max_weight\": null,\n \"name\": \"DHLParcelInternationalDirect\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlecommercesolutions\",\n \"max_weight\": null,\n \"name\": \"DHLParcelInternationalStandard\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlecommercesolutions\",\n \"max_weight\": null,\n \"name\": \"DHLPacketInternational\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlecommercesolutions\",\n \"max_weight\": null,\n \"name\": \"DHLParcelInternationalDirectPriority\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlecommercesolutions\",\n \"max_weight\": null,\n \"name\": \"DHLParcelInternationalDirectStandard\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"dhlecommercesolutions\",\n \"human_readable\": \"DHL eCommerce Solutions\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"BreakBulkEconomy\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"BreakBulkExpress\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"DomesticEconomySelect\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"DomesticExpress\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"DomesticExpress1030\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"DomesticExpress1200\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"EconomySelect\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"EconomySelectNonDoc\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"EuroPack\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"EuropackNonDoc\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"Express1030\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"Express1030NonDoc\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"Express1200NonDoc\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"Express1200\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"Express900\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"Express900NonDoc\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"ExpressEasy\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"ExpressEasyNonDoc\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"ExpressEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"ExpressWorldwide\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"ExpressWorldwideB2C\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"ExpressWorldwideB2CNonDoc\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"ExpressWorldwideECX\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"ExpressWorldwideNonDoc\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"FreightWorldwide\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"GlobalmailBusiness\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"JetLine\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"JumboBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"LogisticsServices\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"SameDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"SecureLine\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"SprintLine\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"JumboDocument\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"JumboParcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"Document\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"DHLFlyer\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"Domestic\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"ExpressDocument\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"DHLExpressEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"JumboBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"JumboJuniorDocument\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"JuniorJumboBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"JumboJuniorParcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"OtherDHLPackaging\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"Parcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlexpress\",\n \"max_weight\": null,\n \"name\": \"YourPackaging\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"supported_features\": [],\n \"name\": \"dhlexpress\",\n \"human_readable\": \"DHL Express\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"dhlpaket\",\n \"max_weight\": null,\n \"name\": \"EuroPaket\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlpaket\",\n \"max_weight\": null,\n \"name\": \"Paket\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlpaket\",\n \"max_weight\": null,\n \"name\": \"PaketConnect\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlpaket\",\n \"max_weight\": null,\n \"name\": \"PaketInternational\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dhlpaket\",\n \"max_weight\": null,\n \"name\": \"Retoure\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"dhlpaket\",\n \"human_readable\": \"DHL Paket\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"doordash\",\n \"max_weight\": null,\n \"name\": \"Standard\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"doordash\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"doordash\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"doordash\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": null\n }\n ],\n \"name\": \"doordash\",\n \"human_readable\": \"DoorDash\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"dpd\",\n \"max_weight\": null,\n \"name\": \"DPDCLASSIC\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpd\",\n \"max_weight\": null,\n \"name\": \"DPD8:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpd\",\n \"max_weight\": null,\n \"name\": \"DPD10:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpd\",\n \"max_weight\": null,\n \"name\": \"DPD12:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpd\",\n \"max_weight\": null,\n \"name\": \"DPD18:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpd\",\n \"max_weight\": null,\n \"name\": \"DPDEXPRESS\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpd\",\n \"max_weight\": null,\n \"name\": \"DPDPARCELLETTER\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpd\",\n \"max_weight\": null,\n \"name\": \"DPDPARCELLETTERPLUS\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpd\",\n \"max_weight\": null,\n \"name\": \"DPDINTERNATIONALMAIL\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"dpd\",\n \"human_readable\": \"DPD\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"dpdnl\",\n \"max_weight\": null,\n \"name\": \"DPDNL_CLASSIC\",\n \"description\": null,\n \"human_readable\": \"DPDNL Classic\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpdnl\",\n \"max_weight\": null,\n \"name\": \"EXPRESS_10\",\n \"description\": null,\n \"human_readable\": \"Express 10\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpdnl\",\n \"max_weight\": null,\n \"name\": \"EXPRESS_12\",\n \"description\": null,\n \"human_readable\": \"Express 12\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpdnl\",\n \"max_weight\": null,\n \"name\": \"EXPRESS_18\",\n \"description\": null,\n \"human_readable\": \"Express 18\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpdnl\",\n \"max_weight\": null,\n \"name\": \"INTERNATIONAL_EXPRESS\",\n \"description\": null,\n \"human_readable\": \"International Express\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpdnl\",\n \"max_weight\": null,\n \"name\": \"DPDNL_HOME\",\n \"description\": null,\n \"human_readable\": \"DPDNL B2C Home\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpdnl\",\n \"max_weight\": null,\n \"name\": \"DPDNL_TO_SHOP\",\n \"description\": null,\n \"human_readable\": \"DPDNL B2C Shop\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"dpdnl\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"dpdnl\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"dpdnl\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"dpdnl\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"dpdnl\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"dpdnl\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"dpdnl\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"dpdnl\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"dpdnl\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"dpdnl\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": true\n }\n ],\n \"name\": \"dpdnl\",\n \"human_readable\": \"DPD NL\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"AirClassicInternationalAir\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"AirExpressInternationalAir\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ExpresspakDpd10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ExpresspakDpd12:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ExpresspakDpdClassic\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ExpresspakDpdNextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ExpresspakSaturday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ExpresspakSaturday10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ExpresspakSaturday12:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ExpresspakSunday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ExpresspakSunday12:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"FreightParcelDpd10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"FreightParcelDpd12:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"FreightParcelDpdClassic\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"FreightParcelDpdNextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"FreightParcelDpdTwoDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"FreightParcelSaturday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"FreightParcelSaturday10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"FreightParcelSaturday12:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"FreightParcelSunday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"FreightParcelSunday12:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"PalletDpd10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"PalletDpd12:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"PalletDpdClassic\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"PalletDpdNextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"PalletDpdTwoDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"PalletSaturday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"PalletSaturday10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"PalletSaturday12:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"PalletSunday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"PalletSunday12:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ParcelDpd10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ParcelDpd12:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ParcelDpdClassic\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ParcelDpdNextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ParcelDpdTwoDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ParcelReturnToShop\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ParcelSaturday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ParcelSaturday10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ParcelSaturday12:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ParcelSunday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ParcelSunday12:00\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"Parcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"Pallet\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"ExpressPak\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"FreightParcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"dpduk\",\n \"max_weight\": null,\n \"name\": \"Freight\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"supported_features\": [],\n \"name\": \"dpduk\",\n \"human_readable\": \"DPD UK\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"CourierServiceDDP\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"CourierServiceDDU\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"DomesticEconomyParcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"DomesticParcelBPM\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"DomesticPriorityParcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"DomesticPriorityParcelBPM\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"EMIService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"EconomyParcelService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"IPAService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"ISALService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"PMIService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"PriorityParcelDDP\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"PriorityParcelDDU\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"PriorityParcelDeliveryConfirmationDDP\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"PriorityParcelDeliveryConfirmationDDU\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobal\",\n \"max_weight\": null,\n \"name\": \"ePacketService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"epostglobal\",\n \"human_readable\": \"ePostGlobal\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"CourierService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"CourierServiceDutiesPaid\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"DomesticPriorityParcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"DomesticeDGE\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"EconomyParcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"ExpeditedParcelWithDeliveryConfirmationDutiesPaid\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"ExpeditedWithDC\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"FirstClassParcelsInternational\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"IPA\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"ISAL\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"PMEI\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"PMEIDDP\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"PMIPresortService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"PMIServiceDutyPaid\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"PriorityPacketDDU\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"PriorityParcelNoDeliveryConfirmation\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"PriorityParcelNoDeliveryConfirmationDutiesPaid\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"PriorityParcelWithDeliveryConfirmation\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"PriorityParcelWithDeliveryConfirmationDutiesPaid\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"ePacket\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"max_weight\": null,\n \"name\": \"ePacketDDP\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"epostglobalv2\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"epostglobalv2\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": null\n }\n ],\n \"name\": \"epostglobalv2\",\n \"human_readable\": \"EPostGlobalV2\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"estafeta\",\n \"max_weight\": null,\n \"name\": \"11:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"estafeta\",\n \"max_weight\": null,\n \"name\": \"12:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"estafeta\",\n \"max_weight\": null,\n \"name\": \"Dia Sig.\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"estafeta\",\n \"max_weight\": null,\n \"name\": \"2 Dias\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"estafeta\",\n \"max_weight\": null,\n \"name\": \"Terrestre\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"estafeta\",\n \"max_weight\": null,\n \"name\": \"LTL\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"estafeta\",\n \"max_weight\": null,\n \"name\": \"ENVELOPE\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"estafeta\",\n \"max_weight\": null,\n \"name\": \"PARCEL\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"supported_features\": [],\n \"name\": \"estafeta\",\n \"human_readable\": \"Estafeta\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"Courier2Home\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"Courier2HomeNextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"Shop2Home\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"Shop2HomeNextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"Shop2Shop\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"Shop2ShopNextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"Courier2Shop\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"Courier2ShopNextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"International Delivery\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"Commercial\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"DDP Courier\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"DDU Courier\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"DDU Shop\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"evri\",\n \"max_weight\": null,\n \"name\": \"Postal\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"evri\",\n \"human_readable\": \"Evri\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"fastway\",\n \"max_weight\": null,\n \"name\": \"Parcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"fastway\",\n \"max_weight\": null,\n \"name\": \"Satchel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"fastway\",\n \"max_weight\": null,\n \"name\": \"Parcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"fastway\",\n \"max_weight\": null,\n \"name\": \"A2\",\n \"description\": \"(Satchel)\",\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"fastway\",\n \"max_weight\": null,\n \"name\": \"A3\",\n \"description\": \"(Satchel)\",\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"fastway\",\n \"max_weight\": null,\n \"name\": \"A4\",\n \"description\": \"(Satchel, not available in Australia)\",\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"fastway\",\n \"max_weight\": null,\n \"name\": \"A5\",\n \"description\": \"(Satchel, not available in South Africa)\",\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"fastway\",\n \"max_weight\": null,\n \"name\": \"BOXSML\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"fastway\",\n \"max_weight\": null,\n \"name\": \"BOXMED\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"fastway\",\n \"max_weight\": null,\n \"name\": \"BOXLRG\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"supported_features\": [],\n \"name\": \"fastway\",\n \"human_readable\": \"Fastway\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"FEDEX_2_DAY\",\n \"description\": \"2 business days by 4:30pm, Saturday delivery\",\n \"human_readable\": \"FedEx 2 Day\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"FEDEX_2_DAY_AM\",\n \"description\": \"2 business days by 10:30am\",\n \"human_readable\": \"FedEx 2 Day (AM)\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"FEDEX_EXPRESS_SAVER\",\n \"description\": \"3 business days by 4:30pm\",\n \"human_readable\": \"FedEx Express Saver\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"FEDEX_GROUND\",\n \"description\": \"1-6 days\",\n \"human_readable\": \"FedEx Ground\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"FEDEX_INTERNATIONAL_CONNECT_PLUS\",\n \"description\": \"2-5 business days\",\n \"human_readable\": \"FedEx International (Connect Plus)\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"FIRST_OVERNIGHT\",\n \"description\": \"By 8am the next business day, Saturday delivery\",\n \"human_readable\": \"FedEx First (Overnight)\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"GROUND_HOME_DELIVERY\",\n \"description\": \"1-5 days\",\n \"human_readable\": \"FedEx Ground (Home Delivery)\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"INTERNATIONAL_ECONOMY\",\n \"description\": \"4-5 business days\",\n \"human_readable\": \"FedEx International (Economy)\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"INTERNATIONAL_FIRST\",\n \"description\": \"1-3 business days, time definite to select markets\",\n \"human_readable\": \"FedEx International First\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"INTERNATIONAL_PRIORITY\",\n \"description\": \"1-3 business days, time definite to select markets\",\n \"human_readable\": \"FedEx International (First)\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"PRIORITY_OVERNIGHT\",\n \"description\": \"By 10:30am the next business day, Saturday delivery\",\n \"human_readable\": \"FedEx Priority Overnight\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"SMART_POST\",\n \"description\": \"2-7 business days; Sunday Delivery to select markets\",\n \"human_readable\": \"FedEx Ground Economy (formerly FedEx SmartPost)\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"STANDARD_OVERNIGHT\",\n \"description\": \"By 4:30pm the next business day\",\n \"human_readable\": \"FedEx Standard Overnight\",\n \"dimensions\": null\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"fedex\",\n \"max_weight\": 160.0,\n \"name\": \"FedExEnvelope\",\n \"description\": \"Up to approximately 60 pages\",\n \"human_readable\": null,\n \"dimensions\": [\n \"9.5in x 12.5in\"\n ]\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": null,\n \"name\": \"FedExBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": 800.0,\n \"name\": \"FedExPak\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"12in x 15.5in\"\n ]\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": 800.0,\n \"name\": \"FedExTube\",\n \"description\": \"Triangular box for plans, posters, fabric rolls, charts and blueprints\",\n \"human_readable\": null,\n \"dimensions\": [\n \"38in x 6in x 6in x 6in\"\n ]\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": 352.0,\n \"name\": \"FedEx10kgBox\",\n \"description\": \"To qualify for the flat rate, weight cannot exceed 10 kg\",\n \"human_readable\": null,\n \"dimensions\": [\n \"15.81in x 12.94in x 10.19in\"\n ]\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": 880.0,\n \"name\": \"FedEx25kgBox\",\n \"description\": \"To qualify for the flat rate, weight cannot exceed 25 kg.\",\n \"human_readable\": null,\n \"dimensions\": [\n \"21.56in x 16.56in x 13.19in\"\n ]\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": 800.0,\n \"name\": \"FedExSmallBox\",\n \"description\": \"Maximum weight allowed is based on pricing option: 50 lbs (800 oz) for domestic Express One Rate shipments, 20 lbs (320 oz) for domestic weight-based Express shipments, 40 lbs (640 oz) for international weight-based Express shipments.\",\n \"human_readable\": null,\n \"dimensions\": [\n \"12.25in x 10.9in x 1.5in\",\n \"8.75in x 2.63in x 11.25in\"\n ]\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": 800.0,\n \"name\": \"FedExMediumBox\",\n \"description\": \"Maximum weight allowed is based on pricing option: 50 lbs (800 oz) for domestic Express One Rate shipments, 20 lbs (320 oz) for domestic weight-based Express shipments, 40 lbs (640 oz) for international weight-based Express shipments.\",\n \"human_readable\": null,\n \"dimensions\": [\n \"13.25in x 11.5in x 2.38in\",\n \"8.75in x 4.38in x 11.25in\"\n ]\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": 800.0,\n \"name\": \"FedExLargeBox\",\n \"description\": \"Maximum weight allowed is based on pricing option: 50 lbs (800 oz) for domestic Express One Rate shipments, 20 lbs (320 oz) for domestic weight-based Express shipments, 40 lbs (640 oz) for international weight-based Express shipments.\",\n \"human_readable\": null,\n \"dimensions\": [\n \"17.88in x 12.38in x 3in\",\n \"8.75in x 7.75in x 11.25in\"\n ]\n },\n {\n \"carrier\": \"fedex\",\n \"max_weight\": 800.0,\n \"name\": \"FedExExtraLargeBox\",\n \"description\": \"Maximum weight allowed is based on pricing option: 50 lbs (800 oz) for domestic Express One Rate shipments, 20 lbs (320 oz) for domestic weight-based Express shipments, 40 lbs (640 oz) for international weight-based Express shipments.\",\n \"human_readable\": null,\n \"dimensions\": [\n \"11.88in x 10.75in x 11in\",\n \"15.25in x 14.13in x 6in\"\n ]\n }\n ],\n \"supported_features\": [],\n \"name\": \"fedex\",\n \"human_readable\": \"FedEx\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"fedexcrossborder\",\n \"max_weight\": null,\n \"name\": \"CBEC\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"fedexcrossborder\",\n \"max_weight\": null,\n \"name\": \"CBECL\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"fedexcrossborder\",\n \"max_weight\": null,\n \"name\": \"CBECP\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"fedexcrossborder\",\n \"human_readable\": \"FedEx Cross Border\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"fedexgroundeconomy\",\n \"max_weight\": null,\n \"name\": \"SMART_POST\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"fedexgroundeconomy\",\n \"human_readable\": \"FedEx Ground Economy\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"fedexsmartpost\",\n \"max_weight\": null,\n \"name\": \"SMART_POST\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"fedexsmartpost\",\n \"human_readable\": \"FedEx SmartPost\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"firstchoice\",\n \"max_weight\": null,\n \"name\": \"ST\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"firstchoice\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": null\n }\n ],\n \"name\": \"firstchoice\",\n \"human_readable\": \"First Choice\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"firstmile\",\n \"max_weight\": null,\n \"name\": \"XParcelPriority\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"firstmile\",\n \"max_weight\": null,\n \"name\": \"XParcelExpedited\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"firstmile\",\n \"max_weight\": null,\n \"name\": \"XParcelReturns\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"firstmile\",\n \"max_weight\": null,\n \"name\": \"XParcelGround\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"firstmile\",\n \"max_weight\": null,\n \"name\": \"XParcelExpeditedPlus\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"firstmile\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"firstmile\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"firstmile\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"firstmile\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"firstmile\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"firstmile\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"firstmile\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"firstmile\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": true\n }\n ],\n \"name\": \"firstmile\",\n \"human_readable\": \"First Mile\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"flexport\",\n \"max_weight\": null,\n \"name\": \"Standard\",\n \"description\": null,\n \"human_readable\": \"Standard\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"flexport\",\n \"max_weight\": null,\n \"name\": \"Expedited\",\n \"description\": null,\n \"human_readable\": \"Expedited\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"flexport\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"bill_on_label_purchase\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"bill_on_manifest\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"bill_on_scan\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"delivers_to_po_box\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"flexport\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": false\n }\n ],\n \"name\": \"flexport\",\n \"human_readable\": \"Flexport\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"gio\",\n \"max_weight\": null,\n \"name\": \"scheduled\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"gio\",\n \"human_readable\": \"Gio\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"gls\",\n \"max_weight\": null,\n \"name\": \"CaliforniaParcelService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"gls\",\n \"max_weight\": null,\n \"name\": \"EarlyPriorityOvernight\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"gls\",\n \"max_weight\": null,\n \"name\": \"EarlySaturdayService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"gls\",\n \"max_weight\": null,\n \"name\": \"Ground\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"gls\",\n \"max_weight\": null,\n \"name\": \"Overnight\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"gls\",\n \"max_weight\": null,\n \"name\": \"PriorityOvernight\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"gls\",\n \"max_weight\": null,\n \"name\": \"SaturdayDeliveryService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"gls\",\n \"human_readable\": \"GLS\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"gso\",\n \"max_weight\": null,\n \"name\": \"CaliforniaParcelService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"gso\",\n \"max_weight\": null,\n \"name\": \"EarlyPriorityOvernight\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"gso\",\n \"max_weight\": null,\n \"name\": \"EarlySaturdayService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"gso\",\n \"max_weight\": null,\n \"name\": \"Ground\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"gso\",\n \"max_weight\": null,\n \"name\": \"Overnight\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"gso\",\n \"max_weight\": null,\n \"name\": \"PriorityOvernight\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"gso\",\n \"max_weight\": null,\n \"name\": \"SaturdayDeliveryService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"gso\",\n \"human_readable\": \"GSO\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"hailify\",\n \"max_weight\": null,\n \"name\": \"Xpress\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"hailify\",\n \"human_readable\": \"Hailify\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"henry\",\n \"max_weight\": null,\n \"name\": \"Distribution\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"henry\",\n \"human_readable\": \"Henry\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkAirClassicInternationalAir\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkAirExpressInternationalAir\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak1By10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak1By12\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak1NextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak1Saturday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak1SaturdayBy10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak1SaturdayBy12\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak1Sunday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak1SundayBy12\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak5By10\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak5By10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak5By12\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak5NextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak5Saturday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak5SaturdayBy10\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak5SaturdayBy10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak5SaturdayBy12\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak5Sunday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkExpresspak5SundayBy12\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkFreightBy10\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkFreightBy12\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkFreightNextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkFreightSaturday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkFreightSaturdayBy10\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkFreightSaturdayBy12\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkFreightSunday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkFreightSundayBy12\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelBy10\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelBy10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelBy12\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelDpdEuropeByRoad\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelNextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelReturn\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelReturnToShop\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelSaturday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelSaturdayBy10\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelSaturdayBy10:30\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelSaturdayBy12\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelShipToShop\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelSunday\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelSundayBy12\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkParcelTwoDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"InterlinkPickupParcelDpdEuropeByRoad\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"Parcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"Pallet\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"ExpressPak\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"FreightParcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"interlinkexpress\",\n \"max_weight\": null,\n \"name\": \"Freight\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"supported_features\": [],\n \"name\": \"interlinkexpress\",\n \"human_readable\": \"Interlink Express\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"jet\",\n \"max_weight\": null,\n \"name\": \"Distribution\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"jet\",\n \"human_readable\": \"Jet\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"jitsu\",\n \"max_weight\": null,\n \"name\": \"AxleHireDelivery\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"jitsu\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"jitsu\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"jitsu\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"jitsu\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": null\n }\n ],\n \"name\": \"jitsu\",\n \"human_readable\": \"Jitsu\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"jppost\",\n \"human_readable\": \"JP Post\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"kuronekoyamato\",\n \"human_readable\": \"Kuroneko Yamato\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"laposte\",\n \"human_readable\": \"La Poste\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"lasershipv2\",\n \"max_weight\": null,\n \"name\": \"SameDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"lasershipv2\",\n \"max_weight\": null,\n \"name\": \"NextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"lasershipv2\",\n \"max_weight\": null,\n \"name\": \"Weekend\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"lasershipv2\",\n \"max_weight\": null,\n \"name\": \"Envelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"lasershipv2\",\n \"max_weight\": null,\n \"name\": \"Custom\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"supported_features\": [],\n \"name\": \"lasershipv2\",\n \"human_readable\": \"LaserShip\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"loomisexpress\",\n \"max_weight\": null,\n \"name\": \"LoomisGround\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"loomisexpress\",\n \"max_weight\": null,\n \"name\": \"LoomisExpress1800\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"loomisexpress\",\n \"max_weight\": null,\n \"name\": \"LoomisExpress1200\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"loomisexpress\",\n \"max_weight\": null,\n \"name\": \"LoomisExpress900\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"loomisexpress\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"loomisexpress\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"loomisexpress\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"loomisexpress\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"loomisexpress\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": null\n }\n ],\n \"name\": \"loomisexpress\",\n \"human_readable\": \"Loomis Express\"\n },\n {\n \"shipment_options\": [\n {\n \"carrier\": \"lso\",\n \"deprecated\": false,\n \"name\": \"delivery_confirmation\",\n \"description\": null,\n \"human_readable\": \"Delivery Confirmation\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"lso\",\n \"deprecated\": false,\n \"name\": \"saturday_delivery\",\n \"description\": null,\n \"human_readable\": \"Saturday Delivery\",\n \"type\": \"boolean\"\n },\n {\n \"carrier\": \"lso\",\n \"deprecated\": true,\n \"name\": \"date_advance\",\n \"description\": null,\n \"human_readable\": \"Date Advance\",\n \"type\": \"integer\"\n },\n {\n \"carrier\": \"lso\",\n \"deprecated\": true,\n \"name\": \"declared_value\",\n \"description\": null,\n \"human_readable\": \"Declared Value\",\n \"type\": \"float\"\n },\n {\n \"carrier\": \"lso\",\n \"deprecated\": false,\n \"name\": \"label_format\",\n \"description\": null,\n \"human_readable\": \"Label Format\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"lso\",\n \"deprecated\": false,\n \"name\": \"label_size\",\n \"description\": null,\n \"human_readable\": \"Label Size\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"lso\",\n \"deprecated\": true,\n \"name\": \"print_custom_1\",\n \"description\": null,\n \"human_readable\": \"Print Custom 1\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"lso\",\n \"deprecated\": true,\n \"name\": \"print_custom_2\",\n \"description\": null,\n \"human_readable\": \"Print Custom 2\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"lso\",\n \"deprecated\": true,\n \"name\": \"print_custom_3\",\n \"description\": null,\n \"human_readable\": \"Print Custom 3\",\n \"type\": \"string\"\n }\n ],\n \"service_levels\": [\n {\n \"carrier\": \"lso\",\n \"max_weight\": null,\n \"name\": \"PriorityEarly\",\n \"description\": null,\n \"human_readable\": \"Early Next Day by 8:30 a.m.\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"lso\",\n \"max_weight\": null,\n \"name\": \"PriorityBasic\",\n \"description\": null,\n \"human_readable\": \"Priority Next Day by 10:30 a.m.\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"lso\",\n \"max_weight\": null,\n \"name\": \"Priority2ndDay\",\n \"description\": null,\n \"human_readable\": \"Priority 2nd Business Day\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"lso\",\n \"max_weight\": null,\n \"name\": \"GroundEarly\",\n \"description\": null,\n \"human_readable\": \"Economy Next Day by 3 p.m.\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"lso\",\n \"max_weight\": null,\n \"name\": \"GroundBasic\",\n \"description\": null,\n \"human_readable\": \"Ground Basic in 1-3 business days\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"lso\",\n \"max_weight\": null,\n \"name\": \"ECommerce\",\n \"description\": null,\n \"human_readable\": \"eCommerce\",\n \"dimensions\": null\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"lso\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"bill_on_label_purchase\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"bill_on_manifest\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"bill_on_scan\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"delivers_to_po_box\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"lso\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": true\n }\n ],\n \"name\": \"lso\",\n \"human_readable\": \"LSO\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"maersk\",\n \"max_weight\": null,\n \"name\": \"Maersk-3-Day\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"maersk\",\n \"human_readable\": \"Maersk\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"ontracv3\",\n \"max_weight\": null,\n \"name\": \"GRND\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"ontracv3\",\n \"max_weight\": null,\n \"name\": \"Next_Day\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"ontracv3\",\n \"max_weight\": null,\n \"name\": \"Letter\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"supported_features\": [],\n \"name\": \"ontracv3\",\n \"human_readable\": \"OnTracV3\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"optima\",\n \"max_weight\": 800.0,\n \"name\": \"NxtDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"Maximum length: 48in\",\n \"Maximum width: 32in\",\n \"Maximum height: 32in\"\n ]\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"optima\",\n \"human_readable\": \"Optima\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"Priority\",\n \"description\": null,\n \"human_readable\": \"Priority\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"BPM\",\n \"description\": null,\n \"human_readable\": \"BPM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"ParcelSelect\",\n \"description\": null,\n \"human_readable\": \"Parcel Select\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"MediaMail\",\n \"description\": null,\n \"human_readable\": \"Media Mail\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"MarketingParcel\",\n \"description\": null,\n \"human_readable\": \"Marketing Parcel\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"MarketingParcelTracked\",\n \"description\": null,\n \"human_readable\": \"Marketing Parcel Tracked\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"ParcelSelectHazardousMaterial\",\n \"description\": null,\n \"human_readable\": \"Parcel Select Hazardous Material\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"USPSGroundAdvantage\",\n \"description\": null,\n \"human_readable\": \"USPS Ground Advantage\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"USPSGroundAdvantageLightweight\",\n \"description\": null,\n \"human_readable\": \"USPS Ground Advantage Lightweight\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"USPSGroundAdvantageHazmat\",\n \"description\": null,\n \"human_readable\": \"USPS Ground Advantage Hazmat\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"USPSGroundAdvantageHazmatSignature\",\n \"description\": null,\n \"human_readable\": \"USPS Ground Advantage Hazmat Signature\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"USPSGroundAdvantageLightweightHazmat\",\n \"description\": null,\n \"human_readable\": \"USPS Ground Advantage Lightweight Hazmat\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"USPSGroundAdvantageLightweightHazmatSignature\",\n \"description\": null,\n \"human_readable\": \"USPS Ground Advantage Lightweight Hazmat Signature\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"ParcelSelectHazmatSignature\",\n \"description\": null,\n \"human_readable\": \"Parcel Select Hazmat Signature\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"parcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"irregularparcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"osmworldwide\",\n \"max_weight\": null,\n \"name\": \"softpack\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"supported_features\": [\n {\n \"carrier\": \"osmworldwide\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"osmworldwide\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"osmworldwide\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"osmworldwide\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"osmworldwide\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"osmworldwide\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"osmworldwide\",\n \"name\": \"scanforms\",\n \"description\": \"Manifesting\",\n \"supported\": true\n },\n {\n \"carrier\": \"osmworldwide\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": true\n }\n ],\n \"name\": \"osmworldwide\",\n \"human_readable\": \"OSM Worldwide\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"pandion\",\n \"max_weight\": null,\n \"name\": \"Pandion Express\",\n \"description\": null,\n \"human_readable\": \"Pandion Express\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"pandion\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"bill_on_label_purchase\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"bill_on_manifest\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"bill_on_scan\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"delivers_to_po_box\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"pandion\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": true\n }\n ],\n \"name\": \"pandion\",\n \"human_readable\": \"Pandion\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"europrioritybusiness\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"europriorityhome\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express10\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express10CourierPack\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express10Exchange\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express10Secure\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express10SecureExchange\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express24\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express24CourierPack\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express24Exchange\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express24large\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express24Secure\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express24SecureExchange\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express48\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express48large\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express9\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express9CourierPack\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"express9Secure\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"expressAM\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"expressAMCourierPack\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"expressAMExchange\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"expressAMSecure\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"expressAMSecureExchange\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"expressPM\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"expressPMSecure\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"globalBulkDirect\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"globalexpress\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"globalexpressEnvelopeDelivery\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"globalexpressPackDelivery\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"globalpriority\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"globalpriorityReturns\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"globalvalue\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"irelandexpress\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcelforce\",\n \"max_weight\": null,\n \"name\": \"ParcelRiderPlus\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"parcelforce\",\n \"human_readable\": \"Parcelforce\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"CADOECOEA (CA Domestic Economy East)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"CADOECOWE (CA Domestic Economy West)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"CAECOCE (US to CA Economy)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"CAECONE (US to CA Economy)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"CAECOWE (US to CA Economy)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"ECOCE (Economy Central)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"ECOEA (Economy East)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"ECONE (Economy Northeast)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"ECOSO (Economy South)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"ECOWE (Economy West)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"EUECOWE (US to Europe Economy)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"EXPBNE (Expedited Northeast)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"EXPWE (Expedited West)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"REGCE (Regional Central)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"REGEA (Regional East)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"REGNE (Regional Northeast)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"REGSO (Regional South)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"parcll\",\n \"max_weight\": null,\n \"name\": \"REGWE (Regional West)\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"parcll\",\n \"human_readable\": \"PARCLL\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"passportglobal\",\n \"human_readable\": \"Passport\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"postnl\",\n \"human_readable\": \"PostNL\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpress\",\n \"description\": null,\n \"human_readable\": \"Purolator Express\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpress12PM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express 12PM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressPack12PM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Pack 12PM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressBox12PM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Box 12PM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEnvelope12PM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Envelope 12PM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpress1030AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express 10:30AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpress9AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express 9AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressBox\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Box\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressBox1030AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Box 10:30AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressBox9AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Box 9AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressBoxEvening\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Box Evening\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressBoxInternational\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Box International\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressBoxUS\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Box US\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEnvelope\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Envelope\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEnvelope1030AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Envelope 10:30AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEnvelope9AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Envelope 9AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEnvelopeEvening\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Envelope Evening\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEnvelopeInternational\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Envelope International\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEnvelopeUS\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Envelope US\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEvening\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Evening\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressInternational\",\n \"description\": null,\n \"human_readable\": \"Purolator Express International\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressInternational1030AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express International 10:30AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressInternational1200\",\n \"description\": null,\n \"human_readable\": \"Purolator Express International 12:00\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressInternational9AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express International 9AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressBoxInternational1030AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Box International 10:30AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressBoxInternational1200\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Box International 12:00\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressBoxInternational9AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Box International 9AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEnvelopeInternational1030AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Envelope International 10:30AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEnvelopeInternational1200\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Envelope International 12:00\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEnvelopeInternational9AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Envelope International 9AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressPackInternational1030AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Pack International 10:30AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressPackInternational1200\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Pack International 12:00\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressPackInternational9AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Pack International 9AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressPack\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Pack\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressPack1030AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Pack 10:30AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressPack9AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Pack 9AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressPackEvening\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Pack Evening\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressPackInternational\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Pack International\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressPackUS\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Pack US\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressUS\",\n \"description\": null,\n \"human_readable\": \"Purolator Express US\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressUS1030AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express US 10:30AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressUS1200\",\n \"description\": null,\n \"human_readable\": \"Purolator Express US 12:00\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressUS9AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express US 9AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressBoxUS1030AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Box US 10:30AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressBoxUS1200\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Box US 12:00\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressBoxUS9AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Box US 9AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEnvelopeUS1030AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Envelope US 10:30AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEnvelopeUS1200\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Envelope US 12:00\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressEnvelopeUS9AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Envelope US 9AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressPackUS1030AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Pack US 10:30AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressPackUS1200\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Pack US 12:00\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorExpressPackUS9AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Express Pack US 9AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorGround\",\n \"description\": null,\n \"human_readable\": \"Purolator Ground\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorGround1030AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Ground 10:30AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorGround9AM\",\n \"description\": null,\n \"human_readable\": \"Purolator Ground 9AM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorGround12PM\",\n \"description\": null,\n \"human_readable\": \"Purolator Ground 12PM\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorGroundDistribution\",\n \"description\": null,\n \"human_readable\": \"Purolator Ground Distribution\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorGroundEvening\",\n \"description\": null,\n \"human_readable\": \"Purolator Ground Evening\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorGroundUS\",\n \"description\": null,\n \"human_readable\": \"Purolator Ground US\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorQuickShip\",\n \"description\": null,\n \"human_readable\": \"Purolator Quick Ship\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorQuickShipEnvelope\",\n \"description\": null,\n \"human_readable\": \"Purolator Quick Ship Envelope\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorQuickShipPack\",\n \"description\": null,\n \"human_readable\": \"Purolator Quick Ship Pack\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"PurolatorQuickShipBox\",\n \"description\": null,\n \"human_readable\": \"Purolator Quick Ship Box\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"CUSTOMERPACKAGING\",\n \"description\": null,\n \"human_readable\": \"CustomerPackaging\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"EXPRESSPACK\",\n \"description\": null,\n \"human_readable\": \"ExpressPack\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"EXPRESSBOX\",\n \"description\": null,\n \"human_readable\": \"ExpressBox\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"purolator\",\n \"max_weight\": null,\n \"name\": \"EXPRESSENVELOPE\",\n \"description\": null,\n \"human_readable\": \"ExpressEnvelope\",\n \"dimensions\": []\n }\n ],\n \"supported_features\": [\n {\n \"carrier\": \"purolator\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"purolator\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"purolator\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"purolator\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"purolator\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"purolator\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"purolator\",\n \"name\": \"refunds\",\n \"description\": \"Purolator bills at the end of the day for all labels created that day. You cannot refund a label after the end of the day it was created.\",\n \"supported\": true\n },\n {\n \"carrier\": \"purolator\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"purolator\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"purolator\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"purolator\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": true\n }\n ],\n \"name\": \"purolator\",\n \"human_readable\": \"Purolator\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"quick\",\n \"max_weight\": null,\n \"name\": \"Routed\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"quick\",\n \"human_readable\": \"Quick\"\n },\n {\n \"shipment_options\": [\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": false,\n \"name\": \"carrier_insurance_amount\",\n \"description\": null,\n \"human_readable\": \"Carrier Insurance Amount\",\n \"type\": \"float\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": false,\n \"name\": \"carrier_notification_email\",\n \"description\": null,\n \"human_readable\": \"Carrier Notification Email\",\n \"type\": \"boolean\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": false,\n \"name\": \"carrier_notification_sms\",\n \"description\": null,\n \"human_readable\": \"Carrier Notification Sms\",\n \"type\": \"boolean\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": true,\n \"name\": \"date_advance\",\n \"description\": null,\n \"human_readable\": \"Date Advance\",\n \"type\": \"integer\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": true,\n \"name\": \"delivered_duty_paid\",\n \"description\": null,\n \"human_readable\": \"Delivered Duty Paid\",\n \"type\": \"boolean\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": false,\n \"name\": \"delivery_confirmation\",\n \"description\": null,\n \"human_readable\": \"Delivery Confirmation\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": false,\n \"name\": \"handling_instructions\",\n \"description\": null,\n \"human_readable\": \"Handling Instructions\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": false,\n \"name\": \"import_federal_tax_id\",\n \"description\": null,\n \"human_readable\": \"Import Federal Tax Id\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": false,\n \"name\": \"incoterm\",\n \"description\": null,\n \"human_readable\": \"Incoterm\",\n \"type\": \"enum\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": false,\n \"name\": \"invoice_number\",\n \"description\": null,\n \"human_readable\": \"Invoice Number\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": false,\n \"name\": \"label_date\",\n \"description\": null,\n \"human_readable\": \"Label Date\",\n \"type\": \"datetime\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": false,\n \"name\": \"label_format\",\n \"description\": null,\n \"human_readable\": \"Label Format\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": false,\n \"name\": \"license_number\",\n \"description\": null,\n \"human_readable\": \"License Number\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": true,\n \"name\": \"print_custom_1\",\n \"description\": null,\n \"human_readable\": \"Print Custom 1\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": true,\n \"name\": \"print_custom_2\",\n \"description\": null,\n \"human_readable\": \"Print Custom 2\",\n \"type\": \"string\"\n },\n {\n \"carrier\": \"royalmail\",\n \"deprecated\": false,\n \"name\": \"saturday_delivery\",\n \"description\": null,\n \"human_readable\": \"Saturday Delivery\",\n \"type\": \"boolean\"\n }\n ],\n \"service_levels\": [\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"InternationalPriority\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"InternationalEconomy\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"InternationalStandard\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"InternationalTrackedAndSigned\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"InternationalTracked\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"InternationalSigned\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"AccountMail\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"RoyalMailUnsigned\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"RoyalMail\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"SpecialDeliveryGuaranteed\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"SpecialDeliveryGuaranteed1pm\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"SpecialDeliveryGuaranteed9am\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"StandardLetter\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"Tracked24\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"Tracked24HighVolume\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"Tracked24HighVolumeSignature\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"Tracked24LBT\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"Tracked24SignatureLBT\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"Tracked48LBT\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"Tracked48SignatureLBT\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"Tracked24Signature\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"Tracked48\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"Tracked48HighVolume\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"Tracked48HighVolumeSignature\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"Tracked48Signature\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"TrackedReturns24\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"TrackedReturns48\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"CrossBorderImportTracked48HighVolume\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"LARGELETTER\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"SMALLPARCEL\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"MEDIUMPARCEL\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"LETTER\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"royalmail\",\n \"max_weight\": null,\n \"name\": \"PRINTEDPAPER\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"supported_features\": [\n {\n \"carrier\": \"royalmail\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"bill_on_label_purchase\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"bill_on_manifest\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"bill_on_scan\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"delivers_to_po_box\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"royalmail\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": true\n }\n ],\n \"name\": \"royalmail\",\n \"human_readable\": \"Royal Mail\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Ecommerce Standard Tracked\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Ecommerce Express Tracked\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Domestic Express\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Domestic Standard\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Bag\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Box\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Carton\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Container\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Crate\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Envelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Pail\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Pallet\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Satchel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sekoomniparcel\",\n \"max_weight\": null,\n \"name\": \"Tub\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"supported_features\": [],\n \"name\": \"sekoomniparcel\",\n \"human_readable\": \"SEKO OmniParcel\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"sendle\",\n \"max_weight\": null,\n \"name\": \"Standard\",\n \"description\": null,\n \"human_readable\": \"Standard\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"sendle\",\n \"max_weight\": null,\n \"name\": \"Express\",\n \"description\": null,\n \"human_readable\": \"Express\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"sendle\",\n \"max_weight\": null,\n \"name\": \"Saver\",\n \"description\": null,\n \"human_readable\": \"Saver\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"sendle\",\n \"max_weight\": null,\n \"name\": \"Two-Day\",\n \"description\": null,\n \"human_readable\": \"Two-Day\",\n \"dimensions\": []\n },\n {\n \"carrier\": \"sendle\",\n \"max_weight\": null,\n \"name\": \"Three-Day\",\n \"description\": null,\n \"human_readable\": \"Three-Day\",\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"sendle\",\n \"human_readable\": \"Sendle\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"sfexpress\",\n \"max_weight\": null,\n \"name\": \"InternationalStandardExpressDoc\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sfexpress\",\n \"max_weight\": null,\n \"name\": \"InternationalStandardExpressParcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sfexpress\",\n \"max_weight\": null,\n \"name\": \"InternationalEconomyExpressPilot\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sfexpress\",\n \"max_weight\": null,\n \"name\": \"InternationalEconomyExpressDoc\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sfexpress\",\n \"max_weight\": null,\n \"name\": \"InternationalEconomyExpressParcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sfexpress\",\n \"max_weight\": null,\n \"name\": \"DomesticExpress\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sfexpress\",\n \"max_weight\": null,\n \"name\": \"DomesticStandard\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sfexpress\",\n \"max_weight\": null,\n \"name\": \"DomesticIntraCity\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sfexpress\",\n \"max_weight\": null,\n \"name\": \"StandardExpress\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"sfexpress\",\n \"max_weight\": null,\n \"name\": \"EconomyExpress\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"sfexpress\",\n \"human_readable\": \"SF Express\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"smartkargo\",\n \"max_weight\": null,\n \"name\": \"EPR\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"smartkargo\",\n \"max_weight\": null,\n \"name\": \"EPS\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"smartkargo\",\n \"max_weight\": null,\n \"name\": \"EST\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"smartkargo\",\n \"max_weight\": null,\n \"name\": \"EXP\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"smartkargo\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"smartkargo\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"smartkargo\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"smartkargo\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": null\n }\n ],\n \"name\": \"smartkargo\",\n \"human_readable\": \"SmartKargo\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"sonic\",\n \"max_weight\": null,\n \"name\": \"SAMEDAY\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"sonic\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"sonic\",\n \"name\": \"bill_on_label_purchase\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"sonic\",\n \"name\": \"bill_on_manifest\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"sonic\",\n \"name\": \"bill_on_scan\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"sonic\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"sonic\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"sonic\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"sonic\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"sonic\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"sonic\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"sonic\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"sonic\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"sonic\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"sonic\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": false\n }\n ],\n \"name\": \"sonic\",\n \"human_readable\": \"Sonic\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"speedee\",\n \"max_weight\": null,\n \"name\": \"SpeeDeeDelivery\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"speedee\",\n \"human_readable\": \"Spee-Dee\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"speedx\",\n \"max_weight\": null,\n \"name\": \"DGD\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"speedx\",\n \"max_weight\": null,\n \"name\": \"D2A\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"speedx\",\n \"max_weight\": null,\n \"name\": \"DZS\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"speedx\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"speedx\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"speedx\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": null\n }\n ],\n \"name\": \"speedx\",\n \"human_readable\": \"SpeedX\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"swyft\",\n \"max_weight\": null,\n \"name\": \"NEXTDAY\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"swyft\",\n \"max_weight\": null,\n \"name\": \"SAMEDAY\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"swyft\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"swyft\",\n \"name\": \"bill_on_label_purchase\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"swyft\",\n \"name\": \"bill_on_manifest\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"swyft\",\n \"name\": \"bill_on_scan\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"swyft\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"swyft\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"swyft\",\n \"name\": \"orders\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"swyft\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"swyft\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"swyft\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"swyft\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"swyft\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"swyft\",\n \"name\": \"sort_codes\",\n \"description\": null,\n \"supported\": false\n },\n {\n \"carrier\": \"swyft\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": false\n }\n ],\n \"name\": \"swyft\",\n \"human_readable\": \"Swyft\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"tcc\",\n \"max_weight\": null,\n \"name\": \"Smith Drug Same Day\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"tcc\",\n \"human_readable\": \"TCC\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"tforce\",\n \"max_weight\": null,\n \"name\": \"NextDay\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"tforce\",\n \"max_weight\": null,\n \"name\": \"Return\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"tforce\",\n \"human_readable\": \"TForce Logistics\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"toll\",\n \"max_weight\": null,\n \"name\": \"IPEC Direct\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"toll\",\n \"max_weight\": null,\n \"name\": \"IPEC Fashion\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"toll\",\n \"max_weight\": null,\n \"name\": \"IPEC Local\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"toll\",\n \"max_weight\": null,\n \"name\": \"IPEC Priority\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"toll\",\n \"max_weight\": null,\n \"name\": \"IPEC Road Express\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"toll\",\n \"max_weight\": null,\n \"name\": \"IPEC Sensitive\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"toll\",\n \"max_weight\": null,\n \"name\": \"IPEC VicEXP\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"toll\",\n \"human_readable\": \"Toll\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"uds\",\n \"max_weight\": null,\n \"name\": \"DeliveryService\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"uds\",\n \"human_readable\": \"UDS\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"Ground\",\n \"description\": \"1-5 Business Days\",\n \"human_readable\": \"UPS Ground\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"UPSStandard\",\n \"description\": \"1-5 Business Days\",\n \"human_readable\": \"UPS Standard\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"UPSSaver\",\n \"description\": \"Next Day to 4 Business Days\",\n \"human_readable\": \"UPS Worldwide Saver\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"Express\",\n \"description\": \"Next Day to 3 Business Days\",\n \"human_readable\": \"UPS Worldwide Express\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"ExpressPlus\",\n \"description\": \"Next Day to 2 Business Days\",\n \"human_readable\": \"UPS Worldwide Express Plus\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"Expedited\",\n \"description\": \"3 to 5 Business Days\",\n \"human_readable\": \"UPS Worldwide Expedited\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"NextDayAir\",\n \"description\": \"Next Business Day by 10:30am\",\n \"human_readable\": \"UPS Next Day Air\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"NextDayAirSaver\",\n \"description\": \"Next Business Day by 3:00pm\",\n \"human_readable\": \"UPS Next Day Air Saver\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"NextDayAirEarlyAM\",\n \"description\": \"Next Business Days by 8:00am\",\n \"human_readable\": \"UPS Next Day Air A.M.\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"2ndDayAir\",\n \"description\": \"2 Business Days by end of day\",\n \"human_readable\": \"UPS 2nd Day Air\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"2ndDayAirAM\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": null\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"3DaySelect\",\n \"description\": \"3 Business Days by end of day\",\n \"human_readable\": \"UPS 3-Day Select\",\n \"dimensions\": null\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"ups\",\n \"max_weight\": 16.0,\n \"name\": \"UPSLetter\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"12.5in - 15in x 9.5in\"\n ]\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": 480.0,\n \"name\": \"UPSExpressBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"12.5in x 3.75in x 18in\"\n ]\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": 880.0,\n \"name\": \"UPS25kgBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"19.75in x 17.75in x 13.25in\"\n ]\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": 352.0,\n \"name\": \"UPS10kgBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"16.5in x 13.25in x 10.75in\"\n ]\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"Tube\",\n \"description\": \"Triangular tube for rolled papers\",\n \"human_readable\": null,\n \"dimensions\": [\n \"38in x 6in x 6in\"\n ]\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": null,\n \"name\": \"Pak\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"16in x 12.75in\"\n ]\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": 480.0,\n \"name\": \"SmallExpressBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"13in x 11in x 2in\"\n ]\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": 480.0,\n \"name\": \"MediumExpressBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"16in x 11in x 3in\"\n ]\n },\n {\n \"carrier\": \"ups\",\n \"max_weight\": 480.0,\n \"name\": \"LargeExpressBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"18in x 13in x 3in\"\n ]\n }\n ],\n \"supported_features\": [],\n \"name\": \"ups\",\n \"human_readable\": \"UPS\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"upsiparcel\",\n \"human_readable\": \"UPS iParcel\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"upsmailinnovations\",\n \"max_weight\": null,\n \"name\": \"BPMFlats\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"upsmailinnovations\",\n \"max_weight\": null,\n \"name\": \"BPMParcels\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"upsmailinnovations\",\n \"max_weight\": null,\n \"name\": \"EconomyMailInnovations\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"upsmailinnovations\",\n \"max_weight\": null,\n \"name\": \"ExpeditedMailInnovations\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"upsmailinnovations\",\n \"max_weight\": null,\n \"name\": \"First\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"upsmailinnovations\",\n \"max_weight\": null,\n \"name\": \"MarketingParcels\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"upsmailinnovations\",\n \"max_weight\": null,\n \"name\": \"MediaMail\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"upsmailinnovations\",\n \"max_weight\": null,\n \"name\": \"ParcelSelect\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"upsmailinnovations\",\n \"max_weight\": null,\n \"name\": \"ParcelSelectLightweight-Irreg\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"upsmailinnovations\",\n \"max_weight\": null,\n \"name\": \"Priority\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"upsmailinnovations\",\n \"max_weight\": null,\n \"name\": \"PriorityMailInnovations\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"upsmailinnovations\",\n \"max_weight\": null,\n \"name\": \"SingleReturns\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"upsmailinnovations\",\n \"max_weight\": null,\n \"name\": \"StandardFlats\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"upsmailinnovations\",\n \"human_readable\": \"UPS Mail Innovations\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"usps\",\n \"max_weight\": 13.0,\n \"name\": \"First\",\n \"description\": \"1-5 business days\",\n \"human_readable\": \"First-Class Mail®\",\n \"dimensions\": [\n \"Cards, Letters and Flats only (no Parcels)\",\n \"See Predefined Packages (Card, Letter, Flat) for details\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 1120.0,\n \"name\": \"Priority\",\n \"description\": \"1-3 business days\",\n \"human_readable\": \"Priority Mail®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 108in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 1120.0,\n \"name\": \"Express\",\n \"description\": \"1-2 days\",\n \"human_readable\": \"Priority Mail Express®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 108in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 70.0,\n \"name\": \"GroundAdvantage\",\n \"description\": \"2-5 days\",\n \"human_readable\": \"USPS Ground Advantage®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 130in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 1120.0,\n \"name\": \"LibraryMail\",\n \"description\": \"2-8 business days\",\n \"human_readable\": \"Library Mail®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 108in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 1120.0,\n \"name\": \"MediaMail\",\n \"description\": \"2-8 business days\",\n \"human_readable\": \"Media Mail®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 108in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 15.994,\n \"name\": \"FirstClassMailInternational\",\n \"description\": null,\n \"human_readable\": \"First-Class Mail International®\",\n \"dimensions\": [\n \"Must be rectangular, otherwise an additional charge may apply.\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 64.0,\n \"name\": \"FirstClassPackageInternationalService\",\n \"description\": \"7-21 days\",\n \"human_readable\": \"First-Class Package International Service®\",\n \"dimensions\": [\n \"Packages (Other Than Rolls): Combined Length and Girth \\u003c 108in\",\n \"Rolls (Tubes): Length: min 4in; max 36 in. Length plus twice the diameter (combined): min 6.75 in; max 42in.\",\n \"Some countries have specific prohibitions and restrictions\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 1120.0,\n \"name\": \"PriorityMailInternational\",\n \"description\": \"6-10 business days\",\n \"human_readable\": \"Priority Mail International®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 108in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 1120.0,\n \"name\": \"ExpressMailInternational\",\n \"description\": \"3-5 business days\",\n \"human_readable\": \"Priority Mail Express International®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 108in\"\n ]\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"Card\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"6in x 4.5in x 0.016in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"Letter\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"11.5in x 6.125in x 0.25in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"Flat\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"11.5in x 6.125in x 0.75in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FlatRateEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"12.5in x 9.5in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FlatRateLegalEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"15in x 9.5in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FlatRatePaddedEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"12.5in x 9.5in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FlatRateWindowEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"10in x 5in\",\n \"12.5in x 9.5in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FlatRateCardboardEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"12.5in x 9.5in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"SmallFlatRateEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"10in x 6in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"Parcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"Varies based on service level\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 320.0,\n \"name\": \"SoftPack\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"Varies based on service level\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"SmallFlatRateBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"8.6875in x 5.4375in x 1.75in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"MediumFlatRateBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"11.25in x 8.75in x 6in\",\n \"14.125in x 12in x 3.5in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"LargeFlatRateBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"12.25in x 12in x 6in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"LargeFlatRateBoxAPOFPO\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"12.25in x 12.25in x 6in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FlatTubTrayBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"EMMTrayBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FullTrayBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"HalfTrayBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"PMODSack\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"supported_features\": [\n {\n \"carrier\": \"usps\",\n \"name\": \"bill_on_delivery\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"usps\",\n \"name\": \"bill_on_label_purchase\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"usps\",\n \"name\": \"commercial_invoices\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"usps\",\n \"name\": \"delivers_to_po_box\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"usps\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"usps\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"usps\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"usps\",\n \"name\": \"refunds\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"usps\",\n \"name\": \"returns\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"usps\",\n \"name\": \"scanforms\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"usps\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": null\n }\n ],\n \"name\": \"usps\",\n \"human_readable\": \"USPS\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [\n {\n \"carrier\": \"veho\",\n \"max_weight\": 800.0,\n \"name\": \"nextDay\",\n \"description\": null,\n \"human_readable\": \"Next Day\",\n \"dimensions\": null\n },\n {\n \"carrier\": \"veho\",\n \"max_weight\": 800.0,\n \"name\": \"sameDay\",\n \"description\": null,\n \"human_readable\": \"Same Day\",\n \"dimensions\": null\n }\n ],\n \"predefined_packages\": [],\n \"supported_features\": [\n {\n \"carrier\": \"veho\",\n \"name\": \"labels\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"veho\",\n \"name\": \"pickups\",\n \"description\": null,\n \"supported\": null\n },\n {\n \"carrier\": \"veho\",\n \"name\": \"rating\",\n \"description\": null,\n \"supported\": true\n },\n {\n \"carrier\": \"veho\",\n \"name\": \"test_environment\",\n \"description\": null,\n \"supported\": null\n }\n ],\n \"name\": \"veho\",\n \"human_readable\": \"Veho\"\n },\n {\n \"shipment_options\": [],\n \"service_levels\": [],\n \"predefined_packages\": [],\n \"supported_features\": [],\n \"name\": \"yanwen\",\n \"human_readable\": \"Yanwen\"\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "165173" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43b66bf76d6e786bc390035a822" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.093402" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/metadata/carriers" + }, + "duration": 300 + } +] \ No newline at end of file diff --git a/src/test/cassettes/carrier_metadata/retrieve_carrier_metadata_with_filter.json b/src/test/cassettes/carrier_metadata/retrieve_carrier_metadata_with_filter.json new file mode 100644 index 000000000..2c1e6b5ac --- /dev/null +++ b/src/test/cassettes/carrier_metadata/retrieve_carrier_metadata_with_filter.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1723823830, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/metadata/carriers?types\u003dservice_levels%2Cpredefined_packages\u0026carriers\u003dusps?%74%79%70%65%73\u003d%73%65%72%76%69%63%65%5F%6C%65%76%65%6C%73%2C%70%72%65%64%65%66%69%6E%65%64%5F%70%61%63%6B%61%67%65%73\u0026%63%61%72%72%69%65%72%73\u003d%75%73%70%73" + }, + "response": { + "body": "{\n \"carriers\": [\n {\n \"service_levels\": [\n {\n \"carrier\": \"usps\",\n \"max_weight\": 13.0,\n \"name\": \"First\",\n \"description\": \"1-5 business days\",\n \"human_readable\": \"First-Class Mail®\",\n \"dimensions\": [\n \"Cards, Letters and Flats only (no Parcels)\",\n \"See Predefined Packages (Card, Letter, Flat) for details\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 1120.0,\n \"name\": \"Priority\",\n \"description\": \"1-3 business days\",\n \"human_readable\": \"Priority Mail®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 108in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 1120.0,\n \"name\": \"Express\",\n \"description\": \"1-2 days\",\n \"human_readable\": \"Priority Mail Express®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 108in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 70.0,\n \"name\": \"GroundAdvantage\",\n \"description\": \"2-5 days\",\n \"human_readable\": \"USPS Ground Advantage®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 130in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 1120.0,\n \"name\": \"LibraryMail\",\n \"description\": \"2-8 business days\",\n \"human_readable\": \"Library Mail®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 108in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 1120.0,\n \"name\": \"MediaMail\",\n \"description\": \"2-8 business days\",\n \"human_readable\": \"Media Mail®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 108in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 15.994,\n \"name\": \"FirstClassMailInternational\",\n \"description\": null,\n \"human_readable\": \"First-Class Mail International®\",\n \"dimensions\": [\n \"Must be rectangular, otherwise an additional charge may apply.\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 64.0,\n \"name\": \"FirstClassPackageInternationalService\",\n \"description\": \"7-21 days\",\n \"human_readable\": \"First-Class Package International Service®\",\n \"dimensions\": [\n \"Packages (Other Than Rolls): Combined Length and Girth \\u003c 108in\",\n \"Rolls (Tubes): Length: min 4in; max 36 in. Length plus twice the diameter (combined): min 6.75 in; max 42in.\",\n \"Some countries have specific prohibitions and restrictions\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 1120.0,\n \"name\": \"PriorityMailInternational\",\n \"description\": \"6-10 business days\",\n \"human_readable\": \"Priority Mail International®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 108in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 1120.0,\n \"name\": \"ExpressMailInternational\",\n \"description\": \"3-5 business days\",\n \"human_readable\": \"Priority Mail Express International®\",\n \"dimensions\": [\n \"Combined Length and Girth \\u003c 108in\"\n ]\n }\n ],\n \"predefined_packages\": [\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"Card\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"6in x 4.5in x 0.016in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"Letter\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"11.5in x 6.125in x 0.25in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"Flat\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"11.5in x 6.125in x 0.75in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FlatRateEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"12.5in x 9.5in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FlatRateLegalEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"15in x 9.5in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FlatRatePaddedEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"12.5in x 9.5in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FlatRateWindowEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"10in x 5in\",\n \"12.5in x 9.5in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FlatRateCardboardEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"12.5in x 9.5in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"SmallFlatRateEnvelope\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"10in x 6in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"Parcel\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"Varies based on service level\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": 320.0,\n \"name\": \"SoftPack\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"Varies based on service level\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"SmallFlatRateBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"8.6875in x 5.4375in x 1.75in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"MediumFlatRateBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"11.25in x 8.75in x 6in\",\n \"14.125in x 12in x 3.5in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"LargeFlatRateBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"12.25in x 12in x 6in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"LargeFlatRateBoxAPOFPO\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": [\n \"12.25in x 12.25in x 6in\"\n ]\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FlatTubTrayBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"EMMTrayBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"FullTrayBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"HalfTrayBox\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n },\n {\n \"carrier\": \"usps\",\n \"max_weight\": null,\n \"name\": \"PMODSack\",\n \"description\": null,\n \"human_readable\": null,\n \"dimensions\": []\n }\n ],\n \"name\": \"usps\",\n \"human_readable\": \"USPS\"\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "5074" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44066bf76d6e786bc3a0035a8a9" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.037446" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/metadata/carriers?types\u003dservice_levels%2Cpredefined_packages\u0026carriers\u003dusps?%74%79%70%65%73\u003d%73%65%72%76%69%63%65%5F%6C%65%76%65%6C%73%2C%70%72%65%64%65%66%69%6E%65%64%5F%70%61%63%6B%61%67%65%73\u0026%63%61%72%72%69%65%72%73\u003d%75%73%70%73" + }, + "duration": 242 + } +] \ No newline at end of file diff --git a/src/test/cassettes/claim/all.json b/src/test/cassettes/claim/all.json new file mode 100644 index 000000000..e0359c012 --- /dev/null +++ b/src/test/cassettes/claim/all.json @@ -0,0 +1,88 @@ +[ + { + "recordedAt": 1726510947, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/claims?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"claims\": [\n {\n \"insurance_id\": \"ins_5183544879624aada94c467184a830de\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/03dce6ea67c44877962bbe9cfc11cc71.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/9853a78b25f947f686b5a05e5fdc0f7b.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/bb85c6100b2945f58781eae95bea524e.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-08-16T15:58:19Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"cancelled\",\n \"status_detail\": \"Claim cancellation was requested.\",\n \"timestamp\": \"2024-08-16T15:58:20Z\"\n },\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-08-16T15:58:19Z\"\n }\n ],\n \"shipment_id\": \"shp_1afc79ef71b2437e92cfd3c63b048ab9\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100105807076062921\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim cancellation was requested.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-08-16T15:58:20Z\",\n \"id\": \"clm_0981c3c08cbf426ba1b95a28cb767393\",\n \"status_timestamp\": \"2024-08-16T15:58:20Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"cancelled\"\n },\n {\n \"insurance_id\": \"ins_38b44c6fa6b64fefb05b3f8c8d964a62\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/6631f38e703343eb97fe0941e7ad7399.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/d734b9be0a0d4b4681a2206a1de68d63.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/9a1db2c4bdc84e5e9806acd054035c67.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-08-16T15:58:15Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-08-16T15:58:15Z\"\n }\n ],\n \"shipment_id\": \"shp_92744ae3e4364c35b4ed9035695dd218\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100105807076062891\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim was created.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-08-16T15:58:15Z\",\n \"id\": \"clm_098135c03daa47e9848c7a1606ddff5a\",\n \"status_timestamp\": \"2024-08-16T15:58:15Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"submitted\"\n },\n {\n \"insurance_id\": \"ins_0ab8a24d79114d0283f1d9a1283f6862\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/5ebae251e9e24f178e96e98556da9fe8.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/9bb5547542a346828d039e1de63cdd93.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/f661380b18964bbc90d0a61aac83c09a.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-08-16T15:58:11Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-08-16T15:58:11Z\"\n }\n ],\n \"shipment_id\": \"shp_54ad1de739464651a50980f4b4246eee\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100105807076062877\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim was created.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-08-16T15:58:11Z\",\n \"id\": \"clm_09818d60969248ec92513a3fbf7eaa8d\",\n \"status_timestamp\": \"2024-08-16T15:58:11Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"submitted\"\n },\n {\n \"insurance_id\": \"ins_0ac2c47236234589b9bd8f58484fdc59\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/64129940fc5348e299cc308130d440b2.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/ec02e95a82eb42a38b7a16ea1fe1bbe9.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/46b1022cce664a32bbede970bf735bda.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-07-23T21:16:56Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"cancelled\",\n \"status_detail\": \"Claim cancellation was requested.\",\n \"timestamp\": \"2024-07-23T21:16:58Z\"\n },\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-07-23T21:16:56Z\"\n }\n ],\n \"shipment_id\": \"shp_2ffabf823a754afdb236fdd933fc126c\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100110368066416763\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim cancellation was requested.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-07-23T21:16:57Z\",\n \"id\": \"clm_097e8fdd467f4d0e908e12bb955ce499\",\n \"status_timestamp\": \"2024-07-23T21:16:58Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"cancelled\"\n },\n {\n \"insurance_id\": \"ins_8601c937f7394ac09ec16dc9aec5b390\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/345024219d2f4d1286df783ef0d1433d.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/d8ba1d668d2a4a8a8fb0c0b598bdd066.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/f4c9fd26f1fb4cafbe515ed74138ef1a.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-07-23T21:16:50Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-07-23T21:16:50Z\"\n }\n ],\n \"shipment_id\": \"shp_6d9270111c6840dbb5ea5d7ca26c2807\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100110368066416756\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim was created.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-07-23T21:16:50Z\",\n \"id\": \"clm_097eca949076417890a081e39b758b97\",\n \"status_timestamp\": \"2024-07-23T21:16:50Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"submitted\"\n }\n ],\n \"has_more\": true\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "5854" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb36nuq" + ], + "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": [ + "4b98d1ef66e87763e798c8e300022b57" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb4nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.065320" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/claims?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 489 + } +] \ No newline at end of file diff --git a/src/test/cassettes/claim/cancel.json b/src/test/cassettes/claim/cancel.json new file mode 100644 index 000000000..f97956e62 --- /dev/null +++ b/src/test/cassettes/claim/cancel.json @@ -0,0 +1,358 @@ +[ + { + "recordedAt": 1726510968, + "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", + "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\": \"2024-09-16T18:22:47Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-09-16T18:22:48Z\",\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\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_aca0715c745811ef9bbfac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4362c67a6a884753893c3a34b1a3571c\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_aca0715c745811ef9bbfac1f6bc539ae\",\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\": \"2024-09-16T18:22:47Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-09-16T18:22:47Z\",\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\": \"2024-09-16T18:22:47Z\",\n \"currency\": null,\n \"id\": \"cstitem_5e0990c341b84bdbb5526c38356ca914\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-09-16T18:22:47Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_93477a2dc6e744bf87cf4e247f96c168\",\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\": \"2024-09-16T18:22:47Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-09-16T18:22:47Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c8a90c8e6d13436db016e7edebf39eb5\",\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\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ac9dcb25745811efa40cac1f6bc53342\",\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\": \"33.10\",\n \"created_at\": \"2024-09-16T18:22:48Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4362c67a6a884753893c3a34b1a3571c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:48Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9ffb4406aef442639a1b131bb07a3718\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-09-16T18:22:48Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4362c67a6a884753893c3a34b1a3571c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:48Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_732068b92bf24c4da43c2e4ac2254904\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-09-16T18:22:48Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4362c67a6a884753893c3a34b1a3571c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:48Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_337f7693446b4bcfa67bae0176f7ce29\",\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\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_ac9dcb25745811efa40cac1f6bc53342\",\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\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\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": [ + "6247" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb40nuq" + ], + "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": [ + "4b98d1f266e87777e798cc1b000243fb" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb3nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.981432" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_4362c67a6a884753893c3a34b1a3571c" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1426 + }, + { + "recordedAt": 1726510970, + "request": { + "body": "{\n \"insurance\": \"100\",\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 16, 2024, 2:22:48 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_4362c67a6a884753893c3a34b1a3571c\",\n \"currency\": \"USD\",\n \"id\": \"rate_337f7693446b4bcfa67bae0176f7ce29\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Sep 16, 2024, 2:22:48 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_4362c67a6a884753893c3a34b1a3571c/buy" + }, + "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.93000\",\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\": \"2024-09-16T18:22:47Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-09-16T18:22:50Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-09-16T18:22:50Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4362c67a6a884753893c3a34b1a3571c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:50Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_337f7693446b4bcfa67bae0176f7ce29\",\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\": \"2024-09-16T18:22:50Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_4362c67a6a884753893c3a34b1a3571c\",\n \"tracking_code\": \"9400100208271089110898\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzI5MGMwMGNhYmE4ZDQwOWZhNTQ4ZTJhOGQ3ZWVmZTEy\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-09-16T18:22:50Z\",\n \"signed_by\": null,\n \"id\": \"trk_290c00caba8d409fa548e2a8d7eefe12\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_aca0715c745811ef9bbfac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4362c67a6a884753893c3a34b1a3571c\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_aca0715c745811ef9bbfac1f6bc539ae\",\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\": \"2024-09-16T18:22:47Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-09-16T18:22:47Z\",\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\": \"2024-09-16T18:22:47Z\",\n \"currency\": null,\n \"id\": \"cstitem_5e0990c341b84bdbb5526c38356ca914\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-09-16T18:22:47Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_93477a2dc6e744bf87cf4e247f96c168\",\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\": \"2024-09-16T18:22:50Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240916/e85cc734aa9eb742498fd382d377405e5d.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-09-16T18:22:50Z\",\n \"id\": \"pl_43b4f38074144eaebd06bd9ac435a012\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-09-16T18:22:50Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-09-16T18:22:47Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-09-16T18:22:47Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c8a90c8e6d13436db016e7edebf39eb5\",\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\": \"2024-09-16T18:22:47+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\": \"2024-09-16T18:22:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_ac9dcb25745811efa40cac1f6bc53342\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-09-16T18:22:48Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4362c67a6a884753893c3a34b1a3571c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:48Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9ffb4406aef442639a1b131bb07a3718\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-09-16T18:22:48Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4362c67a6a884753893c3a34b1a3571c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:48Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_732068b92bf24c4da43c2e4ac2254904\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-09-16T18:22:48Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4362c67a6a884753893c3a34b1a3571c\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:48Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_337f7693446b4bcfa67bae0176f7ce29\",\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\": \"2024-09-16T18:22:47+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\": \"2024-09-16T18:22:49+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_ac9dcb25745811efa40cac1f6bc53342\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100208271089110898\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"No rate response received.\"\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": [ + "8466" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb39nuq" + ], + "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": [ + "4b98d1ed66e87779e798cc1e00024644" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb3nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.263074" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_4362c67a6a884753893c3a34b1a3571c/buy" + }, + "duration": 1723 + }, + { + "recordedAt": 1726510972, + "request": { + "body": "{\n \"email_evidence_attachments\": [\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg\\u003d\\u003d\"\n ],\n \"amount\": \"100\",\n \"supporting_documentation_attachments\": [\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg\\u003d\\u003d\"\n ],\n \"description\": \"Test description\",\n \"type\": \"damage\",\n \"invoice_attachments\": [\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg\\u003d\\u003d\"\n ],\n \"tracking_code\": \"9400100208271089110898\",\n \"contact_email\": \"test@example.com\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/claims" + }, + "response": { + "body": "{\n \"insurance_id\": \"ins_a1a6610d55984e19a6d1efeece4d6a30\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/571e6da210b645b7a743bfc73db005f1.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/68108223c4e140b3a4843ab08e4a5d33.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/a1ef3e6b3cd846e393adab40a653ab1b.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-09-16T18:22:51Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-09-16T18:22:51Z\"\n }\n ],\n \"shipment_id\": \"shp_4362c67a6a884753893c3a34b1a3571c\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100208271089110898\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim was created.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-09-16T18:22:51Z\",\n \"id\": \"clm_0986c11711a24b8bb52f9a25960db8d9\",\n \"status_timestamp\": \"2024-09-16T18:22:51Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"submitted\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "1115" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb38nuq" + ], + "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": [ + "4b98d1f266e8777be798cc20000248ec" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb3nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.847564" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/claims" + }, + "duration": 1299 + }, + { + "recordedAt": 1726510973, + "request": { + "body": "", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/claims/clm_0986c11711a24b8bb52f9a25960db8d9/cancel" + }, + "response": { + "body": "{\n \"insurance_id\": \"ins_a1a6610d55984e19a6d1efeece4d6a30\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/571e6da210b645b7a743bfc73db005f1.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/68108223c4e140b3a4843ab08e4a5d33.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/a1ef3e6b3cd846e393adab40a653ab1b.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-09-16T18:22:51Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"cancelled\",\n \"status_detail\": \"Claim cancellation was requested.\",\n \"timestamp\": \"2024-09-16T18:22:53Z\"\n },\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-09-16T18:22:51Z\"\n }\n ],\n \"shipment_id\": \"shp_4362c67a6a884753893c3a34b1a3571c\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100208271089110898\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim cancellation was requested.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-09-16T18:22:53Z\",\n \"id\": \"clm_0986c11711a24b8bb52f9a25960db8d9\",\n \"status_timestamp\": \"2024-09-16T18:22:53Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"cancelled\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1240" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb35nuq" + ], + "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": [ + "4b98d1ed66e8777de798cc3800024aa7" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb3nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.050620" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/claims/clm_0986c11711a24b8bb52f9a25960db8d9/cancel" + }, + "duration": 512 + } +] \ No newline at end of file diff --git a/src/test/cassettes/claim/create.json b/src/test/cassettes/claim/create.json new file mode 100644 index 000000000..59fda5df1 --- /dev/null +++ b/src/test/cassettes/claim/create.json @@ -0,0 +1,275 @@ +[ + { + "recordedAt": 1726510961, + "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", + "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\": \"2024-09-16T18:22:38Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-09-16T18:22:38Z\",\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\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_a781c2e3745811efae57ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_a781c2e3745811efae57ac1f6bc539aa\",\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\": \"2024-09-16T18:22:38Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-09-16T18:22:38Z\",\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\": \"2024-09-16T18:22:38Z\",\n \"currency\": null,\n \"id\": \"cstitem_97ae19bb01844320b539713eae148017\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-09-16T18:22:38Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_2e915d5196c64b0193a7cc82994d07f7\",\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\": \"2024-09-16T18:22:38Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-09-16T18:22:38Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c5256218be5846fa9b8e30e65d6e899b\",\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\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_a77e9139745811efae453cecef1b359e\",\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\": \"6.40\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8f1eae2d923840688305e487209e8e14\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c239e7db23f1419aae604b2fb8389b7d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a5327da85bdd4c9b9f2cbd8bbaf5a06d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_953be39de1b44a259280c39b67bd773c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cbc9225c6b5c43d9bf0fc925fa771945\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ddcd57bb5054402eb9fdc1aeac6189b2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d86dbbaf52494affa26350d15271b5ae\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7272200141594c2589bd437c6ef06453\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_11dab8fcd65e4af799fd641beeb05d4c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f7c80cc09f354825bce3fa5ee6d6a00c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fa51800224e34b3dbeceb0ea1a449fd7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0ee02782ead74edba10bf58ab4e56c4d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5ad6d30f785d4abe8fe9fe2b7360ffdb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_03a0a6e3b84648c2a86ca3f3fdac632f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_55734e265dd64c19b03f31fe90cb55f9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4922adc304974275b9016bdfbaecff13\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1d89763287854073ad8d3c929a358e8e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9c4944309223491da360786c10cae78e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_87dd8e8fc67f45ba963ac5ff89892afb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_725e3f9561d54f648f0124105b467ab1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_979e5bdf61de48cda38339815c7a3f13\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0a4766cbfd96455d80cec64e49d9993a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1f2a64dae04e4b61955fc6adb1b9977e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a588dea2f98f4bd1aec28425295ce7ed\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3ca2731e151e4b11b11e7baa4fad8a2e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6cd1b6af0e8442f5a05ad70107e99eeb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9691732b0f224e3ab228ebd19d9c0bc1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b79182d0716246e5bd49c9be579021b3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e29fdbb467814694817971f4198e1ae8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6ec43b345d484c02967d445327f263c1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_373097da9274451db42eb1bd67add795\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d7a9b16e6c084190b176dee89890d131\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f73e2dbd1c7e4a2d856530c7af5d1707\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b77a33072dd2449f91a1a02007c60053\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1bc7d89ce1404a6f8dab931ecdba853b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5b4e45639fdb42d7be8faae90676b91c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2d47bfb984cd44b29192264aa394ba5b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3b5ffa24908740bd89ace0e0e6f16a0a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1e87aff7d253403d899a712b3a592d74\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_77a6cde04fbc47549e5e39f7c88fb911\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_447a4468dfca4b0781b559240535e570\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ce5a5fa18f08488d837d286fe07908c7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_55b5206e7b1d468292c6a7ca7881511d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d95ba6b441d64348a097f7d9ac8aa83c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0772e6563f714833bd39a48e039986d7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d8abfd4b0bf3418ca51c228b16bbf285\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cf7f4c24339b4626b93266a96eb77d92\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c044432b28ac4ff5af7e35a6f9355340\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3984d4ea5f6d464b85130a4fdcee5f8f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_583cfb16dc954e499a037c7feb5c8be8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c504a98aca1a40b09b43aa263584ed6b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_82d9667bd2aa486e97847649c4c51a2f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3e6d1629eb4248e59b1c3721e41f1a2a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8f51c22bf9a64b389b3d770f7d74fbc8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_85ed36d78e0c40d89be1c60c83e975a1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_746afcfb648b4c7a9d1f68845560541a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_183d6cd0607549e8a598c31a94c27f5f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_211e691d0189429c8a51533b6b66d90e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c31bc618857e44499d15403fe98f5806\",\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\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_a77e9139745811efae453cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\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": [ + "36416" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb40nuq" + ], + "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": [ + "4b98d1f266e8776ee798c905000239da" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb3nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "2.564859" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_bf1d7c0982ec48eaa4aff50542970ed6" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 3098 + }, + { + "recordedAt": 1726510964, + "request": { + "body": "{\n \"insurance\": \"100\",\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 16, 2024, 2:22:40 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"currency\": \"USD\",\n \"id\": \"rate_8f1eae2d923840688305e487209e8e14\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Sep 16, 2024, 2:22:40 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_bf1d7c0982ec48eaa4aff50542970ed6/buy" + }, + "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.93000\",\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\": \"2024-09-16T18:22:38Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-09-16T18:22:43Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-09-16T18:22:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:43Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8f1eae2d923840688305e487209e8e14\",\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\": \"2024-09-16T18:22:43Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"tracking_code\": \"9400100208271089110867\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzk4MTk1MTk3Y2FhOTQzMmJiOGVjMGNmNzA2MTE3NTQ2\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-09-16T18:22:43Z\",\n \"signed_by\": null,\n \"id\": \"trk_98195197caa9432bb8ec0cf706117546\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_a781c2e3745811efae57ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:38+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_a781c2e3745811efae57ac1f6bc539aa\",\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\": \"2024-09-16T18:22:38Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-09-16T18:22:38Z\",\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\": \"2024-09-16T18:22:38Z\",\n \"currency\": null,\n \"id\": \"cstitem_97ae19bb01844320b539713eae148017\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-09-16T18:22:38Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_2e915d5196c64b0193a7cc82994d07f7\",\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\": \"2024-09-16T18:22:43Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240916/e8728e85a3c82746dab4ae81f82d79951d.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-09-16T18:22:43Z\",\n \"id\": \"pl_5b7995b0828742e8a8dabedf0ea91bc8\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-09-16T18:22:43Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-09-16T18:22:38Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-09-16T18:22:38Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_c5256218be5846fa9b8e30e65d6e899b\",\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\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_a77e9139745811efae453cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8f1eae2d923840688305e487209e8e14\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c239e7db23f1419aae604b2fb8389b7d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a5327da85bdd4c9b9f2cbd8bbaf5a06d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_953be39de1b44a259280c39b67bd773c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cbc9225c6b5c43d9bf0fc925fa771945\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ddcd57bb5054402eb9fdc1aeac6189b2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d86dbbaf52494affa26350d15271b5ae\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7272200141594c2589bd437c6ef06453\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_11dab8fcd65e4af799fd641beeb05d4c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f7c80cc09f354825bce3fa5ee6d6a00c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fa51800224e34b3dbeceb0ea1a449fd7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0ee02782ead74edba10bf58ab4e56c4d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5ad6d30f785d4abe8fe9fe2b7360ffdb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_03a0a6e3b84648c2a86ca3f3fdac632f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_55734e265dd64c19b03f31fe90cb55f9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4922adc304974275b9016bdfbaecff13\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1d89763287854073ad8d3c929a358e8e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9c4944309223491da360786c10cae78e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_87dd8e8fc67f45ba963ac5ff89892afb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_725e3f9561d54f648f0124105b467ab1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_979e5bdf61de48cda38339815c7a3f13\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0a4766cbfd96455d80cec64e49d9993a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1f2a64dae04e4b61955fc6adb1b9977e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a588dea2f98f4bd1aec28425295ce7ed\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3ca2731e151e4b11b11e7baa4fad8a2e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6cd1b6af0e8442f5a05ad70107e99eeb\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9691732b0f224e3ab228ebd19d9c0bc1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b79182d0716246e5bd49c9be579021b3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e29fdbb467814694817971f4198e1ae8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6ec43b345d484c02967d445327f263c1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_373097da9274451db42eb1bd67add795\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d7a9b16e6c084190b176dee89890d131\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f73e2dbd1c7e4a2d856530c7af5d1707\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b77a33072dd2449f91a1a02007c60053\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1bc7d89ce1404a6f8dab931ecdba853b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5b4e45639fdb42d7be8faae90676b91c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2d47bfb984cd44b29192264aa394ba5b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3b5ffa24908740bd89ace0e0e6f16a0a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:40Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1e87aff7d253403d899a712b3a592d74\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_77a6cde04fbc47549e5e39f7c88fb911\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_447a4468dfca4b0781b559240535e570\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ce5a5fa18f08488d837d286fe07908c7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_55b5206e7b1d468292c6a7ca7881511d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d95ba6b441d64348a097f7d9ac8aa83c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0772e6563f714833bd39a48e039986d7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d8abfd4b0bf3418ca51c228b16bbf285\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cf7f4c24339b4626b93266a96eb77d92\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c044432b28ac4ff5af7e35a6f9355340\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3984d4ea5f6d464b85130a4fdcee5f8f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_583cfb16dc954e499a037c7feb5c8be8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c504a98aca1a40b09b43aa263584ed6b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_82d9667bd2aa486e97847649c4c51a2f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3e6d1629eb4248e59b1c3721e41f1a2a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8f51c22bf9a64b389b3d770f7d74fbc8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_85ed36d78e0c40d89be1c60c83e975a1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_746afcfb648b4c7a9d1f68845560541a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_183d6cd0607549e8a598c31a94c27f5f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_211e691d0189429c8a51533b6b66d90e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:41Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:41Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c31bc618857e44499d15403fe98f5806\",\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\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_a77e9139745811efae453cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100208271089110867\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "38635" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb35nuq" + ], + "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": [ + "4b98d1ed66e87772e798c90800023e32" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb4nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.497738" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_bf1d7c0982ec48eaa4aff50542970ed6/buy" + }, + "duration": 1945 + }, + { + "recordedAt": 1726510966, + "request": { + "body": "{\n \"email_evidence_attachments\": [\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg\\u003d\\u003d\"\n ],\n \"amount\": \"100\",\n \"supporting_documentation_attachments\": [\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg\\u003d\\u003d\"\n ],\n \"description\": \"Test description\",\n \"type\": \"damage\",\n \"invoice_attachments\": [\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg\\u003d\\u003d\"\n ],\n \"tracking_code\": \"9400100208271089110867\",\n \"contact_email\": \"test@example.com\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/claims" + }, + "response": { + "body": "{\n \"insurance_id\": \"ins_336e9ed7d3f74ed2a28c64cd8ce26fd5\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/419cda2c6ea04661934d4e5c7b6e1e60.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/e046b74666734d5d9214eb422a64d424.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/aebc3729909141ca987b126142ed02e2.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-09-16T18:22:45Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-09-16T18:22:45Z\"\n }\n ],\n \"shipment_id\": \"shp_bf1d7c0982ec48eaa4aff50542970ed6\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100208271089110867\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim was created.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-09-16T18:22:45Z\",\n \"id\": \"clm_09860377b78840f786da644643a2e28d\",\n \"status_timestamp\": \"2024-09-16T18:22:45Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"submitted\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "1115" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb43nuq" + ], + "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": [ + "4b98d1eb66e87775e798cc1900024191" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb4nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.901117" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/claims" + }, + "duration": 1403 + } +] \ No newline at end of file diff --git a/src/test/cassettes/claim/get_next_page.json b/src/test/cassettes/claim/get_next_page.json new file mode 100644 index 000000000..eff2e50f8 --- /dev/null +++ b/src/test/cassettes/claim/get_next_page.json @@ -0,0 +1,177 @@ +[ + { + "recordedAt": 1726510946, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/claims?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"claims\": [\n {\n \"insurance_id\": \"ins_5183544879624aada94c467184a830de\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/03dce6ea67c44877962bbe9cfc11cc71.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/9853a78b25f947f686b5a05e5fdc0f7b.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/bb85c6100b2945f58781eae95bea524e.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-08-16T15:58:19Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"cancelled\",\n \"status_detail\": \"Claim cancellation was requested.\",\n \"timestamp\": \"2024-08-16T15:58:20Z\"\n },\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-08-16T15:58:19Z\"\n }\n ],\n \"shipment_id\": \"shp_1afc79ef71b2437e92cfd3c63b048ab9\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100105807076062921\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim cancellation was requested.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-08-16T15:58:20Z\",\n \"id\": \"clm_0981c3c08cbf426ba1b95a28cb767393\",\n \"status_timestamp\": \"2024-08-16T15:58:20Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"cancelled\"\n },\n {\n \"insurance_id\": \"ins_38b44c6fa6b64fefb05b3f8c8d964a62\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/6631f38e703343eb97fe0941e7ad7399.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/d734b9be0a0d4b4681a2206a1de68d63.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/9a1db2c4bdc84e5e9806acd054035c67.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-08-16T15:58:15Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-08-16T15:58:15Z\"\n }\n ],\n \"shipment_id\": \"shp_92744ae3e4364c35b4ed9035695dd218\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100105807076062891\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim was created.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-08-16T15:58:15Z\",\n \"id\": \"clm_098135c03daa47e9848c7a1606ddff5a\",\n \"status_timestamp\": \"2024-08-16T15:58:15Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"submitted\"\n },\n {\n \"insurance_id\": \"ins_0ab8a24d79114d0283f1d9a1283f6862\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/5ebae251e9e24f178e96e98556da9fe8.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/9bb5547542a346828d039e1de63cdd93.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240816/f661380b18964bbc90d0a61aac83c09a.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-08-16T15:58:11Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-08-16T15:58:11Z\"\n }\n ],\n \"shipment_id\": \"shp_54ad1de739464651a50980f4b4246eee\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100105807076062877\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim was created.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-08-16T15:58:11Z\",\n \"id\": \"clm_09818d60969248ec92513a3fbf7eaa8d\",\n \"status_timestamp\": \"2024-08-16T15:58:11Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"submitted\"\n },\n {\n \"insurance_id\": \"ins_0ac2c47236234589b9bd8f58484fdc59\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/64129940fc5348e299cc308130d440b2.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/ec02e95a82eb42a38b7a16ea1fe1bbe9.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/46b1022cce664a32bbede970bf735bda.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-07-23T21:16:56Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"cancelled\",\n \"status_detail\": \"Claim cancellation was requested.\",\n \"timestamp\": \"2024-07-23T21:16:58Z\"\n },\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-07-23T21:16:56Z\"\n }\n ],\n \"shipment_id\": \"shp_2ffabf823a754afdb236fdd933fc126c\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100110368066416763\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim cancellation was requested.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-07-23T21:16:57Z\",\n \"id\": \"clm_097e8fdd467f4d0e908e12bb955ce499\",\n \"status_timestamp\": \"2024-07-23T21:16:58Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"cancelled\"\n },\n {\n \"insurance_id\": \"ins_8601c937f7394ac09ec16dc9aec5b390\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/345024219d2f4d1286df783ef0d1433d.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/d8ba1d668d2a4a8a8fb0c0b598bdd066.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/f4c9fd26f1fb4cafbe515ed74138ef1a.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-07-23T21:16:50Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-07-23T21:16:50Z\"\n }\n ],\n \"shipment_id\": \"shp_6d9270111c6840dbb5ea5d7ca26c2807\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100110368066416756\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim was created.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-07-23T21:16:50Z\",\n \"id\": \"clm_097eca949076417890a081e39b758b97\",\n \"status_timestamp\": \"2024-07-23T21:16:50Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"submitted\"\n }\n ],\n \"has_more\": true\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "5854" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "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": [ + "4b98d1f266e87761e798c8e1000229b2" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb3nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.056874" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/claims?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 942 + }, + { + "recordedAt": 1726510946, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/claims?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%63%6C%6D%5F%30%39%37%65%63%61%39%34%39%30%37%36%34%31%37%38%39%30%61%30%38%31%65%33%39%62%37%35%38%62%39%37" + }, + "response": { + "body": "{\n \"claims\": [\n {\n \"insurance_id\": \"ins_fd87478c4ff2447fa678853fa6aebaff\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/75c2be22b8e7413cbf45c2259da506cd.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/90554c79fbdb47d18653644e3fc2732f.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/3743b283d3e84ab2b1959798d647421a.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-07-23T21:16:44Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-07-23T21:16:44Z\"\n }\n ],\n \"shipment_id\": \"shp_a2950885f2f34a4fb453b95b4390acb9\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100110368066416749\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim was created.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-07-23T21:16:44Z\",\n \"id\": \"clm_097e1f7b5af5443d8ae2d16c00b47584\",\n \"status_timestamp\": \"2024-07-23T21:16:44Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"submitted\"\n },\n {\n \"insurance_id\": \"ins_3b89d3d6211647cc9a134f0cecc90905\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/e098fe2fd81644a19b2b709899814443.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/8a5fbc43bc8d4bd48cc011605646cfc1.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/8e77038b7b084305a0d8918e6651b492.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-07-23T21:14:47Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"cancelled\",\n \"status_detail\": \"Claim cancellation was requested.\",\n \"timestamp\": \"2024-07-23T21:14:49Z\"\n },\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-07-23T21:14:47Z\"\n }\n ],\n \"shipment_id\": \"shp_5f4859079b0446409ebaf7feb0fefbc2\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100110368066416374\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim cancellation was requested.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-07-23T21:14:48Z\",\n \"id\": \"clm_097e1ddd8aa54840ad8298f5885b70c8\",\n \"status_timestamp\": \"2024-07-23T21:14:49Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"cancelled\"\n },\n {\n \"insurance_id\": \"ins_22e4bf754387428ab7a4fa911d74dd43\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/dc99a33c1939492999f2c49079090301.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/4efbc5873e1d43dab8764c46e762508f.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/412b08fc5eb746cdaa3f0bb7707b38cc.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-07-23T21:08:19Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-07-23T21:08:19Z\"\n }\n ],\n \"shipment_id\": \"shp_220c769f287b4a3f9f275f20630c5f2d\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100110368066415445\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim was created.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-07-23T21:08:19Z\",\n \"id\": \"clm_097e6e5e6f404fb4b7bca2b5be34ec76\",\n \"status_timestamp\": \"2024-07-23T21:08:19Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"submitted\"\n },\n {\n \"insurance_id\": \"ins_9a6a479680bd4cfe9539338a70510693\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/a043595d2c534a7ea6271b757d5904c8.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/b37723b6eea04b3889e933367bff8cb2.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/f7f20ecca7bd436c9befaa35518af9fb.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-07-23T20:47:28Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-07-23T20:47:28Z\"\n }\n ],\n \"shipment_id\": \"shp_48dc72e60c9b42029263b4ddef062d2f\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100110368066411584\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim was created.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-07-23T20:47:28Z\",\n \"id\": \"clm_097e5b5bb5d2473b938b1659498bf9bf\",\n \"status_timestamp\": \"2024-07-23T20:47:28Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"submitted\"\n }\n ],\n \"has_more\": false\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "4615" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb33nuq" + ], + "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": [ + "4b98d1ed66e87762e798c8e200022a94" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb4nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.055299" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/claims?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%63%6C%6D%5F%30%39%37%65%63%61%39%34%39%30%37%36%34%31%37%38%39%30%61%30%38%31%65%33%39%62%37%35%38%62%39%37" + }, + "duration": 476 + } +] \ No newline at end of file diff --git a/src/test/cassettes/claim/retrieve.json b/src/test/cassettes/claim/retrieve.json new file mode 100644 index 000000000..9910ab3d2 --- /dev/null +++ b/src/test/cassettes/claim/retrieve.json @@ -0,0 +1,364 @@ +[ + { + "recordedAt": 1726510952, + "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", + "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\": \"2024-09-16T18:22:28Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_a15036af745811efaa1f3cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_a15036af745811efaa1f3cecef1b359e\",\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\": \"2024-09-16T18:22:28Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:28Z\",\n \"currency\": null,\n \"id\": \"cstitem_b4c7900122ab4a02a404440582f0f268\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-09-16T18:22:28Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_d4db8aa618654e468151da81fada89d3\",\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\": \"2024-09-16T18:22:28Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-09-16T18:22:28Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_ac8aa7525ca64ef09b506ab4223908ed\",\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\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_a14c3b48745811efaa1d3cecef1b359e\",\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\": \"33.10\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8c0babf96cf4420999d101abd0732011\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6866c5de89d04f41820f47272807aaf6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_26cc5253427b40039116f7e5f69e0138\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0c6ed99986db41099fc4a44c44c7d8ad\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4862e641c67d412d90db0934c2b09ba5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_41be58a1382c48e88e1ceb6a365aea73\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a037405131934341834c2d6f4f58e526\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_add71cb07a81438aa562fbff1e3d3e08\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0f263e38171a4cd38b52a7a0f8c4ae03\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a8a4414b5a274fd3a649d24a6713e743\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e5a469b5103c4df29003fb7803e1adcd\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b69c0d06120e4c37ac5b0690f462d4d5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c6b4b1d574c449a3ac06c9d49d60a614\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6bf2daea74c84f309a34a3a74eeb0bee\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4a0eeb6d7be34b5a81cf468eca457fb8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7e8f41ae208a49e1850adb22ffe6851c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cd56e63fe22b4abf88f145fe8c7d19ae\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bc29a25bb9984a9eba8b9f60f1ac46aa\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5e83a5bc54db43379b25d2e9f3cf478a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8bd6d1b733b647eea5ed68f4a8429e2d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4efb498b23bf4f97b0ecca03878fe0c4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_75e6908b4585424da0cbd122e6e308aa\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_624342bf294a4e249f433695fc8800c9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a822ab0065b142fdaf9fcf00e46e8a8a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f37cc99e8b384edc9eef09c5a4a43a8d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_48c2672957174a11a9cc511d197df722\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_23547a992a52452d99baf0a45b41e531\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2b99fd8b8eea4990b9191c3b383ef664\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e355d24cb0bd44829d10211da0dc10ec\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4ccb5b8e206f4891976b82e51070e7ae\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bb70b311f59144cfbd6522c8197ab8c5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7c97ace84b7c4ab8998057723791a87d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_39fb77a63125457f8fa7f37138499246\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ef5d7e0dd35b4b8ba8bf23203a686df6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c1873f1854a04f17973fde2ae1cc825a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8778f1afed3c45c09b26b77887eec97c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bbd27e7068854a66a5aad06a186380a1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_66bb7ab0ab6a427b9ab83f77e3dbb153\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_02901ce19e2a4be2bc455dcc2db6de44\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1af93a662ca64b85b0b7c58b69d411bd\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f12c3e543af4480ab65b0f727ac34ee6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_87f5b3d39e2d499b90dccb2830d7d386\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f40d5f7968804796807177892daa9c5c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_564ff1ff28cb4012ae3c86405a6be2a2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4625b0d45abb408785e1fce8a2327f26\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_71508da1273b44159492c1aaff047857\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_844251f9b3e04908936c84247fc4a362\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c0f252a8ce894a57911121ef0c0784ab\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e523fb405894457ba5ee4ecbf218e5f6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b176435067204b819438dd25b0cd5666\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_22fe86bbb0ba4919937e0e823672dcb8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_594050968fd54213b1a2710f3cda25d8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6214d1bf39074404979b508c37520e99\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2cab67470b2043058f82dc890ac9510a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_30dc2f13c02b49579938e89485801c80\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_274d4634d8c34ef49d933e95f240efda\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ab0c1c5d8e324be1afde89ced5a2c08e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9963f3f7e8b3419db1fe0bf3535e1572\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_69a2a241b01d4e52afc0f4555ef8e3bf\",\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\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_a14c3b48745811efaa1d3cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\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": [ + "36416" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "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": [ + "4b98d1f266e87764e798c8e500022ca1" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb4nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "3.930510" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "location": [ + "/api/v2/shipments/shp_34c2783bebf14fa6ab9c4a0159d06a14" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 4370 + }, + { + "recordedAt": 1726510955, + "request": { + "body": "{\n \"insurance\": \"100\",\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Sep 16, 2024, 2:22:31 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"currency\": \"USD\",\n \"id\": \"rate_26cc5253427b40039116f7e5f69e0138\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Sep 16, 2024, 2:22:31 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_34c2783bebf14fa6ab9c4a0159d06a14/buy" + }, + "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.93000\",\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\": \"2024-09-16T18:22:28Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-09-16T18:22:34Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-09-16T18:22:34Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:34Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_26cc5253427b40039116f7e5f69e0138\",\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\": \"2024-09-16T18:22:34Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"tracking_code\": \"9400100208271089110836\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2U5NDVjMzJmYmFiMTRjN2ZiODIzMTI1ZmEyZDA5Mjkz\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-09-16T18:22:34Z\",\n \"signed_by\": null,\n \"id\": \"trk_e945c32fbab14c7fb823125fa2d09293\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_a15036af745811efaa1f3cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:28+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_a15036af745811efaa1f3cecef1b359e\",\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\": \"2024-09-16T18:22:28Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:28Z\",\n \"currency\": null,\n \"id\": \"cstitem_b4c7900122ab4a02a404440582f0f268\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-09-16T18:22:28Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_d4db8aa618654e468151da81fada89d3\",\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\": \"2024-09-16T18:22:34Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240916/e89c6f47a47bf547f48683e6ee11e08f43.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-09-16T18:22:34Z\",\n \"id\": \"pl_e16886121d694ff5b0c98edb7626a05d\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-09-16T18:22:33Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-09-16T18:22:28Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-09-16T18:22:28Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_ac8aa7525ca64ef09b506ab4223908ed\",\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\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_a14c3b48745811efaa1d3cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8c0babf96cf4420999d101abd0732011\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6866c5de89d04f41820f47272807aaf6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_26cc5253427b40039116f7e5f69e0138\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0c6ed99986db41099fc4a44c44c7d8ad\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4862e641c67d412d90db0934c2b09ba5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_41be58a1382c48e88e1ceb6a365aea73\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a037405131934341834c2d6f4f58e526\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_add71cb07a81438aa562fbff1e3d3e08\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0f263e38171a4cd38b52a7a0f8c4ae03\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a8a4414b5a274fd3a649d24a6713e743\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e5a469b5103c4df29003fb7803e1adcd\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b69c0d06120e4c37ac5b0690f462d4d5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c6b4b1d574c449a3ac06c9d49d60a614\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6bf2daea74c84f309a34a3a74eeb0bee\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4a0eeb6d7be34b5a81cf468eca457fb8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7e8f41ae208a49e1850adb22ffe6851c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cd56e63fe22b4abf88f145fe8c7d19ae\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bc29a25bb9984a9eba8b9f60f1ac46aa\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5e83a5bc54db43379b25d2e9f3cf478a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8bd6d1b733b647eea5ed68f4a8429e2d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4efb498b23bf4f97b0ecca03878fe0c4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_75e6908b4585424da0cbd122e6e308aa\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_624342bf294a4e249f433695fc8800c9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a822ab0065b142fdaf9fcf00e46e8a8a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f37cc99e8b384edc9eef09c5a4a43a8d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_48c2672957174a11a9cc511d197df722\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_23547a992a52452d99baf0a45b41e531\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2b99fd8b8eea4990b9191c3b383ef664\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e355d24cb0bd44829d10211da0dc10ec\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4ccb5b8e206f4891976b82e51070e7ae\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bb70b311f59144cfbd6522c8197ab8c5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7c97ace84b7c4ab8998057723791a87d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_39fb77a63125457f8fa7f37138499246\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ef5d7e0dd35b4b8ba8bf23203a686df6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c1873f1854a04f17973fde2ae1cc825a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8778f1afed3c45c09b26b77887eec97c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bbd27e7068854a66a5aad06a186380a1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_66bb7ab0ab6a427b9ab83f77e3dbb153\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_02901ce19e2a4be2bc455dcc2db6de44\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1af93a662ca64b85b0b7c58b69d411bd\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f12c3e543af4480ab65b0f727ac34ee6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:31Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:31Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_87f5b3d39e2d499b90dccb2830d7d386\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f40d5f7968804796807177892daa9c5c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_564ff1ff28cb4012ae3c86405a6be2a2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4625b0d45abb408785e1fce8a2327f26\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_71508da1273b44159492c1aaff047857\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_844251f9b3e04908936c84247fc4a362\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c0f252a8ce894a57911121ef0c0784ab\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e523fb405894457ba5ee4ecbf218e5f6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b176435067204b819438dd25b0cd5666\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_22fe86bbb0ba4919937e0e823672dcb8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_594050968fd54213b1a2710f3cda25d8\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"101.32\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"88.31\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"88.31\",\n \"service\": \"NextDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6214d1bf39074404979b508c37520e99\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"136.04\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T08:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"123.03\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"123.03\",\n \"service\": \"NextDayAirEarlyAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2cab67470b2043058f82dc890ac9510a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"92.60\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-17T23:00:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"83.12\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"83.12\",\n \"service\": \"NextDayAirSaver\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_30dc2f13c02b49579938e89485801c80\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"31.57\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"29.39\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"29.39\",\n \"service\": \"2ndDayAir\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_274d4634d8c34ef49d933e95f240efda\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"35.54\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T10:30:00Z\",\n \"delivery_date_guaranteed\": true,\n \"retail_rate\": \"33.28\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"33.28\",\n \"service\": \"2ndDayAirAM\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ab0c1c5d8e324be1afde89ced5a2c08e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"24.89\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-19T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.41\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"22.41\",\n \"service\": \"3DaySelect\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9963f3f7e8b3419db1fe0bf3535e1572\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"list_rate\": \"15.95\",\n \"created_at\": \"2024-09-16T18:22:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"mode\": \"test\",\n \"carrier\": \"UPS\",\n \"delivery_date\": \"2024-09-18T23:00:00Z\",\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"14.88\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-09-16T18:22:32Z\",\n \"rate\": \"14.88\",\n \"service\": \"Ground\",\n \"billing_type\": \"carrier\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_69a2a241b01d4e52afc0f4555ef8e3bf\",\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\": \"2024-09-16T18:22: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\": \"2024-09-16T18:22:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_a14c3b48745811efaa1d3cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100208271089110836\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "38635" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb42nuq" + ], + "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": [ + "4b98d1ee66e87769e798c8ff0002334d" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb4nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.309036" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_34c2783bebf14fa6ab9c4a0159d06a14/buy" + }, + "duration": 1742 + }, + { + "recordedAt": 1726510957, + "request": { + "body": "{\n \"email_evidence_attachments\": [\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg\\u003d\\u003d\"\n ],\n \"amount\": \"100\",\n \"supporting_documentation_attachments\": [\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg\\u003d\\u003d\"\n ],\n \"description\": \"Test description\",\n \"type\": \"damage\",\n \"invoice_attachments\": [\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg\\u003d\\u003d\"\n ],\n \"tracking_code\": \"9400100208271089110836\",\n \"contact_email\": \"test@example.com\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/claims" + }, + "response": { + "body": "{\n \"insurance_id\": \"ins_81446db3fd65481ca00359231b9e098b\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/4564855b7b5148f7bf79b1e4d4ecdc30.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/8d4b0e7f3e8e461db2fbb7d3f79dfdb0.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/d8ae14f22b4f4a3b829f99701f603f2e.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-09-16T18:22:36Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-09-16T18:22:36Z\"\n }\n ],\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100208271089110836\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim was created.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-09-16T18:22:36Z\",\n \"id\": \"clm_09861cadb8ba4b1f8ff5e1068cbcf96e\",\n \"status_timestamp\": \"2024-09-16T18:22:36Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"submitted\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "1115" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb33nuq" + ], + "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": [ + "4b98d1f266e8776be798c9020002369e" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb3nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.889064" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/claims" + }, + "duration": 1449 + }, + { + "recordedAt": 1726510957, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/claims/clm_09861cadb8ba4b1f8ff5e1068cbcf96e" + }, + "response": { + "body": "{\n \"insurance_id\": \"ins_81446db3fd65481ca00359231b9e098b\",\n \"attachments\": [\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/4564855b7b5148f7bf79b1e4d4ecdc30.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/8d4b0e7f3e8e461db2fbb7d3f79dfdb0.png\",\n \"https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240916/d8ae14f22b4f4a3b829f99701f603f2e.png\"\n ],\n \"check_delivery_address\": null,\n \"created_at\": \"2024-09-16T18:22:36Z\",\n \"description\": \"Test description\",\n \"history\": [\n {\n \"status\": \"submitted\",\n \"status_detail\": \"Claim was created.\",\n \"timestamp\": \"2024-09-16T18:22:36Z\"\n }\n ],\n \"shipment_id\": \"shp_34c2783bebf14fa6ab9c4a0159d06a14\",\n \"type\": \"damage\",\n \"tracking_code\": \"9400100208271089110836\",\n \"requested_amount\": \"100.00\",\n \"contact_email\": \"test@example.com\",\n \"status_detail\": \"Claim was created.\",\n \"mode\": \"test\",\n \"insurance_amount\": \"100.00\",\n \"updated_at\": \"2024-09-16T18:22:36Z\",\n \"id\": \"clm_09861cadb8ba4b1f8ff5e1068cbcf96e\",\n \"status_timestamp\": \"2024-09-16T18:22:36Z\",\n \"recipient_name\": null,\n \"approved_amount\": null,\n \"payment_method\": \"easypost_wallet\",\n \"object\": \"Claim\",\n \"salvage_value\": null,\n \"status\": \"submitted\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1115" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "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": [ + "4b98d1f066e8776de798c9030002387c" + ], + "x-proxied": [ + "extlb1nuq b6e1b5034c", + "intlb4nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.040661" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202409132001-2fb47e50de-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/claims/clm_09861cadb8ba4b1f8ff5e1068cbcf96e" + }, + "duration": 490 + } +] \ No newline at end of file diff --git a/src/test/cassettes/customer_portal/create_account_link.json b/src/test/cassettes/customer_portal/create_account_link.json new file mode 100644 index 000000000..9faf3b805 --- /dev/null +++ b/src/test/cassettes/customer_portal/create_account_link.json @@ -0,0 +1,177 @@ +[ + { + "recordedAt": 1763493497, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/users/children?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"children\": [\n {\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"test user\",\n \"verified\": true,\n \"created_at\": \"2023-12-07T17:46:08Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_af930e9bd27a4445bc2741fac37850cc\",\n \"object\": \"User\"\n }\n ],\n \"has_more\": false\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "245" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb33nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "57503b0a691cc678e2b9fe92014348ca" + ], + "x-proxied": [ + "intlb3nuq c0061e0a2e", + "extlb1nuq cbbd141214" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.086392" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202511181852-613eda4497-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/users/children?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 198 + }, + { + "recordedAt": 1763493497, + "request": { + "body": "{\n \"user_id\": \"user_af930e9bd27a4445bc2741fac37850cc\",\n \"return_url\": \"https://example.com/return\",\n \"session_type\": \"account_onboarding\",\n \"refresh_url\": \"https://example.com/refresh\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/customer_portal/account_link" + }, + "response": { + "body": "{\n \"expires_at\": \"2025-11-18T19:23:17Z\",\n \"link\": \"https://app.easypost.com/customer-portal/onboarding?session_id\\u003dZL1UeM2clfGFTa1a\",\n \"created_at\": \"2025-11-18T19:18:17Z\",\n \"object\": \"CustomerPortalAccountLink\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "199" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb56nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "57503b0e691cc679e2b9fe940143492f" + ], + "x-proxied": [ + "intlb6nuq c0061e0a2e", + "extlb1nuq cbbd141214" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.184415" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202511181852-613eda4497-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/customer_portal/account_link" + }, + "duration": 297 + } +] \ 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..8016052db 100644 --- a/src/test/cassettes/customs_info/create.json +++ b/src/test/cassettes/customs_info/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456506, + "recordedAt": 1723823821, "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\": \"2024-08-16T15:57:01Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:01Z\",\n \"currency\": null,\n \"id\": \"cstitem_fc01b80db632492ead7a64af105d1342\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-08-16T15:57:01Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_686267a496a24b0dbe2412de9676db4f\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,56 +31,53 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d07af7ca677300087b39" + "8a4bf44066bf76cde786b8e500359e32" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.032946" + "0.040801" ], - "etag": [ - "W/\"7008ddd112fe468470783968cee5af40\"" + "location": [ + "/api/v2/customs_infos/cstinfo_686267a496a24b0dbe2412de9676db4f" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/customs_infos/cstinfo_867a5aef6ad646fab264e19a90d865ad" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +87,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/customs_infos" }, - "duration": 171 + "duration": 254 } ] \ 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..74104d514 100644 --- a/src/test/cassettes/customs_info/retrieve.json +++ b/src/test/cassettes/customs_info/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456506, + "recordedAt": 1723823820, "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\": \"2024-08-16T15:57:00Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:00Z\",\n \"currency\": null,\n \"id\": \"cstitem_c428d9fbaf5d4e85910965e44edd1e39\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-08-16T15:57:00Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_42e835a623b34a31b8e984697801efa5\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,56 +31,53 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d07af7ed6e7400087af3" + "8a4bf43f66bf76cce786b8e200359d84" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.028621" + "0.049020" ], - "etag": [ - "W/\"29d01013151e09d2b3f0266c28dbc5ca\"" + "location": [ + "/api/v2/customs_infos/cstinfo_42e835a623b34a31b8e984697801efa5" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/customs_infos/cstinfo_2e05f150163a4fb49399074f6a4d49d1" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/customs_infos" }, - "duration": 165 + "duration": 251 }, { - "recordedAt": 1661456506, + "recordedAt": 1723823820, "request": { "body": "", "method": "GET", @@ -108,10 +104,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/customs_infos/cstinfo_2e05f150163a4fb49399074f6a4d49d1" + "uri": "https://api.easypost.com/v2/customs_infos/cstinfo_42e835a623b34a31b8e984697801efa5" }, "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\": \"2024-08-16T15:57:00Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:00Z\",\n \"currency\": null,\n \"id\": \"cstitem_c428d9fbaf5d4e85910965e44edd1e39\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-08-16T15:57:00Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_42e835a623b34a31b8e984697801efa5\",\n \"contents_explanation\": \"\",\n \"non_delivery_option\": \"return\",\n \"object\": \"CustomsInfo\",\n \"contents_type\": \"merchandise\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,53 +120,50 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d07af7a86bb900087b0b" + "8a4bf43c66bf76cce786b8e300359dc5" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.024431" - ], - "etag": [ - "W/\"29d01013151e09d2b3f0266c28dbc5ca\"" + "0.037193" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +173,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_42e835a623b34a31b8e984697801efa5" }, - "duration": 157 + "duration": 244 } ] \ 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..d06c52813 100644 --- a/src/test/cassettes/customs_item/create.json +++ b/src/test/cassettes/customs_item/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456580, + "recordedAt": 1723823857, "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\": \"2024-08-16T15:57:37Z\",\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\": \"2024-08-16T15:57:37Z\",\n \"currency\": null,\n \"id\": \"cstitem_6d695e24b5534718a90004951cc2526a\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,56 +31,53 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb34nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d0c4f800399a0008a132" + "8a4bf43e66bf76f1e786bcc60035c3f7" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.022698" + "0.038862" ], - "etag": [ - "W/\"3479531fd248545e89de1e7b2d9acd40\"" + "location": [ + "/api/v2/customs_items/cstitem_6d695e24b5534718a90004951cc2526a" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/customs_items/cstitem_aebbce7aece340f9b20b5c37b683b6b0" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +87,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/customs_items" }, - "duration": 154 + "duration": 249 } ] \ 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..5c0654d11 100644 --- a/src/test/cassettes/customs_item/retrieve.json +++ b/src/test/cassettes/customs_item/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456580, + "recordedAt": 1723823857, "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\": \"2024-08-16T15:57:37Z\",\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\": \"2024-08-16T15:57:37Z\",\n \"currency\": null,\n \"id\": \"cstitem_16ac6b56315c4f2f8fb5c1d9e619ac30\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n}", "httpVersion": null, "headers": { "null": [ @@ -31,56 +31,53 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb36nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d0c4f7c95ff60008a103" + "8a4bf43e66bf76f1e786bcc30035c341" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.028623" + "0.033638" ], - "etag": [ - "W/\"359ce359ef9c1b5bd3774021ea701b85\"" + "location": [ + "/api/v2/customs_items/cstitem_16ac6b56315c4f2f8fb5c1d9e619ac30" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/customs_items/cstitem_44e0b79edc5a474ab0e6aa921c9bb554" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/customs_items" }, - "duration": 163 + "duration": 235 }, { - "recordedAt": 1661456580, + "recordedAt": 1723823857, "request": { "body": "", "method": "GET", @@ -108,10 +104,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/customs_items/cstitem_44e0b79edc5a474ab0e6aa921c9bb554" + "uri": "https://api.easypost.com/v2/customs_items/cstitem_16ac6b56315c4f2f8fb5c1d9e619ac30" }, "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\": \"2024-08-16T15:57:37Z\",\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\": \"2024-08-16T15:57:37Z\",\n \"currency\": null,\n \"id\": \"cstitem_16ac6b56315c4f2f8fb5c1d9e619ac30\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n}", "httpVersion": null, "headers": { "null": [ @@ -124,53 +120,50 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb36nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d0c4f7df34750008a111" + "8a4bf43c66bf76f1e786bcc40035c372" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.025639" - ], - "etag": [ - "W/\"359ce359ef9c1b5bd3774021ea701b85\"" + "0.027447" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +173,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_16ac6b56315c4f2f8fb5c1d9e619ac30" }, - "duration": 155 + "duration": 225 } ] \ No newline at end of file diff --git a/src/test/cassettes/beta_referral/create.json b/src/test/cassettes/easypost_resource/pretty_print.json similarity index 52% rename from src/test/cassettes/beta_referral/create.json rename to src/test/cassettes/easypost_resource/pretty_print.json index e9d7e4526..a7e223441 100644 --- a/src/test/cassettes/beta_referral/create.json +++ b/src/test/cassettes/easypost_resource/pretty_print.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1663368479, + "recordedAt": 1723823876, "request": { - "body": "{\n \"user\": {\n \"phone\": \"REDACTED\",\n \"name\": \"Test Referral\",\n \"email\": \"test@example.com\"\n }\n}", + "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": [ @@ -15,69 +15,69 @@ "application/json" ] }, - "uri": "https://api.easypost.com/beta/referral_customers" + "uri": "https://api.easypost.com/v2/addresses" }, "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}", + "body": "{\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4dc23bc25be811efa4cbac1f6bc53342\",\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": [ - "965" + "461" ], "expires": [ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "359b96fc6324fd1eecb3c545000a46c0" + "8a4bf43b66bf7704e786c0a40035d69e" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.043825" + "0.041979" ], - "etag": [ - "W/\"13fea18ba3f9973a6b09a8829e385995\"" + "location": [ + "/api/v2/addresses/adr_4dc23bc25be811efa4cbac1f6bc53342" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209152244-6075a793a4-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +87,8 @@ "code": 201, "message": "Created" }, - "errors": null, - "uri": "https://api.easypost.com/beta/referral_customers" + "uri": "https://api.easypost.com/v2/addresses" }, - "duration": 1180 + "duration": 262 } ] \ No newline at end of file diff --git a/src/test/cassettes/easypost_resource/to_string.json b/src/test/cassettes/easypost_resource/to_string.json new file mode 100644 index 000000000..ac0319bd0 --- /dev/null +++ b/src/test/cassettes/easypost_resource/to_string.json @@ -0,0 +1,94 @@ +[ + { + "recordedAt": 1723823876, + "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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_4d85137b5be811efa4bcac1f6bc53342\",\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": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43b66bf7704e786c0a20035d64f" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.034839" + ], + "location": [ + "/api/v2/addresses/adr_4d85137b5be811efa4bcac1f6bc53342" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/addresses" + }, + "duration": 233 + } +] \ No newline at end of file diff --git a/src/test/cassettes/beta_referral/update.json b/src/test/cassettes/embeddable/create_session.json similarity index 57% rename from src/test/cassettes/beta_referral/update.json rename to src/test/cassettes/embeddable/create_session.json index 73421d608..0f89ce844 100644 --- a/src/test/cassettes/beta_referral/update.json +++ b/src/test/cassettes/embeddable/create_session.json @@ -1,102 +1,95 @@ [ { - "recordedAt": 1663368480, + "recordedAt": 1763493703, "request": { - "body": "{\n \"user\": {\n \"phone\": \"REDACTED\",\n \"name\": \"Test Referral\",\n \"email\": \"test@example.com\"\n }\n}", - "method": "POST", + "body": "", + "method": "GET", "headers": { "Accept-Charset": [ "UTF-8" ], "User-Agent": [ "REDACTED" - ], - "Content-Type": [ - "application/json" ] }, - "uri": "https://api.easypost.com/beta/referral_customers" + "uri": "https://api.easypost.com/v2/users/children?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, "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}", + "body": "{\n \"children\": [\n {\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"test user\",\n \"verified\": true,\n \"created_at\": \"2023-12-07T17:46:08Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_af930e9bd27a4445bc2741fac37850cc\",\n \"object\": \"User\"\n }\n ],\n \"has_more\": false\n}", "httpVersion": null, "headers": { "null": [ - "HTTP/1.1 201 Created" + "HTTP/1.1 200 OK" ], "content-length": [ - "965" + "245" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb58nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "359b97016324fd1fecd672aa000a46f6" + "57503b0f691cc747e2ba0b99014471ce" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0061e0a2e", + "extlb1nuq cbbd141214" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.028179" - ], - "etag": [ - "W/\"853eb5cb7dfedb61ffd8d12883c03669\"" + "0.028557" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209152244-6075a793a4-master" + "easypost-202511181852-613eda4497-master" ], "cache-control": [ "private, no-cache, no-store" ] }, "status": { - "code": 201, - "message": "Created" + "code": 200, + "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/beta/referral_customers" + "uri": "https://api.easypost.com/v2/users/children?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, - "duration": 1177 + "duration": 130 }, { - "recordedAt": 1663368481, + "recordedAt": 1763493704, "request": { - "body": "{\n \"user\": {\n \"email\": \"email@example.com\"\n }\n}", - "method": "PUT", + "body": "{\n \"user_id\": \"user_af930e9bd27a4445bc2741fac37850cc\",\n \"origin_host\": \"https://example.com\"\n}", + "method": "POST", "headers": { "Accept-Charset": [ "UTF-8" @@ -108,81 +101,80 @@ "application/json" ] }, - "uri": "https://api.easypost.com/beta/referral_customers/user_fb7f3b815d774d52995409ed5b7cf9da" + "uri": "https://api.easypost.com/v2/embeddables/session" }, "response": { - "body": "{\n \"message\": \"Referral Customer email updated successfully\"\n}", + "body": "{\n \"expires_at\": \"2025-11-18T19:36:44Z\",\n \"session_id\": \"MlFxfifK1l4UDmPr\",\n \"created_at\": \"2025-11-18T19:21:44Z\",\n \"object\": \"EmbeddablesSession\"\n}", "httpVersion": null, "headers": { "null": [ - "HTTP/1.1 200 OK" + "HTTP/1.1 201 Created" ], "content-length": [ - "59" + "135" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "359b97006324fd20ec7f36aa000a472c" + "57503b11691cc748e2ba0bb201447214" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0061e0a2e", + "extlb1nuq cbbd141214" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.120319" - ], - "etag": [ - "W/\"7b30d603e3257aee787616dc99d6d4af\"" + "0.121527" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209152244-6075a793a4-master" + "easypost-202511181852-613eda4497-master" ], "cache-control": [ "private, no-cache, no-store" ] }, "status": { - "code": 200, - "message": "OK" + "code": 201, + "message": "Created" }, - "errors": null, - "uri": "https://api.easypost.com/beta/referral_customers/user_fb7f3b815d774d52995409ed5b7cf9da" + "uri": "https://api.easypost.com/v2/embeddables/session" }, - "duration": 252 + "duration": 222 } ] \ 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 c6d9c5a6b..33298eeab 100644 --- a/src/test/cassettes/end_shipper/all.json +++ b/src/test/cassettes/end_shipper/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661457163, + "recordedAt": 1723823824, "request": { "body": "", "method": "GET", @@ -12,69 +12,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/end_shippers?page_size\u003d5" + "uri": "https://api.easypost.com/v2/end_shippers?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, "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\": 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": [ - "1834" + "1876" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb36nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d30bf7dae7d50009a1a6" + "8a4bf43e66bf76cde786b8e600359e71" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.057165" - ], - "etag": [ - "W/\"b59c6a898bcc8b89834ebbfb4e6a776d\"" + "2.570541" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +81,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/end_shippers?page_size\u003d5" + "uri": "https://api.easypost.com/v2/end_shippers?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, - "duration": 343 + "duration": 2773 } ] \ 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..230468b89 100644 --- a/src/test/cassettes/end_shipper/create.json +++ b/src/test/cassettes/end_shipper/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661457165, + "recordedAt": 1723823825, "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,67 +18,63 @@ "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\": \"2024-08-16T15:57:05+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:57:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_f26dc448ef1241c1914cf9e4f65b6316\",\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" + "bigweb34nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "4cb7bec76307d30cf7caefd800080978" + "8a4bf44066bf76d1e786b9020035a20c" ], "x-proxied": [ - "extlb4wdc 9ce216bfac", - "intlb2wdc 6aa9972c1e", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.042280" - ], - "etag": [ - "W/\"6d960cd7b8d5792544b852a80e3258cc\"" + "0.052960" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -88,9 +84,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/end_shippers" }, - "duration": 338 + "duration": 269 } ] \ 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..29d449d7b 100644 --- a/src/test/cassettes/end_shipper/retrieve.json +++ b/src/test/cassettes/end_shipper/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661457164, + "recordedAt": 1723823824, "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,69 +18,66 @@ "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\": \"2024-08-16T15:57:04+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:57:04+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_ccff1d1cc9564da59d2b9f1629c45e9f\",\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" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], "x-canary": [ "direct" ], - "x-content-type-options": [ - "nosniff" - ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d30cf7ef28d70009a1cb" + "8a4bf43f66bf76d0e786b8e80035a156" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037954" - ], - "etag": [ - "W/\"57ee198f343a77b6b994266afb950cae\"" + "0.051439" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/end_shippers" }, - "duration": 188 + "duration": 285 }, { - "recordedAt": 1661457164, + "recordedAt": 1723823824, "request": { "body": "", "method": "GET", @@ -108,69 +104,69 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/end_shippers/es_d1d72fa6085443e985f53012381f259e" + "uri": "https://api.easypost.com/v2/end_shippers/es_ccff1d1cc9564da59d2b9f1629c45e9f" }, "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\": \"2024-08-16T15:57:04+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:57:04+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_ccff1d1cc9564da59d2b9f1629c45e9f\",\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" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d30cf7edfed40009a1df" + "8a4bf43d66bf76d0e786b9000035a1a2" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.033761" - ], - "etag": [ - "W/\"a4ed696baf9b34d24023c0205e789755\"" + "0.052289" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +176,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/end_shippers/es_d1d72fa6085443e985f53012381f259e" + "uri": "https://api.easypost.com/v2/end_shippers/es_ccff1d1cc9564da59d2b9f1629c45e9f" }, - "duration": 168 + "duration": 249 } ] \ 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..4ee3fc26a 100644 --- a/src/test/cassettes/end_shipper/update.json +++ b/src/test/cassettes/end_shipper/update.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661457165, + "recordedAt": 1723823825, "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,67 +18,63 @@ "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\": \"2024-08-16T15:57:05+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:57:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_1f057b69dec2486f83225382aa3347fb\",\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" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "4cb7beca6307d30df7dd8bfa00080994" + "8a4bf44066bf76d1e786b9040035a26e" ], "x-proxied": [ - "extlb4wdc 9ce216bfac", - "intlb1wdc 6aa9972c1e", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.130275" - ], - "etag": [ - "W/\"e7f77589fad5971000d74dad0b2d717c\"" + "0.061453" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -88,13 +84,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/end_shippers" }, - "duration": 422 + "duration": 267 }, { - "recordedAt": 1661457166, + "recordedAt": 1723823826, "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,69 +104,66 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/end_shippers/es_194f830c7a0c4565a9acf28fe5147bbb" + "uri": "https://api.easypost.com/v2/end_shippers/es_1f057b69dec2486f83225382aa3347fb" }, "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\": \"2024-08-16T15:57:05+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:57:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"NEW NAME\",\n \"company\": \"EASYPOST\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_1f057b69dec2486f83225382aa3347fb\",\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" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92346307d30ef7b7b96a000981d8" + "8a4bf43e66bf76d1e786b9060035a2d5" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.057519" - ], - "etag": [ - "W/\"147c562a754afb6c13ed7617c5518b50\"" + "0.057285" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -181,9 +173,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/end_shippers/es_194f830c7a0c4565a9acf28fe5147bbb" + "uri": "https://api.easypost.com/v2/end_shippers/es_1f057b69dec2486f83225382aa3347fb" }, - "duration": 197 + "duration": 254 } ] \ No newline at end of file diff --git a/src/test/cassettes/error/error.json b/src/test/cassettes/error/error.json index 57508f684..e1b4fd761 100644 --- a/src/test/cassettes/error/error.json +++ b/src/test/cassettes/error/error.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456596, + "recordedAt": 1723823903, "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": [ @@ -31,50 +31,50 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb35nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d0d4f7a874350008a8d9" + "8a4bf43c66bf771fe786c1830035f2e9" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.035329" + "0.041939" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-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": 240 } ] \ No newline at end of file diff --git a/src/test/cassettes/error/error_alternative_format.json b/src/test/cassettes/error/error_alternative_format.json new file mode 100644 index 000000000..6faed463c --- /dev/null +++ b/src/test/cassettes/error/error_alternative_format.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1740505524, + "request": { + "body": "{\n \"email_evidence_attachments\": [\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg\\u003d\\u003d\"\n ],\n \"supporting_documentation_attachments\": [\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg\\u003d\\u003d\"\n ],\n \"description\": \"Test description\",\n \"type\": \"damage\",\n \"invoice_attachments\": [\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg\\u003d\\u003d\"\n ],\n \"tracking_code\": \"123\",\n \"contact_email\": \"test@example.com\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/claims" + }, + "response": { + "body": "{\n \"error\": {\n \"code\": \"NOT_FOUND\",\n \"message\": \"The requested resource could not be found.\",\n \"errors\": [\n \"No eligible insurance found with provided tracking code.\"\n ]\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 404 Not Found" + ], + "content-length": [ + "156" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "c1c6fbd367be01b4e2b8558f001d4c8a" + ], + "x-proxied": [ + "intlb4nuq 51d74985a2", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.028904" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202502251451-d4f6425809-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 404, + "message": "Not Found" + }, + "uri": "https://api.easypost.com/v2/claims" + }, + "duration": 130 + } +] \ No newline at end of file diff --git a/src/test/cassettes/event/all.json b/src/test/cassettes/event/all.json index 19ff2a844..d1e68b1c9 100644 --- a/src/test/cassettes/event/all.json +++ b/src/test/cassettes/event/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456540, + "recordedAt": 1723823812, "request": { "body": "", "method": "GET", @@ -12,69 +12,69 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/events?page_size\u003d5" + "uri": "https://api.easypost.com/v2/events?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, "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\": false,\n \"events\": [\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.updated\",\n \"created_at\": \"2024-08-16T15:56:45.339Z\",\n \"id\": \"evt_233b29c05be811efba9e55034f86de6a\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.created\",\n \"created_at\": \"2024-08-16T15:56:45.244Z\",\n \"id\": \"evt_232cb61a5be811eface937608af8fd6e\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"insurance.cancelled\",\n \"created_at\": \"2024-08-16T15:56:37.713Z\",\n \"id\": \"evt_1eaf8ebe5be811efb9865bebcdda88e0\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "1116" + "683" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d09cf7efb8f600088bb5" + "8a4bf43a66bf76c4e786b8c000359561" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.223208" - ], - "etag": [ - "W/\"9527332a93e95fdbb3e45a9b55113449\"" + "0.190509" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +84,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/events?page_size\u003d5" + "uri": "https://api.easypost.com/v2/events?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, - "duration": 361 + "duration": 398 } ] \ No newline at end of file diff --git a/src/test/cassettes/event/get_next_page.json b/src/test/cassettes/event/get_next_page.json new file mode 100644 index 000000000..37caf651b --- /dev/null +++ b/src/test/cassettes/event/get_next_page.json @@ -0,0 +1,88 @@ +[ + { + "recordedAt": 1723823811, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/events?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"has_more\": false,\n \"events\": [\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.updated\",\n \"created_at\": \"2024-08-16T15:56:45.339Z\",\n \"id\": \"evt_233b29c05be811efba9e55034f86de6a\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.created\",\n \"created_at\": \"2024-08-16T15:56:45.244Z\",\n \"id\": \"evt_232cb61a5be811eface937608af8fd6e\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"insurance.cancelled\",\n \"created_at\": \"2024-08-16T15:56:37.713Z\",\n \"id\": \"evt_1eaf8ebe5be811efb9865bebcdda88e0\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "683" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb35nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44166bf76c3e786b8bf00359509" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.195326" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/events?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 407 + } +] \ No newline at end of file diff --git a/src/test/cassettes/event/retrieve.json b/src/test/cassettes/event/retrieve.json index e8f1c6d9e..0139db69c 100644 --- a/src/test/cassettes/event/retrieve.json +++ b/src/test/cassettes/event/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456540, + "recordedAt": 1723823812, "request": { "body": "", "method": "GET", @@ -12,69 +12,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/events?page_size\u003d5" + "uri": "https://api.easypost.com/v2/events?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, "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\": false,\n \"events\": [\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.updated\",\n \"created_at\": \"2024-08-16T15:56:45.339Z\",\n \"id\": \"evt_233b29c05be811efba9e55034f86de6a\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.created\",\n \"created_at\": \"2024-08-16T15:56:45.244Z\",\n \"id\": \"evt_232cb61a5be811eface937608af8fd6e\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"insurance.cancelled\",\n \"created_at\": \"2024-08-16T15:56:37.713Z\",\n \"id\": \"evt_1eaf8ebe5be811efb9865bebcdda88e0\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "1116" + "683" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb38nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d09cf7ed94d700088be8" + "8a4bf43d66bf76c4e786b8c1003595bd" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.191760" - ], - "etag": [ - "W/\"9527332a93e95fdbb3e45a9b55113449\"" + "0.178351" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,13 +81,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/events?page_size\u003d5" + "uri": "https://api.easypost.com/v2/events?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, - "duration": 330 + "duration": 376 }, { - "recordedAt": 1661456540, + "recordedAt": 1723823813, "request": { "body": "", "method": "GET", @@ -102,69 +98,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/events/evt_077f41d024ae11edb9c91b5a718e3454" + "uri": "https://api.easypost.com/v2/events/evt_233b29c05be811efba9e55034f86de6a" }, "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\": \"2024-08-16T15:56:45.000Z\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"pending_urls\": [\n \"http://example.com\"\n ],\n \"description\": \"batch.updated\",\n \"previous_attributes\": {\n \"state\": \"creating\"\n },\n \"created_at\": \"2024-08-16T15:56:45.000Z\",\n \"id\": \"evt_233b29c05be811efba9e55034f86de6a\",\n \"completed_urls\": [],\n \"status\": \"pending\",\n \"object\": \"Event\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "320" + "356" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb36nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d09cf7f1d95400088c1c" + "8a4bf43c66bf76c4e786b8c20035961c" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.026741" - ], - "etag": [ - "W/\"6582771cc38e1d7bb163a62c3b6be7db\"" + "0.036175" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -174,9 +167,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/events/evt_077f41d024ae11edb9c91b5a718e3454" + "uri": "https://api.easypost.com/v2/events/evt_233b29c05be811efba9e55034f86de6a" }, - "duration": 159 + "duration": 240 } ] \ No newline at end of file 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..229dc4e07 --- /dev/null +++ b/src/test/cassettes/event/retrieve_all_payloads.json @@ -0,0 +1,441 @@ +[ + { + "recordedAt": 1723823813, + "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\": \"2024-08-16T15:56:53Z\",\n \"id\": \"hook_2807b7a25be811efa6196f8c5aa266cb\",\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": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44066bf76c5e786b8c400359684" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.148153" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/webhooks" + }, + "duration": 357 + }, + { + "recordedAt": 1723823813, + "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\": \"2024-08-16T15:56:53Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:56:53Z\",\n \"id\": \"batch_db213479e6a34678b251bbd824d24695\",\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": [ + "bigweb40nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf76c5e786b8c6003596f9" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.040819" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches" + }, + "duration": 237 + }, + { + "recordedAt": 1723823819, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/events?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"has_more\": false,\n \"events\": [\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.updated\",\n \"created_at\": \"2024-08-16T15:56:53.991Z\",\n \"id\": \"evt_2863529c5be811efbd9b5d0569f77627\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.created\",\n \"created_at\": \"2024-08-16T15:56:53.910Z\",\n \"id\": \"evt_2856fcea5be811ef81b37faf7729a2d5\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.updated\",\n \"created_at\": \"2024-08-16T15:56:45.339Z\",\n \"id\": \"evt_233b29c05be811efba9e55034f86de6a\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.created\",\n \"created_at\": \"2024-08-16T15:56:45.244Z\",\n \"id\": \"evt_232cb61a5be811eface937608af8fd6e\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"insurance.cancelled\",\n \"created_at\": \"2024-08-16T15:56:37.713Z\",\n \"id\": \"evt_1eaf8ebe5be811efb9865bebcdda88e0\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1115" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44066bf76cbe786b8c700359c1f" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.245712" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/events?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 456 + }, + { + "recordedAt": 1723823819, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/events/evt_2863529c5be811efbd9b5d0569f77627/payloads" + }, + "response": { + "body": "{\n \"payloads\": []\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "15" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf76cbe786b8df00359c90" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.049900" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/events/evt_2863529c5be811efbd9b5d0569f77627/payloads" + }, + "duration": 269 + }, + { + "recordedAt": 1723823820, + "request": { + "body": "", + "method": "DELETE", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/webhooks/hook_2807b7a25be811efa6196f8c5aa266cb" + }, + "response": { + "body": "{}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf76cbe786b8e000359ccf" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.386373" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/webhooks/hook_2807b7a25be811efa6196f8c5aa266cb" + }, + "duration": 588 + } +] \ 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..9b507119b --- /dev/null +++ b/src/test/cassettes/event/retrieve_payload.json @@ -0,0 +1,441 @@ +[ + { + "recordedAt": 1723823804, + "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\": \"2024-08-16T15:56:45Z\",\n \"id\": \"hook_22d73fe65be811ef94c615366a5e7ccc\",\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": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44166bf76bce786b87c00358df6" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.168851" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/webhooks" + }, + "duration": 383 + }, + { + "recordedAt": 1723823805, + "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\": \"2024-08-16T15:56:45Z\",\n \"pickup\": null,\n \"shipments\": [],\n \"label_url\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"num_shipments\": 1.0,\n \"updated_at\": \"2024-08-16T15:56:45Z\",\n \"id\": \"batch_6d70fe5330aa4fec838d6b9ff35ad4eb\",\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": [ + "bigweb36nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf76bde786b87e00358e87" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.042081" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/batches" + }, + "duration": 258 + }, + { + "recordedAt": 1723823810, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/events?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"has_more\": false,\n \"events\": [\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.updated\",\n \"created_at\": \"2024-08-16T15:56:45.339Z\",\n \"id\": \"evt_233b29c05be811efba9e55034f86de6a\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"batch.created\",\n \"created_at\": \"2024-08-16T15:56:45.244Z\",\n \"id\": \"evt_232cb61a5be811eface937608af8fd6e\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n },\n {\n \"mode\": \"test\",\n \"user_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"description\": \"insurance.cancelled\",\n \"created_at\": \"2024-08-16T15:56:37.713Z\",\n \"id\": \"evt_1eaf8ebe5be811efb9865bebcdda88e0\",\n \"status\": \"pending\",\n \"object\": \"Event\"\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "683" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf76c2e786b87f003593b5" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.291126" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/events?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 507 + }, + { + "recordedAt": 1723823811, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/events/evt_233b29c05be811efba9e55034f86de6a/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": [ + "bigweb38nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf76c2e786b88000359438" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.042287" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 404, + "message": "Not Found" + }, + "uri": "https://api.easypost.com/v2/events/evt_233b29c05be811efba9e55034f86de6a/payloads/payload_11111111111111111111111111111111" + }, + "duration": 256 + }, + { + "recordedAt": 1723823811, + "request": { + "body": "", + "method": "DELETE", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/webhooks/hook_22d73fe65be811ef94c615366a5e7ccc" + }, + "response": { + "body": "{}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb42nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43d66bf76c3e786b8a100359482" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.319806" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/webhooks/hook_22d73fe65be811ef94c615366a5e7ccc" + }, + "duration": 526 + } +] \ No newline at end of file diff --git a/src/test/cassettes/hook/create.json b/src/test/cassettes/hook/create.json new file mode 100644 index 000000000..759429cbb --- /dev/null +++ b/src/test/cassettes/hook/create.json @@ -0,0 +1,94 @@ +[ + { + "recordedAt": 1723823906, + "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\": \"2024-08-16T15:58:26Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:26Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_b0b9603c3efc4a2e997b7ce7bcb0ce4a\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "229" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb33nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44066bf7722e786c49f0035f737" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.030823" + ], + "location": [ + "/api/v2/parcels/prcl_b0b9603c3efc4a2e997b7ce7bcb0ce4a" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/parcels" + }, + "duration": 234 + } +] \ No newline at end of file diff --git a/src/test/cassettes/report/all_reports_no_type.json b/src/test/cassettes/hook/http_error.json similarity index 70% rename from src/test/cassettes/report/all_reports_no_type.json rename to src/test/cassettes/hook/http_error.json index 7357ef126..ca37130da 100644 --- a/src/test/cassettes/report/all_reports_no_type.json +++ b/src/test/cassettes/hook/http_error.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456542, + "recordedAt": 1723823907, "request": { "body": "", "method": "GET", @@ -12,66 +12,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/reports/test/?type\u003dtest" + "uri": "https://api.easypost.com/v2/parcels/par_123" }, "response": { - "body": null, + "body": "{\n \"error\": {\n \"code\": \"NOT_FOUND\",\n \"message\": \"The requested resource could not be found.\",\n \"errors\": [\n {\n \"field\": \"par_123\",\n \"message\": \"not found\"\n }\n ]\n }\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 404 Not Found" ], "content-length": [ - "97" + "138" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d09ef7cc1dbe00088d0b" + "8a4bf43f66bf7723e786c4a20035f7b5" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.020700" + "0.027811" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -81,9 +81,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" + "uri": "https://api.easypost.com/v2/parcels/par_123" }, - "duration": 146 + "duration": 235 } ] \ No newline at end of file diff --git a/src/test/cassettes/insurance/all.json b/src/test/cassettes/insurance/all.json index 3d60ba71e..947ef37d3 100644 --- a/src/test/cassettes/insurance/all.json +++ b/src/test/cassettes/insurance/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456496, + "recordedAt": 1723823799, "request": { "body": "", "method": "GET", @@ -12,69 +12,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/insurances?page_size\u003d5" + "uri": "https://api.easypost.com/v2/insurances?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, "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\": \"100.00000\",\n \"fee\": {\n \"amount\": \"0.50000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2024-08-16T15:56:36Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:56:36+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\": \"2024-08-16T15:56:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_1e09965d5be811ef8e70ac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"EZ1000000001\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56: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\": \"2024-07-16T15:56:37Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:33:37Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\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/djE6dHJrX2JhNGE2ODlkNmJkYTRiOWI4YjJiN2I1YTM5ODIyNjBi\",\n \"est_delivery_date\": \"2024-08-16T15:56:37Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:56:37Z\",\n \"signed_by\": null,\n \"id\": \"trk_ba4a689d6bda4b9b8b2b7b5a3982260b\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [\n \"Insurance was cancelled by the user.\"\n ],\n \"id\": \"ins_0c311b3ad5d3440489c2ff8e5b24cc3c\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_1e0f386b5be811efb9393cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"cancelled\"\n },\n {\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\": \"2024-07-24T22:21:52Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-24T22:21:51+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\": \"2024-07-24T22:21:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_205b6acd4a0b11efa1f6ac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"EZ1000000001\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-07-24T22:23:34Z\",\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\": \"2024-08-16T15:56: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\": \"2024-07-16T15:56:37Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:33:37Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\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/djE6dHJrX2JhNGE2ODlkNmJkYTRiOWI4YjJiN2I1YTM5ODIyNjBi\",\n \"est_delivery_date\": \"2024-08-16T15:56:37Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:56:37Z\",\n \"signed_by\": null,\n \"id\": \"trk_ba4a689d6bda4b9b8b2b7b5a3982260b\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_08671ea4bb7446708ca3dc66dba65b8b\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2024-07-24T22:21: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\": \"2024-07-24T22:21:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_206020f74a0b11efb5863cecef1b359e\",\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\": \"100.00000\",\n \"fee\": {\n \"amount\": \"0.50000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2024-07-23T21:16:54Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-23T21:16:52+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\": \"2024-07-23T21:16:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_e1bbefa5493811efbce2ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_2ffabf823a754afdb236fdd933fc126c\",\n \"tracking_code\": \"9400100110368066416763\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-07-23T21:16:55Z\",\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\": {\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\": \"2024-06-26T11:10:55Z\",\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\": \"2024-07-23T21:16:55Z\",\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\": \"2024-06-23T21:19:55Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T09:56:55Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T20:01:55Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T21:37:55Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T00:28:55Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:08:55Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:18:55Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T11:10:55Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Delivered\",\n \"object\": \"TrackingDetail\",\n \"status\": \"delivered\",\n \"status_detail\": \"arrived_at_destination\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_2ffabf823a754afdb236fdd933fc126c\",\n \"tracking_code\": \"9400100110368066416763\",\n \"status_detail\": \"arrived_at_destination\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzNjODUyNTc2ZjMwNTRiNGNhNmFiMDY1ZDgxNmRhNTVk\",\n \"est_delivery_date\": \"2024-07-23T21:19:55Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-23T21:19:55Z\",\n \"signed_by\": \"John Tester\",\n \"id\": \"trk_3c852576f3054b4ca6ab065d816da55d\",\n \"object\": \"Tracker\",\n \"status\": \"delivered\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_0ac2c47236234589b9bd8f58484fdc59\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-07-23T21:16: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\": \"2024-07-23T21:16:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_e1be9761493811efb577ac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\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\": \"2024-07-23T21:16:48Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-23T21:16:46+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\": \"2024-07-23T21:16:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_de510f23493811efac203cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_6d9270111c6840dbb5ea5d7ca26c2807\",\n \"tracking_code\": \"9400100110368066416756\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-07-23T21:16:49Z\",\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\": {\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\": \"2024-06-26T11:10:49Z\",\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\": \"2024-07-23T21:16:49Z\",\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\": \"2024-06-23T21:19:49Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T09:56:49Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T20:01:49Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T21:37:49Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T00:28:49Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:08:49Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:18:49Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T11:10:49Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Delivered\",\n \"object\": \"TrackingDetail\",\n \"status\": \"delivered\",\n \"status_detail\": \"arrived_at_destination\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_6d9270111c6840dbb5ea5d7ca26c2807\",\n \"tracking_code\": \"9400100110368066416756\",\n \"status_detail\": \"arrived_at_destination\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzg4OTMzMjU0M2FjMjQ3M2I4YTk4YTk4NTQ3NzU5NDhj\",\n \"est_delivery_date\": \"2024-07-23T21:19:49Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-23T21:19:49Z\",\n \"signed_by\": \"John Tester\",\n \"id\": \"trk_889332543ac2473b8a98a9854775948c\",\n \"object\": \"Tracker\",\n \"status\": \"delivered\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_8601c937f7394ac09ec16dc9aec5b390\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-07-23T21:16: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\": \"2024-07-23T21:16:46+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_de52d6e3493811ef80e0ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\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\": \"2024-07-23T21:16:42Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-23T21:16:40+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\": \"2024-07-23T21:16:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_dab7e11e493811efbf7bac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_a2950885f2f34a4fb453b95b4390acb9\",\n \"tracking_code\": \"9400100110368066416749\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-07-23T21:16:43Z\",\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\": {\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\": \"2024-06-26T11:10:43Z\",\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\": \"2024-07-23T21:16:43Z\",\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\": \"2024-06-23T21:19:43Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T09:56:43Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T20:01:43Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T21:37:43Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T00:28:43Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:08:43Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:18:43Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T11:10:43Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Delivered\",\n \"object\": \"TrackingDetail\",\n \"status\": \"delivered\",\n \"status_detail\": \"arrived_at_destination\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_a2950885f2f34a4fb453b95b4390acb9\",\n \"tracking_code\": \"9400100110368066416749\",\n \"status_detail\": \"arrived_at_destination\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzA4OTI5ZGYwYjE5MDRlMjFhZmM0ZGFkYTNkZjVhY2Rk\",\n \"est_delivery_date\": \"2024-07-23T21:19:43Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-23T21:19:43Z\",\n \"signed_by\": \"John Tester\",\n \"id\": \"trk_08929df0b1904e21afc4dada3df5acdd\",\n \"object\": \"Tracker\",\n \"status\": \"delivered\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_fd87478c4ff2447fa678853fa6aebaff\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-07-23T21:16: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\": \"2024-07-23T21:16:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_daba1db0493811efba19ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\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": [ "HTTP/1.1 200 OK" ], "content-length": [ - "16452" + "22737" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c396307d06ff7dcff5400087558" + "8a4bf43d66bf76b7e786b81d003588a7" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.190956" - ], - "etag": [ - "W/\"27d003b9bd4d28e691523c63496885a3\"" + "0.380178" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +81,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/insurances?page_size\u003d5" + "uri": "https://api.easypost.com/v2/insurances?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, - "duration": 313 + "duration": 644 } ] \ No newline at end of file diff --git a/src/test/cassettes/insurance/create.json b/src/test/cassettes/insurance/create.json index dc19d39c5..f962790bf 100644 --- a/src/test/cassettes/insurance/create.json +++ b/src/test/cassettes/insurance/create.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456499, + "recordedAt": 1723823803, "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 \"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\": \"GroundAdvantage\",\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,72 +18,69 @@ "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.93000\",\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\": \"2024-08-16T15:56:42Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:56:43Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:56:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4d58188c8af646e7b68c4e0dbca5fc64\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:56:43Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1fc16624a4e149d0b1ad1ef60f37af87\",\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\": \"2024-08-16T15:56:43Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_4d58188c8af646e7b68c4e0dbca5fc64\",\n \"tracking_code\": \"9400100105807076062266\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2UyYjgzNjViNDlhYTRmNjBhMzkzNzgwMTY2N2RlYWYx\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:56:43Z\",\n \"signed_by\": null,\n \"id\": \"trk_e2b8365b49aa4f60a3937801667deaf1\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_21907c4c5be811efbac03cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4d58188c8af646e7b68c4e0dbca5fc64\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_21907c4c5be811efbac03cecef1b359e\",\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\": \"2024-08-16T15:56:43Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8a3169cf187b34fe38d85435f34af8627.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:56:43Z\",\n \"id\": \"pl_5121c575031e443899dbd0c373f72a5a\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:56:43Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:56:42Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:56:42Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_fa9c9db8df30470aac64d7a813c3aa50\",\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\": \"2024-08-16T15:56:42+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\": \"2024-08-16T15:56:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_218df41f5be811ef900dac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:56:42Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4d58188c8af646e7b68c4e0dbca5fc64\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:56:42Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0ea0c4179cca4c5bb3639cd3e3527563\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:56:42Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4d58188c8af646e7b68c4e0dbca5fc64\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:56:42Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_45048020e493471e89287ef347fbf3ef\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:56:42Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4d58188c8af646e7b68c4e0dbca5fc64\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:56:42Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1fc16624a4e149d0b1ad1ef60f37af87\",\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\": \"2024-08-16T15:56:42+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\": \"2024-08-16T15:56:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_218df41f5be811ef900dac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076062266\",\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" + "6549" ], "expires": [ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], "x-canary": [ "direct" ], - "x-content-type-options": [ - "nosniff" - ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d072f7c9ce75000876bf" + "8a4bf43b66bf76bae786b86100358bc2" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.043638" + "1.074192" ], - "etag": [ - "W/\"b1b7ed9ec2dd9797fdd355951165d835\"" + "location": [ + "/api/v2/shipments/shp_4d58188c8af646e7b68c4e0dbca5fc64" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_abef53333dd64c1eb251732cbcfe5100" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,15 +90,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1180 + "duration": 1275 }, { - "recordedAt": 1661456499, + "recordedAt": 1723823804, "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\": \"9400100105807076062266\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -117,69 +113,66 @@ "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\": \"2024-08-16T15:56:44Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:56:44+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\": \"2024-08-16T15:56:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_227406095be811ef8cf7ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"9400100105807076062266\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:43Z\",\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\": \"2024-07-16T15:56:43Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:33:43Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_4d58188c8af646e7b68c4e0dbca5fc64\",\n \"tracking_code\": \"9400100105807076062266\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2UyYjgzNjViNDlhYTRmNjBhMzkzNzgwMTY2N2RlYWYx\",\n \"est_delivery_date\": \"2024-08-16T15:56:43Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:56:43Z\",\n \"signed_by\": null,\n \"id\": \"trk_e2b8365b49aa4f60a3937801667deaf1\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_a6dd1d4802974ecca75facbfa13d293f\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_2279ba605be811ef8b62ac1f6bc53342\",\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": [ "HTTP/1.1 201 Created" ], "content-length": [ - "3428" + "3424" ], "expires": [ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb41nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d073f7efb9ba00087783" + "8a4bf43d66bf76bbe786b86300358d48" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.150261" + "0.352167" ], - "etag": [ - "W/\"c3db083a4992e0d5b7424aeabfab158f\"" + "location": [ + "/api/v2/insurances/ins_a6dd1d4802974ecca75facbfa13d293f" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/insurances/ins_ea7373520f9446178f89237ad67a8f81" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -189,9 +182,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/insurances" }, - "duration": 286 + "duration": 565 } ] \ No newline at end of file diff --git a/src/test/cassettes/insurance/get_next_page.json b/src/test/cassettes/insurance/get_next_page.json new file mode 100644 index 000000000..c8426e89e --- /dev/null +++ b/src/test/cassettes/insurance/get_next_page.json @@ -0,0 +1,177 @@ +[ + { + "recordedAt": 1723823798, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/insurances?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"insurances\": [\n {\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\": \"2024-08-16T15:56:36Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:56:36+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\": \"2024-08-16T15:56:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_1e09965d5be811ef8e70ac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"EZ1000000001\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56: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\": \"2024-07-16T15:56:37Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:33:37Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\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/djE6dHJrX2JhNGE2ODlkNmJkYTRiOWI4YjJiN2I1YTM5ODIyNjBi\",\n \"est_delivery_date\": \"2024-08-16T15:56:37Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:56:37Z\",\n \"signed_by\": null,\n \"id\": \"trk_ba4a689d6bda4b9b8b2b7b5a3982260b\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [\n \"Insurance was cancelled by the user.\"\n ],\n \"id\": \"ins_0c311b3ad5d3440489c2ff8e5b24cc3c\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_1e0f386b5be811efb9393cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"cancelled\"\n },\n {\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\": \"2024-07-24T22:21:52Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-24T22:21:51+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\": \"2024-07-24T22:21:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_205b6acd4a0b11efa1f6ac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"EZ1000000001\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-07-24T22:23:34Z\",\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\": \"2024-08-16T15:56: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\": \"2024-07-16T15:56:37Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:33:37Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\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/djE6dHJrX2JhNGE2ODlkNmJkYTRiOWI4YjJiN2I1YTM5ODIyNjBi\",\n \"est_delivery_date\": \"2024-08-16T15:56:37Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:56:37Z\",\n \"signed_by\": null,\n \"id\": \"trk_ba4a689d6bda4b9b8b2b7b5a3982260b\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_08671ea4bb7446708ca3dc66dba65b8b\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2024-07-24T22:21: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\": \"2024-07-24T22:21:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_206020f74a0b11efb5863cecef1b359e\",\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\": \"100.00000\",\n \"fee\": {\n \"amount\": \"0.50000\",\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n \"created_at\": \"2024-07-23T21:16:54Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-23T21:16:52+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\": \"2024-07-23T21:16:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_e1bbefa5493811efbce2ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_2ffabf823a754afdb236fdd933fc126c\",\n \"tracking_code\": \"9400100110368066416763\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-07-23T21:16:55Z\",\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\": {\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\": \"2024-06-26T11:10:55Z\",\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\": \"2024-07-23T21:16:55Z\",\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\": \"2024-06-23T21:19:55Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T09:56:55Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T20:01:55Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T21:37:55Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T00:28:55Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:08:55Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:18:55Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T11:10:55Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Delivered\",\n \"object\": \"TrackingDetail\",\n \"status\": \"delivered\",\n \"status_detail\": \"arrived_at_destination\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_2ffabf823a754afdb236fdd933fc126c\",\n \"tracking_code\": \"9400100110368066416763\",\n \"status_detail\": \"arrived_at_destination\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzNjODUyNTc2ZjMwNTRiNGNhNmFiMDY1ZDgxNmRhNTVk\",\n \"est_delivery_date\": \"2024-07-23T21:19:55Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-23T21:19:55Z\",\n \"signed_by\": \"John Tester\",\n \"id\": \"trk_3c852576f3054b4ca6ab065d816da55d\",\n \"object\": \"Tracker\",\n \"status\": \"delivered\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_0ac2c47236234589b9bd8f58484fdc59\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-07-23T21:16: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\": \"2024-07-23T21:16:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_e1be9761493811efb577ac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\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\": \"2024-07-23T21:16:48Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-23T21:16:46+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\": \"2024-07-23T21:16:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_de510f23493811efac203cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_6d9270111c6840dbb5ea5d7ca26c2807\",\n \"tracking_code\": \"9400100110368066416756\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-07-23T21:16:49Z\",\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\": {\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\": \"2024-06-26T11:10:49Z\",\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\": \"2024-07-23T21:16:49Z\",\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\": \"2024-06-23T21:19:49Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T09:56:49Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T20:01:49Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T21:37:49Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T00:28:49Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:08:49Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:18:49Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T11:10:49Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Delivered\",\n \"object\": \"TrackingDetail\",\n \"status\": \"delivered\",\n \"status_detail\": \"arrived_at_destination\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_6d9270111c6840dbb5ea5d7ca26c2807\",\n \"tracking_code\": \"9400100110368066416756\",\n \"status_detail\": \"arrived_at_destination\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzg4OTMzMjU0M2FjMjQ3M2I4YTk4YTk4NTQ3NzU5NDhj\",\n \"est_delivery_date\": \"2024-07-23T21:19:49Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-23T21:19:49Z\",\n \"signed_by\": \"John Tester\",\n \"id\": \"trk_889332543ac2473b8a98a9854775948c\",\n \"object\": \"Tracker\",\n \"status\": \"delivered\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_8601c937f7394ac09ec16dc9aec5b390\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-07-23T21:16: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\": \"2024-07-23T21:16:46+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_de52d6e3493811ef80e0ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\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\": \"2024-07-23T21:16:42Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-23T21:16:40+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\": \"2024-07-23T21:16:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_dab7e11e493811efbf7bac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_a2950885f2f34a4fb453b95b4390acb9\",\n \"tracking_code\": \"9400100110368066416749\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-07-23T21:16:43Z\",\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\": {\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\": \"2024-06-26T11:10:43Z\",\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\": \"2024-07-23T21:16:43Z\",\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\": \"2024-06-23T21:19:43Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T09:56:43Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T20:01:43Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T21:37:43Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T00:28:43Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:08:43Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:18:43Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T11:10:43Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Delivered\",\n \"object\": \"TrackingDetail\",\n \"status\": \"delivered\",\n \"status_detail\": \"arrived_at_destination\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_a2950885f2f34a4fb453b95b4390acb9\",\n \"tracking_code\": \"9400100110368066416749\",\n \"status_detail\": \"arrived_at_destination\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzA4OTI5ZGYwYjE5MDRlMjFhZmM0ZGFkYTNkZjVhY2Rk\",\n \"est_delivery_date\": \"2024-07-23T21:19:43Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-23T21:19:43Z\",\n \"signed_by\": \"John Tester\",\n \"id\": \"trk_08929df0b1904e21afc4dada3df5acdd\",\n \"object\": \"Tracker\",\n \"status\": \"delivered\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_fd87478c4ff2447fa678853fa6aebaff\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-07-23T21:16: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\": \"2024-07-23T21:16:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_daba1db0493811efba19ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\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": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "22737" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf76b5e786b81b00358729" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.425539" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/insurances?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 636 + }, + { + "recordedAt": 1723823799, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/insurances?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%69%6E%73%5F%66%64%38%37%34%37%38%63%34%66%66%32%34%34%37%66%61%36%37%38%38%35%33%66%61%36%61%65%62%61%66%66" + }, + "response": { + "body": "{\n \"insurances\": [\n {\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\": \"2024-07-23T20:45:15Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-23T20:45:13+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\": \"2024-07-23T20:45:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_75d6d62d493411efab943cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_4381b08c0e1047ec8dc23d1f17b7cd87\",\n \"tracking_code\": \"9400100110368066410860\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-07-23T20:45:16Z\",\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\": {\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\": \"2024-06-26T10:39:16Z\",\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\": \"2024-07-23T20:45: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\": \"2024-06-23T20:48:16Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T09:25:16Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T19:30:16Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T21:06:16Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T23:57:16Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T05:37:16Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T05:47:16Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T10:39:16Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Delivered\",\n \"object\": \"TrackingDetail\",\n \"status\": \"delivered\",\n \"status_detail\": \"arrived_at_destination\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_4381b08c0e1047ec8dc23d1f17b7cd87\",\n \"tracking_code\": \"9400100110368066410860\",\n \"status_detail\": \"arrived_at_destination\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2M2YmY2MzM2ODc3OTRhYWY4OTdiNmJkZGJmYzUwNTBl\",\n \"est_delivery_date\": \"2024-07-23T20:48:16Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-23T20:48:17Z\",\n \"signed_by\": \"John Tester\",\n \"id\": \"trk_c6bf633687794aaf897b6bddbfc5050e\",\n \"object\": \"Tracker\",\n \"status\": \"delivered\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_a62c71d01373434c8a0894f4b4379e2a\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-07-23T20:45: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\": \"2024-07-23T20:45:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_75d878ca493411ef8108ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\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\": \"2024-07-23T20:46:18Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-23T20:46:16+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\": \"2024-07-23T20:46:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_9b9a9678493411efbbf63cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_358fc51660b0401aa2ba94b360404e50\",\n \"tracking_code\": \"9400100110368066411225\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-07-23T20:46:19Z\",\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\": {\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\": \"2024-06-26T10:40:19Z\",\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\": \"2024-07-23T20:46: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\": \"2024-06-23T20:49:19Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T09:26:19Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T19:31:19Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T21:07:19Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T23:58:19Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T05:38:19Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T05:48:19Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T10:40:19Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Delivered\",\n \"object\": \"TrackingDetail\",\n \"status\": \"delivered\",\n \"status_detail\": \"arrived_at_destination\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_358fc51660b0401aa2ba94b360404e50\",\n \"tracking_code\": \"9400100110368066411225\",\n \"status_detail\": \"arrived_at_destination\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzI2NTFlYzI4NGEwYjRhNDY4NjdkYWIzYTUxZDM1ODI4\",\n \"est_delivery_date\": \"2024-07-23T20:49:19Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-23T20:49:19Z\",\n \"signed_by\": \"John Tester\",\n \"id\": \"trk_2651ec284a0b4a46867dab3a51d35828\",\n \"object\": \"Tracker\",\n \"status\": \"delivered\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_7dd82606c77c46cda3c96f86e57bd9b9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-07-23T20:46: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\": \"2024-07-23T20:46:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_9b9d1d41493411ef85fcac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\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\": \"2024-07-23T20:47:26Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-23T20:47: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\": \"2024-07-23T20:47:26+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_c428270f493411ef8f513cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_48dc72e60c9b42029263b4ddef062d2f\",\n \"tracking_code\": \"9400100110368066411584\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-07-23T20:47:27Z\",\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\": {\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\": \"2024-06-26T10:41:28Z\",\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\": \"2024-07-23T20:47: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\": \"2024-06-23T20:50:28Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T09:27:28Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T19:32:28Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T21:08:28Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T23:59:28Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T05:39:28Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T05:49:28Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T10:41:28Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Delivered\",\n \"object\": \"TrackingDetail\",\n \"status\": \"delivered\",\n \"status_detail\": \"arrived_at_destination\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_48dc72e60c9b42029263b4ddef062d2f\",\n \"tracking_code\": \"9400100110368066411584\",\n \"status_detail\": \"arrived_at_destination\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2VjYzk5YzA5ZTRhZTRjM2FhMzU5MmY5NTFhMTY4MDQ3\",\n \"est_delivery_date\": \"2024-07-23T20:50:28Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-23T20:50:28Z\",\n \"signed_by\": \"John Tester\",\n \"id\": \"trk_ecc99c09e4ae4c3aa3592f951a168047\",\n \"object\": \"Tracker\",\n \"status\": \"delivered\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_9a6a479680bd4cfe9539338a70510693\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-07-23T20: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\": \"2024-07-23T20:47:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_c429e973493411ef99dcac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\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\": \"2024-07-23T21:08:17Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-23T21:08: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\": \"2024-07-23T21:08:17+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_ad9f1092493711efb575ac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_220c769f287b4a3f9f275f20630c5f2d\",\n \"tracking_code\": \"9400100110368066415445\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-07-23T21:08:18Z\",\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\": {\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\": \"2024-06-26T11:02:18Z\",\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\": \"2024-07-23T21:08: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\": \"2024-06-23T21:11:18Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T09:48:18Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T19:53:18Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T21:29:18Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T00:20:18Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:00:18Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:10:18Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T11:02:18Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Delivered\",\n \"object\": \"TrackingDetail\",\n \"status\": \"delivered\",\n \"status_detail\": \"arrived_at_destination\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_220c769f287b4a3f9f275f20630c5f2d\",\n \"tracking_code\": \"9400100110368066415445\",\n \"status_detail\": \"arrived_at_destination\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzk5OTNlZjkxMjFiMjQxYmJiNGM0NWVlNDEzMzhjMzVk\",\n \"est_delivery_date\": \"2024-07-23T21:11:18Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-23T21:11:18Z\",\n \"signed_by\": \"John Tester\",\n \"id\": \"trk_9993ef9121b241bbb4c45ee41338c35d\",\n \"object\": \"Tracker\",\n \"status\": \"delivered\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_22e4bf754387428ab7a4fa911d74dd43\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-07-23T21:08: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\": \"2024-07-23T21:08:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_ada1a42e493711ef83bcac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n },\n {\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\": \"2024-07-23T21:14:45Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-23T21:14:43+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\": \"2024-07-23T21:14:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_94cc88ba493811efa2a2ac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": \"shp_5f4859079b0446409ebaf7feb0fefbc2\",\n \"tracking_code\": \"9400100110368066416374\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-07-23T21:14:46Z\",\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\": {\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\": \"2024-06-26T11:08:46Z\",\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\": \"2024-07-23T21:14:46Z\",\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\": \"2024-06-23T21:17:46Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T09:54:46Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-24T19:59:46Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T21:35:46Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T00:26:46Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:06:46Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T06:16:46Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-26T11:08:46Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Delivered\",\n \"object\": \"TrackingDetail\",\n \"status\": \"delivered\",\n \"status_detail\": \"arrived_at_destination\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_5f4859079b0446409ebaf7feb0fefbc2\",\n \"tracking_code\": \"9400100110368066416374\",\n \"status_detail\": \"arrived_at_destination\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Q4YTI1YTQ2ZDkyNzQ0NGZiOTNlNzg1OTA1ZWJjMDNj\",\n \"est_delivery_date\": \"2024-07-23T21:17:46Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-23T21:17:46Z\",\n \"signed_by\": \"John Tester\",\n \"id\": \"trk_d8a25a46d927444fb93e785905ebc03c\",\n \"object\": \"Tracker\",\n \"status\": \"delivered\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_3b89d3d6211647cc9a134f0cecc90905\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-07-23T21:14: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\": \"2024-07-23T21:14:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_94ce6bdf493811ef9cd9ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"purchased\"\n }\n ],\n \"has_more\": false\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "26568" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44166bf76b6e786b81c003587ea" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.420834" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/insurances?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%69%6E%73%5F%66%64%38%37%34%37%38%63%34%66%66%32%34%34%37%66%61%36%37%38%38%35%33%66%61%36%61%65%62%61%66%66" + }, + "duration": 620 + } +] \ No newline at end of file diff --git a/src/test/cassettes/insurance/refund.json b/src/test/cassettes/insurance/refund.json new file mode 100644 index 000000000..cb494b5d4 --- /dev/null +++ b/src/test/cassettes/insurance/refund.json @@ -0,0 +1,180 @@ +[ + { + "recordedAt": 1723823797, + "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\": \"EZ1000000001\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "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\": \"2024-08-16T15:56:36Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:56:36+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\": \"2024-08-16T15:56:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_1e09965d5be811ef8e70ac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"EZ1000000001\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-08-16T15:56:36Z\",\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\": \"2024-07-24T22:21: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\": \"2024-06-24T22:21:52Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T10:58:52Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\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/djE6dHJrX2VjNDg5YTg4NWQ3MzRlNDY5MjRiZWZhZDMzMzZkNWY0\",\n \"est_delivery_date\": \"2024-07-24T22:21:52Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-24T22:21:52Z\",\n \"signed_by\": null,\n \"id\": \"trk_ec489a885d734e46924befad3336d5f4\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_0c311b3ad5d3440489c2ff8e5b24cc3c\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_1e0f386b5be811efb9393cecef1b359e\",\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": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "3370" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf76b4e786b819003585ea" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.545189" + ], + "location": [ + "/api/v2/insurances/ins_0c311b3ad5d3440489c2ff8e5b24cc3c" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/insurances" + }, + "duration": 748 + }, + { + "recordedAt": 1723823797, + "request": { + "body": "", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/insurances/ins_0c311b3ad5d3440489c2ff8e5b24cc3c/refund" + }, + "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\": \"2024-08-16T15:56:36Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:56:36+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\": \"2024-08-16T15:56:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_1e09965d5be811ef8e70ac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"EZ1000000001\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56: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\": \"2024-07-16T15:56:37Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:33:37Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\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/djE6dHJrX2JhNGE2ODlkNmJkYTRiOWI4YjJiN2I1YTM5ODIyNjBi\",\n \"est_delivery_date\": \"2024-08-16T15:56:37Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:56:37Z\",\n \"signed_by\": null,\n \"id\": \"trk_ba4a689d6bda4b9b8b2b7b5a3982260b\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [\n \"Insurance was cancelled by the user.\"\n ],\n \"id\": \"ins_0c311b3ad5d3440489c2ff8e5b24cc3c\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_1e0f386b5be811efb9393cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"object\": \"Insurance\",\n \"status\": \"cancelled\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "3420" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb40nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf76b5e786b81a0035868b" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.317700" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/insurances/ins_0c311b3ad5d3440489c2ff8e5b24cc3c/refund" + }, + "duration": 530 + } +] \ No newline at end of file diff --git a/src/test/cassettes/insurance/retrieve.json b/src/test/cassettes/insurance/retrieve.json index e233eb0c3..d5eb7ab0f 100644 --- a/src/test/cassettes/insurance/retrieve.json +++ b/src/test/cassettes/insurance/retrieve.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456497, + "recordedAt": 1723823801, "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 \"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\": \"GroundAdvantage\",\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,69 +18,66 @@ "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.93000\",\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\": \"2024-08-16T15:56:40Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:56:40Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:56:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_087a4b7c8ce7471391e45ed9d73042fa\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:56:40Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9924da2d05e249f48a07b1b7bd88aff5\",\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\": \"2024-08-16T15:56:41Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_087a4b7c8ce7471391e45ed9d73042fa\",\n \"tracking_code\": \"9400100105807076062211\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2IxMzBjMzYyZDUxZDQzNWE5MmZjY2U5ZmI0ZDAyMjcy\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:56:41Z\",\n \"signed_by\": null,\n \"id\": \"trk_b130c362d51d435a92fcce9fb4d02272\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_201e9a175be811ef8a5fac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_087a4b7c8ce7471391e45ed9d73042fa\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_201e9a175be811ef8a5fac1f6bc53342\",\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\": \"2024-08-16T15:56:40Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e81927cbe97e104a39869c50e350552b6f.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:56:40Z\",\n \"id\": \"pl_3c8822dcc07f4d6498d474dfe8620a85\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:56:40Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:56:40Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:56:40Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_9a16b1f0b664490fb220b7d588626f25\",\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\": \"2024-08-16T15:56:40+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\": \"2024-08-16T15:56:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_201c1dc75be811ef8bd6ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:56:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_087a4b7c8ce7471391e45ed9d73042fa\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:56:40Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6b58872cf2f1458583fe9f6ea2be280b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:56:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_087a4b7c8ce7471391e45ed9d73042fa\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:56:40Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_01d32ed588d2472f88d5b33c0dc8c3bf\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:56:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_087a4b7c8ce7471391e45ed9d73042fa\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:56:40Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9924da2d05e249f48a07b1b7bd88aff5\",\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\": \"2024-08-16T15:56:40+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\": \"2024-08-16T15:56:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_201c1dc75be811ef8bd6ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076062211\",\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" + "6549" ], "expires": [ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb35nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c396307d070f7a75334000875bd" + "8a4bf43a66bf76b8e786b85c0035896d" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.931025" + "1.011530" ], - "etag": [ - "W/\"d3b7bcd03c2e477c19c3704d81d189c3\"" + "location": [ + "/api/v2/shipments/shp_087a4b7c8ce7471391e45ed9d73042fa" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_96f533078e4c4d579aea1305aae36567" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,15 +87,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1059 + "duration": 1214 }, { - "recordedAt": 1661456497, + "recordedAt": 1723823801, "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\": \"9400100105807076062211\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,69 +110,66 @@ "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\": \"2024-08-16T15:56:41Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:56:41+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\": \"2024-08-16T15:56:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_20f631875be811ef8fbcac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"9400100105807076062211\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-08-16T15:56:41Z\",\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\": \"2024-08-16T15:56:41Z\",\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\": \"2024-07-16T15:56:41Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:33:41Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_087a4b7c8ce7471391e45ed9d73042fa\",\n \"tracking_code\": \"9400100105807076062211\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2IxMzBjMzYyZDUxZDQzNWE5MmZjY2U5ZmI0ZDAyMjcy\",\n \"est_delivery_date\": \"2024-08-16T15:56:41Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:56:41Z\",\n \"signed_by\": null,\n \"id\": \"trk_b130c362d51d435a92fcce9fb4d02272\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_5f17998ff9fc480fb61ca56e007a01c8\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_20fba7295be811efba703cecef1b359e\",\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": [ "HTTP/1.1 201 Created" ], "content-length": [ - "3428" + "3424" ], "expires": [ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d071f7dfbdba00087657" + "8a4bf43c66bf76b9e786b85e00358aa3" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.161831" + "0.375276" ], - "etag": [ - "W/\"163c828483afe431c5db3ce87fcf5440\"" + "location": [ + "/api/v2/insurances/ins_5f17998ff9fc480fb61ca56e007a01c8" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/insurances/ins_47794ca5e06e4173a19ae1e3a332ed5b" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -186,13 +179,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/insurances" }, - "duration": 293 + "duration": 577 }, { - "recordedAt": 1661456498, + "recordedAt": 1723823802, "request": { "body": "", "method": "GET", @@ -204,69 +196,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/insurances/ins_47794ca5e06e4173a19ae1e3a332ed5b" + "uri": "https://api.easypost.com/v2/insurances/ins_5f17998ff9fc480fb61ca56e007a01c8" }, "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\": \"2024-08-16T15:56:41Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:56:41+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\": \"2024-08-16T15:56:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_20f631875be811ef8fbcac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"shipment_id\": null,\n \"tracking_code\": \"9400100105807076062211\",\n \"mode\": \"test\",\n \"reference\": null,\n \"updated_at\": \"2024-08-16T15:56:41Z\",\n \"provider\": \"easypost\",\n \"tracker\": {\n \"fees\": [],\n \"carrier_detail\": null,\n \"created_at\": \"2024-08-16T15:56:41Z\",\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\": \"2024-08-16T15:56:41Z\",\n \"description\": \"\",\n \"source\": \"ProcessingError\",\n \"message\": \"In test mode, only test tracking numbers are valid. Test tracking numbers are EZ1000000001, EZ2000000002, ... , EZ7000000007\",\n \"object\": \"TrackingDetail\",\n \"status\": \"error\",\n \"status_detail\": null,\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": null,\n \"tracking_code\": \"9400100105807076062211\",\n \"status_detail\": null,\n \"mode\": \"test\",\n \"finalized\": true,\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Q3ZjBjOGJiYjBjNzQxZjNiMDk1NGJkNTY1NDkxY2Ey\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:56:41Z\",\n \"signed_by\": null,\n \"id\": \"trk_d7f0c8bbb0c741f3b0954bd565491ca2\",\n \"object\": \"Tracker\",\n \"status\": \"error\"\n },\n \"provider_id\": null,\n \"messages\": [],\n \"id\": \"ins_5f17998ff9fc480fb61ca56e007a01c8\",\n \"from_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_20fba7295be811efba703cecef1b359e\",\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": [ "HTTP/1.1 200 OK" ], "content-length": [ - "3432" + "2666" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb36nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d072f7b8df370008768e" + "8a4bf43a66bf76bae786b85f00358b41" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.060818" - ], - "etag": [ - "W/\"dcb93a6046f8b3034a592cac21d84405\"" + "0.126416" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -276,9 +265,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/insurances/ins_47794ca5e06e4173a19ae1e3a332ed5b" + "uri": "https://api.easypost.com/v2/insurances/ins_5f17998ff9fc480fb61ca56e007a01c8" }, - "duration": 185 + "duration": 328 } ] \ No newline at end of file diff --git a/src/test/cassettes/luma/get_promise.json b/src/test/cassettes/luma/get_promise.json new file mode 100644 index 000000000..9590cb630 --- /dev/null +++ b/src/test/cassettes/luma/get_promise.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1750095923, + "request": { + "body": "{\n \"shipment\": {\n \"parcel\": {\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"height\": 4.0\n },\n \"planned_ship_date\": \"2025-06-16\",\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 \"ruleset_name\": \"cheapest_delivery\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/luma/promise" + }, + "response": { + "body": "{\n \"luma_info\": {\n \"matching_rule_idx\": 0.0,\n \"ruleset_description\": \"Buy the cheapest rate that satisfies all of the following:\\nRule 0\\n \\nOtherwise buy the cheapest rate\",\n \"luma_selected_rate\": {\n \"carrier\": \"USPS\",\n \"rate\": \"6.07\",\n \"service\": \"GroundAdvantage\",\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"currency\": \"USD\",\n \"luma_predicted_deliver_by_date\": \"2025-06-19\"\n },\n \"ai_results\": [\n {\n \"meets_ruleset_requirements\": true,\n \"carrier\": \"USPS\",\n \"predicted_deliver_by_date\": \"2025-06-19\",\n \"service\": \"GroundAdvantage\",\n \"rate_usd\": \"6.07\",\n \"predicted_deliver_days\": 3.0\n },\n {\n \"meets_ruleset_requirements\": true,\n \"carrier\": \"USPS\",\n \"predicted_deliver_by_date\": \"2025-06-17\",\n \"service\": \"Express\",\n \"rate_usd\": \"34.15\",\n \"predicted_deliver_days\": 1.0\n },\n {\n \"meets_ruleset_requirements\": true,\n \"carrier\": \"USPS\",\n \"predicted_deliver_by_date\": \"2025-06-18\",\n \"service\": \"Priority\",\n \"rate_usd\": \"7.42\",\n \"predicted_deliver_days\": 2.0\n }\n ]\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "873" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb38nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "6ebfb8b068505833e2baa4f8006d7fcc" + ], + "x-proxied": [ + "intlb4nuq ec99f2d065", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.172372" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202506161725-4166f0359d-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/luma/promise" + }, + "duration": 284 + } +] \ No newline at end of file diff --git a/src/test/cassettes/order/buy.json b/src/test/cassettes/order/buy.json deleted file mode 100644 index a4bca7efe..000000000 --- a/src/test/cassettes/order/buy.json +++ /dev/null @@ -1,194 +0,0 @@ -[ - { - "recordedAt": 1661456532, - "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-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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 201 Created" - ], - "content-length": [ - "11334" - ], - "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": [ - "07323c3a6307d093e68a139c0008870a" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.695703" - ], - "etag": [ - "W/\"5487d603d144b29dbe7e133d6ecfec76\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "location": [ - "/api/v2/orders/order_b9d0a56fb5b1468298d19af92d204145" - ], - "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/orders" - }, - "duration": 832 - }, - { - "recordedAt": 1661456533, - "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_b9d0a56fb5b1468298d19af92d204145/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}", - "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": [ - "07323c396307d094f7dc843400088799" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.972922" - ], - "etag": [ - "W/\"91b61792ef21c887ddc3cdbaa460ccf8\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/orders/order_b9d0a56fb5b1468298d19af92d204145/buy" - }, - "duration": 1108 - } -] \ No newline at end of file diff --git a/src/test/cassettes/order/buy_with_params.json b/src/test/cassettes/order/buy_with_params.json new file mode 100644 index 000000000..ae4a7ab19 --- /dev/null +++ b/src/test/cassettes/order/buy_with_params.json @@ -0,0 +1,186 @@ +[ + { + "recordedAt": 1723823908, + "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 \"weight\": 10.2\n }\n },\n {\n \"parcel\": {\n \"weight\": 17.5\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\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\": \"17.22\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.30\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"14.48\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8d70c771dffe437da59d254a905db12c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"12.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"17.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"11.40\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_35ad1f2c242b4dd48535ea3d9d187980\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"70.30\",\n \"created_at\": null,\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"80.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"70.30\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_18f88c8de8f04e299efe6e193ffc647b\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2024-08-16T15:58:27Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\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\": \"2024-08-16T15:58:27Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\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\": \"2024-08-16T15:58:27Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:27Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_a7382a7799af4894bcf12b345fd26cb8\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\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.25\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8d70c771dffe437da59d254a905db12c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_35ad1f2c242b4dd48535ea3d9d187980\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_18f88c8de8f04e299efe6e193ffc647b\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\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_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_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 \"order_id\": \"order_e4f72f9fe91a4373b85ee59ebc901c86\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:58:27Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\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\": \"2024-08-16T15:58:27Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:27Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_b7ce992c1a6146af9aa35ef207154021\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\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\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ec4cc7aee65e451c841afb8bf730a913\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_56c7ac22afd448ee8182c2bc6697d74a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.97\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_142c56933c0048cea318dcb67ba08ec2\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\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_e4f72f9fe91a4373b85ee59ebc901c86\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": \"\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:28Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\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_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_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 \"id\": \"order_e4f72f9fe91a4373b85ee59ebc901c86\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\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": [ + "14670" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf7723e786c4bb0035f82d" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.854134" + ], + "location": [ + "/api/v2/orders/order_e4f72f9fe91a4373b85ee59ebc901c86" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/orders" + }, + "duration": 1057 + }, + { + "recordedAt": 1723823911, + "request": { + "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"GroundAdvantage\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/orders/order_e4f72f9fe91a4373b85ee59ebc901c86/buy" + }, + "response": { + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58:27+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\": \"2024-08-16T15:58:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"17.22\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.30\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"14.48\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8d70c771dffe437da59d254a905db12c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"12.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"17.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"11.40\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_35ad1f2c242b4dd48535ea3d9d187980\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"70.30\",\n \"created_at\": null,\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"80.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"70.30\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_18f88c8de8f04e299efe6e193ffc647b\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2024-08-16T15:58:27Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58:27+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\": \"2024-08-16T15:58:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\n \"street2\": \"\",\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.07000\",\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\": \"2024-08-16T15:58:27Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:29Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:29Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:29Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_35ad1f2c242b4dd48535ea3d9d187980\",\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\": \"2024-08-16T15:58:30Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"tracking_code\": \"9400100105807076062990\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2VjMTZjZGFiNjY3ZjRkMTViNWM5YjNiMjVmOWNlYjMw\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:30Z\",\n \"signed_by\": null,\n \"id\": \"trk_ec16cdab667f4d15b5c9b3b25f9ceb30\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\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\": \"2024-08-16T15:58:29Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e86c978345cd4f48dc810c16053dcb3646.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:29Z\",\n \"id\": \"pl_0b1e99ab251a4803be6acd77ee9457b2\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:29Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:27Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:27Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_a7382a7799af4894bcf12b345fd26cb8\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58:27+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\": \"2024-08-16T15:58:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\n \"street2\": \"\",\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.25\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8d70c771dffe437da59d254a905db12c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_35ad1f2c242b4dd48535ea3d9d187980\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_18f88c8de8f04e299efe6e193ffc647b\",\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\": \"2024-08-16T15:58:27+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\": \"2024-08-16T15:58:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076062990\",\n \"messages\": [],\n \"order_id\": \"order_e4f72f9fe91a4373b85ee59ebc901c86\",\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\": \"6.33000\",\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\": \"2024-08-16T15:58:27Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:30Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:30Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ec4cc7aee65e451c841afb8bf730a913\",\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\": \"2024-08-16T15:58:30Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"tracking_code\": \"9434600105807076063005\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Q3ZTNlNjNhYjUwNzRjYmY5NTUxODI2OGExNmNlZjU1\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:30Z\",\n \"signed_by\": null,\n \"id\": \"trk_d7e3e63ab5074cbf95518268a16cef55\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\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\": \"2024-08-16T15:58:30Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8240f500213e54273b72a7aedaa0c0fcc.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:30Z\",\n \"id\": \"pl_c2de163b7f2a4c848f788b3f7ff881a0\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:30Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:27Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:27Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_b7ce992c1a6146af9aa35ef207154021\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58:27+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\": \"2024-08-16T15:58:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\n \"street2\": \"\",\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\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ec4cc7aee65e451c841afb8bf730a913\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_56c7ac22afd448ee8182c2bc6697d74a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.97\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_142c56933c0048cea318dcb67ba08ec2\",\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\": \"2024-08-16T15:58:27+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\": \"2024-08-16T15:58:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9434600105807076063005\",\n \"messages\": [],\n \"order_id\": \"order_e4f72f9fe91a4373b85ee59ebc901c86\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": \"\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:28Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\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_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_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 \"id\": \"order_e4f72f9fe91a4373b85ee59ebc901c86\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\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": [ + "18360" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44066bf7725e786c4bd0035f96d" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.936771" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/orders/order_e4f72f9fe91a4373b85ee59ebc901c86/buy" + }, + "duration": 2144 + } +] \ 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..b8512976b --- /dev/null +++ b/src/test/cassettes/order/buy_with_rate.json @@ -0,0 +1,183 @@ +[ + { + "recordedAt": 1723823920, + "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 \"weight\": 10.2\n }\n },\n {\n \"parcel\": {\n \"weight\": 17.5\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\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\": \"70.30\",\n \"created_at\": null,\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"80.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"70.30\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_38ac5fb715e14cabb3029bde5b09d9f5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"17.22\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.30\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"14.48\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4be8395f399b4279b64677dd495f9519\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"12.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"17.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"11.40\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d7e2d2ac36db42ffbbc0aebb8a1e0128\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\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\": \"2024-08-16T15:58:39Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\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\": \"2024-08-16T15:58:39Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_d081bb2780ec4e08bb5bb8f17e58a7c5\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_38ac5fb715e14cabb3029bde5b09d9f5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4be8395f399b4279b64677dd495f9519\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d7e2d2ac36db42ffbbc0aebb8a1e0128\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\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_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_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 \"order_id\": \"order_64ba299ed95a46a4a3a341cb78e5fdf7\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\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\": \"2024-08-16T15:58:39Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_0a6f94b2055f4d7888ee1294c5b4fece\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\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.97\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b1784194fdd8469fade7b00b5f5e9a7e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_119edccd62c24583b6e7f59ced7b5d49\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fe13d12f237c4ece984468ced5737017\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\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_64ba299ed95a46a4a3a341cb78e5fdf7\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": \"\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:40Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\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_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_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_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 \"id\": \"order_64ba299ed95a46a4a3a341cb78e5fdf7\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\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": [ + "14670" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf772fe786c4e300360491" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.930294" + ], + "location": [ + "/api/v2/orders/order_64ba299ed95a46a4a3a341cb78e5fdf7" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/orders" + }, + "duration": 1139 + }, + { + "recordedAt": 1723823922, + "request": { + "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"GroundAdvantage\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/orders/order_64ba299ed95a46a4a3a341cb78e5fdf7/buy" + }, + "response": { + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"70.30\",\n \"created_at\": null,\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"80.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"70.30\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_38ac5fb715e14cabb3029bde5b09d9f5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"17.22\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.30\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"14.48\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4be8395f399b4279b64677dd495f9519\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"12.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"17.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"11.40\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d7e2d2ac36db42ffbbc0aebb8a1e0128\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"to_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\n \"street2\": \"\",\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.07000\",\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\": \"2024-08-16T15:58:39Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:41Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:41Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d7e2d2ac36db42ffbbc0aebb8a1e0128\",\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\": \"2024-08-16T15:58:42Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"tracking_code\": \"9400100105807076063027\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2FmMmE3NjU2YjY2NTRjYWFhMTU2N2E0NjNhMzQ3ZmI1\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"signed_by\": null,\n \"id\": \"trk_af2a7656b6654caaa1567a463a347fb5\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\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\": \"2024-08-16T15:58:41Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8bf48473c72b74f8682106707cb6abc70.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:41Z\",\n \"id\": \"pl_111ca27882714b1fb6e539f4d0e22da1\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:41Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:39Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_d081bb2780ec4e08bb5bb8f17e58a7c5\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_38ac5fb715e14cabb3029bde5b09d9f5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4be8395f399b4279b64677dd495f9519\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d7e2d2ac36db42ffbbc0aebb8a1e0128\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063027\",\n \"messages\": [],\n \"order_id\": \"order_64ba299ed95a46a4a3a341cb78e5fdf7\",\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\": \"6.33000\",\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\": \"2024-08-16T15:58:39Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:42Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_119edccd62c24583b6e7f59ced7b5d49\",\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\": \"2024-08-16T15:58:42Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"tracking_code\": \"9434600105807076063043\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzUwOTc3YWQ1NTc2ZTQ0ZTg5OGJiMzJlODBhZTk5ZmIx\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"signed_by\": null,\n \"id\": \"trk_50977ad5576e44e898bb32e80ae99fb1\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\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\": \"2024-08-16T15:58:42Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e807e421f9466e4883a480b82b1e71f19e.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"id\": \"pl_a8680e95f49c4f15bc068bdcd9e620f3\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:42Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:39Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_0a6f94b2055f4d7888ee1294c5b4fece\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\n \"street2\": \"\",\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.97\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b1784194fdd8469fade7b00b5f5e9a7e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_119edccd62c24583b6e7f59ced7b5d49\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fe13d12f237c4ece984468ced5737017\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9434600105807076063043\",\n \"messages\": [],\n \"order_id\": \"order_64ba299ed95a46a4a3a341cb78e5fdf7\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": \"\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:40Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\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_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_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_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 \"id\": \"order_64ba299ed95a46a4a3a341cb78e5fdf7\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\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": [ + "18360" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf7731e786c4e5003605ed" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.741378" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/orders/order_64ba299ed95a46a4a3a341cb78e5fdf7/buy" + }, + "duration": 1946 + } +] \ No newline at end of file diff --git a/src/test/cassettes/order/create.json b/src/test/cassettes/order/create.json index 747b51cb6..0ebc26cf5 100644 --- a/src/test/cassettes/order/create.json +++ b/src/test/cassettes/order/create.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456537, + "recordedAt": 1723823916, "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}", + "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 \"weight\": 10.2\n }\n },\n {\n \"parcel\": {\n \"weight\": 17.5\n }\n }\n ]\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,69 +18,66 @@ "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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6501c4435be811efa2a63cecef1b359e\",\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\": \"70.30\",\n \"created_at\": null,\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e4b5578a6259435b86c094882a982454\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"80.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"70.30\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f9e87f551e834eb0bad1532c85b099c4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"17.22\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e4b5578a6259435b86c094882a982454\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.30\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"14.48\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fbd17de95ec9434ab5ab9fa1688a53bf\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"12.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e4b5578a6259435b86c094882a982454\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"17.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"11.40\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cb148fb402df470d990e139882912791\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2024-08-16T15:58:35Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6501c4435be811efa2a63cecef1b359e\",\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\": \"2024-08-16T15:58:35Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_650392c95be811efb741ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_e4b5578a6259435b86c094882a982454\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_650392c95be811efb741ac1f6bc539ae\",\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\": \"2024-08-16T15:58:35Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:35Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_082d308d497843198c9e2e079b4f621f\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6501c4435be811efa2a63cecef1b359e\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:36Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e4b5578a6259435b86c094882a982454\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:36Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f9e87f551e834eb0bad1532c85b099c4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:36Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e4b5578a6259435b86c094882a982454\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:36Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fbd17de95ec9434ab5ab9fa1688a53bf\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:36Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e4b5578a6259435b86c094882a982454\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:36Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cb148fb402df470d990e139882912791\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6501c4435be811efa2a63cecef1b359e\",\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_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\": \"order_ca8e568f95cf4fb687ecb3e49382f66b\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:58:35Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_650392c95be811efb741ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_2cb956b4e37a4d66abcc69728583cb34\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_650392c95be811efb741ac1f6bc539ae\",\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\": \"2024-08-16T15:58:35Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:35Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_5eb5df74e19c4c09850ca2ef6693d9fa\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6501c4435be811efa2a63cecef1b359e\",\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\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:36Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2cb956b4e37a4d66abcc69728583cb34\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:36Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3355215d75c4421984bdc64e23b278d9\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.97\",\n \"created_at\": \"2024-08-16T15:58:36Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2cb956b4e37a4d66abcc69728583cb34\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:36Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_c05d5247c4ca4d99b9838c4e67c938db\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:36Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2cb956b4e37a4d66abcc69728583cb34\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:36Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1c0c36b923404894b7e9962d1dc18f1a\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6501c4435be811efa2a63cecef1b359e\",\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_ca8e568f95cf4fb687ecb3e49382f66b\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": \"\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:36Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_650392c95be811efb741ac1f6bc539ae\",\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_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_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 \"id\": \"order_ca8e568f95cf4fb687ecb3e49382f66b\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_650392c95be811efb741ac1f6bc539ae\",\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" + "14670" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb35nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d098f7a63ad8000889c2" + "8a4bf43d66bf772be786c4dd0036005d" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.754012" + "0.890360" ], - "etag": [ - "W/\"1e3a604de88a6a16f0225eff04df2add\"" + "location": [ + "/api/v2/orders/order_ca8e568f95cf4fb687ecb3e49382f66b" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/orders/order_6d5ecaf82c3a4f0b94a9355fe11211d4" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +87,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/orders" }, - "duration": 897 + "duration": 1099 } ] \ 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..fe494a19f 100644 --- a/src/test/cassettes/order/get_rates.json +++ b/src/test/cassettes/order/get_rates.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456531, + "recordedAt": 1723823912, "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}", + "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 \"weight\": 10.2\n }\n },\n {\n \"parcel\": {\n \"weight\": 17.5\n }\n }\n ]\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,69 +18,69 @@ "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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_627bee845be811efb26dac1f6bc539aa\",\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\": \"70.30\",\n \"created_at\": null,\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_269d79e37a17454aa45bab2aa6cfae87\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"80.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"70.30\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_aa015e5f32574a85a9a010b858d29d4e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"17.22\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_269d79e37a17454aa45bab2aa6cfae87\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.30\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"14.48\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6d3849693a204529b8793b4d47d230e7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"12.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_269d79e37a17454aa45bab2aa6cfae87\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"17.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"11.40\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_641b1bcaf5a54d4a96319ee96faf46f3\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2024-08-16T15:58:31Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_627bee845be811efb26dac1f6bc539aa\",\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\": \"2024-08-16T15:58:31Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:31Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_627df8865be811efa1753cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_269d79e37a17454aa45bab2aa6cfae87\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_627df8865be811efa1753cecef1b359e\",\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\": \"2024-08-16T15:58:31Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:31Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_4a240314851743819ffa437dc4b125ae\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_627bee845be811efb26dac1f6bc539aa\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_269d79e37a17454aa45bab2aa6cfae87\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:32Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_aa015e5f32574a85a9a010b858d29d4e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_269d79e37a17454aa45bab2aa6cfae87\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:32Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6d3849693a204529b8793b4d47d230e7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_269d79e37a17454aa45bab2aa6cfae87\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:32Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_641b1bcaf5a54d4a96319ee96faf46f3\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_627bee845be811efb26dac1f6bc539aa\",\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_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 \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_a8804bff91244c2ca5688d4e4fa9cf3a\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:58:31Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:31Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_627df8865be811efa1753cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_59a0bfac7f9d46de8355e4278797e339\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_627df8865be811efa1753cecef1b359e\",\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\": \"2024-08-16T15:58:31Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:31Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_40e74dbdbbea4e6682fda21f2cbd732e\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_627bee845be811efb26dac1f6bc539aa\",\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.97\",\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59a0bfac7f9d46de8355e4278797e339\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:32Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2731522747bc41a08bb2cbd6d4125de2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59a0bfac7f9d46de8355e4278797e339\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:32Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5b8d22371f414d1c853b549c6ebe61b7\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59a0bfac7f9d46de8355e4278797e339\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:32Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_05f2932317824bceb0b2c4458ccdd047\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_627bee845be811efb26dac1f6bc539aa\",\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_a8804bff91244c2ca5688d4e4fa9cf3a\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": \"\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:32Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_627df8865be811efa1753cecef1b359e\",\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_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 \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_a8804bff91244c2ca5688d4e4fa9cf3a\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:31+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_627df8865be811efa1753cecef1b359e\",\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" + "14670" ], "expires": [ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c396307d092e68ccdca00088656" + "8a4bf43f66bf7727e786c4bf0035fbd4" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.299750" + "0.867037" ], - "etag": [ - "W/\"573bcebfc2e6ed0a1a3ddc087315f64a\"" + "location": [ + "/api/v2/orders/order_a8804bff91244c2ca5688d4e4fa9cf3a" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/orders/order_1f4f47a8c0f6479c997435575a4b9831" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +90,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/orders" }, - "duration": 1439 + "duration": 1076 } ] \ 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..59ab13bfc 100644 --- a/src/test/cassettes/order/lowest_rate.json +++ b/src/test/cassettes/order/lowest_rate.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456536, + "recordedAt": 1723823915, "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}", + "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 \"weight\": 10.2\n }\n },\n {\n \"parcel\": {\n \"weight\": 17.5\n }\n }\n ]\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,69 +18,66 @@ "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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_644315695be811efb6d9ac1f6bc539ae\",\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\": \"12.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8f6eccc16cbf4dbe8131610413aa08d6\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"17.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"11.40\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d25d487c95894606b354c0151247056c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"70.30\",\n \"created_at\": null,\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8f6eccc16cbf4dbe8131610413aa08d6\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"80.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"70.30\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f8c78dccdf8b42048744a2c56a4861dc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"17.22\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8f6eccc16cbf4dbe8131610413aa08d6\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.30\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"14.48\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ffd6922519dc473cb67bac126f4933ce\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2024-08-16T15:58:34Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_644315695be811efb6d9ac1f6bc539ae\",\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\": \"2024-08-16T15:58:34Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:34Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6444d3755be811efb6daac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_8f6eccc16cbf4dbe8131610413aa08d6\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6444d3755be811efb6daac1f6bc539ae\",\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\": \"2024-08-16T15:58:34Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:34Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_b94903eaa864461abc2ee3410524b29d\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_644315695be811efb6d9ac1f6bc539ae\",\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.07\",\n \"created_at\": \"2024-08-16T15:58:35Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8f6eccc16cbf4dbe8131610413aa08d6\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:35Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d25d487c95894606b354c0151247056c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:35Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8f6eccc16cbf4dbe8131610413aa08d6\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:35Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f8c78dccdf8b42048744a2c56a4861dc\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:35Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_8f6eccc16cbf4dbe8131610413aa08d6\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:35Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ffd6922519dc473cb67bac126f4933ce\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_644315695be811efb6d9ac1f6bc539ae\",\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_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_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 \"order_id\": \"order_764ce39790bd41d48ecd0244b92f8b37\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:58:34Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:34Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6444d3755be811efb6daac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f58127d5bf2e4ee5b260d15b464f4be5\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6444d3755be811efb6daac1f6bc539ae\",\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\": \"2024-08-16T15:58:34Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:34Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_be13ad8f6c9743919f34a19f9d223aae\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_644315695be811efb6d9ac1f6bc539ae\",\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\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:35Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f58127d5bf2e4ee5b260d15b464f4be5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:35Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ae3e97cc30044ff79d9601ef495c2aea\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.97\",\n \"created_at\": \"2024-08-16T15:58:35Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f58127d5bf2e4ee5b260d15b464f4be5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:35Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ba0365a6c02346fe8cd7a9797bc4d6bf\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:35Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f58127d5bf2e4ee5b260d15b464f4be5\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:35Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9ea57ce26c38462488f4621c0c13f3e3\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_644315695be811efb6d9ac1f6bc539ae\",\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_764ce39790bd41d48ecd0244b92f8b37\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": \"\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:35Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6444d3755be811efb6daac1f6bc539ae\",\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_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_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_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 \"id\": \"order_764ce39790bd41d48ecd0244b92f8b37\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6444d3755be811efb6daac1f6bc539ae\",\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" + "14670" ], "expires": [ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d097f7a5100c0008892c" + "8a4bf44166bf772ae786c4c40035fefa" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.719436" + "0.832902" ], - "etag": [ - "W/\"aeeb5f8643f1bc695438b2aa96b4a7e8\"" + "location": [ + "/api/v2/orders/order_764ce39790bd41d48ecd0244b92f8b37" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/orders/order_1879d25a237f4d298b26b41b9d87c895" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +87,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/orders" }, - "duration": 845 + "duration": 1033 } ] \ 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..21567b8ea --- /dev/null +++ b/src/test/cassettes/order/new_rate.json @@ -0,0 +1,180 @@ +[ + { + "recordedAt": 1723823917, + "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 \"weight\": 10.2\n }\n },\n {\n \"parcel\": {\n \"weight\": 17.5\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_65c859d25be811efb3d5ac1f6bc539aa\",\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\": \"70.30\",\n \"created_at\": null,\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"80.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"70.30\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b966bf4307a048a393c0cc0cabfddbd4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"17.22\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.30\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"14.48\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e5e6f1c516dc465184a8bc644eb98f3d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"12.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"17.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"11.40\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_173d460bc0334d65b5552955d956900f\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_65c859d25be811efb3d5ac1f6bc539aa\",\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\": \"2024-08-16T15:58:37Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:37Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_65ca3aa55be811efb3d6ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_65ca3aa55be811efb3d6ac1f6bc539aa\",\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\": \"2024-08-16T15:58:37Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_f47943fca71c44bd87e259d7f10ba60f\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_65c859d25be811efb3d5ac1f6bc539aa\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:37Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b966bf4307a048a393c0cc0cabfddbd4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:37Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e5e6f1c516dc465184a8bc644eb98f3d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:37Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_173d460bc0334d65b5552955d956900f\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_65c859d25be811efb3d5ac1f6bc539aa\",\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_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_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 \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_7d92ec045a4a4d4587ca6739e571f36a\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:37Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_65ca3aa55be811efb3d6ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6ad8c8dddc944c96a3c75a0ff4cab9e2\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_65ca3aa55be811efb3d6ac1f6bc539aa\",\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\": \"2024-08-16T15:58:37Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_10b2d1e134c1459b83659ff8ddcc5453\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_65c859d25be811efb3d5ac1f6bc539aa\",\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\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ad8c8dddc944c96a3c75a0ff4cab9e2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:37Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_857f2175bec846de9cb106fb3a6c3441\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.97\",\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ad8c8dddc944c96a3c75a0ff4cab9e2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:37Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f4f929e4dded4cd8bcb44aed63a1cbe5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ad8c8dddc944c96a3c75a0ff4cab9e2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:37Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a237bdd8eed94a4ea20e77c56986c0b6\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_65c859d25be811efb3d5ac1f6bc539aa\",\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_7d92ec045a4a4d4587ca6739e571f36a\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": \"\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:37Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_65ca3aa55be811efb3d6ac1f6bc539aa\",\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_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_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 \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_7d92ec045a4a4d4587ca6739e571f36a\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_65ca3aa55be811efb3d6ac1f6bc539aa\",\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": [ + "14670" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb33nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf772ce786c4df0036019e" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.871235" + ], + "location": [ + "/api/v2/orders/order_7d92ec045a4a4d4587ca6739e571f36a" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/orders" + }, + "duration": 1070 + }, + { + "recordedAt": 1723823919, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/orders/order_7d92ec045a4a4d4587ca6739e571f36a/rates" + }, + "response": { + "body": "{\n \"customs_info\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_65c859d25be811efb3d5ac1f6bc539aa\",\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\": \"17.22\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.30\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"14.48\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62a01f86165a4ab9bdd4573966164872\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"12.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"17.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"11.40\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bbb2c7b7ccf84f46876971aaf251f1d1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"70.30\",\n \"created_at\": null,\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"80.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"70.30\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_816de4b192054508a3d62e05939c0976\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_65c859d25be811efb3d5ac1f6bc539aa\",\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\": \"2024-08-16T15:58:37Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:37Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_65ca3aa55be811efb3d6ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_65ca3aa55be811efb3d6ac1f6bc539aa\",\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\": \"2024-08-16T15:58:37Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_f47943fca71c44bd87e259d7f10ba60f\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_65c859d25be811efb3d5ac1f6bc539aa\",\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.25\",\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:39Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_62a01f86165a4ab9bdd4573966164872\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:39Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bbb2c7b7ccf84f46876971aaf251f1d1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7705bcdd4c1c47a582861319ff55535d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:39Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_816de4b192054508a3d62e05939c0976\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_65c859d25be811efb3d5ac1f6bc539aa\",\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_7d92ec045a4a4d4587ca6739e571f36a\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:37Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_65ca3aa55be811efb3d6ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6ad8c8dddc944c96a3c75a0ff4cab9e2\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_65ca3aa55be811efb3d6ac1f6bc539aa\",\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\": \"2024-08-16T15:58:37Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:37Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_10b2d1e134c1459b83659ff8ddcc5453\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_65c859d25be811efb3d5ac1f6bc539aa\",\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.97\",\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ad8c8dddc944c96a3c75a0ff4cab9e2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:39Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1c784c17a26241bf941e2e3bc4ddec2d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ad8c8dddc944c96a3c75a0ff4cab9e2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:39Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3f34a710a1e0482b84de414ca70439d0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6ad8c8dddc944c96a3c75a0ff4cab9e2\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:39Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1c70dd943a164c968cb0b3bcdadcbebe\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_65c859d25be811efb3d5ac1f6bc539aa\",\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_7d92ec045a4a4d4587ca6739e571f36a\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": \"\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:37Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_65ca3aa55be811efb3d6ac1f6bc539aa\",\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_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_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 \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_7d92ec045a4a4d4587ca6739e571f36a\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_65ca3aa55be811efb3d6ac1f6bc539aa\",\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": [ + "13559" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb41nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf772ee786c4e1003602f5" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.164158" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/orders/order_7d92ec045a4a4d4587ca6739e571f36a/rates" + }, + "duration": 1450 + } +] \ No newline at end of file diff --git a/src/test/cassettes/order/retrieve.json b/src/test/cassettes/order/retrieve.json index 9970dc845..3dac71f69 100644 --- a/src/test/cassettes/order/retrieve.json +++ b/src/test/cassettes/order/retrieve.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456534, + "recordedAt": 1723823913, "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}", + "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 \"weight\": 10.2\n }\n },\n {\n \"parcel\": {\n \"weight\": 17.5\n }\n }\n ]\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,69 +18,66 @@ "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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_63409f565be811efb2cdac1f6bc539aa\",\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\": \"70.30\",\n \"created_at\": null,\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"80.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"70.30\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_77542cd2ee9740f58d715b849aea3c79\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"17.22\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.30\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"14.48\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a8cf99c8a3084c11adbcef4228c30571\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"12.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"17.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"11.40\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a85028ccbf1f47d1a3e2393c2dba4a31\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_63409f565be811efb2cdac1f6bc539aa\",\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\": \"2024-08-16T15:58:32Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:32Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6342240b5be811efa1d03cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6342240b5be811efa1d03cecef1b359e\",\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\": \"2024-08-16T15:58:32Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_b47d62c739584b15a819a9b26726e603\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_63409f565be811efb2cdac1f6bc539aa\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:33Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:33Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_77542cd2ee9740f58d715b849aea3c79\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:33Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:33Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a8cf99c8a3084c11adbcef4228c30571\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:33Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:33Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a85028ccbf1f47d1a3e2393c2dba4a31\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_63409f565be811efb2cdac1f6bc539aa\",\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_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_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 \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"order_id\": \"order_b503661683c64d18895dca080873ac33\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:32Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6342240b5be811efa1d03cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_948cbd7eb68843819a27eb2693df3d78\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6342240b5be811efa1d03cecef1b359e\",\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\": \"2024-08-16T15:58:32Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_2ba6ff7e56aa4ed8b6575c8cf0b4f0ba\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_63409f565be811efb2cdac1f6bc539aa\",\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.97\",\n \"created_at\": \"2024-08-16T15:58:33Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_948cbd7eb68843819a27eb2693df3d78\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:33Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a41cabf5ed9e49a49c358ddb13314ae1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:33Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_948cbd7eb68843819a27eb2693df3d78\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:33Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9a40b2367adf43d1b06f8019d065718b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:33Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_948cbd7eb68843819a27eb2693df3d78\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:33Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6312dcb46b7c4455b779ea55546e37cd\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_63409f565be811efb2cdac1f6bc539aa\",\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_b503661683c64d18895dca080873ac33\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": \"\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:33Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6342240b5be811efa1d03cecef1b359e\",\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_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 \"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 \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_b503661683c64d18895dca080873ac33\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6342240b5be811efa1d03cecef1b359e\",\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" + "14670" ], "expires": [ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d095f7ee0c5b00088855" + "8a4bf44066bf7728e786c4c10035fd10" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.690637" + "0.850054" ], - "etag": [ - "W/\"69a259a6fa4bd8250d28e82ee3273c42\"" + "location": [ + "/api/v2/orders/order_b503661683c64d18895dca080873ac33" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/orders/order_e06d5ae00d354c8f8af125dcf2690eed" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/orders" }, - "duration": 819 + "duration": 1054 }, { - "recordedAt": 1661456535, + "recordedAt": 1723823914, "request": { "body": "", "method": "GET", @@ -108,69 +104,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/orders/order_e06d5ae00d354c8f8af125dcf2690eed" + "uri": "https://api.easypost.com/v2/orders/order_b503661683c64d18895dca080873ac33" }, "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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_63409f565be811efb2cdac1f6bc539aa\",\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\": \"70.30\",\n \"created_at\": null,\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"80.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"70.30\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_77542cd2ee9740f58d715b849aea3c79\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"17.22\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"22.30\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"14.48\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a8cf99c8a3084c11adbcef4228c30571\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"12.82\",\n \"created_at\": null,\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"17.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"11.40\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a85028ccbf1f47d1a3e2393c2dba4a31\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"to_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_63409f565be811efb2cdac1f6bc539aa\",\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\": \"2024-08-16T15:58:32Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:32Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6342240b5be811efa1d03cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6342240b5be811efa1d03cecef1b359e\",\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\": \"2024-08-16T15:58:32Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_b47d62c739584b15a819a9b26726e603\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_63409f565be811efb2cdac1f6bc539aa\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:33Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:33Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_77542cd2ee9740f58d715b849aea3c79\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:33Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:33Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a8cf99c8a3084c11adbcef4228c30571\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:33Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e23c49b421dd46cca9d0e6cba84f60a4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:33Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a85028ccbf1f47d1a3e2393c2dba4a31\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_63409f565be811efb2cdac1f6bc539aa\",\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_b503661683c64d18895dca080873ac33\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:32Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6342240b5be811efa1d03cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_948cbd7eb68843819a27eb2693df3d78\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6342240b5be811efa1d03cecef1b359e\",\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\": \"2024-08-16T15:58:32Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:32Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_2ba6ff7e56aa4ed8b6575c8cf0b4f0ba\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_63409f565be811efb2cdac1f6bc539aa\",\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.97\",\n \"created_at\": \"2024-08-16T15:58:33Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_948cbd7eb68843819a27eb2693df3d78\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:33Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a41cabf5ed9e49a49c358ddb13314ae1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:33Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_948cbd7eb68843819a27eb2693df3d78\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:33Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9a40b2367adf43d1b06f8019d065718b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:33Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_948cbd7eb68843819a27eb2693df3d78\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:33Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6312dcb46b7c4455b779ea55546e37cd\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_63409f565be811efb2cdac1f6bc539aa\",\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_b503661683c64d18895dca080873ac33\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": \"\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:33Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6342240b5be811efa1d03cecef1b359e\",\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_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 \"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 \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Invalid Access License number\"\n }\n ],\n \"id\": \"order_b503661683c64d18895dca080873ac33\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6342240b5be811efa1d03cecef1b359e\",\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" + "13559" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb35nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d096e6897300000888ea" + "8a4bf43b66bf7729e786c4c20035fe5a" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.198025" - ], - "etag": [ - "W/\"94f922eb7f2066a37297bb20ee677dc8\"" + "0.153669" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +173,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/orders/order_e06d5ae00d354c8f8af125dcf2690eed" + "uri": "https://api.easypost.com/v2/orders/order_b503661683c64d18895dca080873ac33" }, - "duration": 330 + "duration": 352 } ] \ No newline at end of file diff --git a/src/test/cassettes/paginated_collections/next_page.json b/src/test/cassettes/paginated_collections/next_page.json new file mode 100644 index 000000000..02dc86f89 --- /dev/null +++ b/src/test/cassettes/paginated_collections/next_page.json @@ -0,0 +1,174 @@ +[ + { + "recordedAt": 1723823827, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/addresses?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"addresses\": [\n {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:06+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2fc788aa5be811ef811f3cecef1b359e\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:06+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_2fc51c395be811ef811d3cecef1b359e\",\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\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2857090e5be811efbddb3cecef1b359e\",\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\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_2855588b5be811ef932eac1f6bc539ae\",\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\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_232d19035be811ef8bb4ac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n }\n ],\n \"has_more\": true\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2337" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb35nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43b66bf76d3e786bc180035a4bd" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.045794" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/addresses?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 251 + }, + { + "recordedAt": 1723823828, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/addresses?%62%65%66%6F%72%65%5F%69%64\u003d%61%64%72%5F%32%33%32%64%31%39%30%33%35%62%65%38%31%31%65%66%38%62%62%34%61%63%31%66%36%62%63%35%33%33%34%32" + }, + "response": { + "body": "{\n \"addresses\": [\n {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_232b887b5be811ef90ddac1f6bc539ae\",\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\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_2279ba605be811ef8b62ac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:56:44+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\": \"2024-08-16T15:56:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_227406095be811ef8cf7ac1f6bc539aa\",\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\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_21907c4c5be811efbac03cecef1b359e\",\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\": \"2024-08-16T15:56:42+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\": \"2024-08-16T15:56:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_218df41f5be811ef900dac1f6bc539ae\",\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\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_20fba7295be811efba703cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:56:41+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\": \"2024-08-16T15:56:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_20f631875be811ef8fbcac1f6bc539ae\",\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\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_201e9a175be811ef8a5fac1f6bc53342\",\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\": \"2024-08-16T15:56:40+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\": \"2024-08-16T15:56:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_201c1dc75be811ef8bd6ac1f6bc539aa\",\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\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_1e0f386b5be811efb9393cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:56:36+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\": \"2024-08-16T15:56:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_1e09965d5be811ef8e70ac1f6bc539ae\",\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\": \"2024-07-24T22:21: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\": \"2024-07-24T22:21:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_206020f74a0b11efb5863cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-07-24T22:21:51+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\": \"2024-07-24T22:21:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_205b6acd4a0b11efa1f6ac1f6bc539ae\",\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\": \"2024-07-24T22:21: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\": \"2024-07-24T22:21:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_201f28e84a0b11efb5723cecef1b359e\",\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\": \"2024-07-24T22:21: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\": \"2024-07-24T22:21:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_201de2d64a0b11efa1dfac1f6bc539ae\",\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\": \"2024-07-24T22:21: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\": \"2024-07-24T22:21:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_1fc977634a0b11efa1c8ac1f6bc539ae\",\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\": \"2024-07-24T22:21: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\": \"2024-07-24T22:21:51+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_1fc7888a4a0b11ef93deac1f6bc53342\",\n \"street2\": \"Apt 20\",\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\": \"2024-07-24T22:21: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\": \"2024-07-24T22:21:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_1f7755694a0b11efb5213cecef1b359e\",\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\": \"2024-07-24T22:21: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\": \"2024-07-24T22:21:50+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_1f75d29c4a0b11efb5203cecef1b359e\",\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\": \"2024-07-24T22:21: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\": \"2024-07-24T22:21:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_18e97c624a0b11ef9f86ac1f6bc539ae\",\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": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "11107" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf76d3e786bc190035a512" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.056175" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/addresses?%62%65%66%6F%72%65%5F%69%64\u003d%61%64%72%5F%32%33%32%64%31%39%30%33%35%62%65%38%31%31%65%66%38%62%62%34%61%63%31%66%36%62%63%35%33%33%34%32" + }, + "duration": 269 + } +] \ No newline at end of file diff --git a/src/test/cassettes/paginated_collections/next_page_size_limit.json b/src/test/cassettes/paginated_collections/next_page_size_limit.json new file mode 100644 index 000000000..112396a0e --- /dev/null +++ b/src/test/cassettes/paginated_collections/next_page_size_limit.json @@ -0,0 +1,177 @@ +[ + { + "recordedAt": 1723823828, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/addresses?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"addresses\": [\n {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:06+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2fc788aa5be811ef811f3cecef1b359e\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:06+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_2fc51c395be811ef811d3cecef1b359e\",\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\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2857090e5be811efbddb3cecef1b359e\",\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\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_2855588b5be811ef932eac1f6bc539ae\",\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\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_232d19035be811ef8bb4ac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n }\n ],\n \"has_more\": true\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2337" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf76d4e786bc1a0035a57e" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.039237" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/addresses?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 244 + }, + { + "recordedAt": 1723823828, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/addresses?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%61%64%72%5F%32%33%32%64%31%39%30%33%35%62%65%38%31%31%65%66%38%62%62%34%61%63%31%66%36%62%63%35%33%33%34%32" + }, + "response": { + "body": "{\n \"addresses\": [\n {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_232b887b5be811ef90ddac1f6bc539ae\",\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\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_2279ba605be811ef8b62ac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:56:44+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\": \"2024-08-16T15:56:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_227406095be811ef8cf7ac1f6bc539aa\",\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\": \"2024-08-16T15:56: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\": \"2024-08-16T15:56:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_21907c4c5be811efbac03cecef1b359e\",\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\": \"2024-08-16T15:56:42+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\": \"2024-08-16T15:56:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_218df41f5be811ef900dac1f6bc539ae\",\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": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2893" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb41nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43b66bf76d4e786bc1b0035a5ce" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.048759" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/addresses?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%61%64%72%5F%32%33%32%64%31%39%30%33%35%62%65%38%31%31%65%66%38%62%62%34%61%63%31%66%36%62%63%35%33%33%34%32" + }, + "duration": 261 + } +] \ No newline at end of file diff --git a/src/test/cassettes/parcel/create.json b/src/test/cassettes/parcel/create.json index 97f56482f..bdaeeb305 100644 --- a/src/test/cassettes/parcel/create.json +++ b/src/test/cassettes/parcel/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456469, + "recordedAt": 1723823866, "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\": \"2024-08-16T15:57:46Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:57:46Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_b10a0d7fa8614d3e85ca83d8507469ee\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n}", "httpVersion": null, "headers": { "null": [ @@ -31,56 +31,53 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d055f7ed0038000867d7" + "8a4bf44066bf76fae786bd250035cd80" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.020708" + "0.029591" ], - "etag": [ - "W/\"11c3f088fe56a2cdd0ed6680b4923ca2\"" + "location": [ + "/api/v2/parcels/prcl_b10a0d7fa8614d3e85ca83d8507469ee" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/parcels.prcl_897794da7cc24300a523bd381f554b5d" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +87,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/parcels" }, - "duration": 151 + "duration": 241 } ] \ No newline at end of file diff --git a/src/test/cassettes/parcel/retrieve.json b/src/test/cassettes/parcel/retrieve.json index b011e5915..540b19629 100644 --- a/src/test/cassettes/parcel/retrieve.json +++ b/src/test/cassettes/parcel/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456468, + "recordedAt": 1723823866, "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\": \"2024-08-16T15:57:46Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:57:46Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_7fb2d970236944bba7d3b5ff1f75638b\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n}", "httpVersion": null, "headers": { "null": [ @@ -31,56 +31,53 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb41nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d054f7efa3cf000867a0" + "8a4bf43d66bf76fae786bd220035cccd" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.021409" + "0.048449" ], - "etag": [ - "W/\"fa2fb20a3c8276853619b88017f77777\"" + "location": [ + "/api/v2/parcels/prcl_7fb2d970236944bba7d3b5ff1f75638b" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/parcels.prcl_5b192722e3a74e53b3aa5511447a4da9" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/parcels" }, - "duration": 158 + "duration": 258 }, { - "recordedAt": 1661456468, + "recordedAt": 1723823866, "request": { "body": "", "method": "GET", @@ -108,10 +104,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/parcels/prcl_5b192722e3a74e53b3aa5511447a4da9" + "uri": "https://api.easypost.com/v2/parcels/prcl_7fb2d970236944bba7d3b5ff1f75638b" }, "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\": \"2024-08-16T15:57:46Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:57:46Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_7fb2d970236944bba7d3b5ff1f75638b\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n}", "httpVersion": null, "headers": { "null": [ @@ -124,53 +120,50 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d054f7f0d2c1000867b7" + "8a4bf43c66bf76fae786bd230035cd15" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.026814" - ], - "etag": [ - "W/\"fa2fb20a3c8276853619b88017f77777\"" + "0.027146" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +173,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/parcels/prcl_5b192722e3a74e53b3aa5511447a4da9" + "uri": "https://api.easypost.com/v2/parcels/prcl_7fb2d970236944bba7d3b5ff1f75638b" }, - "duration": 162 + "duration": 229 } ] \ 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..3717418d9 --- /dev/null +++ b/src/test/cassettes/payment_method/all.json @@ -0,0 +1,88 @@ +[ + { + "recordedAt": 1723823877, + "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": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf7704e786c0bc0035d6db" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.083029" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/payment_methods" + }, + "duration": 287 + } +] \ No newline at end of file diff --git a/src/test/cassettes/pickup/all.json b/src/test/cassettes/pickup/all.json new file mode 100644 index 000000000..c30fcde5d --- /dev/null +++ b/src/test/cassettes/pickup/all.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1723823832, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/pickups?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "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\": \"2023-12-27T19:40: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\": \"2023-12-27T19:40:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d96685b5a4ef11ee96b5ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-28T00:00:00Z\",\n \"created_at\": \"2023-12-27T19:40:54Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-27T19:40:55Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-27T19:40:55Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_a965676512e24485bf2d50e3e317752c\",\n \"pickup_id\": \"pickup_ec9e3bb5252a4db3b5c479f2954aac6f\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC63906512\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-28T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-27T19:40:57Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_ec9e3bb5252a4db3b5c479f2954aac6f\",\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\": \"2023-12-27T19:40: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\": \"2023-12-27T19:40:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d7d56f39a4ef11ee95fdac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-28T00:00:00Z\",\n \"created_at\": \"2023-12-27T19:40:52Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-27T19:40:52Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-27T19:40:52Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_e5c8e252781e4ec0ba025ca79fbea91e\",\n \"pickup_id\": \"pickup_ec95cdda44334729af451277bacb5041\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-28T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-27T19:40:52Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_ec95cdda44334729af451277bacb5041\",\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\": \"2023-12-27T19:40: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\": \"2023-12-27T19:40:46+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d4c18861a4ef11eeb194ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-28T00:00:00Z\",\n \"created_at\": \"2023-12-27T19:40:46Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-27T19:40:47Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-27T19:40:47Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_188e197c7b3943ca9ab572ff9ac22bbc\",\n \"pickup_id\": \"pickup_7324ea25c3fd4f5ea5182681bf6960d6\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC63906736\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-28T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-27T19:40:50Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_7324ea25c3fd4f5ea5182681bf6960d6\",\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\": \"2023-12-27T19:40: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\": \"2023-12-27T19:40:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d31ffdd2a4ef11eea5403cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-28T00:00:00Z\",\n \"created_at\": \"2023-12-27T19:40:44Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-27T19:40:45Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-27T19:40:45Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_0c35750982174f7393bbc1536ccda5d3\",\n \"pickup_id\": \"pickup_89f4f639683049d8ab5a1c8526c87cf7\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-28T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-27T19:40:44Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_89f4f639683049d8ab5a1c8526c87cf7\",\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\": \"2023-12-27T19:40: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\": \"2023-12-27T19:40:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d162b4bea4ef11eea43d3cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-28T00:00:00Z\",\n \"created_at\": \"2023-12-27T19:40:41Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-27T19:40:42Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-27T19:40:42Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_cefd58afaf694649adcf39156b92f52b\",\n \"pickup_id\": \"pickup_1ce4c97001ad493fb176eb254f5c200d\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-28T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-27T19:40:41Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_1ce4c97001ad493fb176eb254f5c200d\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n }\n ],\n \"has_more\": true\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "5840" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb43nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf76d7e786bc3d0035a9e3" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.303792" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/pickups?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "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 79ff8bcab..05ddc8091 100644 --- a/src/test/cassettes/pickup/buy.json +++ b/src/test/cassettes/pickup/buy.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456513, + "recordedAt": 1735856304, "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 \"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\": \"GroundAdvantage\",\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,69 +18,66 @@ "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.93000\",\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\": \"2025-01-02T22:18:23Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2025-01-02T22:18:24Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.70\",\n \"created_at\": \"2025-01-02T22:18:24Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c4aec94772b84c33ac5ece85238f8c22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:18:24Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b1ee589042d24cac8a26453053f266c4\",\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\": \"2025-01-02T22:18:24Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_c4aec94772b84c33ac5ece85238f8c22\",\n \"tracking_code\": \"9400100208271116082709\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzkzZDVhNjViMGIyZDQ0NDBiYTBhZjk1YjEzNmE1ZTJk\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:18:24Z\",\n \"signed_by\": null,\n \"id\": \"trk_93d5a65b0b2d4440ba0af95b136a5e2d\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:23+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7b386d2ec95711efa64bac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_c4aec94772b84c33ac5ece85238f8c22\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:23+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7b386d2ec95711efa64bac1f6bc539aa\",\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\": \"2025-01-02T22:18:24Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250102/e82a20d8b9c83b474eaf4880c700f2d06c.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2025-01-02T22:18:24Z\",\n \"id\": \"pl_e092df76438e4539b16f8353d40ce79c\",\n \"label_zpl_url\": null,\n \"label_date\": \"2025-01-02T22:18:24Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2025-01-02T22:18:23Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2025-01-02T22:18:23Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_15dd44955acf45ce982e37e6f9d6e338\",\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\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7b359110c95711efb73dac1f6bc53342\",\n \"street2\": \"\",\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.55\",\n \"created_at\": \"2025-01-02T22:18:23Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c4aec94772b84c33ac5ece85238f8c22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.20\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:18:23Z\",\n \"rate\": \"7.20\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_487f4f25bf474a2bb03dd1820019aff4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.70\",\n \"created_at\": \"2025-01-02T22:18:23Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c4aec94772b84c33ac5ece85238f8c22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:18:23Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b1ee589042d24cac8a26453053f266c4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"34.10\",\n \"created_at\": \"2025-01-02T22:18:23Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c4aec94772b84c33ac5ece85238f8c22\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"39.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:18:23Z\",\n \"rate\": \"34.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bdbdf0adf43a47308ec1be9206160eb3\",\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\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:24+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7b359110c95711efb73dac1f6bc53342\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100208271116082709\",\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" + "6550" ], "expires": [ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb56nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d080f7de287700087df5" + "afab89c4677710afe78854be004f871a" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.994030" + "0.888250" ], - "etag": [ - "W/\"1819d1a2b8967d796a9c990311f30adc\"" + "location": [ + "/api/v2/shipments/shp_c4aec94772b84c33ac5ece85238f8c22" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_24f83f6b9be047ab9a51091a8a800cf5" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,15 +87,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1152 + "duration": 1106 }, { - "recordedAt": 1661456514, + "recordedAt": 1735856306, "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\": \"2025-01-03\",\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\": \"Jan 2, 2025, 3:18:23 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_15dd44955acf45ce982e37e6f9d6e338\",\n \"height\": 4.0,\n \"object\": \"Parcel\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:23 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.93,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.5,\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.55,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:23 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.2,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_c4aec94772b84c33ac5ece85238f8c22\",\n \"currency\": \"USD\",\n \"id\": \"rate_487f4f25bf474a2bb03dd1820019aff4\",\n \"retailRate\": 10.2,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:23 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.7,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:23 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_c4aec94772b84c33ac5ece85238f8c22\",\n \"currency\": \"USD\",\n \"id\": \"rate_b1ee589042d24cac8a26453053f266c4\",\n \"retailRate\": 8.85,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:23 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 34.1,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:23 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 34.1,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_c4aec94772b84c33ac5ece85238f8c22\",\n \"currency\": \"USD\",\n \"id\": \"rate_bdbdf0adf43a47308ec1be9206160eb3\",\n \"retailRate\": 39.0,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:23 PM\"\n }\n ],\n \"trackingCode\": \"9400100208271116082709\",\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\": \"Jan 2, 2025, 3:18:23 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_7b359110c95711efb73dac1f6bc53342\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:24 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:23 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_7b386d2ec95711efa64bac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:23 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.7,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:24 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_c4aec94772b84c33ac5ece85238f8c22\",\n \"currency\": \"USD\",\n \"id\": \"rate_b1ee589042d24cac8a26453053f266c4\",\n \"retailRate\": 8.85,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:24 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:23 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\": \"Jan 2, 2025, 3:18:23 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_7b359110c95711efb73dac1f6bc53342\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:24 PM\"\n },\n \"tracker\": {\n \"weight\": 0.0,\n \"trackingCode\": \"9400100208271116082709\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:24 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_c4aec94772b84c33ac5ece85238f8c22\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzkzZDVhNjViMGIyZDQ0NDBiYTBhZjk1YjEzNmE1ZTJk\",\n \"trackingDetails\": [],\n \"id\": \"trk_93d5a65b0b2d4440ba0af95b136a5e2d\",\n \"status\": \"unknown\",\n \"object\": \"Tracker\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:24 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\": \"Jan 2, 2025, 3:18:23 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_7b386d2ec95711efa64bac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:23 PM\"\n },\n \"id\": \"shp_c4aec94772b84c33ac5ece85238f8c22\",\n \"postageLabel\": {\n \"createdAt\": \"Jan 2, 2025, 3:18:24 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_e092df76438e4539b16f8353d40ce79c\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250102/e82a20d8b9c83b474eaf4880c700f2d06c.png\",\n \"object\": \"PostageLabel\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:24 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:24 PM\"\n },\n \"min_datetime\": \"2025-01-03\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +110,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\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7bf5d649c95711efa6cbac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2025-01-03T00:00:00Z\",\n \"created_at\": \"2025-01-02T22:18:25Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:18:26Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2025-01-02T22:18:26Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_cc1060b46158488bad23afb7790c92a6\",\n \"pickup_id\": \"pickup_2f687f9a294845e9b868ca5886209fad\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2025-01-03T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2025-01-02T22:18:25Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_2f687f9a294845e9b868ca5886209fad\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,53 +123,50 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb38nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d081e68c350900087e8c" + "afab89c8677710b1e78854c0004f8946" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.188485" - ], - "etag": [ - "W/\"d2582d2af90332ee52141eb515689c4b\"" + "1.126662" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,13 +176,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1358 + "duration": 1332 }, { - "recordedAt": 1661456516, + "recordedAt": 1735856310, "request": { "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"NextDay\"\n}", "method": "POST", @@ -204,10 +196,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_0fde304e4362472b989a53e6d6673669/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_2f687f9a294845e9b868ca5886209fad/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\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7bf5d649c95711efa6cbac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2025-01-03T00:00:00Z\",\n \"created_at\": \"2025-01-02T22:18:25Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:18:26Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2025-01-02T22:18:26Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_cc1060b46158488bad23afb7790c92a6\",\n \"pickup_id\": \"pickup_2f687f9a294845e9b868ca5886209fad\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC64874562\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2025-01-03T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2025-01-02T22:18:30Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_2f687f9a294845e9b868ca5886209fad\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", "httpVersion": null, "headers": { "null": [ @@ -220,53 +212,50 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d083f7b74b9400087f57" + "afab89c7677710b2e78854c2004f8bc3" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.954640" - ], - "etag": [ - "W/\"db9d681fd691afbdaefc30ae17107838\"" + "4.405836" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -276,9 +265,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/pickups/pickup_0fde304e4362472b989a53e6d6673669/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_2f687f9a294845e9b868ca5886209fad/buy" }, - "duration": 1147 + "duration": 4616 } ] \ 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..c32df5b90 --- /dev/null +++ b/src/test/cassettes/pickup/buy_with_rate.json @@ -0,0 +1,272 @@ +[ + { + "recordedAt": 1735856315, + "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\": \"GroundAdvantage\",\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.93000\",\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\": \"2025-01-02T22:18:35Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2025-01-02T22:18:35Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.70\",\n \"created_at\": \"2025-01-02T22:18:35Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_31195c38b9a9416eac34a25743865433\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:18:35Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_22bda26cf44740288e2415df9a17d873\",\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\": \"2025-01-02T22:18:35Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_31195c38b9a9416eac34a25743865433\",\n \"tracking_code\": \"9400100208271116082723\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzQ1ZTNjNjE3NmUzYzRiMmNiZTU3YmEwMjdkN2E5ZDk5\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:18:35Z\",\n \"signed_by\": null,\n \"id\": \"trk_45e3c6176e3c4b2cbe57ba027d7a9d99\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_81f4f1dbc95711ef824e3cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_31195c38b9a9416eac34a25743865433\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_81f4f1dbc95711ef824e3cecef1b359e\",\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\": \"2025-01-02T22:18:35Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250102/e8463200e83a484f21b23a1f844f39103a.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2025-01-02T22:18:35Z\",\n \"id\": \"pl_ee67a6f25cef4362a612da2c66b49086\",\n \"label_zpl_url\": null,\n \"label_date\": \"2025-01-02T22:18:35Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2025-01-02T22:18:35Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2025-01-02T22:18:35Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_7394fb4b21514d7c8ffc0b9d400546d2\",\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\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_81f258a4c95711ef824a3cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.70\",\n \"created_at\": \"2025-01-02T22:18:35Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_31195c38b9a9416eac34a25743865433\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:18:35Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_22bda26cf44740288e2415df9a17d873\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"34.10\",\n \"created_at\": \"2025-01-02T22:18:35Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_31195c38b9a9416eac34a25743865433\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"39.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:18:35Z\",\n \"rate\": \"34.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8508af4f01fa421b832f4b32a948bb1a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.55\",\n \"created_at\": \"2025-01-02T22:18:35Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_31195c38b9a9416eac34a25743865433\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.20\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:18:35Z\",\n \"rate\": \"7.20\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b9f5f3c5933241f383096b2d314efa03\",\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\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:35+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_81f258a4c95711ef824a3cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100208271116082723\",\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": [ + "6550" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb41nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "379710ee677710bbe78854fc004a0637" + ], + "x-proxied": [ + "intlb4nuq 51d74985a2", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.801793" + ], + "location": [ + "/api/v2/shipments/shp_31195c38b9a9416eac34a25743865433" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202501022109-2fb261155f-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1010 + }, + { + "recordedAt": 1735856317, + "request": { + "body": "{\n \"pickup\": {\n \"max_datetime\": \"2025-01-03\",\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\": \"Jan 2, 2025, 3:18:35 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_7394fb4b21514d7c8ffc0b9d400546d2\",\n \"height\": 4.0,\n \"object\": \"Parcel\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:35 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.93,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.5,\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\": 6.7,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:35 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_31195c38b9a9416eac34a25743865433\",\n \"currency\": \"USD\",\n \"id\": \"rate_22bda26cf44740288e2415df9a17d873\",\n \"retailRate\": 8.85,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:35 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 34.1,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:35 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 34.1,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_31195c38b9a9416eac34a25743865433\",\n \"currency\": \"USD\",\n \"id\": \"rate_8508af4f01fa421b832f4b32a948bb1a\",\n \"retailRate\": 39.0,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:35 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.55,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:35 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.2,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_31195c38b9a9416eac34a25743865433\",\n \"currency\": \"USD\",\n \"id\": \"rate_b9f5f3c5933241f383096b2d314efa03\",\n \"retailRate\": 10.2,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:35 PM\"\n }\n ],\n \"trackingCode\": \"9400100208271116082723\",\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\": \"Jan 2, 2025, 3:18:35 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_81f258a4c95711ef824a3cecef1b359e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:35 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:35 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_81f4f1dbc95711ef824e3cecef1b359e\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:35 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.7,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:35 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_31195c38b9a9416eac34a25743865433\",\n \"currency\": \"USD\",\n \"id\": \"rate_22bda26cf44740288e2415df9a17d873\",\n \"retailRate\": 8.85,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:35 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18: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\": \"Jan 2, 2025, 3:18:35 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_81f258a4c95711ef824a3cecef1b359e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:35 PM\"\n },\n \"tracker\": {\n \"weight\": 0.0,\n \"trackingCode\": \"9400100208271116082723\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:35 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_31195c38b9a9416eac34a25743865433\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzQ1ZTNjNjE3NmUzYzRiMmNiZTU3YmEwMjdkN2E5ZDk5\",\n \"trackingDetails\": [],\n \"id\": \"trk_45e3c6176e3c4b2cbe57ba027d7a9d99\",\n \"status\": \"unknown\",\n \"object\": \"Tracker\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:35 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\": \"Jan 2, 2025, 3:18:35 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_81f4f1dbc95711ef824e3cecef1b359e\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:35 PM\"\n },\n \"id\": \"shp_31195c38b9a9416eac34a25743865433\",\n \"postageLabel\": {\n \"createdAt\": \"Jan 2, 2025, 3:18:35 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_ee67a6f25cef4362a612da2c66b49086\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250102/e8463200e83a484f21b23a1f844f39103a.png\",\n \"object\": \"PostageLabel\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:35 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:35 PM\"\n },\n \"min_datetime\": \"2025-01-03\"\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\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_82adb3aec95711ef82c83cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2025-01-03T00:00:00Z\",\n \"created_at\": \"2025-01-02T22:18:36Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:18:37Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2025-01-02T22:18:37Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_9c62ce4a8e3c4d9a90dddd4804e95661\",\n \"pickup_id\": \"pickup_ccc1bf4275774d4f84575e1113c3b118\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2025-01-03T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2025-01-02T22:18:36Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_ccc1bf4275774d4f84575e1113c3b118\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1157" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb41nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "379710f3677710bce78854fe004a0827" + ], + "x-proxied": [ + "intlb4nuq 51d74985a2", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.842640" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202501022109-2fb261155f-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/pickups" + }, + "duration": 1058 + }, + { + "recordedAt": 1735856319, + "request": { + "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"NextDay\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/pickups/pickup_ccc1bf4275774d4f84575e1113c3b118/buy" + }, + "response": { + "body": "{\n \"instructions\": \"Pickup at front door\",\n \"address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_82adb3aec95711ef82c83cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2025-01-03T00:00:00Z\",\n \"created_at\": \"2025-01-02T22:18:36Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:18:37Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2025-01-02T22:18:37Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_9c62ce4a8e3c4d9a90dddd4804e95661\",\n \"pickup_id\": \"pickup_ccc1bf4275774d4f84575e1113c3b118\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC64874478\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2025-01-03T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2025-01-02T22:18:39Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_ccc1bf4275774d4f84575e1113c3b118\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1168" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb38nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "379710f5677710bde7885500004a09e6" + ], + "x-proxied": [ + "intlb4nuq 51d74985a2", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "2.168661" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202501022109-2fb261155f-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/pickups/pickup_ccc1bf4275774d4f84575e1113c3b118/buy" + }, + "duration": 2381 + } +] \ No newline at end of file diff --git a/src/test/cassettes/pickup/cancel.json b/src/test/cassettes/pickup/cancel.json index 732413122..a6805926d 100644 --- a/src/test/cassettes/pickup/cancel.json +++ b/src/test/cassettes/pickup/cancel.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456522, + "recordedAt": 1735856480, "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 \"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\": \"GroundAdvantage\",\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,69 +18,66 @@ "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.93000\",\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\": \"2025-01-02T22:21:18Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2025-01-02T22:21:19Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.70\",\n \"created_at\": \"2025-01-02T22:21:19Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e66ff5ca55ab458c844e4d1ffc85e321\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:21:19Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4e5d2ecd8ca448d5ba5f70bc474af477\",\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\": \"2025-01-02T22:21:19Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_e66ff5ca55ab458c844e4d1ffc85e321\",\n \"tracking_code\": \"9400100208271116082754\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzdmNjUzYmI5NjMwNTQ0NTY5ZWY3MmEwYWY4YzYwYzE0\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:21:19Z\",\n \"signed_by\": null,\n \"id\": \"trk_7f653bb9630544569ef72a0af8c60c14\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_e395ec8fc95711ef9f8aac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_e66ff5ca55ab458c844e4d1ffc85e321\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_e395ec8fc95711ef9f8aac1f6bc539aa\",\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\": \"2025-01-02T22:21:19Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250102/e852ad5bb114844b65bf8b5b2574180ed6.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2025-01-02T22:21:19Z\",\n \"id\": \"pl_be857ba3a180400ead62214f58b38851\",\n \"label_zpl_url\": null,\n \"label_date\": \"2025-01-02T22:21:19Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2025-01-02T22:21:18Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2025-01-02T22:21:18Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_495288bc9216437087a5ad87d652a578\",\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\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_e3932fa3c95711ef8766ac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"34.10\",\n \"created_at\": \"2025-01-02T22:21:19Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e66ff5ca55ab458c844e4d1ffc85e321\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"39.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:21:19Z\",\n \"rate\": \"34.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_afc1f920d5b74d1fa513c6a14c5c4a6d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.55\",\n \"created_at\": \"2025-01-02T22:21:19Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e66ff5ca55ab458c844e4d1ffc85e321\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.20\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:21:19Z\",\n \"rate\": \"7.20\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5834b73bb24645cdb1dadf8461f3605a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.70\",\n \"created_at\": \"2025-01-02T22:21:19Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e66ff5ca55ab458c844e4d1ffc85e321\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:21:19Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4e5d2ecd8ca448d5ba5f70bc474af477\",\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\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_e3932fa3c95711ef8766ac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100208271116082754\",\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" + "6550" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d089f7c9e314000881a3" + "379710f46777115ee7886ae6004ad7c2" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.013174" + "1.123672" ], - "etag": [ - "W/\"1336185f2b8f17a52645d3e11fbea4af\"" + "location": [ + "/api/v2/shipments/shp_e66ff5ca55ab458c844e4d1ffc85e321" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_60e2aa0066f84451b44e1be3b2b4ee76" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,15 +87,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1230 + "duration": 1340 }, { - "recordedAt": 1661456524, + "recordedAt": 1735856481, "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\": \"2025-01-03\",\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\": \"Jan 2, 2025, 3:21:18 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_495288bc9216437087a5ad87d652a578\",\n \"height\": 4.0,\n \"object\": \"Parcel\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:18 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.93,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.5,\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\": 34.1,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:19 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 34.1,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_e66ff5ca55ab458c844e4d1ffc85e321\",\n \"currency\": \"USD\",\n \"id\": \"rate_afc1f920d5b74d1fa513c6a14c5c4a6d\",\n \"retailRate\": 39.0,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:19 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.55,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:19 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.2,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_e66ff5ca55ab458c844e4d1ffc85e321\",\n \"currency\": \"USD\",\n \"id\": \"rate_5834b73bb24645cdb1dadf8461f3605a\",\n \"retailRate\": 10.2,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:19 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.7,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:19 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_e66ff5ca55ab458c844e4d1ffc85e321\",\n \"currency\": \"USD\",\n \"id\": \"rate_4e5d2ecd8ca448d5ba5f70bc474af477\",\n \"retailRate\": 8.85,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:19 PM\"\n }\n ],\n \"trackingCode\": \"9400100208271116082754\",\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\": \"Jan 2, 2025, 3:21:18 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_e3932fa3c95711ef8766ac1f6bc539ae\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:19 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:18 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_e395ec8fc95711ef9f8aac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:18 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.7,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:19 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_e66ff5ca55ab458c844e4d1ffc85e321\",\n \"currency\": \"USD\",\n \"id\": \"rate_4e5d2ecd8ca448d5ba5f70bc474af477\",\n \"retailRate\": 8.85,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:19 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21: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\": \"Jan 2, 2025, 3:21:18 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_e3932fa3c95711ef8766ac1f6bc539ae\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:19 PM\"\n },\n \"tracker\": {\n \"weight\": 0.0,\n \"trackingCode\": \"9400100208271116082754\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:19 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_e66ff5ca55ab458c844e4d1ffc85e321\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzdmNjUzYmI5NjMwNTQ0NTY5ZWY3MmEwYWY4YzYwYzE0\",\n \"trackingDetails\": [],\n \"id\": \"trk_7f653bb9630544569ef72a0af8c60c14\",\n \"status\": \"unknown\",\n \"object\": \"Tracker\",\n \"updatedAt\": \"Jan 2, 2025, 3:21: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\": \"Jan 2, 2025, 3:21:18 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_e395ec8fc95711ef9f8aac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:18 PM\"\n },\n \"id\": \"shp_e66ff5ca55ab458c844e4d1ffc85e321\",\n \"postageLabel\": {\n \"createdAt\": \"Jan 2, 2025, 3:21:19 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_be857ba3a180400ead62214f58b38851\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250102/e852ad5bb114844b65bf8b5b2574180ed6.png\",\n \"object\": \"PostageLabel\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:19 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:19 PM\"\n },\n \"min_datetime\": \"2025-01-03\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +110,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\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_e48347dac95711efa009ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2025-01-03T00:00:00Z\",\n \"created_at\": \"2025-01-02T22:21:20Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:21:21Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2025-01-02T22:21:21Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_3220c7e9c2844373b4028a582a7fa601\",\n \"pickup_id\": \"pickup_5f249ade4ce348f5ac1a8b7fad7912a2\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2025-01-03T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2025-01-02T22:21:20Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_5f249ade4ce348f5ac1a8b7fad7912a2\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,53 +123,50 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb57nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d08bf7b8ce1000088230" + "379710ee67771160e7886ae8004ad964" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq 51d74985a2", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.924478" - ], - "etag": [ - "W/\"c8ed5c84247e695005c537767bb665f8\"" + "1.109154" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,13 +176,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1156 + "duration": 1329 }, { - "recordedAt": 1661456525, + "recordedAt": 1735856484, "request": { "body": "{\n \"carrier\": \"USPS\",\n \"service\": \"NextDay\"\n}", "method": "POST", @@ -204,10 +196,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_7f5d8e050c61480b9591d55a23a6b5b1/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_5f249ade4ce348f5ac1a8b7fad7912a2/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\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_e48347dac95711efa009ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2025-01-03T00:00:00Z\",\n \"created_at\": \"2025-01-02T22:21:20Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:21:21Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2025-01-02T22:21:21Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_3220c7e9c2844373b4028a582a7fa601\",\n \"pickup_id\": \"pickup_5f249ade4ce348f5ac1a8b7fad7912a2\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC64874480\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2025-01-03T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2025-01-02T22:21:24Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_5f249ade4ce348f5ac1a8b7fad7912a2\",\n \"object\": \"Pickup\",\n \"status\": \"scheduled\"\n}", "httpVersion": null, "headers": { "null": [ @@ -220,53 +212,50 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb58nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d08ce6899067000882d0" + "379710f067771161e7886aea004adb0f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.047195" - ], - "etag": [ - "W/\"0d2b85a2333fd9026f45cce2a6c83a36\"" + "2.491198" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -276,13 +265,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/pickups/pickup_7f5d8e050c61480b9591d55a23a6b5b1/buy" + "uri": "https://api.easypost.com/v2/pickups/pickup_5f249ade4ce348f5ac1a8b7fad7912a2/buy" }, - "duration": 1187 + "duration": 2706 }, { - "recordedAt": 1661456526, + "recordedAt": 1735856485, "request": { "body": "", "method": "POST", @@ -294,10 +282,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_7f5d8e050c61480b9591d55a23a6b5b1/cancel" + "uri": "https://api.easypost.com/v2/pickups/pickup_5f249ade4ce348f5ac1a8b7fad7912a2/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\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_e48347dac95711efa009ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2025-01-03T00:00:00Z\",\n \"created_at\": \"2025-01-02T22:21:20Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:21:21Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2025-01-02T22:21:21Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_3220c7e9c2844373b4028a582a7fa601\",\n \"pickup_id\": \"pickup_5f249ade4ce348f5ac1a8b7fad7912a2\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC64874480\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2025-01-03T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2025-01-02T22:21:25Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_5f249ade4ce348f5ac1a8b7fad7912a2\",\n \"object\": \"Pickup\",\n \"status\": \"canceled\"\n}", "httpVersion": null, "headers": { "null": [ @@ -310,53 +298,50 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb54nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d08df7db666f00088360" + "379710f267771164e7886aeb004ade71" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq 51d74985a2", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.874094" - ], - "etag": [ - "W/\"f40fcaf9459d65fb7dc161945729400e\"" + "0.607584" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -366,9 +351,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/pickups/pickup_7f5d8e050c61480b9591d55a23a6b5b1/cancel" + "uri": "https://api.easypost.com/v2/pickups/pickup_5f249ade4ce348f5ac1a8b7fad7912a2/cancel" }, - "duration": 1000 + "duration": 819 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/create.json b/src/test/cassettes/pickup/create.json index 6e95ee587..c45eeef15 100644 --- a/src/test/cassettes/pickup/create.json +++ b/src/test/cassettes/pickup/create.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456528, + "recordedAt": 1735856313, "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 \"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\": \"GroundAdvantage\",\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,69 +18,66 @@ "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.93000\",\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\": \"2025-01-02T22:18:32Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2025-01-02T22:18:33Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.70\",\n \"created_at\": \"2025-01-02T22:18:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c3ab4e43ed1d4158a5f69096d35eb444\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:18:32Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b09ce9251e014b1db1271d8c352a5224\",\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\": \"2025-01-02T22:18:33Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_c3ab4e43ed1d4158a5f69096d35eb444\",\n \"tracking_code\": \"9400100208271116082716\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzNlOTc5ZmVjMzNkNTRiMzg5OWFiNmM4MzViNWFjNDkw\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:18:33Z\",\n \"signed_by\": null,\n \"id\": \"trk_3e979fec33d54b3899ab6c835b5ac490\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_803e4839c95711efa988ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_c3ab4e43ed1d4158a5f69096d35eb444\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_803e4839c95711efa988ac1f6bc539aa\",\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\": \"2025-01-02T22:18:32Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250102/e8359f9746ef624ea8b341a7aa07a41051.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2025-01-02T22:18:33Z\",\n \"id\": \"pl_a8aa952fd3a243bb8cea9381cf16691e\",\n \"label_zpl_url\": null,\n \"label_date\": \"2025-01-02T22:18:32Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2025-01-02T22:18:32Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2025-01-02T22:18:32Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_7cc51ba81a7349738c5fd85de6f8a357\",\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\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_803bd2cec95711ef81493cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"34.10\",\n \"created_at\": \"2025-01-02T22:18:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c3ab4e43ed1d4158a5f69096d35eb444\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"39.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:18:32Z\",\n \"rate\": \"34.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_45fac100d0854658862bbbfa2036de4b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.55\",\n \"created_at\": \"2025-01-02T22:18:32Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c3ab4e43ed1d4158a5f69096d35eb444\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.20\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:18:32Z\",\n \"rate\": \"7.20\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1f29ef7db4bd46f7b82712d27669d503\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.70\",\n \"created_at\": \"2025-01-02T22:18:32Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c3ab4e43ed1d4158a5f69096d35eb444\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:18:32Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b09ce9251e014b1db1271d8c352a5224\",\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\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_803bd2cec95711ef81493cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100208271116082716\",\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" + "6550" ], "expires": [ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb39nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d08ee68c3908000883fd" + "379710f4677710b8e78854e1004a02b7" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq 51d74985a2", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.415517" + "1.000854" ], - "etag": [ - "W/\"e881b9cd509eed4d1b1c034107565401\"" + "location": [ + "/api/v2/shipments/shp_c3ab4e43ed1d4158a5f69096d35eb444" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_7bfca42f81524e1cacc2ef16747b63b7" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,15 +87,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1614 + "duration": 1217 }, { - "recordedAt": 1661456529, + "recordedAt": 1735856314, "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\": \"2025-01-03\",\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\": \"Jan 2, 2025, 3:18:32 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_7cc51ba81a7349738c5fd85de6f8a357\",\n \"height\": 4.0,\n \"object\": \"Parcel\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:32 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.93,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.5,\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\": 34.1,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:32 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 34.1,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_c3ab4e43ed1d4158a5f69096d35eb444\",\n \"currency\": \"USD\",\n \"id\": \"rate_45fac100d0854658862bbbfa2036de4b\",\n \"retailRate\": 39.0,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:32 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.55,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:32 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.2,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_c3ab4e43ed1d4158a5f69096d35eb444\",\n \"currency\": \"USD\",\n \"id\": \"rate_1f29ef7db4bd46f7b82712d27669d503\",\n \"retailRate\": 10.2,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:32 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.7,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:32 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_c3ab4e43ed1d4158a5f69096d35eb444\",\n \"currency\": \"USD\",\n \"id\": \"rate_b09ce9251e014b1db1271d8c352a5224\",\n \"retailRate\": 8.85,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:32 PM\"\n }\n ],\n \"trackingCode\": \"9400100208271116082716\",\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\": \"Jan 2, 2025, 3:18:32 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_803bd2cec95711ef81493cecef1b359e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:32 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:32 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_803e4839c95711efa988ac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:32 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.7,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:32 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_c3ab4e43ed1d4158a5f69096d35eb444\",\n \"currency\": \"USD\",\n \"id\": \"rate_b09ce9251e014b1db1271d8c352a5224\",\n \"retailRate\": 8.85,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:32 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:32 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\": \"Jan 2, 2025, 3:18:32 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_803bd2cec95711ef81493cecef1b359e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:32 PM\"\n },\n \"tracker\": {\n \"weight\": 0.0,\n \"trackingCode\": \"9400100208271116082716\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:18:33 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_c3ab4e43ed1d4158a5f69096d35eb444\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzNlOTc5ZmVjMzNkNTRiMzg5OWFiNmM4MzViNWFjNDkw\",\n \"trackingDetails\": [],\n \"id\": \"trk_3e979fec33d54b3899ab6c835b5ac490\",\n \"status\": \"unknown\",\n \"object\": \"Tracker\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:33 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\": \"Jan 2, 2025, 3:18:32 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_803e4839c95711efa988ac1f6bc539aa\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:32 PM\"\n },\n \"id\": \"shp_c3ab4e43ed1d4158a5f69096d35eb444\",\n \"postageLabel\": {\n \"createdAt\": \"Jan 2, 2025, 3:18:32 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_a8aa952fd3a243bb8cea9381cf16691e\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250102/e8359f9746ef624ea8b341a7aa07a41051.png\",\n \"object\": \"PostageLabel\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:33 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\",\n \"updatedAt\": \"Jan 2, 2025, 3:18:33 PM\"\n },\n \"min_datetime\": \"2025-01-03\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +110,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\": \"2025-01-02T22:18: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\": \"2025-01-02T22:18:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_81169ee1c95711efbb09ac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2025-01-03T00:00:00Z\",\n \"created_at\": \"2025-01-02T22:18:33Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:18:34Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2025-01-02T22:18:34Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_003090dc078e430ca85027782225c1ef\",\n \"pickup_id\": \"pickup_b9cc3f771cb748018cbfd60b9c42fe76\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2025-01-03T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2025-01-02T22:18:33Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_b9cc3f771cb748018cbfd60b9c42fe76\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,53 +123,50 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d090f7ecfb4f000884f6" + "379710f4677710b9e78854e3004a042d" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.113049" - ], - "etag": [ - "W/\"2a9741950478159265984698bcbde49b\"" + "1.146652" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,9 +176,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1295 + "duration": 1353 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/get_next_page.json b/src/test/cassettes/pickup/get_next_page.json new file mode 100644 index 000000000..be4b85b71 --- /dev/null +++ b/src/test/cassettes/pickup/get_next_page.json @@ -0,0 +1,174 @@ +[ + { + "recordedAt": 1723823831, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/pickups?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "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\": \"2023-12-27T19:40: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\": \"2023-12-27T19:40:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d96685b5a4ef11ee96b5ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-28T00:00:00Z\",\n \"created_at\": \"2023-12-27T19:40:54Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-27T19:40:55Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-27T19:40:55Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_a965676512e24485bf2d50e3e317752c\",\n \"pickup_id\": \"pickup_ec9e3bb5252a4db3b5c479f2954aac6f\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC63906512\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-28T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-27T19:40:57Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_ec9e3bb5252a4db3b5c479f2954aac6f\",\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\": \"2023-12-27T19:40: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\": \"2023-12-27T19:40:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d7d56f39a4ef11ee95fdac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-28T00:00:00Z\",\n \"created_at\": \"2023-12-27T19:40:52Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-27T19:40:52Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-27T19:40:52Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_e5c8e252781e4ec0ba025ca79fbea91e\",\n \"pickup_id\": \"pickup_ec95cdda44334729af451277bacb5041\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-28T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-27T19:40:52Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_ec95cdda44334729af451277bacb5041\",\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\": \"2023-12-27T19:40: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\": \"2023-12-27T19:40:46+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d4c18861a4ef11eeb194ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-28T00:00:00Z\",\n \"created_at\": \"2023-12-27T19:40:46Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-27T19:40:47Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-27T19:40:47Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_188e197c7b3943ca9ab572ff9ac22bbc\",\n \"pickup_id\": \"pickup_7324ea25c3fd4f5ea5182681bf6960d6\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC63906736\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-28T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-27T19:40:50Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_7324ea25c3fd4f5ea5182681bf6960d6\",\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\": \"2023-12-27T19:40: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\": \"2023-12-27T19:40:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d31ffdd2a4ef11eea5403cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-28T00:00:00Z\",\n \"created_at\": \"2023-12-27T19:40:44Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-27T19:40:45Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-27T19:40:45Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_0c35750982174f7393bbc1536ccda5d3\",\n \"pickup_id\": \"pickup_89f4f639683049d8ab5a1c8526c87cf7\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-28T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-27T19:40:44Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_89f4f639683049d8ab5a1c8526c87cf7\",\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\": \"2023-12-27T19:40: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\": \"2023-12-27T19:40:41+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_d162b4bea4ef11eea43d3cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-28T00:00:00Z\",\n \"created_at\": \"2023-12-27T19:40:41Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-27T19:40:42Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-27T19:40:42Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_cefd58afaf694649adcf39156b92f52b\",\n \"pickup_id\": \"pickup_1ce4c97001ad493fb176eb254f5c200d\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-28T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-27T19:40:41Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_1ce4c97001ad493fb176eb254f5c200d\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n }\n ],\n \"has_more\": true\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "5840" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb33nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf76d7e786bc3b0035a8f6" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.184014" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/pickups?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 385 + }, + { + "recordedAt": 1723823831, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/pickups?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%70%69%63%6B%75%70%5F%31%63%65%34%63%39%37%30%30%31%61%64%34%39%33%66%62%31%37%36%65%62%32%35%34%66%35%63%32%30%30%64" + }, + "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\": \"2023-12-27T19:40: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\": \"2023-12-27T19:40:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_ce66bb09a4ef11ee90edac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-28T00:00:00Z\",\n \"created_at\": \"2023-12-27T19:40:36Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-27T19:40:37Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-27T19:40:37Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_bb247171f1d24634974aed83834bc665\",\n \"pickup_id\": \"pickup_c1e228bb501e491e8f166f04295268d9\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC63906734\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-28T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-27T19:40:39Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_c1e228bb501e491e8f166f04295268d9\",\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\": \"2023-12-07T19:04: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\": \"2023-12-07T19:04:52+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_802f63fb953311eea26dac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-08T00:00:00Z\",\n \"created_at\": \"2023-12-07T19:04:52Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-07T19:04:52Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-07T19:04:52Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_0978a9a4e0684527acca630b960bfece\",\n \"pickup_id\": \"pickup_0c7724d352b14847a4ea2aac73bd2ad9\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC63811662\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-08T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-07T19:04:54Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_0c7724d352b14847a4ea2aac73bd2ad9\",\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\": \"2023-12-07T19:04:48+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2023-12-07T19:04:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7de6733d953311eea0ffac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-08T00:00:00Z\",\n \"created_at\": \"2023-12-07T19:04:48Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-07T19:04:49Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-07T19:04:49Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_276fb7c190da4c7faeac518c4eaedf52\",\n \"pickup_id\": \"pickup_74f7ec1f63ef4a188ef9302e4f67efae\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-08T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-07T19:04:48Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_74f7ec1f63ef4a188ef9302e4f67efae\",\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\": \"2023-12-07T19:04: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\": \"2023-12-07T19:04:40+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_79566ac6953311ee8e4d3cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-08T00:00:00Z\",\n \"created_at\": \"2023-12-07T19:04:40Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-07T19:04:41Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-07T19:04:41Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_7dceb3a32eb6442b90caaf167fc923a4\",\n \"pickup_id\": \"pickup_001d444c599c40b1950cbb79fadaaaf1\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": \"WTC63811660\",\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-08T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-07T19:04:45Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_001d444c599c40b1950cbb79fadaaaf1\",\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\": \"2023-12-07T19:04: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\": \"2023-12-07T19:04:37+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_77288a7c953311ee9cb0ac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2023-12-08T00:00:00Z\",\n \"created_at\": \"2023-12-07T19:04:37Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2023-12-07T19:04:37Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2023-12-07T19:04:37Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_bccf23c83abd4f09817afbc87d15dd46\",\n \"pickup_id\": \"pickup_1efd0f7107e6428a9fc605b7f1dc4b64\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2023-12-08T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2023-12-07T19:04:37Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_1efd0f7107e6428a9fc605b7f1dc4b64\",\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": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf76d7e786bc3c0035a960" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.203378" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/pickups?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%70%69%63%6B%75%70%5F%31%63%65%34%63%39%37%30%30%31%61%64%34%39%33%66%62%31%37%36%65%62%32%35%34%66%35%63%32%30%30%64" + }, + "duration": 407 + } +] \ 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..9f90e4ac5 100644 --- a/src/test/cassettes/pickup/lowest_rate.json +++ b/src/test/cassettes/pickup/lowest_rate.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456520, + "recordedAt": 1735856477, "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 \"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\": \"GroundAdvantage\",\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,69 +18,66 @@ "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.93000\",\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\": \"2025-01-02T22:21:16Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2025-01-02T22:21:17Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.70\",\n \"created_at\": \"2025-01-02T22:21:17Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d12aadc2d7bb41c89f7e56f2c90554de\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:21:17Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_42f13bc38d614be690a3632e2111e029\",\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\": \"2025-01-02T22:21:17Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_d12aadc2d7bb41c89f7e56f2c90554de\",\n \"tracking_code\": \"9400100208271116082747\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2I4MTRiNzFhMjdmZDRjZTdhMTMwYjk1ODA1MDZkNmVk\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:21:17Z\",\n \"signed_by\": null,\n \"id\": \"trk_b814b71a27fd4ce7a130b9580506d6ed\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_e23945e8c95711efafe8ac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d12aadc2d7bb41c89f7e56f2c90554de\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_e23945e8c95711efafe8ac1f6bc53342\",\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\": \"2025-01-02T22:21:17Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250102/e8c40d932bf9ba472a9fe4b471f9736679.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2025-01-02T22:21:17Z\",\n \"id\": \"pl_d5b40ec9c2cc4eb09d57b2d0fa3426de\",\n \"label_zpl_url\": null,\n \"label_date\": \"2025-01-02T22:21:17Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2025-01-02T22:21:16Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2025-01-02T22:21:16Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_5c7537a9197a46e4b290ea1165c1f426\",\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\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_e236b63fc95711efb6683cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"34.10\",\n \"created_at\": \"2025-01-02T22:21:16Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d12aadc2d7bb41c89f7e56f2c90554de\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"39.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:21:16Z\",\n \"rate\": \"34.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fd9fddb987174474a7d8f252ff2ac329\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.55\",\n \"created_at\": \"2025-01-02T22:21:16Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d12aadc2d7bb41c89f7e56f2c90554de\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.20\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:21:16Z\",\n \"rate\": \"7.20\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_24ca96e5fb6f4e668d9e9bb126b0a203\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.70\",\n \"created_at\": \"2025-01-02T22:21:16Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d12aadc2d7bb41c89f7e56f2c90554de\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:21:16Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_42f13bc38d614be690a3632e2111e029\",\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\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_e236b63fc95711efb6683cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100208271116082747\",\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" + "6550" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb39nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d087f7a646f3000880af" + "379710f26777115ce7886acb004ad57f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.074053" + "0.902526" ], - "etag": [ - "W/\"f68479d972d3b029cd2a5420f5802975\"" + "location": [ + "/api/v2/shipments/shp_d12aadc2d7bb41c89f7e56f2c90554de" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_2986d2a65f3b4ae6a64979187e182a37" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,15 +87,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1208 + "duration": 1111 }, { - "recordedAt": 1661456521, + "recordedAt": 1735856478, "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\": \"2025-01-03\",\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\": \"Jan 2, 2025, 3:21:16 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_5c7537a9197a46e4b290ea1165c1f426\",\n \"height\": 4.0,\n \"object\": \"Parcel\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:16 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.93,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.5,\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\": 34.1,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:16 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 34.1,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_d12aadc2d7bb41c89f7e56f2c90554de\",\n \"currency\": \"USD\",\n \"id\": \"rate_fd9fddb987174474a7d8f252ff2ac329\",\n \"retailRate\": 39.0,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:16 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.55,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:16 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.2,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_d12aadc2d7bb41c89f7e56f2c90554de\",\n \"currency\": \"USD\",\n \"id\": \"rate_24ca96e5fb6f4e668d9e9bb126b0a203\",\n \"retailRate\": 10.2,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:16 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.7,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:16 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_d12aadc2d7bb41c89f7e56f2c90554de\",\n \"currency\": \"USD\",\n \"id\": \"rate_42f13bc38d614be690a3632e2111e029\",\n \"retailRate\": 8.85,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:16 PM\"\n }\n ],\n \"trackingCode\": \"9400100208271116082747\",\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\": \"Jan 2, 2025, 3:21:16 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_e236b63fc95711efb6683cecef1b359e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:16 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:16 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_e23945e8c95711efafe8ac1f6bc53342\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:16 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.7,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:17 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_d12aadc2d7bb41c89f7e56f2c90554de\",\n \"currency\": \"USD\",\n \"id\": \"rate_42f13bc38d614be690a3632e2111e029\",\n \"retailRate\": 8.85,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:17 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:16 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\": \"Jan 2, 2025, 3:21:16 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_e236b63fc95711efb6683cecef1b359e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:16 PM\"\n },\n \"tracker\": {\n \"weight\": 0.0,\n \"trackingCode\": \"9400100208271116082747\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:17 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_d12aadc2d7bb41c89f7e56f2c90554de\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2I4MTRiNzFhMjdmZDRjZTdhMTMwYjk1ODA1MDZkNmVk\",\n \"trackingDetails\": [],\n \"id\": \"trk_b814b71a27fd4ce7a130b9580506d6ed\",\n \"status\": \"unknown\",\n \"object\": \"Tracker\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:17 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\": \"Jan 2, 2025, 3:21:16 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_e23945e8c95711efafe8ac1f6bc53342\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:16 PM\"\n },\n \"id\": \"shp_d12aadc2d7bb41c89f7e56f2c90554de\",\n \"postageLabel\": {\n \"createdAt\": \"Jan 2, 2025, 3:21:17 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_d5b40ec9c2cc4eb09d57b2d0fa3426de\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250102/e8c40d932bf9ba472a9fe4b471f9736679.png\",\n \"object\": \"PostageLabel\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:17 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:17 PM\"\n },\n \"min_datetime\": \"2025-01-03\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +110,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\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:17+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_e2fa515fc95711efb6cd3cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2025-01-03T00:00:00Z\",\n \"created_at\": \"2025-01-02T22:21:17Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:21:18Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2025-01-02T22:21:18Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_5040110c599048bca7b59fac6ddf65fa\",\n \"pickup_id\": \"pickup_899fa045c93c430c8d7e84adc3ee81ed\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2025-01-03T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2025-01-02T22:21:17Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_899fa045c93c430c8d7e84adc3ee81ed\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,53 +123,50 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb38nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d088e68a144200088126" + "379710ef6777115de7886acd004ad6bc" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.751992" - ], - "etag": [ - "W/\"596a6590edee9d0298c2211d75d8ca2d\"" + "0.648418" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,9 +176,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 893 + "duration": 865 } ] \ No newline at end of file diff --git a/src/test/cassettes/pickup/retrieve.json b/src/test/cassettes/pickup/retrieve.json index a0f2be893..d8c9c304a 100644 --- a/src/test/cassettes/pickup/retrieve.json +++ b/src/test/cassettes/pickup/retrieve.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456517, + "recordedAt": 1735856473, "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 \"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\": \"GroundAdvantage\",\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,69 +18,66 @@ "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.93000\",\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\": \"2025-01-02T22:21:12Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2025-01-02T22:21:13Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.70\",\n \"created_at\": \"2025-01-02T22:21:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_47d30c1de3334fe88826c1016d8687ec\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:21:13Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ce53650487b048c48688059d5fa6c24d\",\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\": \"2025-01-02T22:21:13Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_47d30c1de3334fe88826c1016d8687ec\",\n \"tracking_code\": \"9400100208271116082730\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzU1NzM2ZTI1M2Q3MzRlY2Y4YjEyNzY3MmY2NjBhYWY3\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:21:13Z\",\n \"signed_by\": null,\n \"id\": \"trk_55736e253d734ecf8b127672f660aaf7\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_e008f983c95711efaec4ac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_47d30c1de3334fe88826c1016d8687ec\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:12+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_e008f983c95711efaec4ac1f6bc53342\",\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\": \"2025-01-02T22:21:13Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250102/e8ae42dc566b8748be9bd58c10b8e40bf7.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2025-01-02T22:21:13Z\",\n \"id\": \"pl_cc24056d488b42f4a53abe96b86b1371\",\n \"label_zpl_url\": null,\n \"label_date\": \"2025-01-02T22:21:13Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2025-01-02T22:21:12Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2025-01-02T22:21:12Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_13ab9db8a0204dc2aff9b9770d00c36a\",\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\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_e0072f9cc95711ef858bac1f6bc539ae\",\n \"street2\": \"\",\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.55\",\n \"created_at\": \"2025-01-02T22:21:13Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_47d30c1de3334fe88826c1016d8687ec\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.20\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:21:13Z\",\n \"rate\": \"7.20\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ebf7b6ac02c84e868c0c219276b2278d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.70\",\n \"created_at\": \"2025-01-02T22:21:13Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_47d30c1de3334fe88826c1016d8687ec\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:21:13Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ce53650487b048c48688059d5fa6c24d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"34.10\",\n \"created_at\": \"2025-01-02T22:21:13Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_47d30c1de3334fe88826c1016d8687ec\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"39.00\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-01-02T22:21:13Z\",\n \"rate\": \"34.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cd8f4d4e1d244c69905bdbba79c9c924\",\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\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_e0072f9cc95711ef858bac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100208271116082730\",\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" + "6550" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb36nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d084f800a39200087fca" + "379710ee67771158e7886ac6004ad1ca" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.030155" + "0.863532" ], - "etag": [ - "W/\"0a586a0dd26d53dce2936d511ba3df94\"" + "location": [ + "/api/v2/shipments/shp_47d30c1de3334fe88826c1016d8687ec" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_86551c2f67f0417fb61b5e259af11b05" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,15 +87,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1169 + "duration": 1081 }, { - "recordedAt": 1661456518, + "recordedAt": 1735856475, "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\": \"2025-01-03\",\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\": \"Jan 2, 2025, 3:21:12 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_13ab9db8a0204dc2aff9b9770d00c36a\",\n \"height\": 4.0,\n \"object\": \"Parcel\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:12 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.93,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.5,\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.55,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:13 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 7.2,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_47d30c1de3334fe88826c1016d8687ec\",\n \"currency\": \"USD\",\n \"id\": \"rate_ebf7b6ac02c84e868c0c219276b2278d\",\n \"retailRate\": 10.2,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:13 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.7,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:13 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_47d30c1de3334fe88826c1016d8687ec\",\n \"currency\": \"USD\",\n \"id\": \"rate_ce53650487b048c48688059d5fa6c24d\",\n \"retailRate\": 8.85,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:13 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 34.1,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:13 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 34.1,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_47d30c1de3334fe88826c1016d8687ec\",\n \"currency\": \"USD\",\n \"id\": \"rate_cd8f4d4e1d244c69905bdbba79c9c924\",\n \"retailRate\": 39.0,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:13 PM\"\n }\n ],\n \"trackingCode\": \"9400100208271116082730\",\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\": \"Jan 2, 2025, 3:21:12 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_e0072f9cc95711ef858bac1f6bc539ae\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:13 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:12 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_e008f983c95711efaec4ac1f6bc53342\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:12 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.7,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:13 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_47d30c1de3334fe88826c1016d8687ec\",\n \"currency\": \"USD\",\n \"id\": \"rate_ce53650487b048c48688059d5fa6c24d\",\n \"retailRate\": 8.85,\n \"object\": \"Rate\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:13 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:12 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\": \"Jan 2, 2025, 3:21:12 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_e0072f9cc95711ef858bac1f6bc539ae\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:13 PM\"\n },\n \"tracker\": {\n \"weight\": 0.0,\n \"trackingCode\": \"9400100208271116082730\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Jan 2, 2025, 3:21:13 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_47d30c1de3334fe88826c1016d8687ec\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzU1NzM2ZTI1M2Q3MzRlY2Y4YjEyNzY3MmY2NjBhYWY3\",\n \"trackingDetails\": [],\n \"id\": \"trk_55736e253d734ecf8b127672f660aaf7\",\n \"status\": \"unknown\",\n \"object\": \"Tracker\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:13 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\": \"Jan 2, 2025, 3:21:12 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_e008f983c95711efaec4ac1f6bc53342\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:12 PM\"\n },\n \"id\": \"shp_47d30c1de3334fe88826c1016d8687ec\",\n \"postageLabel\": {\n \"createdAt\": \"Jan 2, 2025, 3:21:13 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_cc24056d488b42f4a53abe96b86b1371\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250102/e8ae42dc566b8748be9bd58c10b8e40bf7.png\",\n \"object\": \"PostageLabel\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:13 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\",\n \"updatedAt\": \"Jan 2, 2025, 3:21:13 PM\"\n },\n \"min_datetime\": \"2025-01-03\"\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,7 +110,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\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_e0c673bec95711efaf1fac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2025-01-03T00:00:00Z\",\n \"created_at\": \"2025-01-02T22:21:14Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:21:15Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2025-01-02T22:21:15Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_38562fa2203a42d5be9cecf0c5fa3407\",\n \"pickup_id\": \"pickup_fbcecc96f5ec425ca2665f4e006df009\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2025-01-03T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2025-01-02T22:21:14Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_fbcecc96f5ec425ca2665f4e006df009\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -127,53 +123,53 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d085f7f02bb100088037" + "379710f36777115ae7886ac8004ad32e" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq 51d74985a2", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.913636" - ], - "etag": [ - "W/\"c1c26a6adc9a114f29ba188c43b08423\"" + "1.681109" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,13 +179,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/pickups" }, - "duration": 1046 + "duration": 1906 }, { - "recordedAt": 1661456518, + "recordedAt": 1735856476, "request": { "body": "", "method": "GET", @@ -201,10 +196,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/pickups/pickup_45b11f67a0194a2ba089f8193c436fe6" + "uri": "https://api.easypost.com/v2/pickups/pickup_fbcecc96f5ec425ca2665f4e006df009" }, "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\": \"2025-01-02T22:21: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\": \"2025-01-02T22:21:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_e0c673bec95711efaf1fac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"min_datetime\": \"2025-01-03T00:00:00Z\",\n \"created_at\": \"2025-01-02T22:21:14Z\",\n \"pickup_rates\": [\n {\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-01-02T22:21:15Z\",\n \"rate\": \"0.00\",\n \"service\": \"NextDay\",\n \"created_at\": \"2025-01-02T22:21:15Z\",\n \"currency\": \"USD\",\n \"id\": \"pickuprate_38562fa2203a42d5be9cecf0c5fa3407\",\n \"pickup_id\": \"pickup_fbcecc96f5ec425ca2665f4e006df009\",\n \"object\": \"PickupRate\"\n }\n ],\n \"confirmation\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"max_datetime\": \"2025-01-03T00:00:00Z\",\n \"is_account_address\": false,\n \"updated_at\": \"2025-01-02T22:21:14Z\",\n \"messages\": [],\n \"carrier_accounts\": [],\n \"id\": \"pickup_fbcecc96f5ec425ca2665f4e006df009\",\n \"object\": \"Pickup\",\n \"status\": \"unknown\"\n}", "httpVersion": null, "headers": { "null": [ @@ -217,53 +212,50 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb41nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d086f7dc87f500088088" + "379710ef6777115ce7886ac9004ad4f6" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq 51d74985a2", + "extlb1nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.065849" - ], - "etag": [ - "W/\"c1c26a6adc9a114f29ba188c43b08423\"" + "0.153489" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202501022109-2fb261155f-master" ], "cache-control": [ "private, no-cache, no-store" @@ -273,9 +265,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/pickups/pickup_45b11f67a0194a2ba089f8193c436fe6" + "uri": "https://api.easypost.com/v2/pickups/pickup_fbcecc96f5ec425ca2665f4e006df009" }, - "duration": 192 + "duration": 357 } ] \ No newline at end of file diff --git a/src/test/cassettes/rate/retrieve.json b/src/test/cassettes/rate/retrieve.json index fe744f730..334120e50 100644 --- a/src/test/cassettes/rate/retrieve.json +++ b/src/test/cassettes/rate/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456467, + "recordedAt": 1723823827, "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,69 +18,66 @@ "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\": \"2024-08-16T15:57:06Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:06+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2fc788aa5be811ef811f3cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f2fb100e7468419db9f29a83a2a5d20a\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:06+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_2fc788aa5be811ef811f3cecef1b359e\",\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\": \"2024-08-16T15:57:06Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:57:06Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_e06032f638554e30ad70a91fcee0ea1b\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:06+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_2fc51c395be811ef811d3cecef1b359e\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:57:06Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2fb100e7468419db9f29a83a2a5d20a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:06Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3c7c64b0d0f34fc0a0da584986569f67\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:57:06Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2fb100e7468419db9f29a83a2a5d20a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:06Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f96267b99ff24da18c62ee3e0e2c63a0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:57:07Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2fb100e7468419db9f29a83a2a5d20a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:07Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6e7e7f905fc44475aa503d399bea90c5\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:06+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_2fc51c395be811ef811d3cecef1b359e\",\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_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_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 \"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" + "5436" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb38nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d053f7b9ef51000866f5" + "8a4bf43e66bf76d2e786b9080035a342" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.751292" + "0.658150" ], - "etag": [ - "W/\"067b41d075185fb127359ba21ed2c521\"" + "location": [ + "/api/v2/shipments/shp_f2fb100e7468419db9f29a83a2a5d20a" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_dc776864dd95437f8cde7d247fa1c1ad" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 966 + "duration": 862 }, { - "recordedAt": 1661456468, + "recordedAt": 1723823827, "request": { "body": "", "method": "GET", @@ -108,69 +104,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/rates/rate_32e4fcb4046c4b7393c51ddd1d7bed33" + "uri": "https://api.easypost.com/v2/rates/rate_3c7c64b0d0f34fc0a0da584986569f67" }, "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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:57:06Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f2fb100e7468419db9f29a83a2a5d20a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:06Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3c7c64b0d0f34fc0a0da584986569f67\",\n \"object\": \"Rate\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "543" + "537" ], "expires": [ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d054f7dead5600086765" + "8a4bf43f66bf76d3e786b9090035a432" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.147135" - ], - "etag": [ - "W/\"6433d4b440e3e617ff9e8ca925f597b4\"" + "0.216382" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +173,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/rates/rate_32e4fcb4046c4b7393c51ddd1d7bed33" + "uri": "https://api.easypost.com/v2/rates/rate_3c7c64b0d0f34fc0a0da584986569f67" }, - "duration": 275 + "duration": 413 } ] \ No newline at end of file diff --git a/src/test/cassettes/referral/all.json b/src/test/cassettes/referral/all.json deleted file mode 100644 index 1b2968aa7..000000000 --- a/src/test/cassettes/referral/all.json +++ /dev/null @@ -1,95 +0,0 @@ -[ - { - "recordedAt": 1663367868, - "request": { - "body": "", - "method": "GET", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ] - }, - "uri": "https://api.easypost.com/v2/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": [ - "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": [ - "359b96fd6324fabcec7b5abd00098d10" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.288283" - ], - "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/v2/referral_customers?page_size\u003d5" - }, - "duration": 779 - } -] \ No newline at end of file diff --git a/src/test/cassettes/referral_customer/add_bank_account_from_stripe.json b/src/test/cassettes/referral_customer/add_bank_account_from_stripe.json new file mode 100644 index 000000000..a22b51d94 --- /dev/null +++ b/src/test/cassettes/referral_customer/add_bank_account_from_stripe.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1742503697, + "request": { + "body": "{\n \"financial_connections_id\": \"fca_0QAc7sDqT4huGUvdf6BahYa9\",\n \"mandate_data\": {\n \"ip_address\": \"127.0.0.1\",\n \"accepted_at\": 1.72251073E9,\n \"user_agent\": \"Mozilla/5.0\"\n },\n \"priority\": \"primary\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/bank_accounts" + }, + "response": { + "body": "{\n \"error\": {\n \"code\": \"BANK_ACCOUNT.INVALID_PARAMS\",\n \"message\": \"account_holder_name must be present when creating a Financial Connections payment method\",\n \"errors\": []\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 422 Unprocessable Entity" + ], + "content-length": [ + "161" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb33nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "64f5803467dc7f11e2baa010002efd3c" + ], + "x-proxied": [ + "intlb4nuq 284c5d344a", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.036008" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202503202010-5de35d6868-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 422, + "message": "Unprocessable Entity" + }, + "uri": "https://api.easypost.com/v2/bank_accounts" + }, + "duration": 146 + } +] \ No newline at end of file diff --git a/src/test/cassettes/referral_customer/add_credit_card_from_stripe.json b/src/test/cassettes/referral_customer/add_credit_card_from_stripe.json new file mode 100644 index 000000000..a11a1a9ec --- /dev/null +++ b/src/test/cassettes/referral_customer/add_credit_card_from_stripe.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1742503697, + "request": { + "body": "{\n \"credit_card\": {\n \"payment_method_id\": \"pm_0Pn6bQDqT4huGUvd0CjpRerH\",\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 \"error\": {\n \"code\": \"CREDIT_CARD.NOT_FOUND\",\n \"message\": \"Stripe::PaymentMethod does not exist for the specified reference_id\",\n \"errors\": []\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 404 Not Found" + ], + "content-length": [ + "134" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb42nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "64f5803167dc7f11e2baa012002efd6f" + ], + "x-proxied": [ + "intlb3nuq 284c5d344a", + "extlb1nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.444659" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202503202010-5de35d6868-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 404, + "message": "Not Found" + }, + "uri": "https://api.easypost.com/v2/credit_cards" + }, + "duration": 562 + } +] \ No newline at end of file diff --git a/src/test/cassettes/referral_customer/all.json b/src/test/cassettes/referral_customer/all.json new file mode 100644 index 000000000..8283a12d9 --- /dev/null +++ b/src/test/cassettes/referral_customer/all.json @@ -0,0 +1,88 @@ +[ + { + "recordedAt": 1723823879, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/referral_customers?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"referral_customers\": [\n {\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2022-04-26T15:50:28Z\",\n \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\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 \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": \"100.00\",\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\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 \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\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 \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\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 \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": \"100.00\",\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\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": [ + "2858" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44166bf7706e786c0c10035d908" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.237363" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/referral_customers?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 434 + } +] \ No newline at end of file diff --git a/src/test/cassettes/referral/create.json b/src/test/cassettes/referral_customer/create.json similarity index 63% rename from src/test/cassettes/referral/create.json rename to src/test/cassettes/referral_customer/create.json index 0f78ea215..3ad5adb81 100644 --- a/src/test/cassettes/referral/create.json +++ b/src/test/cassettes/referral_customer/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1663367903, + "recordedAt": 1723823883, "request": { "body": "{\n \"user\": {\n \"phone\": \"REDACTED\",\n \"name\": \"Test Referral\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,66 +18,63 @@ "uri": "https://api.easypost.com/v2/referral_customers" }, "response": { - "body": "{\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2022-09-16T22:38:22Z\",\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_0678ed60f6ef4444ad6d6afa5cbc36bc\",\n \"api_keys\": [],\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"referral_customer_7a898c2a6f4449329430d51fd6d8d631@donotemail.easypost.com\",\n \"object\": \"User\"\n}", + "body": "{\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2024-08-16T15:58:03Z\",\n \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0375\",\n \"has_elevate_access\": false,\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.01\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_7294fa8b75d247318ce711cc6346469e\",\n \"api_keys\": [],\n \"insurance_fee_minimum\": \"0.50\",\n \"email\": \"referral_customer_b0719983252a4e56a479d5f902fbfdb4@donotemail.easypost.com\",\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "965" + "1021" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb35nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "fcf3b5806324fadef3c5cb39000ac746" + "8a4bf44166bf770be786c0df0035de2f" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.124291" - ], - "etag": [ - "W/\"d41defb1790cddd44b9a534bb3d676f0\"" + "0.607568" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209152244-6075a793a4-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +84,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/referral_customers" }, - "duration": 1279 + "duration": 822 } ] \ No newline at end of file diff --git a/src/test/cassettes/referral_customer/create_bad_stripe_token.json b/src/test/cassettes/referral_customer/create_bad_stripe_token.json new file mode 100644 index 000000000..62c6c0e9d --- /dev/null +++ b/src/test/cassettes/referral_customer/create_bad_stripe_token.json @@ -0,0 +1,191 @@ +[ + { + "recordedAt": 1723823877, + "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": [ + "bigweb41nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44166bf7705e786c0bd0035d721" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.027043" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/partners/stripe_public_key" + }, + "duration": 234 + }, + { + "recordedAt": 1723823877, + "request": { + "body": "", + "method": "POST", + "headers": { + "Content-Type": [ + "application/x-www-form-urlencoded" + ] + }, + "uri": "https://api.stripe.com/v1/tokens?card%5Bnumber%5D\u003d1234\u0026card%5Bcvc%5D\u003d1234\u0026card%5Bexp_month%5D\u003d1234\u0026card%5Bexp_year%5D\u003d1234?%63%61%72%64%5B%63%76%63%5D\u003d%52%45%44%41%43%54%45%44\u0026%63%61%72%64%5B%65%78%70%5F%79%65%61%72%5D\u003d%31%32%33%34\u0026%63%61%72%64%5B%6E%75%6D%62%65%72%5D\u003d%52%45%44%41%43%54%45%44\u0026%63%61%72%64%5B%65%78%70%5F%6D%6F%6E%74%68%5D\u003d%31%32%33%34" + }, + "response": { + "body": "{\n \"error\": {\n \"doc_url\": \"https://stripe.com/docs/error-codes/invalid-number\",\n \"code\": \"invalid_number\",\n \"param\": \"number\",\n \"message\": \"The card number is not a valid credit card number.\",\n \"type\": \"card_error\",\n \"request_log_url\": \"https://dashboard.stripe.com/logs/req_UJTBvZhpAxDxco?t\\u003d1723823877\"\n }\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 402 Payment Required" + ], + "Server": [ + "nginx" + ], + "Access-Control-Allow-Origin": [ + "*" + ], + "Access-Control-Allow-Methods": [ + "GET,HEAD,PUT,PATCH,POST,DELETE" + ], + "Idempotency-Key": [ + "8528839b-26b7-4e9b-9716-28d8d71d4bfd" + ], + "Original-Request": [ + "req_UJTBvZhpAxDxco" + ], + "Stripe-Version": [ + "2020-08-27" + ], + "Stripe-Should-Retry": [ + "false" + ], + "Access-Control-Expose-Headers": [ + "Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required" + ], + "Strict-Transport-Security": [ + "max-age\u003d63072000; includeSubDomains; preload" + ], + "Access-Control-Allow-Credentials": [ + "true" + ], + "Report-To": [ + "{\"group\":\"coop\",\"max_age\":8640,\"endpoints\":[{\"url\":\"https://q.stripe.com/coop-report?s\u003dpayins-bapi-srv\"}],\"include_subdomains\":true}" + ], + "Content-Security-Policy": [ + "report-uri https://q.stripe.com/csp-report?p\u003dv1%2Ftokens; block-all-mixed-content; default-src \u0027none\u0027; base-uri \u0027none\u0027; form-action \u0027none\u0027; frame-ancestors \u0027none\u0027; img-src \u0027self\u0027; script-src \u0027self\u0027 \u0027report-sample\u0027; style-src \u0027self\u0027" + ], + "Cross-Origin-Opener-Policy-Report-Only": [ + "same-origin; report-to\u003d\"coop\"" + ], + "Content-Length": [ + "329" + ], + "Access-Control-Max-Age": [ + "300" + ], + "Request-Id": [ + "req_UJTBvZhpAxDxco" + ], + "Content-Type": [ + "application/json" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Connection": [ + "keep-alive" + ], + "Reporting-Endpoints": [ + "coop\u003d\"https://q.stripe.com/coop-report?s\u003dpayins-bapi-srv\"" + ], + "Date": [ + "Fri, 16 Aug 2024 15:57:57 GMT" + ], + "X-Stripe-Priority-Routing-Enabled": [ + "true" + ], + "Cache-Control": [ + "no-cache, no-store" + ], + "Vary": [ + "Origin" + ], + "X-Stripe-Routing-Context-Priority-Tier": [ + "livemode-critical" + ] + }, + "status": { + "code": 402, + "message": "Payment Required" + }, + "uri": "https://api.stripe.com/v1/tokens?card%5Bnumber%5D\u003d1234\u0026card%5Bcvc%5D\u003d1234\u0026card%5Bexp_month%5D\u003d1234\u0026card%5Bexp_year%5D\u003d1234?%63%61%72%64%5B%63%76%63%5D\u003d%52%45%44%41%43%54%45%44\u0026%63%61%72%64%5B%65%78%70%5F%79%65%61%72%5D\u003d%31%32%33%34\u0026%63%61%72%64%5B%6E%75%6D%62%65%72%5D\u003d%52%45%44%41%43%54%45%44\u0026%63%61%72%64%5B%65%78%70%5F%6D%6F%6E%74%68%5D\u003d%31%32%33%34" + }, + "duration": 318 + } +] \ No newline at end of file diff --git a/src/test/cassettes/referral_customer/get_next_page.json b/src/test/cassettes/referral_customer/get_next_page.json new file mode 100644 index 000000000..71d6074d0 --- /dev/null +++ b/src/test/cassettes/referral_customer/get_next_page.json @@ -0,0 +1,177 @@ +[ + { + "recordedAt": 1723823878, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/referral_customers?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"referral_customers\": [\n {\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2022-04-26T15:50:28Z\",\n \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\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 \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": \"100.00\",\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\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 \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\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 \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\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 \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": \"100.00\",\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\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": [ + "2858" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf7705e786c0bf0035d7d3" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.382369" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/referral_customers?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 582 + }, + { + "recordedAt": 1723823878, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/referral_customers?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%75%73%65%72%5F%34%38%38%65%33%39%31%33%39%35%66%34%34%31%36%31%39%36%61%33%31%39%36%35%66%65%63%61%63%34%30%39" + }, + "response": { + "body": "{\n \"referral_customers\": [\n {\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2022-04-29T19:35:33Z\",\n \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\n \"email\": \"test@test.com\",\n \"object\": \"User\"\n },\n {\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2022-04-28T22:34:38Z\",\n \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\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 \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": \"100.00\",\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\n \"email\": \"email@example.com\",\n \"object\": \"User\"\n },\n {\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2022-04-26T15:50:28Z\",\n \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0325\",\n \"has_elevate_access\": false,\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.50\",\n \"email\": \"email@example.com\",\n \"object\": \"User\"\n }\n ],\n \"has_more\": false\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2285" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb42nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf7706e786c0c00035d898" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.200041" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/referral_customers?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%75%73%65%72%5F%34%38%38%65%33%39%31%33%39%35%66%34%34%31%36%31%39%36%61%33%31%39%36%35%66%65%63%61%63%34%30%39" + }, + "duration": 412 + } +] \ No newline at end of file diff --git a/src/test/cassettes/referral_customer/referral_add_credit_card.json b/src/test/cassettes/referral_customer/referral_add_credit_card.json new file mode 100644 index 000000000..8045f040c --- /dev/null +++ b/src/test/cassettes/referral_customer/referral_add_credit_card.json @@ -0,0 +1,280 @@ +[ + { + "recordedAt": 1723824484, + "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": [ + "bigweb36nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "0580883166bf7964e787564d003794f6" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb2nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.026426" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/partners/stripe_public_key" + }, + "duration": 224 + }, + { + "recordedAt": 1723824484, + "request": { + "body": "", + "method": "POST", + "headers": { + "Content-Type": [ + "application/x-www-form-urlencoded" + ] + }, + "uri": "https://api.stripe.com/v1/tokens?card%5Bnumber%5D\u003d4536410136126170\u0026card%5Bcvc%5D\u003d778\u0026card%5Bexp_month%5D\u003d5\u0026card%5Bexp_year%5D\u003d2028?%63%61%72%64%5B%63%76%63%5D\u003d%52%45%44%41%43%54%45%44\u0026%63%61%72%64%5B%65%78%70%5F%79%65%61%72%5D\u003d%32%30%32%38\u0026%63%61%72%64%5B%6E%75%6D%62%65%72%5D\u003d%52%45%44%41%43%54%45%44\u0026%63%61%72%64%5B%65%78%70%5F%6D%6F%6E%74%68%5D\u003d%35" + }, + "response": { + "body": "{\n \"livemode\": true,\n \"created\": 1.723824484E9,\n \"client_ip\": \"REDACTED\",\n \"id\": \"tok_0PoSh6DqT4huGUvd5K2dAq31\",\n \"used\": false,\n \"type\": \"card\",\n \"card\": {\n \"address_zip_check\": null,\n \"country\": \"US\",\n \"last4\": \"6170\",\n \"funding\": \"credit\",\n \"wallet\": null,\n \"address_country\": null,\n \"address_state\": null,\n \"exp_month\": 5.0,\n \"exp_year\": 2028.0,\n \"networks\": {\n \"preferred\": null\n },\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_0PoSh6DqT4huGUvduHN4IpK3\",\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,HEAD,PUT,PATCH,POST,DELETE" + ], + "Idempotency-Key": [ + "940f9c59-9223-4e4b-a63e-29bf2a73e9d7" + ], + "Original-Request": [ + "req_kWaAqXWA7o5QHJ" + ], + "Stripe-Version": [ + "2020-08-27" + ], + "Stripe-Should-Retry": [ + "false" + ], + "Access-Control-Expose-Headers": [ + "Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required" + ], + "Strict-Transport-Security": [ + "max-age\u003d63072000; includeSubDomains; preload" + ], + "Access-Control-Allow-Credentials": [ + "true" + ], + "Report-To": [ + "{\"group\":\"coop\",\"max_age\":8640,\"endpoints\":[{\"url\":\"https://q.stripe.com/coop-report?s\u003dpayins-bapi-srv\"}],\"include_subdomains\":true}" + ], + "Content-Security-Policy": [ + "report-uri https://q.stripe.com/csp-report?p\u003dv1%2Ftokens; block-all-mixed-content; default-src \u0027none\u0027; base-uri \u0027none\u0027; form-action \u0027none\u0027; frame-ancestors \u0027none\u0027; img-src \u0027self\u0027; script-src \u0027self\u0027 \u0027report-sample\u0027; style-src \u0027self\u0027" + ], + "Cross-Origin-Opener-Policy-Report-Only": [ + "same-origin; report-to\u003d\"coop\"" + ], + "Content-Length": [ + "788" + ], + "Access-Control-Max-Age": [ + "300" + ], + "Request-Id": [ + "req_kWaAqXWA7o5QHJ" + ], + "Content-Type": [ + "application/json" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Connection": [ + "keep-alive" + ], + "Reporting-Endpoints": [ + "coop\u003d\"https://q.stripe.com/coop-report?s\u003dpayins-bapi-srv\"" + ], + "Date": [ + "Fri, 16 Aug 2024 16:08:04 GMT" + ], + "X-Stripe-Priority-Routing-Enabled": [ + "true" + ], + "Cache-Control": [ + "no-cache, no-store" + ], + "Vary": [ + "Origin" + ], + "X-Stripe-Routing-Context-Priority-Tier": [ + "livemode-critical" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.stripe.com/v1/tokens?card%5Bnumber%5D\u003d4536410136126170\u0026card%5Bcvc%5D\u003d778\u0026card%5Bexp_month%5D\u003d5\u0026card%5Bexp_year%5D\u003d2028?%63%61%72%64%5B%63%76%63%5D\u003d%52%45%44%41%43%54%45%44\u0026%63%61%72%64%5B%65%78%70%5F%79%65%61%72%5D\u003d%32%30%32%38\u0026%63%61%72%64%5B%6E%75%6D%62%65%72%5D\u003d%52%45%44%41%43%54%45%44\u0026%63%61%72%64%5B%65%78%70%5F%6D%6F%6E%74%68%5D\u003d%35" + }, + "duration": 506 + }, + { + "recordedAt": 1723824487, + "request": { + "body": "{\n \"credit_card\": {\n \"stripe_object_id\": \"tok_0PoSh6DqT4huGUvd5K2dAq31\",\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\": \"pm_1ff40e4f4ee54a2eab85b957f199c089\",\n \"exp_year\": 2028.0,\n \"requires_mandate_collection\": false,\n \"brand\": \"Visa\",\n \"object\": \"CreditCard\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "193" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "0580883666bf7965e7875667003795de" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb2nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "2.623311" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/credit_cards" + }, + "duration": 2826 + } +] \ No newline at end of file diff --git a/src/test/cassettes/referral/update.json b/src/test/cassettes/referral_customer/update.json similarity index 70% rename from src/test/cassettes/referral/update.json rename to src/test/cassettes/referral_customer/update.json index cd5801389..fdb3ed444 100644 --- a/src/test/cassettes/referral/update.json +++ b/src/test/cassettes/referral_customer/update.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1663367904, + "recordedAt": 1723823885, "request": { "body": "{\n \"user\": {\n \"phone\": \"REDACTED\",\n \"name\": \"Test Referral\",\n \"email\": \"test@example.com\"\n }\n}", "method": "POST", @@ -18,67 +18,63 @@ "uri": "https://api.easypost.com/v2/referral_customers" }, "response": { - "body": "{\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2022-09-16T22:38:23Z\",\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_3e9d9ac0f2354583a70f40055ac60645\",\n \"api_keys\": [],\n \"insurance_fee_minimum\": \"0.25\",\n \"email\": \"referral_customer_2adf9f2eb9c74a8e91edc4692246cf9d@donotemail.easypost.com\",\n \"object\": \"User\"\n}", + "body": "{\n \"recharge_amount\": null,\n \"verified\": true,\n \"created_at\": \"2024-08-16T15:58:04Z\",\n \"default_carbon_offset\": false,\n \"secondary_recharge_amount\": null,\n \"cc_fee_rate\": \"0.0375\",\n \"has_elevate_access\": false,\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.01\",\n \"price_per_shipment\": \"0.00000\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_6f97218bddab44efba498134a21fd864\",\n \"api_keys\": [],\n \"insurance_fee_minimum\": \"0.50\",\n \"email\": \"referral_customer_cf67554e353a4754b6ed53b9e2709fd2@donotemail.easypost.com\",\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "965" + "1021" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "ebabba4a6324fadfecc702c4000ad7c5" + "8a4bf44066bf770ce786c0e10035df1f" ], "x-proxied": [ - "extlb4wdc 9ce216bfac", - "intlb2wdc 6aa9972c1e", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.027511" - ], - "etag": [ - "W/\"6f2fa97dae9c69b4419cb842498a8411\"" + "0.721427" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209152244-6075a793a4-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -88,13 +84,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/referral_customers" }, - "duration": 1361 + "duration": 927 }, { - "recordedAt": 1663367905, + "recordedAt": 1723823885, "request": { "body": "{\n \"user\": {\n \"email\": \"email@example.com\"\n }\n}", "method": "PUT", @@ -109,7 +104,7 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/referral_customers/user_3e9d9ac0f2354583a70f40055ac60645" + "uri": "https://api.easypost.com/v2/referral_customers/user_6f97218bddab44efba498134a21fd864" }, "response": { "body": "{\n \"message\": \"Referral Customer email updated successfully\"\n}", @@ -125,54 +120,50 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07d247fe6324fae1ec7cfc270012f056" + "8a4bf43c66bf770de786c0e30035e02c" ], "x-proxied": [ - "extlb3wdc 9ce216bfac", - "intlb2wdc 6aa9972c1e", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.128444" - ], - "etag": [ - "W/\"7b30d603e3257aee787616dc99d6d4af\"" + "0.049037" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202209152244-6075a793a4-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -182,9 +173,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/referral_customers/user_3e9d9ac0f2354583a70f40055ac60645" + "uri": "https://api.easypost.com/v2/referral_customers/user_6f97218bddab44efba498134a21fd864" }, - "duration": 466 + "duration": 253 } ] \ No newline at end of file diff --git a/src/test/cassettes/refund/all.json b/src/test/cassettes/refund/all.json index fbbaebe93..73c0305cd 100644 --- a/src/test/cassettes/refund/all.json +++ b/src/test/cassettes/refund/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456507, + "recordedAt": 1723823872, "request": { "body": "", "method": "GET", @@ -12,69 +12,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/refunds?page_size\u003d5" + "uri": "https://api.easypost.com/v2/refunds?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, "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\": false,\n \"refunds\": []\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "1506" + "31" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb38nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d07bf7f1669c00087b4b" + "8a4bf44066bf7700e786c07f0035d35a" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.067814" - ], - "etag": [ - "W/\"bbd58599045318bbf872e1eb65fd8c16\"" + "0.024233" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +81,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/refunds?page_size\u003d5" + "uri": "https://api.easypost.com/v2/refunds?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, - "duration": 202 + "duration": 220 } ] \ No newline at end of file diff --git a/src/test/cassettes/refund/create.json b/src/test/cassettes/refund/create.json index 8508395bf..c531f43be 100644 --- a/src/test/cassettes/refund/create.json +++ b/src/test/cassettes/refund/create.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456511, + "recordedAt": 1723823874, "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 \"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\": \"GroundAdvantage\",\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,69 +18,66 @@ "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.93000\",\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\": \"2024-08-16T15:57:53Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:57:54Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_03f256d69a44470d8e39bb47baf93af1\",\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\": \"2024-08-16T15:57:54Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"tracking_code\": \"9400100105807076062822\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzBhZGEwYzY0YTU0NDQzYTFiMjQxMTM2MTQ2MGU2ZjBh\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:57:54Z\",\n \"signed_by\": null,\n \"id\": \"trk_0ada0c64a54443a1b2411361460e6f0a\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4bcd16f15be811ef93b63cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4bcd16f15be811ef93b63cecef1b359e\",\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\": \"2024-08-16T15:57:53Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e88dbc7a3cf93842f9920c71b9c3d71409.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:57:54Z\",\n \"id\": \"pl_637972bd21af452fa61c22c68aa23fae\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:57:53Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_1553867a55f84a3bae09ab7a95a2ed22\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4bc9c2125be811efa8b1ac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d61fb30bd1c74c19bbe5190441a9b677\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_68a60f118ce6487c948c09a8ed8736b3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_03f256d69a44470d8e39bb47baf93af1\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4bc9c2125be811efa8b1ac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076062822\",\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" + "6549" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb36nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d07df7dc7fd100087cd2" + "8a4bf43b66bf7701e786c0820035d3e0" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.188556" + "0.972484" ], - "etag": [ - "W/\"085230546a890607597ac57399e2831e\"" + "location": [ + "/api/v2/shipments/shp_e2b01acfa9ce40a1beabb08665cac06d" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_005a9b8851634a0fa5318d400ec44416" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1376 + "duration": 1172 }, { - "recordedAt": 1661456511, + "recordedAt": 1723823874, "request": { "body": "", "method": "GET", @@ -108,69 +104,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_005a9b8851634a0fa5318d400ec44416" + "uri": "https://api.easypost.com/v2/shipments/shp_e2b01acfa9ce40a1beabb08665cac06d" }, "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.93000\",\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\": \"2024-08-16T15:57:53Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:57:54Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_03f256d69a44470d8e39bb47baf93af1\",\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\": \"2024-08-16T15:57:54Z\",\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\": \"2024-07-16T15:57:54Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:34:54Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"tracking_code\": \"9400100105807076062822\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzBhZGEwYzY0YTU0NDQzYTFiMjQxMTM2MTQ2MGU2ZjBh\",\n \"est_delivery_date\": \"2024-08-16T15:57:54Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:57:54Z\",\n \"signed_by\": null,\n \"id\": \"trk_0ada0c64a54443a1b2411361460e6f0a\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4bcd16f15be811ef93b63cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4bcd16f15be811ef93b63cecef1b359e\",\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\": \"2024-08-16T15:57:53Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e88dbc7a3cf93842f9920c71b9c3d71409.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:57:54Z\",\n \"id\": \"pl_637972bd21af452fa61c22c68aa23fae\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:57:53Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_1553867a55f84a3bae09ab7a95a2ed22\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4bc9c2125be811efa8b1ac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d61fb30bd1c74c19bbe5190441a9b677\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_68a60f118ce6487c948c09a8ed8736b3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_03f256d69a44470d8e39bb47baf93af1\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4bc9c2125be811efa8b1ac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076062822\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "8211" + "7679" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb34nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d07ff7de289900087d82" + "8a4bf43c66bf7702e786c0830035d4f6" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.148796" - ], - "etag": [ - "W/\"16777bd9a4187006c0f9a4b7b79ae4fe\"" + "0.154318" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,15 +173,14 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_005a9b8851634a0fa5318d400ec44416" + "uri": "https://api.easypost.com/v2/shipments/shp_e2b01acfa9ce40a1beabb08665cac06d" }, - "duration": 280 + "duration": 351 }, { - "recordedAt": 1661456511, + "recordedAt": 1723823875, "request": { - "body": "{\n \"refund\": {\n \"carrier\": \"USPS\",\n \"tracking_codes\": \"9400100109361135003639\"\n }\n}", + "body": "{\n \"refund\": {\n \"carrier\": \"USPS\",\n \"tracking_codes\": [\n \"9400100105807076062822\"\n ]\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -204,7 +196,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\": \"2024-08-16T15:57:55Z\",\n \"created_at\": \"2024-08-16T15:57:55Z\",\n \"id\": \"rfnd_6708eb7011214bd4bfbb51dc1e142100\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"tracking_code\": \"9400100105807076062822\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n }\n]", "httpVersion": null, "headers": { "null": [ @@ -217,53 +209,50 @@ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d07ff7c9df7a00087dc0" + "8a4bf43d66bf7703e786c09c0035d55f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.066367" - ], - "etag": [ - "W/\"b792c7a05df6ff339eee84191e998cad\"" + "0.082529" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -273,9 +262,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/refunds" }, - "duration": 211 + "duration": 285 } ] \ No newline at end of file diff --git a/src/test/cassettes/refund/get_next_page.json b/src/test/cassettes/refund/get_next_page.json new file mode 100644 index 000000000..2ecdc2ff2 --- /dev/null +++ b/src/test/cassettes/refund/get_next_page.json @@ -0,0 +1,88 @@ +[ + { + "recordedAt": 1723823872, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/refunds?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"has_more\": false,\n \"refunds\": []\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "31" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf7700e786c07e0035d310" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.031970" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/refunds?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 239 + } +] \ No newline at end of file diff --git a/src/test/cassettes/refund/retrieve.json b/src/test/cassettes/refund/retrieve.json index fab50932d..a2754f586 100644 --- a/src/test/cassettes/refund/retrieve.json +++ b/src/test/cassettes/refund/retrieve.json @@ -1,102 +1,6 @@ [ { - "recordedAt": 1661456508, - "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", - "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.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}", - "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": [ - "07323c396307d07bf7a6caf000087b6c" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "1.149877" - ], - "etag": [ - "W/\"31038177be58bb11f155e9c1ea2e2bb2\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "location": [ - "/api/v2/shipments/shp_fdd13557301f4c879c83ca9877b5051f" - ], - "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments" - }, - "duration": 1367 - }, - { - "recordedAt": 1661456508, + "recordedAt": 1723824339, "request": { "body": "", "method": "GET", @@ -108,181 +12,81 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_fdd13557301f4c879c83ca9877b5051f" + "uri": "https://api.easypost.com/v2/refunds?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, "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 \"has_more\": false,\n \"refunds\": [\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:21Z\",\n \"created_at\": \"2024-08-16T15:59:21Z\",\n \"id\": \"rfnd_8cf6654bef8445c9b19e664ed4e52e4a\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"tracking_code\": \"9400100105807076063256\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n },\n {\n \"confirmation_number\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:57:55Z\",\n \"created_at\": \"2024-08-16T15:57:55Z\",\n \"id\": \"rfnd_6708eb7011214bd4bfbb51dc1e142100\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"tracking_code\": \"9400100105807076062822\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "8211" + "622" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb41nuq" ], "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": [ - "07323c3c6307d07ce68b290300087c3e" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.110975" - ], - "etag": [ - "W/\"e1efb5dd867a48968eaa7dda9ba14365\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_fdd13557301f4c879c83ca9877b5051f" - }, - "duration": 244 - }, - { - "recordedAt": 1661456509, - "request": { - "body": "{\n \"refund\": {\n \"carrier\": \"USPS\",\n \"tracking_codes\": \"9400100109361135003622\"\n }\n}", - "method": "POST", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ], - "Content-Type": [ - "application/json" - ] - }, - "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]", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 201 Created" - ], - "content-length": [ - "297" - ], - "expires": [ - "0" - ], - "x-node": [ - "bigweb7nuq" - ], - "x-frame-options": [ - "SAMEORIGIN" + "x-permitted-cross-domain-policies": [ + "none" ], "x-backend": [ "easypost" ], - "x-permitted-cross-domain-policies": [ - "none" - ], - "x-download-options": [ - "noopen" + "pragma": [ + "no-cache" ], "strict-transport-security": [ "max-age\u003d31536000; includeSubDomains; preload" ], - "pragma": [ - "no-cache" - ], - "x-canary": [ - "direct" + "x-xss-protection": [ + "1; mode\u003dblock" ], "x-content-type-options": [ "nosniff" ], - "x-xss-protection": [ - "1; mode\u003dblock" - ], "x-ep-request-uuid": [ - "07323c3d6307d07df8012fd000087c77" + "0580883066bf78d3e7874d620036efd8" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb2nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.186724" - ], - "etag": [ - "W/\"fe711b782557107a3edef280e641ab66\"" + "0.041848" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" ] }, "status": { - "code": 201, - "message": "Created" + "code": 200, + "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/refunds" + "uri": "https://api.easypost.com/v2/refunds?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, - "duration": 326 + "duration": 241 }, { - "recordedAt": 1661456509, + "recordedAt": 1723824340, "request": { "body": "", "method": "GET", @@ -294,10 +98,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/refunds/rfnd_1e0c0e03089942f299720f6682421b8c" + "uri": "https://api.easypost.com/v2/refunds/rfnd_8cf6654bef8445c9b19e664ed4e52e4a" }, "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\": \"2024-08-16T15:59:21Z\",\n \"created_at\": \"2024-08-16T15:59:21Z\",\n \"id\": \"rfnd_8cf6654bef8445c9b19e664ed4e52e4a\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"tracking_code\": \"9400100105807076063256\",\n \"object\": \"Refund\",\n \"status\": \"submitted\"\n}", "httpVersion": null, "headers": { "null": [ @@ -310,53 +114,50 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb35nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d07df7b7361200087c95" + "0580883166bf78d4e7874d630036f022" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb2nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.046259" - ], - "etag": [ - "W/\"25f7a0093e5ec708fde18410beab3eb0\"" + "0.045971" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -366,9 +167,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/refunds/rfnd_1e0c0e03089942f299720f6682421b8c" + "uri": "https://api.easypost.com/v2/refunds/rfnd_8cf6654bef8445c9b19e664ed4e52e4a" }, - "duration": 170 + "duration": 252 } ] \ 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..8a6395086 100644 --- a/src/test/cassettes/report/all_reports.json +++ b/src/test/cassettes/report/all_reports.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456541, + "recordedAt": 1723823887, "request": { "body": "", "method": "GET", @@ -12,69 +12,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/reports/shipment/?page_size\u003d5\u0026type\u003dshipment" + "uri": "https://api.easypost.com/v2/reports/shipment?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%74%79%70%65\u003d%73%68%69%70%6D%65%6E%74" }, "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\": \"2024-08-16T15:58:06Z\",\n \"created_at\": \"2024-08-16T15:58:06Z\",\n \"id\": \"shprep_d29f8fb2230d48b6b949d3ef01956632\",\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\": \"2024-08-16T15:58:06Z\",\n \"created_at\": \"2024-08-16T15:58:05Z\",\n \"id\": \"shprep_904c9b5f954b4dd887cc3a5554a42560\",\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\": \"2023-12-27T19:39:08Z\",\n \"created_at\": \"2023-12-27T19:39:07Z\",\n \"id\": \"shprep_789367e2ee404ba39eb7b84b1437b25e\",\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\": \"2023-12-27T19:39:07Z\",\n \"created_at\": \"2023-12-27T19:39:07Z\",\n \"id\": \"shprep_d9b2d5f15d9942fcb91b848e9a2f3e1a\",\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\": \"2023-12-27T19:39:06Z\",\n \"created_at\": \"2023-12-27T19:39:06Z\",\n \"id\": \"shprep_8fec829b910a4a22b1366ad8af28e420\",\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" + "1459" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb38nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d09df7cae2f800088cb5" + "8a4bf43b66bf770fe786c1010035e222" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.025242" - ], - "etag": [ - "W/\"6e0dfa315976d1002ef27082565f3b1d\"" + "0.055874" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +81,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/reports/shipment/?page_size\u003d5\u0026type\u003dshipment" + "uri": "https://api.easypost.com/v2/reports/shipment?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%74%79%70%65\u003d%73%68%69%70%6D%65%6E%74" }, - "duration": 154 + "duration": 271 } ] \ 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..ca80e2d79 100644 --- a/src/test/cassettes/report/create_report.json +++ b/src/test/cassettes/report/create_report.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456541, + "recordedAt": 1723823885, "request": { "body": "{\n \"end_date\": \"2022-05-04\",\n \"start_date\": \"2022-05-04\"\n}", "method": "POST", @@ -15,10 +15,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/reports/shipment/" + "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\": \"2024-08-16T15:58:05Z\",\n \"created_at\": \"2024-08-16T15:58:05Z\",\n \"id\": \"shprep_904c9b5f954b4dd887cc3a5554a42560\",\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,53 +31,50 @@ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c396307d09df7ecfb1200088c6e" + "8a4bf43f66bf770de786c0e50035e0b2" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037700" - ], - "etag": [ - "W/\"59bf1176c35d457d37c7488881fcb842\"" + "0.113861" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +84,8 @@ "code": 201, "message": "Created" }, - "errors": null, - "uri": "https://api.easypost.com/v2/reports/shipment/" + "uri": "https://api.easypost.com/v2/reports/shipment" }, - "duration": 166 + "duration": 310 } ] \ 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..9f109d608 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": 1723823887, "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", @@ -15,10 +15,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/reports/shipment/" + "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\": \"2024-08-16T15:58:07Z\",\n \"created_at\": \"2024-08-16T15:58:07Z\",\n \"id\": \"shprep_d065eed544e94cc580f22556a48f8013\",\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,53 +31,50 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d09ef7ed8ff100088cd8" + "8a4bf43e66bf770fe786c1030035e2a5" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.047198" - ], - "etag": [ - "W/\"cca3721f64482bcc3713c62fc3a5938e\"" + "0.077431" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +84,8 @@ "code": 201, "message": "Created" }, - "errors": null, - "uri": "https://api.easypost.com/v2/reports/shipment/" + "uri": "https://api.easypost.com/v2/reports/shipment" }, - "duration": 187 + "duration": 290 } ] \ 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..ed877aa53 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": 1723823886, "request": { "body": "{\n \"end_date\": \"2022-05-04\",\n \"columns\": [\n \"usps_zone\"\n ],\n \"start_date\": \"2022-05-04\"\n}", "method": "POST", @@ -15,10 +15,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/reports/shipment/" + "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\": \"2024-08-16T15:58:06Z\",\n \"created_at\": \"2024-08-16T15:58:06Z\",\n \"id\": \"shprep_d29f8fb2230d48b6b949d3ef01956632\",\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,53 +31,50 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c396307d09df7a6d3d600088ca1" + "8a4bf43b66bf770ee786c0fe0035e12e" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037358" - ], - "etag": [ - "W/\"8b89ad393da3b35fc83aa7767cf292bb\"" + "0.138146" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +84,8 @@ "code": 201, "message": "Created" }, - "errors": null, - "uri": "https://api.easypost.com/v2/reports/shipment/" + "uri": "https://api.easypost.com/v2/reports/shipment" }, - "duration": 161 + "duration": 340 } ] \ No newline at end of file diff --git a/src/test/cassettes/report/get_next_page.json b/src/test/cassettes/report/get_next_page.json new file mode 100644 index 000000000..bc49ce44c --- /dev/null +++ b/src/test/cassettes/report/get_next_page.json @@ -0,0 +1,174 @@ +[ + { + "recordedAt": 1723823886, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/reports/shipment?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%74%79%70%65\u003d%73%68%69%70%6D%65%6E%74" + }, + "response": { + "body": "{\n \"reports\": [\n {\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2024-08-16T15:58:06Z\",\n \"created_at\": \"2024-08-16T15:58:06Z\",\n \"id\": \"shprep_d29f8fb2230d48b6b949d3ef01956632\",\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\": \"2024-08-16T15:58:06Z\",\n \"created_at\": \"2024-08-16T15:58:05Z\",\n \"id\": \"shprep_904c9b5f954b4dd887cc3a5554a42560\",\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\": \"2023-12-27T19:39:08Z\",\n \"created_at\": \"2023-12-27T19:39:07Z\",\n \"id\": \"shprep_789367e2ee404ba39eb7b84b1437b25e\",\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\": \"2023-12-27T19:39:07Z\",\n \"created_at\": \"2023-12-27T19:39:07Z\",\n \"id\": \"shprep_d9b2d5f15d9942fcb91b848e9a2f3e1a\",\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\": \"2023-12-27T19:39:06Z\",\n \"created_at\": \"2023-12-27T19:39:06Z\",\n \"id\": \"shprep_8fec829b910a4a22b1366ad8af28e420\",\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": [ + "1459" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf770ee786c0ff0035e18c" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.037395" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/reports/shipment?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%74%79%70%65\u003d%73%68%69%70%6D%65%6E%74" + }, + "duration": 243 + }, + { + "recordedAt": 1723823886, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/reports/shipment?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%74%79%70%65\u003d%73%68%69%70%6D%65%6E%74\u0026%62%65%66%6F%72%65%5F%69%64\u003d%73%68%70%72%65%70%5F%38%66%65%63%38%32%39%62%39%31%30%61%34%61%32%32%62%31%33%36%36%61%64%38%61%66%32%38%65%34%32%30" + }, + "response": { + "body": "{\n \"reports\": [\n {\n \"end_date\": \"2022-05-04\",\n \"mode\": \"test\",\n \"include_children\": false,\n \"updated_at\": \"2023-12-27T19:39:06Z\",\n \"created_at\": \"2023-12-27T19:39:05Z\",\n \"id\": \"shprep_23260a93c0464541bf87511100a27acf\",\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\": \"2023-06-07T17:51:05Z\",\n \"created_at\": \"2023-06-07T17:51:05Z\",\n \"id\": \"shprep_480eaef3080a4e6b834f0081f46e79f2\",\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\": \"2023-06-07T17:51:05Z\",\n \"created_at\": \"2023-06-07T17:51:05Z\",\n \"id\": \"shprep_bea39cf7d21b48829290104d5f058696\",\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\": \"2023-06-07T17:51:04Z\",\n \"created_at\": \"2023-06-07T17:51:04Z\",\n \"id\": \"shprep_098c647ce9684fe2a90711c7cedbd808\",\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\": \"2023-06-07T17:51:04Z\",\n \"created_at\": \"2023-06-07T17:51:04Z\",\n \"id\": \"shprep_aea0ec64945e4f289936ec0effaed8b7\",\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": [ + "1459" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb35nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf770ee786c1000035e1d5" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.071864" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/reports/shipment?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%74%79%70%65\u003d%73%68%69%70%6D%65%6E%74\u0026%62%65%66%6F%72%65%5F%69%64\u003d%73%68%70%72%65%70%5F%38%66%65%63%38%32%39%62%39%31%30%61%34%61%32%32%62%31%33%36%36%61%64%38%61%66%32%38%65%34%32%30" + }, + "duration": 290 + } +] \ 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..96d52ec1b 100644 --- a/src/test/cassettes/report/retrieve_report.json +++ b/src/test/cassettes/report/retrieve_report.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456542, + "recordedAt": 1723823888, "request": { "body": "{\n \"end_date\": \"2022-05-04\",\n \"start_date\": \"2022-05-04\"\n}", "method": "POST", @@ -15,10 +15,10 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/reports/shipment/" + "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\": \"2024-08-16T15:58:08Z\",\n \"created_at\": \"2024-08-16T15:58:08Z\",\n \"id\": \"shprep_79e33aaf60514a97bfa3a24b7403b64f\",\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,53 +31,50 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d09ef7c8d73000088d25" + "8a4bf43e66bf770fe786c1050035e32d" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.040801" - ], - "etag": [ - "W/\"b0195cc6f907297bdff0089627fc57ac\"" + "0.087407" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +84,12 @@ "code": 201, "message": "Created" }, - "errors": null, - "uri": "https://api.easypost.com/v2/reports/shipment/" + "uri": "https://api.easypost.com/v2/reports/shipment" }, - "duration": 178 + "duration": 292 }, { - "recordedAt": 1661456543, + "recordedAt": 1723823888, "request": { "body": "", "method": "GET", @@ -105,10 +101,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/reports/shprep_01e48fbd5d1248869186908b65820d5c" + "uri": "https://api.easypost.com/v2/reports/shprep_79e33aaf60514a97bfa3a24b7403b64f" }, "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\": \"2024-08-16T15:58:08Z\",\n \"created_at\": \"2024-08-16T15:58:08Z\",\n \"id\": \"shprep_79e33aaf60514a97bfa3a24b7403b64f\",\n \"url_expires_at\": null,\n \"url\": null,\n \"object\": \"ShipmentReport\",\n \"start_date\": \"2022-05-04\",\n \"status\": \"empty\"\n}", "httpVersion": null, "headers": { "null": [ @@ -121,56 +117,50 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb39nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d09ff7a52dca00088d51" + "8a4bf44166bf7710e786c1060035e36f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.037081" - ], - "etag": [ - "W/\"b5749b06c448c803bdea4d1bea86fa07\"" + "0.047575" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +170,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/reports/shprep_01e48fbd5d1248869186908b65820d5c" + "uri": "https://api.easypost.com/v2/reports/shprep_79e33aaf60514a97bfa3a24b7403b64f" }, - "duration": 163 + "duration": 242 } ] \ 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..f345dfca4 100644 --- a/src/test/cassettes/scan_form/all.json +++ b/src/test/cassettes/scan_form/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456461, + "recordedAt": 1723824000, "request": { "body": "", "method": "GET", @@ -12,70 +12,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/scan_forms?page_size\u003d5" + "uri": "https://api.easypost.com/v2/scan_forms?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, "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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_883351f35be811ef8262ac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2024-08-16T15:59:45Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20240816/e85d9894fd73604ad8af0dccd779dd1aa7.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_5e771df3d7cd47d2a9710fa069146f28\",\n \"created_at\": \"2024-08-16T15:59:45Z\",\n \"id\": \"sf_6eaa7fc503d54c268f98f9bfc867c05d\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100105807076063331\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "4552" + "939" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "237d6d7f6307d04df7b8d29100073798" + "8a4bf44166bf7780e786ca0a003659fc" ], "x-proxied": [ - "extlb3wdc 9ce216bfac", - "intlb1wdc 6aa9972c1e", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.047298" - ], - "etag": [ - "W/\"e1ef26ebf8a713c16291b731625f3e70\"" + "0.053633" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -85,9 +81,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/scan_forms?page_size\u003d5" + "uri": "https://api.easypost.com/v2/scan_forms?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, - "duration": 692 + "duration": 256 } ] \ 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..0459b7827 100644 --- a/src/test/cassettes/scan_form/create.json +++ b/src/test/cassettes/scan_form/create.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456465, + "recordedAt": 1723824004, "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 \"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\": \"GroundAdvantage\",\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,69 +18,66 @@ "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.93000\",\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\": \"2024-08-16T16:00:03Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T16:00:04Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T16:00:04Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5819987357ec4077ba8a2e3cdfd0cbae\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T16:00:04Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_41f792c40c1645378f40aacaeda4eff1\",\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\": \"2024-08-16T16:00:04Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_5819987357ec4077ba8a2e3cdfd0cbae\",\n \"tracking_code\": \"9400100105807076063461\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzY2MGQ2MzlkM2QyMjQ3MDRhZjZmOWZlZmZlYjUyNDhl\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T16:00:04Z\",\n \"signed_by\": null,\n \"id\": \"trk_660d639d3d224704af6f9feffeb5248e\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T16:00: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\": \"2024-08-16T16:00:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_9965e5ed5be811efbb633cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_5819987357ec4077ba8a2e3cdfd0cbae\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T16:00: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\": \"2024-08-16T16:00:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_9965e5ed5be811efbb633cecef1b359e\",\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\": \"2024-08-16T16:00:04Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8c7d00d26d7714405b03c747a884a57a8.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T16:00:04Z\",\n \"id\": \"pl_67dadd60e68841cdb5924ec1e10165a1\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T16:00:04Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T16:00:03Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T16:00:03Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_de37401a07c44efdb617b48de5aa8318\",\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\": \"2024-08-16T16:00:03+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\": \"2024-08-16T16:00:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_9960ace35be811efbb623cecef1b359e\",\n \"street2\": \"\",\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.25\",\n \"created_at\": \"2024-08-16T16:00:03Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5819987357ec4077ba8a2e3cdfd0cbae\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T16:00:03Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_5585c037370c4894b1e6e8ddde465a83\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T16:00:03Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5819987357ec4077ba8a2e3cdfd0cbae\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T16:00:03Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_41f792c40c1645378f40aacaeda4eff1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T16:00:03Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5819987357ec4077ba8a2e3cdfd0cbae\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T16:00:03Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6cf93e57f5084eb09e6d0254942ab22e\",\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\": \"2024-08-16T16:00:03+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\": \"2024-08-16T16:00:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_9960ace35be811efbb623cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063461\",\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" + "6549" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a922f6307d050f7dea45400085968" + "8a4bf43d66bf7783e7872ef600365ed4" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.117063" + "1.132756" ], - "etag": [ - "W/\"c2513d1b16a8f0c1d1ae138bb831b067\"" + "location": [ + "/api/v2/shipments/shp_5819987357ec4077ba8a2e3cdfd0cbae" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_022e5373de8e4addb2b1ffe37db07915" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,15 +87,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1332 + "duration": 1342 }, { - "recordedAt": 1661456466, + "recordedAt": 1723824005, "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 \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_de37401a07c44efdb617b48de5aa8318\",\n \"height\": 4.0,\n \"object\": \"Parcel\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.93,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.5,\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.25,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 6.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_5819987357ec4077ba8a2e3cdfd0cbae\",\n \"currency\": \"USD\",\n \"id\": \"rate_5585c037370c4894b1e6e8ddde465a83\",\n \"retailRate\": 9.8,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_5819987357ec4077ba8a2e3cdfd0cbae\",\n \"currency\": \"USD\",\n \"id\": \"rate_41f792c40c1645378f40aacaeda4eff1\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 1.0,\n \"listRate\": 33.1,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 33.1,\n \"deliveryDays\": 1.0,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_5819987357ec4077ba8a2e3cdfd0cbae\",\n \"currency\": \"USD\",\n \"id\": \"rate_6cf93e57f5084eb09e6d0254942ab22e\",\n \"retailRate\": 37.9,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n }\n ],\n \"trackingCode\": \"9400100105807076063461\",\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 15, 2024, 6:00:00 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_9960ace35be811efbb623cecef1b359e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_9965e5ed5be811efbb633cecef1b359e\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_5819987357ec4077ba8a2e3cdfd0cbae\",\n \"currency\": \"USD\",\n \"id\": \"rate_41f792c40c1645378f40aacaeda4eff1\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 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 15, 2024, 6:00:00 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_9960ace35be811efbb623cecef1b359e\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"tracker\": {\n \"weight\": 0.0,\n \"trackingCode\": \"9400100105807076063461\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_5819987357ec4077ba8a2e3cdfd0cbae\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrXzY2MGQ2MzlkM2QyMjQ3MDRhZjZmOWZlZmZlYjUyNDhl\",\n \"trackingDetails\": [],\n \"id\": \"trk_660d639d3d224704af6f9feffeb5248e\",\n \"status\": \"unknown\",\n \"object\": \"Tracker\",\n \"updatedAt\": \"Aug 15, 2024, 6:00: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 15, 2024, 6:00:00 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_9965e5ed5be811efbb633cecef1b359e\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"id\": \"shp_5819987357ec4077ba8a2e3cdfd0cbae\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_67dadd60e68841cdb5924ec1e10165a1\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8c7d00d26d7714405b03c747a884a57a8.png\",\n \"object\": \"PostageLabel\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -114,67 +110,63 @@ "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\": \"2024-08-16T16:00: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\": \"2024-08-16T16:00:03+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_9965e5ed5be811efbb633cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2024-08-16T16:00:05Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20240816/e870712e8fc7a540f8affdbec43f05e4a3.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_538fddbca3014777aa9600d86c9713d5\",\n \"created_at\": \"2024-08-16T16:00:05Z\",\n \"id\": \"sf_9a4bea1e7c1c45fbbbb60062700da9cb\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100105807076063461\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "903" + "905" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "4cb7bec56307d052f7dadab100071fe1" + "8a4bf43a66bf7785e7872ef800366234" ], "x-proxied": [ - "extlb4wdc 9ce216bfac", - "intlb2wdc 6aa9972c1e", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.280295" - ], - "etag": [ - "W/\"904096d69d7e46904e4e684e6a1fef8c\"" + "0.380606" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -184,9 +176,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/scan_forms" }, - "duration": 599 + "duration": 590 } ] \ No newline at end of file diff --git a/src/test/cassettes/scan_form/get_next_page.json b/src/test/cassettes/scan_form/get_next_page.json new file mode 100644 index 000000000..a84ca3c2f --- /dev/null +++ b/src/test/cassettes/scan_form/get_next_page.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1723824000, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/scan_forms?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:34+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_883351f35be811ef8262ac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2024-08-16T15:59:45Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20240816/e85d9894fd73604ad8af0dccd779dd1aa7.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_5e771df3d7cd47d2a9710fa069146f28\",\n \"created_at\": \"2024-08-16T15:59:45Z\",\n \"id\": \"sf_6eaa7fc503d54c268f98f9bfc867c05d\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100105807076063331\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "939" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf7780e786ca0900365987" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.271186" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/scan_forms?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 469 + } +] \ 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..721181c4d 100644 --- a/src/test/cassettes/scan_form/retrieve.json +++ b/src/test/cassettes/scan_form/retrieve.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456463, + "recordedAt": 1723824002, "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 \"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\": \"GroundAdvantage\",\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,70 +18,66 @@ "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.93000\",\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\": \"2024-08-16T16:00:01Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T16:00:01Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T16:00:01Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0026d858518c4c5ebf88744ba83cd211\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T16:00:01Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f92d2d3d9d704efa9f111eb44d92dc84\",\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\": \"2024-08-16T16:00:02Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_0026d858518c4c5ebf88744ba83cd211\",\n \"tracking_code\": \"9400100105807076063447\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2UxZTYxOTRiMzk1OTQyNGJhYjc4ODI2NGFiNTk4MGIw\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T16:00:02Z\",\n \"signed_by\": null,\n \"id\": \"trk_e1e6194b3959424bab788264ab5980b0\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T16:00: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\": \"2024-08-16T16:00:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_97e698eb5be811efbac13cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_0026d858518c4c5ebf88744ba83cd211\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T16:00: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\": \"2024-08-16T16:00:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_97e698eb5be811efbac13cecef1b359e\",\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\": \"2024-08-16T16:00:01Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e89d345bb810744e0983e2536d773c7055.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T16:00:01Z\",\n \"id\": \"pl_182a24034ad144238fc220b364b72d08\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T16:00:01Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T16:00:01Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T16:00:01Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_5a17ef3e50fe4a09bb5f9ac954a8050c\",\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\": \"2024-08-16T16:00: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\": \"2024-08-16T16:00:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_97e37ace5be811ef8be1ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T16:00:01Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0026d858518c4c5ebf88744ba83cd211\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T16:00:01Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_648bcb63e4e145eaa903b2c4e47d7e06\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T16:00:01Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0026d858518c4c5ebf88744ba83cd211\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T16:00:01Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d55a2e62398747ad81e34a006ef01abf\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T16:00:01Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_0026d858518c4c5ebf88744ba83cd211\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T16:00:01Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f92d2d3d9d704efa9f111eb44d92dc84\",\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\": \"2024-08-16T16:00: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\": \"2024-08-16T16:00:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_97e37ace5be811ef8be1ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063447\",\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" + "6549" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb39nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "237d6d846307d04ef7dc83d4000737ca" + "8a4bf43f66bf7781e786ca0c00365a9b" ], "x-proxied": [ - "extlb3wdc 9ce216bfac", - "intlb1wdc 6aa9972c1e", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.140971" + "1.024436" ], - "etag": [ - "W/\"e5f337f114f109ebf9626bc50d785ee8\"" + "location": [ + "/api/v2/shipments/shp_0026d858518c4c5ebf88744ba83cd211" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_495dc457b2fe4ec7ae8b87dcbc6428d1" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -91,15 +87,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1501 + "duration": 1233 }, { - "recordedAt": 1661456464, + "recordedAt": 1723824002, "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 \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"length\": 10.0,\n \"width\": 8.0,\n \"weight\": 15.4,\n \"id\": \"prcl_5a17ef3e50fe4a09bb5f9ac954a8050c\",\n \"height\": 4.0,\n \"object\": \"Parcel\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"fees\": [\n {\n \"amount\": 0.0,\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true\n },\n {\n \"amount\": 5.93,\n \"refunded\": false,\n \"type\": \"PostageFee\",\n \"charged\": true\n },\n {\n \"amount\": 0.5,\n \"refunded\": false,\n \"type\": \"InsuranceFee\",\n \"charged\": true\n }\n ],\n \"rates\": [\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 1.0,\n \"listRate\": 33.1,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 33.1,\n \"deliveryDays\": 1.0,\n \"billingType\": \"easypost\",\n \"service\": \"Express\",\n \"shipmentId\": \"shp_0026d858518c4c5ebf88744ba83cd211\",\n \"currency\": \"USD\",\n \"id\": \"rate_648bcb63e4e145eaa903b2c4e47d7e06\",\n \"retailRate\": 37.9,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 2.0,\n \"listRate\": 8.25,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 6.9,\n \"deliveryDays\": 2.0,\n \"billingType\": \"easypost\",\n \"service\": \"Priority\",\n \"shipmentId\": \"shp_0026d858518c4c5ebf88744ba83cd211\",\n \"currency\": \"USD\",\n \"id\": \"rate_d55a2e62398747ad81e34a006ef01abf\",\n \"retailRate\": 9.8,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_0026d858518c4c5ebf88744ba83cd211\",\n \"currency\": \"USD\",\n \"id\": \"rate_f92d2d3d9d704efa9f111eb44d92dc84\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n }\n ],\n \"trackingCode\": \"9400100105807076063447\",\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 15, 2024, 6:00:00 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_97e37ace5be811ef8be1ac1f6bc539aa\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"returnAddress\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_97e698eb5be811efbac13cecef1b359e\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"selectedRate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_0026d858518c4c5ebf88744ba83cd211\",\n \"currency\": \"USD\",\n \"id\": \"rate_f92d2d3d9d704efa9f111eb44d92dc84\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 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 15, 2024, 6:00:00 PM\",\n \"residential\": true,\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"id\": \"adr_97e37ace5be811ef8be1ac1f6bc539aa\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"tracker\": {\n \"weight\": 0.0,\n \"trackingCode\": \"9400100105807076063447\",\n \"statusDetail\": \"unknown\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"shipmentId\": \"shp_0026d858518c4c5ebf88744ba83cd211\",\n \"publicUrl\": \"https://track.easypost.com/djE6dHJrX2UxZTYxOTRiMzk1OTQyNGJhYjc4ODI2NGFiNTk4MGIw\",\n \"trackingDetails\": [],\n \"id\": \"trk_e1e6194b3959424bab788264ab5980b0\",\n \"status\": \"unknown\",\n \"object\": \"Tracker\",\n \"updatedAt\": \"Aug 15, 2024, 6:00: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 15, 2024, 6:00:00 PM\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"street1\": \"179 N Harbor Dr\",\n \"state\": \"CA\",\n \"id\": \"adr_97e698eb5be811efbac13cecef1b359e\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"id\": \"shp_0026d858518c4c5ebf88744ba83cd211\",\n \"postageLabel\": {\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"integratedForm\": \"none\",\n \"labelSize\": \"4x6\",\n \"labelFileType\": \"image/png\",\n \"labelResolution\": 300.0,\n \"labelType\": \"default\",\n \"id\": \"pl_182a24034ad144238fc220b364b72d08\",\n \"dateAdvance\": 0.0,\n \"labelUrl\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e89d345bb810744e0983e2536d773c7055.png\",\n \"object\": \"PostageLabel\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n }\n ]\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -115,66 +110,63 @@ "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\": \"2024-08-16T16:00: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\": \"2024-08-16T16:00:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_97e698eb5be811efbac13cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2024-08-16T16:00:02Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20240816/e8acf5c3d531d34ff28ac55822722b0871.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_794a403c269e4e0bb577c1d3af9812e0\",\n \"created_at\": \"2024-08-16T16:00:02Z\",\n \"id\": \"sf_a37db1e4995d45d3b667fa884c2bef22\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100105807076063447\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "903" + "905" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d04ff7a900540008655d" + "8a4bf43b66bf7782e7872ef300365ce5" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.315675" - ], - "etag": [ - "W/\"692d706f5e862c8663d05fac5bd45bc6\"" + "0.366122" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -184,13 +176,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/scan_forms" }, - "duration": 493 + "duration": 599 }, { - "recordedAt": 1661456464, + "recordedAt": 1723824003, "request": { "body": "", "method": "GET", @@ -202,69 +193,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/scan_forms/sf_3ed78a5c3f6e4e7f83d08eb06a6852e5" + "uri": "https://api.easypost.com/v2/scan_forms/sf_a37db1e4995d45d3b667fa884c2bef22" }, "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\": \"2024-08-16T16:00: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\": \"2024-08-16T16:00:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_97e698eb5be811efbac13cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"updated_at\": \"2024-08-16T16:00:02Z\",\n \"form_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20240816/e8acf5c3d531d34ff28ac55822722b0871.pdf\",\n \"form_file_type\": null,\n \"batch_id\": \"batch_794a403c269e4e0bb577c1d3af9812e0\",\n \"created_at\": \"2024-08-16T16:00:02Z\",\n \"id\": \"sf_a37db1e4995d45d3b667fa884c2bef22\",\n \"confirmation\": null,\n \"message\": null,\n \"tracking_codes\": [\n \"9400100105807076063447\"\n ],\n \"object\": \"ScanForm\",\n \"status\": \"created\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "903" + "905" ], "expires": [ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb35nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d050f7dfdab900086596" + "8a4bf44166bf7783e7872ef400365e07" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.028887" - ], - "etag": [ - "W/\"692d706f5e862c8663d05fac5bd45bc6\"" + "0.100509" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -274,9 +262,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/scan_forms/sf_3ed78a5c3f6e4e7f83d08eb06a6852e5" + "uri": "https://api.easypost.com/v2/scan_forms/sf_a37db1e4995d45d3b667fa884c2bef22" }, - "duration": 170 + "duration": 340 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/all.json b/src/test/cassettes/shipment/all.json index 640e10b9c..6e64d2d5d 100644 --- a/src/test/cassettes/shipment/all.json +++ b/src/test/cassettes/shipment/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456959, + "recordedAt": 1723823934, "request": { "body": "", "method": "GET", @@ -12,69 +12,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments?page_size\u003d5" + "uri": "https://api.easypost.com/v2/shipments?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, "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.93000\",\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\": \"2024-08-16T15:58:45Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:46Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_030b1b61d7e141cfb08324374e6f3636\",\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\": \"2024-08-16T15:58:46Z\",\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\": \"2024-07-16T15:58:46Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:46Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"tracking_code\": \"9400100105807076063072\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzFhNDU3Mzg3NjFkZTQ3NzRhZWZhNjBjMDVlY2U1MGI5\",\n \"est_delivery_date\": \"2024-08-16T15:58:46Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"signed_by\": null,\n \"id\": \"trk_1a45738761de4774aefa60c05ece50b9\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6ae2d32f5be811efb4f8ac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6ae2d32f5be811efb4f8ac1f6bc53342\",\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\": \"2024-08-16T15:58:46Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8ed0c6e5cc4b14c9aa3947af893080c7b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"id\": \"pl_53b177cdbe5642dbaf14f7160093aace\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:46Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a111c1d2487b436883419352ed3fda54\",\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\": \"2024-08-16T15:58:45+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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6ae041595be811efb601ac1f6bc539aa\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_70f14f2a74c4482a8500e6aa9e637366\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_abcc372cd93d43a49349583604d6573f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_030b1b61d7e141cfb08324374e6f3636\",\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\": \"2024-08-16T15:58:45+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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6ae041595be811efb601ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063072\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [\n {\n \"mode\": \"test\",\n \"submitted_electronically\": null,\n \"updated_at\": \"2024-08-16T15:58:47Z\",\n \"form_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20240816/6408d49f334e43e3b356e0550374bc4a.pdf\",\n \"created_at\": \"2024-08-16T15:58:47Z\",\n \"id\": \"form_31463e4d95294c0fb413fe6fbb5ade9c\",\n \"form_type\": \"return_packing_slip\",\n \"object\": \"Form\"\n }\n ],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\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.93000\",\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\": \"2024-08-16T15:58:43Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:44Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3ba4fdeceae445a0a276d2825b8b97c4\",\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\": \"2024-08-16T15:58: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\": \"2024-07-16T15:58:45Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:45Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"tracking_code\": \"9400100105807076063058\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzJkMmVjZTFmY2MzMjQwZmQ5N2Y3ZmJhYjU1NTk1NjYz\",\n \"est_delivery_date\": \"2024-08-16T15:58:45Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"signed_by\": null,\n \"id\": \"trk_2d2ece1fcc3240fd97f7fbab55595663\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_69930adf5be811efb902ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_69930adf5be811efb902ac1f6bc539ae\",\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\": \"2024-08-16T15:58:44Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8cf18db3e20874e55bf9a20f97aee8dfb.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:44Z\",\n \"id\": \"pl_dffd36f121724d69a36603eafa30b950\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:44Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_ee8d4039129f4a15bdf53915f34a6b19\",\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\": \"2024-08-16T15:58:43+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\": \"2024-08-16T15:58:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_698f52d85be811efb8fdac1f6bc539ae\",\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\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3ba4fdeceae445a0a276d2825b8b97c4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_16cdbe21590a433e8caa76725f192345\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a4ca58d3d8704bbc81088e47f7ca9a9d\",\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\": \"2024-08-16T15:58:43+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\": \"2024-08-16T15:58:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_698f52d85be811efb8fdac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063058\",\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_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 \"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 \"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\": \"6.33000\",\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\": \"2024-08-16T15:58:39Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:42Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_119edccd62c24583b6e7f59ced7b5d49\",\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\": \"2024-08-16T15:58: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\": \"2024-07-16T15:58:42Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:42Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"tracking_code\": \"9434600105807076063043\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzUwOTc3YWQ1NTc2ZTQ0ZTg5OGJiMzJlODBhZTk5ZmIx\",\n \"est_delivery_date\": \"2024-08-16T15:58:42Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"signed_by\": null,\n \"id\": \"trk_50977ad5576e44e898bb32e80ae99fb1\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\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\": \"2024-08-16T15:58:42Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e807e421f9466e4883a480b82b1e71f19e.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"id\": \"pl_a8680e95f49c4f15bc068bdcd9e620f3\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:42Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:39Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_0a6f94b2055f4d7888ee1294c5b4fece\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\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.97\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b1784194fdd8469fade7b00b5f5e9a7e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_119edccd62c24583b6e7f59ced7b5d49\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fe13d12f237c4ece984468ced5737017\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9434600105807076063043\",\n \"messages\": [],\n \"order_id\": \"order_64ba299ed95a46a4a3a341cb78e5fdf7\",\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.07000\",\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\": \"2024-08-16T15:58:39Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:41Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:41Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d7e2d2ac36db42ffbbc0aebb8a1e0128\",\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\": \"2024-08-16T15:58: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\": \"2024-07-16T15:58:42Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:42Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"tracking_code\": \"9400100105807076063027\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2FmMmE3NjU2YjY2NTRjYWFhMTU2N2E0NjNhMzQ3ZmI1\",\n \"est_delivery_date\": \"2024-08-16T15:58:42Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"signed_by\": null,\n \"id\": \"trk_af2a7656b6654caaa1567a463a347fb5\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\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\": \"2024-08-16T15:58:41Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8bf48473c72b74f8682106707cb6abc70.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:41Z\",\n \"id\": \"pl_111ca27882714b1fb6e539f4d0e22da1\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:41Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:39Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_d081bb2780ec4e08bb5bb8f17e58a7c5\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_38ac5fb715e14cabb3029bde5b09d9f5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4be8395f399b4279b64677dd495f9519\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d7e2d2ac36db42ffbbc0aebb8a1e0128\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063027\",\n \"messages\": [],\n \"order_id\": \"order_64ba299ed95a46a4a3a341cb78e5fdf7\",\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\": \"6.33000\",\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\": \"2024-08-16T15:58:27Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:30Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:30Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ec4cc7aee65e451c841afb8bf730a913\",\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\": \"2024-08-16T15:58:31Z\",\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\": \"2024-07-16T15:58:31Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:31Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"tracking_code\": \"9434600105807076063005\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Q3ZTNlNjNhYjUwNzRjYmY5NTUxODI2OGExNmNlZjU1\",\n \"est_delivery_date\": \"2024-08-16T15:58:31Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:31Z\",\n \"signed_by\": null,\n \"id\": \"trk_d7e3e63ab5074cbf95518268a16cef55\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\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\": \"2024-08-16T15:58:30Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8240f500213e54273b72a7aedaa0c0fcc.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:30Z\",\n \"id\": \"pl_c2de163b7f2a4c848f788b3f7ff881a0\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:30Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:27Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:27Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_b7ce992c1a6146af9aa35ef207154021\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58:27+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\": \"2024-08-16T15:58:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\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\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ec4cc7aee65e451c841afb8bf730a913\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_56c7ac22afd448ee8182c2bc6697d74a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.97\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_142c56933c0048cea318dcb67ba08ec2\",\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\": \"2024-08-16T15:58:27+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\": \"2024-08-16T15:58:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9434600105807076063005\",\n \"messages\": [],\n \"order_id\": \"order_e4f72f9fe91a4373b85ee59ebc901c86\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "45756" + "39973" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92346307d23ff7b8f054000932d0" + "8a4bf44066bf773de786c52600361161" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.413124" - ], - "etag": [ - "W/\"dd47214a17779953235332d3d0216119\"" + "0.608678" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +81,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments?page_size\u003d5" + "uri": "https://api.easypost.com/v2/shipments?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, - "duration": 541 + "duration": 805 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/all_parameter_hand_off.json b/src/test/cassettes/shipment/all_parameter_hand_off.json new file mode 100644 index 000000000..9c3d94b15 --- /dev/null +++ b/src/test/cassettes/shipment/all_parameter_hand_off.json @@ -0,0 +1,88 @@ +[ + { + "recordedAt": 1723823944, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/shipments?%70%75%72%63%68%61%73%65%64\u003d%66%61%6C%73%65\u0026%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%69%6E%63%6C%75%64%65%5F%63%68%69%6C%64%72%65%6E\u003d%74%72%75%65" + }, + "response": { + "body": "{\n \"has_more\": true,\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:59:02Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:03Z\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7539f7695be811efa8df3cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_a47bae8202544e7fb36712593a235fca\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7539f7695be811efa8df3cecef1b359e\",\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\": \"2024-08-16T15:59:02Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:02Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_3103705e29054470b5ef1729f4c32d2f\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_753720975be811efb8c7ac1f6bc53342\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:03Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a47bae8202544e7fb36712593a235fca\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:03Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6b6d838a9efb46b0afc87b8d68a7354d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:03Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a47bae8202544e7fb36712593a235fca\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:03Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4678fe663ad84319bf2a048915c9d5b3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:03Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a47bae8202544e7fb36712593a235fca\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:03Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_023b19689d764f9bbda63f754163c3c9\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_753720975be811efb8c7ac1f6bc53342\",\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\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:59:01Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_746a08bc5be811efa8913cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_aa8b00cce6f841709fbe816032eb404e\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_746a08bc5be811efa8913cecef1b359e\",\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\": \"2024-08-16T15:59:01Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:01Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_5cbeb7a411be42e9935a4a9a63e9ceb1\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_74670c045be811efb994ac1f6bc539aa\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:02Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_aa8b00cce6f841709fbe816032eb404e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:02Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fc1dee8518584d8e9f6405a8da326eff\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:02Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_aa8b00cce6f841709fbe816032eb404e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:02Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_781ada61f2d84f8f8cfcde477e72c38f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:02Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_aa8b00cce6f841709fbe816032eb404e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:02Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e97eeea3d50b4df58a2ad9a91146c2ac\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_74670c045be811efb994ac1f6bc539aa\",\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\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:59:00Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:00Z\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_73933b5a5be811efb83eac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_df33bec8dabf4e3bb89cf905ba173fd4\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_73933b5a5be811efb83eac1f6bc53342\",\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\": \"2024-08-16T15:59:00Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:00Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_19c914584f004892b507902a475029ba\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_73907aeb5be811efbca5ac1f6bc539ae\",\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\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:00Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df33bec8dabf4e3bb89cf905ba173fd4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:00Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_af297646287d427fa0ddd3192083ed17\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:00Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df33bec8dabf4e3bb89cf905ba173fd4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:00Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_788bab7d8b5644ffa8de1fb1d2c2620c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:00Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df33bec8dabf4e3bb89cf905ba173fd4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:00Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1cc346ea52564de59d2576f4eb5a167e\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_73907aeb5be811efbca5ac1f6bc539ae\",\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\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n }\n ],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:58:58Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_729d37df5be811efb7ccac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_5f4dd3c13ff74547bcb2061c5a103e2f\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_729d37df5be811efb7ccac1f6bc53342\",\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\": \"2024-08-16T15:58:58Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:58Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_7a96490c9c1d4a06a727f60077a2e240\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_729ace3c5be811efbc4cac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:59Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f4dd3c13ff74547bcb2061c5a103e2f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:59Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f0e69c0ba58d4b57ae08d098771b9b0c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:59Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f4dd3c13ff74547bcb2061c5a103e2f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:59Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9b784972a375442da0d159c03b077866\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:59Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f4dd3c13ff74547bcb2061c5a103e2f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:59Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_25a6c97d8340468188d1f39005ef7488\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_729ace3c5be811efbc4cac1f6bc539ae\",\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_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_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_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 },\n {\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.93000\",\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\": \"2024-08-16T15:58:56Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:58Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:57Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:57Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0cc671f9fc474a94ba7ad618ff1ac0ab\",\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\": \"2024-08-16T15:58: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\": \"2024-07-16T15:58:58Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:58Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"tracking_code\": \"9400100105807076063119\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzU5N2YyODBlYTkyMzRmYjM4NDFkYTZhZjNmN2ExNDdi\",\n \"est_delivery_date\": \"2024-08-16T15:58:58Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:58Z\",\n \"signed_by\": null,\n \"id\": \"trk_597f280ea9234fb3841da6af3f7a147b\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_712a6f6d5be811efb865ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_712a6f6d5be811efb865ac1f6bc539aa\",\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\": \"2024-08-16T15:58:57Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8022596b7abe14b3c954edc6d39895460.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:57Z\",\n \"id\": \"pl_d2a1b88c8fe5441cbfaa0751c58b7aeb\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:57Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:56Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:56Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_e2e4acab9ad942409cdc77683b5858d6\",\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\": \"2024-08-16T15:58:56+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\": \"2024-08-16T15:58:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_7127a4095be811efb734ac1f6bc53342\",\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\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:56Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:56Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0cc671f9fc474a94ba7ad618ff1ac0ab\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:56Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:56Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ae05d2e35fa74c58b576e020c104cce1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:56Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:56Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d37657099418405f9a1d051ad2395661\",\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\": \"2024-08-16T15:58:56+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\": \"2024-08-16T15:58:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_7127a4095be811efb734ac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063119\",\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_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_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_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 \"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": [ + "30277" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb41nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43b66bf7748e786c58200361b77" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.241573" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments?%70%75%72%63%68%61%73%65%64\u003d%66%61%6C%73%65\u0026%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%69%6E%63%6C%75%64%65%5F%63%68%69%6C%64%72%65%6E\u003d%74%72%75%65" + }, + "duration": 441 + } +] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy.json b/src/test/cassettes/shipment/buy.json deleted file mode 100644 index 743df2eae..000000000 --- a/src/test/cassettes/shipment/buy.json +++ /dev/null @@ -1,191 +0,0 @@ -[ - { - "recordedAt": 1661456960, - "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-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}", - "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": [ - "b57a92316307d240f7dd9cb90009331d" - ], - "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.883735" - ], - "etag": [ - "W/\"41fd872cde1aa1be437737988c2a090e\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "location": [ - "/api/v2/shipments/shp_124b742639cc4db4bd4d992de80d2843" - ], - "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments" - }, - "duration": 1020 - }, - { - "recordedAt": 1661456962, - "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}", - "method": "POST", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ], - "Content-Type": [ - "application/json" - ] - }, - "uri": "https://api.easypost.com/v2/shipments/shp_124b742639cc4db4bd4d992de80d2843/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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 200 OK" - ], - "content-length": [ - "8182" - ], - "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": [ - "b57a92346307d241f7ff079100093381" - ], - "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "1.022314" - ], - "etag": [ - "W/\"49bd84fb6c1c3b9176e74ce0dd524d77\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_124b742639cc4db4bd4d992de80d2843/buy" - }, - "duration": 1147 - } -] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy_luma.json b/src/test/cassettes/shipment/buy_luma.json new file mode 100644 index 000000000..2941fa382 --- /dev/null +++ b/src/test/cassettes/shipment/buy_luma.json @@ -0,0 +1,183 @@ +[ + { + "recordedAt": 1750095933, + "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\": \"2025-06-16T17:45:32Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2025-06-16T17:45:32Z\",\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\": \"2025-06-16T17:45: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\": \"2025-06-16T17:45:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_b390dd994ad911f0abbfac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_5571541b585f4e6c832beebed7396fcc\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2025-06-16T17:45: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\": \"2025-06-16T17:45:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_b390dd994ad911f0abbfac1f6bc539aa\",\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\": \"2025-06-16T17:45:32Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2025-06-16T17:45:32Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a7f70c36a6514c54906327289d5c9173\",\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\": \"2025-06-16T17:45: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\": \"2025-06-16T17:45:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_b38dfaae4ad911f0abb8ac1f6bc539aa\",\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\": \"34.15\",\n \"created_at\": \"2025-06-16T17:45:33Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5571541b585f4e6c832beebed7396fcc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"39.10\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-06-16T17:45:33Z\",\n \"rate\": \"34.15\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_22cbea381a6840479dfd708d12d15c27\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.34\",\n \"created_at\": \"2025-06-16T17:45:33Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5571541b585f4e6c832beebed7396fcc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-06-16T17:45:33Z\",\n \"rate\": \"7.42\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_28560fbf722f44e69677eb8ec43da58a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.57\",\n \"created_at\": \"2025-06-16T17:45:33Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5571541b585f4e6c832beebed7396fcc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-06-16T17:45:33Z\",\n \"rate\": \"6.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b84d7ad131c240279e4c9ed023b8440d\",\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\": \"2025-06-16T17:45: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\": \"2025-06-16T17:45:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_b38dfaae4ad911f0abb8ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"tracking_code\": null,\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": [ + "4325" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb56nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "afd263fa6850583ce2baa979006f9a3b" + ], + "x-proxied": [ + "intlb3nuq ec99f2d065", + "extlb2nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.268752" + ], + "location": [ + "/api/v2/shipments/shp_5571541b585f4e6c832beebed7396fcc" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202506161725-4166f0359d-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 389 + }, + { + "recordedAt": 1750095934, + "request": { + "body": "{\n \"planned_ship_date\": \"2025-06-16\",\n \"ruleset_name\": \"cheapest_delivery\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_5571541b585f4e6c832beebed7396fcc/luma" + }, + "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\": \"6.07000\",\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\": \"2025-06-16T17:45:32Z\",\n \"tax_identifiers\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"luma_info\": {\n \"matching_rule_idx\": 0.0,\n \"ruleset_description\": \"Buy the cheapest rate that satisfies all of the following:\\nRule 0\\n \\nOtherwise buy the cheapest rate\",\n \"ai_results\": [\n {\n \"meets_ruleset_requirements\": true,\n \"carrier\": \"USPS\",\n \"rate_id\": \"rate_22cbea381a6840479dfd708d12d15c27\",\n \"predicted_deliver_by_date\": \"2025-06-17\",\n \"service\": \"Express\",\n \"rate_usd\": \"34.15\",\n \"predicted_deliver_days\": 1.0\n },\n {\n \"meets_ruleset_requirements\": true,\n \"carrier\": \"USPS\",\n \"rate_id\": \"rate_28560fbf722f44e69677eb8ec43da58a\",\n \"predicted_deliver_by_date\": \"2025-06-18\",\n \"service\": \"Priority\",\n \"rate_usd\": \"7.42\",\n \"predicted_deliver_days\": 2.0\n },\n {\n \"meets_ruleset_requirements\": true,\n \"carrier\": \"USPS\",\n \"rate_id\": \"rate_b84d7ad131c240279e4c9ed023b8440d\",\n \"predicted_deliver_by_date\": \"2025-06-19\",\n \"service\": \"GroundAdvantage\",\n \"rate_usd\": \"6.07\",\n \"predicted_deliver_days\": 3.0\n }\n ]\n },\n \"usps_zone\": 4.0,\n \"is_return\": null,\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.57\",\n \"created_at\": \"2025-06-16T17:45:34Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5571541b585f4e6c832beebed7396fcc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-06-16T17:45:34Z\",\n \"rate\": \"6.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b84d7ad131c240279e4c9ed023b8440d\",\n \"object\": \"Rate\"\n },\n \"updated_at\": \"2025-06-16T17:45:34Z\",\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2025-06-16T17:45: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\": \"2025-06-16T17:45:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_b390dd994ad911f0abbfac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\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\": \"2025-06-16T17:45:34Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_5571541b585f4e6c832beebed7396fcc\",\n \"tracking_code\": \"9400100208303109991627\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Q0YWIyZTM2MjI3NjRhNTdiYjM2OGZkZGQ5OThlNWE1\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2025-06-16T17:45:34Z\",\n \"signed_by\": null,\n \"id\": \"trk_d4ab2e3622764a57bb368fddd998e5a5\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"id\": \"shp_5571541b585f4e6c832beebed7396fcc\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2025-06-16T17:45: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\": \"2025-06-16T17:45:32+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_b390dd994ad911f0abbfac1f6bc539aa\",\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\": \"2025-06-16T17:45:34Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250616/e81214e9e5fce34674a2a22e8e74f214bd.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2025-06-16T17:45:34Z\",\n \"id\": \"pl_d6da6de57d8d4c5e9dde46d54a24e523\",\n \"label_zpl_url\": null,\n \"label_date\": \"2025-06-16T17:45:34Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2025-06-16T17:45:32Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2025-06-16T17:45:32Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a7f70c36a6514c54906327289d5c9173\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2025-06-16T17:45:32+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\": \"2025-06-16T17:45:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_b38dfaae4ad911f0abb8ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"refund_status\": null,\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"34.15\",\n \"created_at\": \"2025-06-16T17:45:33Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5571541b585f4e6c832beebed7396fcc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"39.10\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-06-16T17:45:33Z\",\n \"rate\": \"34.15\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_22cbea381a6840479dfd708d12d15c27\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.34\",\n \"created_at\": \"2025-06-16T17:45:33Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5571541b585f4e6c832beebed7396fcc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-06-16T17:45:33Z\",\n \"rate\": \"7.42\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_28560fbf722f44e69677eb8ec43da58a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.57\",\n \"created_at\": \"2025-06-16T17:45:33Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5571541b585f4e6c832beebed7396fcc\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-06-16T17:45:33Z\",\n \"rate\": \"6.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b84d7ad131c240279e4c9ed023b8440d\",\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\": \"2025-06-16T17:45:32+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\": \"2025-06-16T17:45:33+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_b38dfaae4ad911f0abb8ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100208303109991627\",\n \"messages\": [],\n \"forms\": [],\n \"object\": \"Shipment\",\n \"status\": \"unknown\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "7367" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb35nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "afd263fe6850583de2baa97b006f9acd" + ], + "x-proxied": [ + "intlb4nuq ec99f2d065", + "extlb2nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.367404" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202506161725-4166f0359d-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_5571541b585f4e6c832beebed7396fcc/luma" + }, + "duration": 1472 + } +] \ 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 deleted file mode 100644 index 37032302b..000000000 --- a/src/test/cassettes/shipment/buy_shipment_with_carbon_offset.json +++ /dev/null @@ -1,191 +0,0 @@ -[ - { - "recordedAt": 1661456964, - "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", - "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-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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 201 Created" - ], - "content-length": [ - "6807" - ], - "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": [ - "b57a92316307d244f7cdb9bc000934b0" - ], - "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.797517" - ], - "etag": [ - "W/\"d4d5417ce12b901bb80c0b103183c729\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "location": [ - "/api/v2/shipments/shp_32bc07ba443d4622861c9ff705b1d633" - ], - "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments" - }, - "duration": 940 - }, - { - "recordedAt": 1661456966, - "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}", - "method": "POST", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ], - "Content-Type": [ - "application/json" - ] - }, - "uri": "https://api.easypost.com/v2/shipments/shp_32bc07ba443d4622861c9ff705b1d633/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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 200 OK" - ], - "content-length": [ - "9450" - ], - "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": [ - "b57a92306307d245e68ccda500093500" - ], - "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "1.215383" - ], - "etag": [ - "W/\"d7d6a631d5b5fc367883c2e53b2ea5ed\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_32bc07ba443d4622861c9ff705b1d633/buy" - }, - "duration": 1421 - } -] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id_with_rate.json b/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id_with_rate.json new file mode 100644 index 000000000..9de84371a --- /dev/null +++ b/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id_with_rate.json @@ -0,0 +1,272 @@ +[ + { + "recordedAt": 1723823944, + "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\": \"2024-08-16T15:59:04+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:04+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_677bf8094d984ea6afbba5ecf2288af8\",\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": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf7748e786c58400361c6d" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.055447" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/end_shippers" + }, + "duration": 260 + }, + { + "recordedAt": 1723823945, + "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\": \"2024-08-16T15:59:05Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:05Z\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_769ed5d15be811efb9b1ac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_9a38d595aecb46acb4680994b4fac580\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_769ed5d15be811efb9b1ac1f6bc53342\",\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\": \"2024-08-16T15:59:05Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:05Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_7772024bbc5b47a98e999805ea24364f\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_769c5e8e5be811efbe1bac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:05Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9a38d595aecb46acb4680994b4fac580\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:05Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0138c237d6924fbc8dc90d0b13d8a9ad\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:05Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9a38d595aecb46acb4680994b4fac580\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:05Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_70414191b8de43e9a9c33e8ad2ba76d0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:05Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9a38d595aecb46acb4680994b4fac580\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:05Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_342aeb8f2e214fa8a035068ff6326e57\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_769c5e8e5be811efbe1bac1f6bc539ae\",\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\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\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": [ + "5340" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb38nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf7749e786c58600361d57" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.606193" + ], + "location": [ + "/api/v2/shipments/shp_9a38d595aecb46acb4680994b4fac580" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 811 + }, + { + "recordedAt": 1723823947, + "request": { + "body": "{\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_9a38d595aecb46acb4680994b4fac580\",\n \"currency\": \"USD\",\n \"id\": \"rate_342aeb8f2e214fa8a035068ff6326e57\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"end_shipper_id\": \"es_677bf8094d984ea6afbba5ecf2288af8\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_9a38d595aecb46acb4680994b4fac580/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.93000\",\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\": \"2024-08-16T15:59:05Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:07Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:06Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9a38d595aecb46acb4680994b4fac580\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:06Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_342aeb8f2e214fa8a035068ff6326e57\",\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\": \"2024-08-16T15:59:07Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_9a38d595aecb46acb4680994b4fac580\",\n \"tracking_code\": \"9400100105807076063195\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzdiNzNhNjljMjk1ZTQ2ZjlhM2JmMWYxNTVhODJjNGIy\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:07Z\",\n \"signed_by\": null,\n \"id\": \"trk_7b73a69c295e46f9a3bf1f155a82c4b2\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_769ed5d15be811efb9b1ac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_9a38d595aecb46acb4680994b4fac580\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:05+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_769ed5d15be811efb9b1ac1f6bc53342\",\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\": \"2024-08-16T15:59:06Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8544635b053be4f1e9abbe6411ed7dd17.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:06Z\",\n \"id\": \"pl_196de9e614734d74a3ceb35c0874b7d1\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:59:06Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:05Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:05Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_7772024bbc5b47a98e999805ea24364f\",\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\": \"2024-08-16T15:59:05+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\": \"2024-08-16T15:59:06+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_769c5e8e5be811efbe1bac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:05Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9a38d595aecb46acb4680994b4fac580\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:05Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0138c237d6924fbc8dc90d0b13d8a9ad\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:05Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9a38d595aecb46acb4680994b4fac580\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:05Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_70414191b8de43e9a9c33e8ad2ba76d0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:05Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_9a38d595aecb46acb4680994b4fac580\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:05Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_342aeb8f2e214fa8a035068ff6326e57\",\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\": \"2024-08-16T15:59:05+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\": \"2024-08-16T15:59:06+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_769c5e8e5be811efbe1bac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063195\",\n \"messages\": [\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\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": [ + "7558" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb33nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44166bf774ae786c58800361e91" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.981532" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_9a38d595aecb46acb4680994b4fac580/buy" + }, + "duration": 1195 + } +] \ 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..d40bd936d --- /dev/null +++ b/src/test/cassettes/shipment/buy_shipment_with_end_shipper_id_with_rate_with_params.json @@ -0,0 +1,272 @@ +[ + { + "recordedAt": 1723823935, + "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\": \"2024-08-16T15:58:55+00:00\",\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:55+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"es_cc913d68bcde470b91572f94749d475d\",\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": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf773fe786c54200361374" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.050292" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/end_shippers" + }, + "duration": 256 + }, + { + "recordedAt": 1723823936, + "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\": \"2024-08-16T15:58:56Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_712a6f6d5be811efb865ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_712a6f6d5be811efb865ac1f6bc539aa\",\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\": \"2024-08-16T15:58:56Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:56Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_e2e4acab9ad942409cdc77683b5858d6\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7127a4095be811efb734ac1f6bc53342\",\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\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:56Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:56Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0cc671f9fc474a94ba7ad618ff1ac0ab\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:56Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:56Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ae05d2e35fa74c58b576e020c104cce1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:56Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:56Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d37657099418405f9a1d051ad2395661\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7127a4095be811efb734ac1f6bc53342\",\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_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_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_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 \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "5436" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb38nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43b66bf7740e786c544003613e4" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.830306" + ], + "location": [ + "/api/v2/shipments/shp_759ed62c45e34096aadebd7277e5e896" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1042 + }, + { + "recordedAt": 1723823938, + "request": { + "body": "{\n \"insurance\": 249.99,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"currency\": \"USD\",\n \"id\": \"rate_0cc671f9fc474a94ba7ad618ff1ac0ab\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 PM\"\n },\n \"end_shipper_id\": \"es_cc913d68bcde470b91572f94749d475d\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_759ed62c45e34096aadebd7277e5e896/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.93000\",\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\": \"2024-08-16T15:58:56Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:58Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:57Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:57Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0cc671f9fc474a94ba7ad618ff1ac0ab\",\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\": \"2024-08-16T15:58:58Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"tracking_code\": \"9400100105807076063119\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzU5N2YyODBlYTkyMzRmYjM4NDFkYTZhZjNmN2ExNDdi\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:58Z\",\n \"signed_by\": null,\n \"id\": \"trk_597f280ea9234fb3841da6af3f7a147b\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_712a6f6d5be811efb865ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:56+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_712a6f6d5be811efb865ac1f6bc539aa\",\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\": \"2024-08-16T15:58:57Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8022596b7abe14b3c954edc6d39895460.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:57Z\",\n \"id\": \"pl_d2a1b88c8fe5441cbfaa0751c58b7aeb\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:57Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:56Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:56Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_e2e4acab9ad942409cdc77683b5858d6\",\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\": \"2024-08-16T15:58:56+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\": \"2024-08-16T15:58:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_7127a4095be811efb734ac1f6bc53342\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:56Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:56Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0cc671f9fc474a94ba7ad618ff1ac0ab\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:56Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:56Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ae05d2e35fa74c58b576e020c104cce1\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:56Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_759ed62c45e34096aadebd7277e5e896\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:56Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d37657099418405f9a1d051ad2395661\",\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\": \"2024-08-16T15:58:56+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\": \"2024-08-16T15:58:57+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_7127a4095be811efb734ac1f6bc53342\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063119\",\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_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_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_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 \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "7655" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb38nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf7741e786c546003614f3" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.889521" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_759ed62c45e34096aadebd7277e5e896/buy" + }, + "duration": 1103 + } +] \ 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..d93cb0fd3 --- /dev/null +++ b/src/test/cassettes/shipment/buy_with_params.json @@ -0,0 +1,183 @@ +[ + { + "recordedAt": 1723823923, + "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\": \"2024-08-16T15:58:43Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_69930adf5be811efb902ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_69930adf5be811efb902ac1f6bc539ae\",\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\": \"2024-08-16T15:58:43Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_ee8d4039129f4a15bdf53915f34a6b19\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_698f52d85be811efb8fdac1f6bc539ae\",\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\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3ba4fdeceae445a0a276d2825b8b97c4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_16cdbe21590a433e8caa76725f192345\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a4ca58d3d8704bbc81088e47f7ca9a9d\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_698f52d85be811efb8fdac1f6bc539ae\",\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_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 \"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 \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "5436" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb33nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf7733e786c4fe0036081b" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.629884" + ], + "location": [ + "/api/v2/shipments/shp_84ff320daac94718b511207c1538cdf0" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 839 + }, + { + "recordedAt": 1723823925, + "request": { + "body": "{\n \"insurance\": 249.99,\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"currency\": \"USD\",\n \"id\": \"rate_3ba4fdeceae445a0a276d2825b8b97c4\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 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_84ff320daac94718b511207c1538cdf0/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.93000\",\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\": \"2024-08-16T15:58:43Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:44Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3ba4fdeceae445a0a276d2825b8b97c4\",\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\": \"2024-08-16T15:58:45Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"tracking_code\": \"9400100105807076063058\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzJkMmVjZTFmY2MzMjQwZmQ5N2Y3ZmJhYjU1NTk1NjYz\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"signed_by\": null,\n \"id\": \"trk_2d2ece1fcc3240fd97f7fbab55595663\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_69930adf5be811efb902ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_69930adf5be811efb902ac1f6bc539ae\",\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\": \"2024-08-16T15:58:44Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8cf18db3e20874e55bf9a20f97aee8dfb.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:44Z\",\n \"id\": \"pl_dffd36f121724d69a36603eafa30b950\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:44Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_ee8d4039129f4a15bdf53915f34a6b19\",\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\": \"2024-08-16T15:58:43+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\": \"2024-08-16T15:58:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_698f52d85be811efb8fdac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3ba4fdeceae445a0a276d2825b8b97c4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_16cdbe21590a433e8caa76725f192345\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a4ca58d3d8704bbc81088e47f7ca9a9d\",\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\": \"2024-08-16T15:58:43+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\": \"2024-08-16T15:58:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_698f52d85be811efb8fdac1f6bc539ae\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063058\",\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_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 \"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 \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "7655" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf7734e786c50000360923" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.847552" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_84ff320daac94718b511207c1538cdf0/buy" + }, + "duration": 1052 + } +] \ No newline at end of file diff --git a/src/test/cassettes/shipment/buy_with_rate.json b/src/test/cassettes/shipment/buy_with_rate.json new file mode 100644 index 000000000..29b1c688c --- /dev/null +++ b/src/test/cassettes/shipment/buy_with_rate.json @@ -0,0 +1,186 @@ +[ + { + "recordedAt": 1723823957, + "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\": \"2024-08-16T15:59:16Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7d8fe25a5be811efadcc3cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_a99b3696d5544ac1a5063a7d0f5d7038\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7d8fe25a5be811efadcc3cecef1b359e\",\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\": \"2024-08-16T15:59:16Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:16Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_2555e3065f2b4691a7973a71b9990fdc\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7d8d1df25be811efbf09ac1f6bc539aa\",\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\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:17Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a99b3696d5544ac1a5063a7d0f5d7038\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:17Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_21e114aa3bce4d29824b9359abcc51b6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:17Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a99b3696d5544ac1a5063a7d0f5d7038\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:17Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ec3081571e5b4d778a5743585f8c142f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:17Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a99b3696d5544ac1a5063a7d0f5d7038\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:17Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3be47e4c7e5b4aa6aca52b7173c48fe7\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7d8d1df25be811efbf09ac1f6bc539aa\",\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_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_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 \"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}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "5436" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb41nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf7754e786c8de0036296e" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.752256" + ], + "location": [ + "/api/v2/shipments/shp_a99b3696d5544ac1a5063a7d0f5d7038" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 949 + }, + { + "recordedAt": 1723823959, + "request": { + "body": "{\n \"rate\": {\n \"deliveryDateGuaranteed\": false,\n \"listCurrency\": \"USD\",\n \"estDeliveryDays\": 3.0,\n \"listRate\": 6.4,\n \"carrierAccountId\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"mode\": \"test\",\n \"createdAt\": \"Aug 15, 2024, 6:00:00 PM\",\n \"carrier\": \"USPS\",\n \"retailCurrency\": \"USD\",\n \"rate\": 5.93,\n \"deliveryDays\": 3.0,\n \"billingType\": \"easypost\",\n \"service\": \"GroundAdvantage\",\n \"shipmentId\": \"shp_a99b3696d5544ac1a5063a7d0f5d7038\",\n \"currency\": \"USD\",\n \"id\": \"rate_21e114aa3bce4d29824b9359abcc51b6\",\n \"retailRate\": 8.45,\n \"object\": \"Rate\",\n \"updatedAt\": \"Aug 15, 2024, 6:00:00 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_a99b3696d5544ac1a5063a7d0f5d7038/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.93000\",\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\": \"2024-08-16T15:59:16Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:18Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:18Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a99b3696d5544ac1a5063a7d0f5d7038\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:18Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_21e114aa3bce4d29824b9359abcc51b6\",\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\": \"2024-08-16T15:59:19Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_a99b3696d5544ac1a5063a7d0f5d7038\",\n \"tracking_code\": \"9400100105807076063249\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzFjMzQ2NzEyNjQ2YjQyNjJhOTM1MjJkYzQ2ZWUwYjFj\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:19Z\",\n \"signed_by\": null,\n \"id\": \"trk_1c346712646b4262a93522dc46ee0b1c\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7d8fe25a5be811efadcc3cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_a99b3696d5544ac1a5063a7d0f5d7038\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7d8fe25a5be811efadcc3cecef1b359e\",\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\": \"2024-08-16T15:59:18Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8ab8a8a8cd6054124957f5de436968ff0.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:18Z\",\n \"id\": \"pl_4656020f43654ce1a2905a8ab5070401\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:59:18Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:16Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:16Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_2555e3065f2b4691a7973a71b9990fdc\",\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\": \"2024-08-16T15:59:16+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\": \"2024-08-16T15:59:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_7d8d1df25be811efbf09ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:17Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a99b3696d5544ac1a5063a7d0f5d7038\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:17Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_21e114aa3bce4d29824b9359abcc51b6\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:17Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a99b3696d5544ac1a5063a7d0f5d7038\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:17Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ec3081571e5b4d778a5743585f8c142f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:17Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a99b3696d5544ac1a5063a7d0f5d7038\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:17Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3be47e4c7e5b4aa6aca52b7173c48fe7\",\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\": \"2024-08-16T15:59:16+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\": \"2024-08-16T15:59:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_7d8d1df25be811efbf09ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063249\",\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_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_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 \"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}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "7654" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf7755e786c8e000362a43" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.155041" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_a99b3696d5544ac1a5063a7d0f5d7038/buy" + }, + "duration": 1377 + } +] \ 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..f2339949f 100644 --- a/src/test/cassettes/shipment/convert_label.json +++ b/src/test/cassettes/shipment/convert_label.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456978, + "recordedAt": 1723823963, "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 \"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\": \"GroundAdvantage\",\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,69 +18,66 @@ "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.93000\",\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\": \"2024-08-16T15:59:22Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:23Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d43143b1ff274c86aaa1b309a295eb17\",\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\": \"2024-08-16T15:59:23Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"tracking_code\": \"9400100105807076063263\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzA5ZDQxMDgwOTg2MTRmYWRiM2Q3OGYwYjc2NmE4ODA5\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:23Z\",\n \"signed_by\": null,\n \"id\": \"trk_09d4108098614fadb3d78f0b766a8809\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_80d66f705be811ef838aac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_80d66f705be811ef838aac1f6bc539ae\",\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\": \"2024-08-16T15:59:22Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e84dc499ee756147d68df4b34eac679492.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:23Z\",\n \"id\": \"pl_c17618284675441cb2570e0c10395b70\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:59:22Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_5b0b226e670c4b4e9314d71750d65470\",\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\": \"2024-08-16T15:59:22+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\": \"2024-08-16T15:59:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_80d3cb275be811efaed93cecef1b359e\",\n \"street2\": \"\",\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.25\",\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6228387051f2418bada036d885f95c75\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d43143b1ff274c86aaa1b309a295eb17\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6fb2039692b84311a5925407b9971c34\",\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\": \"2024-08-16T15:59:22+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\": \"2024-08-16T15:59:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_80d3cb275be811efaed93cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063263\",\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" + "6549" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb41nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92316307d251f7cb7f930009392d" + "8a4bf43b66bf775ae786c8fe00362dba" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.012228" + "1.122006" ], - "etag": [ - "W/\"34b36661f64a041e84f466d39febf9b5\"" + "location": [ + "/api/v2/shipments/shp_070e965fd1cb43d8940afb3f8b40113d" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_cd5b10aea1234f7abf18443c81a363b5" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1134 + "duration": 1323 }, { - "recordedAt": 1661456979, + "recordedAt": 1723823965, "request": { "body": "", "method": "GET", @@ -108,69 +104,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_cd5b10aea1234f7abf18443c81a363b5/label?file_format\u003dZPL" + "uri": "https://api.easypost.com/v2/shipments/shp_070e965fd1cb43d8940afb3f8b40113d/label?%66%69%6C%65%5F%66%6F%72%6D%61%74\u003d%5A%50%4C" }, "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.93000\",\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\": \"2024-08-16T15:59:22Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:23Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d43143b1ff274c86aaa1b309a295eb17\",\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\": \"2024-08-16T15:59:23Z\",\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\": \"2024-07-16T15:59:23Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:36:23Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"tracking_code\": \"9400100105807076063263\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzA5ZDQxMDgwOTg2MTRmYWRiM2Q3OGYwYjc2NmE4ODA5\",\n \"est_delivery_date\": \"2024-08-16T15:59:23Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:23Z\",\n \"signed_by\": null,\n \"id\": \"trk_09d4108098614fadb3d78f0b766a8809\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_80d66f705be811ef838aac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_80d66f705be811ef838aac1f6bc539ae\",\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\": \"2024-08-16T15:59:22Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e84dc499ee756147d68df4b34eac679492.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:24Z\",\n \"id\": \"pl_c17618284675441cb2570e0c10395b70\",\n \"label_zpl_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/postage_label/20240816/d76049cad6b940dbb15b73e954242321.zpl\",\n \"label_date\": \"2024-08-16T15:59:22Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_5b0b226e670c4b4e9314d71750d65470\",\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\": \"2024-08-16T15:59:22+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\": \"2024-08-16T15:59:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_80d3cb275be811efaed93cecef1b359e\",\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.25\",\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6228387051f2418bada036d885f95c75\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d43143b1ff274c86aaa1b309a295eb17\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6fb2039692b84311a5925407b9971c34\",\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\": \"2024-08-16T15:59:22+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\": \"2024-08-16T15:59:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_80d3cb275be811efaed93cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063263\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "8324" + "7792" ], "expires": [ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92356307d252f7ff103a0009399b" + "8a4bf43d66bf775be786c8ff00362ebe" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.579787" - ], - "etag": [ - "W/\"4f2232ab7be5957f383a086ec46cdec4\"" + "1.473895" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +173,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_070e965fd1cb43d8940afb3f8b40113d/label?%66%69%6C%65%5F%66%6F%72%6D%61%74\u003d%5A%50%4C" }, - "duration": 1706 + "duration": 1673 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/create.json b/src/test/cassettes/shipment/create.json index 947e013d0..c3e15d9b6 100644 --- a/src/test/cassettes/shipment/create.json +++ b/src/test/cassettes/shipment/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456971, + "recordedAt": 1723823954, "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,69 +18,66 @@ "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\": \"2024-08-16T15:59:14Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:14Z\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7bd0dfa15be811efbd55ac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_b03d8d40ace34f95ad754d9932d96e2a\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7bd0dfa15be811efbd55ac1f6bc53342\",\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\": \"2024-08-16T15:59:13Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-08-16T15:59:13Z\",\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\": \"2024-08-16T15:59:13Z\",\n \"currency\": null,\n \"id\": \"cstitem_59a29e3b94a141e4805fcf7d775d4f91\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-08-16T15:59:13Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_e9757079588c44658eae3600c42f95b8\",\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\": \"2024-08-16T15:59:13Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:13Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_ebf9c3b2fc1848549534c9ac7c349224\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7bce5e305be811efbd54ac1f6bc53342\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:14Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b03d8d40ace34f95ad754d9932d96e2a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:14Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_048e2939fd574037ab55aa2e977b9cc4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:14Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b03d8d40ace34f95ad754d9932d96e2a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:14Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3caa1977060341a69089f3de610708d2\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:14Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b03d8d40ace34f95ad754d9932d96e2a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:14Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3af0c888fe8d4e59824ef9b17c19290b\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7bce5e305be811efbd54ac1f6bc53342\",\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_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_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_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 \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "6807" + "6271" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb34nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92336307d24ae68aa4e7000936c8" + "8a4bf43e66bf7751e786c5c9003626b2" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.977141" + "0.675065" ], - "etag": [ - "W/\"dfb6544f0e555be43dd742ace0de8b6d\"" + "location": [ + "/api/v2/shipments/shp_b03d8d40ace34f95ad754d9932d96e2a" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_ed272132485f46c1bcbd805907dc63a3" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +87,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1148 + "duration": 879 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/create_and_buy_luma.json b/src/test/cassettes/shipment/create_and_buy_luma.json new file mode 100644 index 000000000..b81335d2d --- /dev/null +++ b/src/test/cassettes/shipment/create_and_buy_luma.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1750095937, + "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 \"planned_ship_date\": \"2025-06-16\",\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 \"ruleset_name\": \"cheapest_delivery\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/luma" + }, + "response": { + "body": "{\n \"customs_info\": null,\n \"insurance\": \"50.00\",\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\": \"2025-06-16T17:45:37Z\",\n \"label_type\": \"default\",\n \"label_url\": null,\n \"label_file\": \"iVBORw0KGgoAAAANSUhEUgAABLAAAAcICAAAAAAJO2eWAAAI+GlDQ1BkZWZhdWx0X2dyYXkuaWNjAABIiZ2VeTTU/R7Hv7/fb/bFMjPGzljHkjXLIMsY21iyr6lo7FuMXUpJKpSSZCuRCEWbJW2SUhFRaH9GHqE8pUUqlUfde869597Tuefc1zmf83798f2c8znvf74A4CvBMrAIALFxSXx7D7a/n38AA/wbwbzEeLabmzP4LZ9GAfQz72v9/s1vQYeEJvKWs2t5NvPi+UkAQFbLrpaaFP/TI5adtiH6l2f+9GgvD86y7wMAR/rn7k+U2PykyLDQNIbnxrCk1GB+KCPRnh+czuByOAw3/sawyJjQ/+O6/0FSaFrSz+RsjE/nR4ZHJDH+6wp9XT0W+FenH7x+dQXRB/+z55/wkvkp/zDUr24AAQgDGpAEckAJqAEtoA+MgRmwArbAEbgCL+AP1gEeiACxgA9SQSbYBnJBPtgHDoJyUAVqQQNoBmdBO7gEroGboA/cAyPgCRCASfAazIFPYBGCICxEhqiQJCQPqUCakD7EgiwgW8gZ8oD8oSAoHIqDkqFMaDuUDxVB5VA11ACdgS5A16Db0BD0CBqHZqD30FcYgUkwDZaFVWEdmAWzYSfYC14Lh8MJcAacA++FS+Ea+CTcBl+D++ARWAC/hucRgBAROqKAaCEshIO4IgFIGMJHtiB5SAlSgzQjnUgvch8RILPIFxQGRUUxUFooM5QDyhvFQyWgtqAKUOWoE6g2VA/qPmocNYf6gSajZdCaaFM0F+2HDkenonPRJeg6dCv6BnoEPYn+hMFg6BgmxhjjgPHHRGE2YQowhzEtmC7MEGYCM4/FYiWxmlhzrCs2GJuEzcWWYU9ir2KHsZPYzzgiTh6nj7PDBeDicNm4Elwj7gpuGDeFW8SL4FXwpnhXfAg+HV+Ir8V34gfxk/hFgiiBSTAneBGiCNsIpYRmwg3CU8IHIpGoSDQhuhMjiVuJpcTTxFvEceIXEoWkQeKQAknJpL2kelIX6RHpA5lMViVbkQPISeS95AbydfJz8mchqpC2EFcoRChLqEKoTWhY6I0wXlhFmC28TjhDuET4nPCg8KwIXkRVhCMSLLJFpELkgsiYyLwoVVRP1FU0VrRAtFH0tug0BUtRpdhSQig5lGOU65QJKkJVonKoPOp2ai31BnWShqExaVxaFC2fdoo2QJsTo4gZiPmIpYlViF0WE9ARuiqdS4+hF9LP0kfpX8VlxdnioeK7xZvFh8UXJKQlrCRCJfIkWiRGJL5KMiRtJaMl90u2Sz6TQklpSLlLpUodkbohNStNkzaT5knnSZ+VfiwDy2jIeMhskjkm0y8zLysnay8bL1sme112Vo4uZyUXJVcsd0VuRp4qbyEfKV8sf1X+FUOMwWbEMEoZPYw5BRkFB4VkhWqFAYVFRaait2K2YoviMyWCEkspTKlYqVtpTlle2UU5U7lJ+bEKXoWlEqFySKVXZUGVqeqrulO1XXWaKcHkMjOYTcynamQ1S7UEtRq1B+oYdZZ6tPph9XsasIahRoRGhcagJqxppBmpeVhzaAV6hcmKuBU1K8a0SFpsrRStJq1xbbq2s3a2drv2Gx1lnQCd/Tq9Oj90DXVjdGt1n+hR9Bz1svU69d7ra+jz9Cv0H6wkr7RbmbWyY+U7A02DUIMjBg8NqYYuhjsNuw2/Gxkb8Y2ajWaMlY2DjCuNx1g0lhurgHXLBG1ibZJlcsnki6mRaZLpWdO3Zlpm0WaNZtOrmKtCV9WumjBXNA82rzYXWDAsgiyOWggsFSyDLWssX1gpWYVY1VlNsdXZUeyT7DfWutZ861brBY4pZzOnywaxsbfJsxmwpdh625bbPrdTtAu3a7Kbsze032Tf5YB2cHLY7zDGleXyuA3cOUdjx82OPU4kJ0+ncqcXzhrOfOdOF9jF0eWAy9PVKqvjVre7Aleu6wHXZ25MtwS3i+4Ydzf3CveXHnoemR69nlTP9Z6Nnp+8rL0KvZ54q3kne3f7CPsE+jT4LPja+Bb5Cvx0/Db79flL+Uf6dwRgA3wC6gLm19iuObhmMtAwMDdwdC1zbdra2+uk1sWsu7xeeH3w+nNB6CDfoMagb8GuwTXB8xu4Gyo3zPE4vEO81yFWIcUhM6HmoUWhU2HmYUVh0+Hm4QfCZyIsI0oiZiM5keWR76IcoqqiFqJdo+ujl2J8Y1picbFBsRfiKHHRcT0b5TambRyK14zPjRckmCYcTJjjO/HrEqHEtYkdSbTlD6o/WS15R/J4ikVKRcrnVJ/Uc2miaXFp/eka6bvTpzLsMo5vQm3iberOVMjcljm+mb25egu0ZcOW7iylrJysya32W09sI2yL3nY3Wze7KPvjdt/tnTmyOVtzJnbY72jKFcrl547tNNtZtQu1K3LXwO6Vu8t2/8gLybuTr5tfkv+tgFdwZ4/entI9S3vD9g4UGhUe2YfZF7dvdL/l/hNFokUZRRMHXA60FTOK84o/Hlx/8HaJQUnVIcKh5EOCUufSjjLlsn1l38ojykcqrCtaKmUqd1cuHA45PHzE6khzlWxVftXXo5FHH1bbV7fVqNaUHMMcSzn2stantvc463hDnVRdft33+rh6wQmPEz0Nxg0NjTKNhU1wU3LTzMnAk/dO2ZzqaNZqrm6ht+SfBqeTT786E3Rm9KzT2e5zrHPN51XOV7ZSW/PaoLb0trn2iHZBh3/H0AXHC92dZp2tF7Uv1l9SuFRxWexy4RXClZwrS1czrs53xXfNXgu/NtG9vvvJdb/rD3rcewZuON24ddPu5vVedu/VW+a3Lt02vX3hDutOe59RX1u/YX/rXcO7rQNGA22DxoMd90zudQ6tGroybDl87b7N/ZsPuA/6RlaPDI16jz4cCxwTPAx5OP0o5tG7xymPF59sfYp+mvdM5FnJc5nnNX+o/9EiMBJcHrcZ73/h+eLJBG/i9Z+Jf36bzHlJflkyJT/VMK0/fWnGbubeqzWvJl/Hv16czf1L9K/KN2pvzr+1ets/5zc3+Y7/bul9wQfJD/UfDT52z7vNP/8U+2lxIe+z5OcTX1hfer/6fp1aTP2G/Vb6Xf175w+nH0+XYpeW/gYv3m/g6otvwAAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAB10RVh0U29mdHdhcmUAR1BMIEdob3N0c2NyaXB0IDkuMjcvl14hAAAgAElEQVR4nOy9vZLbOrr3++9T+wIacwU99AUc76Lz01NFxe9K2On0JFQ4nojK7JVJ0awJpcTeqRjM3rFYZb+5WGudCxDb5wZEv1eAE4AfAAiSIEV9sPv5BXaLAB6AEPkXPh4AAEEQBEEQBDEudwC/dhkmwh2orgjimtzh/7p2EQiCIGwhwSIIYjKQYBEEMRlIsAiCmAwkWARBTAYSLIIgJgMJFkEQk4EEiyCIyUCCRRDEZCDBIghiMpBgEQQxGUiwCIKYDCRYBEFMBhIsgiAmAwkWQRCTgQSLIIjJQIJFEMRkIMEiCGIykGARBDEZSLAIgpgMJFgEcdt8/wu7+8v3a5fiRqBTc6yhU3OIK/Djb98BAM+fHq5ajpvgjgTLHhIs4uL8/NdvP4u/SbJIsPpAgkVcmn99/il9evj496uV5DYgweoBCRZxWb7/7Yd25eHzX69RkJuBBKsHJFjEJfn+63fD1ff/frhwOW4JOvmZIG6Sn38zTwz+8edas+tNcUMtrBhZAiCRrzkMgAd41ymSArWwiEshj7XX+fzXh4uV5La4iS5hksVIsqQjluM4zHGuKVwkWMSF+PqPFrnCGx7KurZgxUmadCmVCnNdx3XPVJx2SLCIi2AevFJ5o5J1RcFK4zTup1USnuu6zpilsYEEi7gAhaNoF7/88+Gs5bhJriRYWRzH6alGHM/12RilsYUEizg7P3/9zTruG3QkvYZgpVEcj2XL9fzLdQ9JsIgz0z7WXuP+46ezFeU2ubhgpZvh/UAzzPf8cS02QYJFnJf//sePnine2lDWZQUr20Qjq5WA+cEl2lkkWMQ5+eMf3wekevj2MHI5rsvX/w0A9/80h15SsKIoOp9xJ/DPPgh/gmBlCQBWqWqaAnCcKjgG4LnSkFwMCO+ztBzsY92q3BHZkE+dJANQRSkL0mQjrY9GKpknGQDpbvPPchxhQsqkzDRL5KSNXKp+z8mP/+zTG6y4//Z+5JJclb99BYCHF3PoHQDwC3AMz64nwe7M93BKXTEArProAcA+/7Ar31S/ugUUuYXyPXrLQ2s2rZGN+dTxAMCrF6TJhpJnnnPNnnSN1eMIpZBKW2a6A4Cw9Z5Loxeo33Py3PRgd/F4tSKfA1ENDw2h6tN4Ng7BRabz3PVZ7+KUugoAYFt8OgKAk/+t+ML6Rymz+gsFsGVbNi2RG/KpI+KVr3ZZkCYbloJV2DjU4+SXJF0qE9gK1oXq95zc1+vRkmuV+Cw8A2gTrAusJYzn7zbZ+bMBkvmfFhfJqD8eIC06igBATBVkM2XKNJp13EC2WNjnKkXum8/cZK6nDZX87g0zxJvcXh9rGtep31EZ1iF8c5xdsOLZbHPuPEqy1bvblCyfQXojEyB/obKZeMsczxN95mTWZWrVxymkiNw7n7T+3g4oq0xeEoP/XV4v6QkzMteqX+IKnLOBd7j84j9m0YMYxEl1FQDVqAoD4HLOiw6Jv+e8HGsJy8yqLou4thexneZcGiM35lMn/8ZY3nkqC9JhYwdofUHVHnzxsRjZrqLui2+uslZmatslvFD9npOej7mEydq3z788PDw8PD5/fTGEZl+e3z88PDx+/MY559++ffv27VsRL/vt+eHh4eHx4795FfhNTf8iLmZlbh9Fbr/8ZsqNZ18+vs9tZlrQ758fHx4e3v/y2+/5hWcAwP03Y77nHsM6BMO/hRNwzjOWdVJdbQEgHx/Zl3+L0ZugiBQAhVKgyE16oYp3u/n2miI351OnEJg8dlmQDhudguWU9pgaNUR+rVKKMlNrwbpM/Z6TQY96eRsqX+SJw+cXLfTluRove/jK8wm5ryLwNyns+aUYWrtXhSY3Lwxnn+Xht8evemFePkrh90ppsl+qkAeR8Fm5NX0sq+F+x+EYXnTljIx7jhnD0+qKoXxJQyCfEwsA5S13gPztQZGb8kKJT35jJk2Rm/OpU7aJRR2WBemw0S5YbnHHO+SdtSoqA+AqLaQBgnWZ+j0nQ5/1+0+6pZpn1mcl+Dd1eP+zIljPqu2v/LP46zfZQp7i2Zzbw4uS3Wd9NqEqzYua9CGrFeCSgrW9+OpkmaB5Gmwop9VVAACiUC6KHgsDpAm5vJ3gFJkZXqgjWkvRFLk5nzoeADgoXnRbG+2CFSKfxAsBLJWoom20VUpeZmovWBep33My8EGvtZ+4YTHixyo0e9YDc0H5yjkv5KnkWyFOiu/ExyLQnNv9v6XsHuvhv+TNtexBvf7A+fUE6wqDVyps213IfpxWV1sg72wcgbzHsgOKVyuHAaJxgCI39YUSr39j+7Ehcks+dTwAWLOitEVBumy0C9a2KJcPQI0aCDOKJ1V59/aCdZH6PSeDnvLHbzU7n03xnsvgX0zBgBAs3V3zkXP+KP58kbJ4AJCLiXmpdtktzIxOre8zY0m/cN4tWGeaJVx9uPZcS/b0dFPzhT5DPn1VTbrrXuT69LwBtyuCKXL/fJwAgDLhOqCsEszJLcS13WMjAK4DH0B2gmfDNer32jx8+/aoX/v6uQx9fCx7Y1//lf/x63+3GSxiPTwKofkEID+o57+qWN9/AAB+AfDjo9HOxz/yP/7xhyn4j19FocSn+/einA/PbUUrOItgpbNbcC6I3p1xLVB/fOTvUgJA2s1LGehzigit9KrcInK/fEIHyFb61QFlzfFE1DTLNaFkkwHwcyk55VfuWvV7Ne4/vTzWLv74tQx8+fYte3nOr3/+AQD443P++fFLxnn27VlJjO8AgIdvL99+f/nygMdHALnqSU2pXLv+DuBvVVk4579/eRAff+bXv34tsvuWcZ79u8jut+8ode+vL79/y35/foCy88THz58/f/78ua6H5xCszdWbV4LsaX5Dj165NC5C4dWYAPr7exYG5MNCACvJaerEsroAYqFIqpEYAHzdk2oAV6zfq/D3l8+Gq7/+AAA8/P75AQAevuQD2z+FkP1DxLr/8u35Hrh//KKOe4vEz48AHp5fvvwTAO6fhYHvZSzx1+MD8D2/+NeXzw8A3j//nivMH0LUcvV8+Pbt8R64/+VLMUL/NwD/R/z5+R7A+y/f/vksFeThn58+ffr06VP9HMbxBeuWZGIzu53WffFGxnmT4iSyuGCEkhkJPJj93YeRC1YKrY+W5T1C9O8TanUwav3ePI8v5WSf7CL/4ysAZQuH4s+vP1EJTNWyUjd7+KkYfBb9wv8lPv1PEaloGaFqa30tynL/z1yxfgOAryLmfdVxffwmYv74rrdjH8ydyxqjC1by4ZY6YsmHy7nZd+GjbGTkW0u4gNH1u5tkllPrtZkYlM8SgKSHw8sqkjMgBWJ5IwhAHnDq3SfU62DM+r1xHr9VOvPrn6WAfBBKVqGHL+L//0IpMJ/e14PFBwDAV3Xg6fFRXC10TBi5/wX4+VWk+izFzndB/eN7lZ28l/ND3vH7teyr9zy1bGzBWn24sQdkfq21YTU8AEmKGGojo15fnf4gvRxGish983ED1JpYA8pa4AExkNSGsIBcsEQL6YTG+ZXq9zw8PjSH3X+pmizf/6wcZv/dkDgXnO9lcN7JU4MBAELIfv6nKiJiYvFn0cQSRn65B3Jh+yR7Wt3nLaX/KXuR6mB67kX6x0/8P7m5v/wXejCuYGW3Iw8lq35rdM+HzwDEaYKyx1Kfs4qB9lGXGLB/oYrIA/IBsGTyksJhNiqcYlsqJYVYP/ju7u7u7i7DCPOEF63fM/L40nTGxP2nciQd3//ylx9y2E8hIY9aChEX+Cki/6JalhwdiiGjr8pprX8VBr6KT/8jQv4K4H/XDFSx/yj1THOkEIX/+QP3eTF/PP+5h2SNKljZBdc52xPPbqTR5yPvZBWHZ7gAIB/HkWgb0dVIEwDM0setjNw/HyAfdy+/0GE2KjwAdcGq6dOp84SXrN/z8lGfwhM8/166jv/8h344dC4Rn+8UhCfDz59FsOYb9b+qP6vW1tc/V9s15y2y76IpJ6w9PKIYo3+UG1jAvTD/owiW7QOlmv6/qKYF+0jWmIKVvLudIW6Z5MNtlMsDEMk9FuYDgDQMtQDaB4yLHpS7yzHsRlWLPCAfALlrQ/FhoI2SvMOmyUXtB65Hn7BWByPW7y3w8KVqShU8fis8B/Dz1z/XvDb/T5u9n4WC/N9aPtLfX6oPv1VdtVxy/gWU41YfgUKR9KU3wsQP4P+r269y/wE8Vvsg/3j+zx+NBdc53UlXsL7a0sFO2L67+J0Ap9ZVUUHlsqEdAGmx7RJA7jyOIjfFE3sNoM0Ruylycz51JF/vXVF/FjbaPd13nHtivN2Xo5YbNVQo7vU9PN05v0D9nhO1GvIFd5KAAHj4VkWXQqSL9fqseCmCv3EVcVV4pytuDsUamtzb/b2UxUt1+Vkz97Eo1Wfxh7ZBw4t0g8rO7WK54rO408ZKGq+Ftbkdb4Ya2W24N+SbV1THKXoeUM4L5HvHmTaTFjP40XxeJWrGENk2Hw3lPKKBNkpcsZ27kiICyj0W8tU1hj5h5b8Qx63P2GXq95I8v1TCJDuKfv9LNcg06lFfDy+Suf8utpkXw1DSzF/bnIC+E2HLzoQfZX38+KtlGRs1vxdtfZMbYIQ2FnBqXeUNCmn7koN4t1gQhvlr5hzLzExb+ELa06BOY+TGfOrIq+mK/YwtbHS2sLbC1E6O6gByK40BonlUZlq28QpaWz9nr99zohZC2tIgV5C/Vy2VF2kc+/FFstG67iYrWkfS2mTOOc9/A8r1f3JHNF/znIlu38eyffSFc160sH7RbiQvXLnO8Hc1+Ju4Wmz/ILch/80vt6f7dXa+6sHpigWcXFcOoG1EtWfmYqLIrfZCte3W1By5KZ86yvLf3KCFjU7BOpamyqj64uSgKHKZaT/BOnv9nhOtGB9fypCXZ0WX5P2ntMXPv4ur/34xUQaru80UCiLtYyVJVm5fiNB90SO8F1cf5Q8lDwCA92XvUdsgq6aalWQ98IsJ1s3r1QiKBZxcVyEg7SfHOdffKLcoJIrctBfKaX1jWyI35FNHEawjKwvSYaNTsISauHLUAJB6hHkjzOXDBevc9XtO9Dt9kF70TBoHknfY+6LZyFtCv3EzebB2zM6zMKboSilZefMpF7Vv6rDVY3FVSVomNO1MUzbAXqRLpWR9u5RgTUCvTlcs4OS62gPS4S4CaZ9DFpaNAxS5yS+UF3T8/LdFNudTR91gZV0WpMNGt2AFgBjeLqPWNrkpLpSZ9hSsc9fvOak/sA9f67GkQwjvP+n7DRcSor3uL+9flGBVYYphJC2zfDy8MCWyfXxRDOTm1FH3Z3HxCy/aWoo2FSqmFjHLz6/+rdwiuX7nnPPRBGsSetUybGMHcKa9w47b0PM8Lxx9B68z5HOpso7JNMpsemJ/eVHjyNszPNflqhw2+qgkeiinF/Pg93LSYg2fro7lUBTnXNu7qlCbojTfpGR5txMvVSKlifVoKGE5jvaxTKPdeIFcpOFMRK8A9yTFAl7ZEXDELWF+ZOUNRTNpfbA0eCWrT97pk4epRAvqsxIstYk+Fxa/cs55eRRF2VIqDMuF+pJffMw/S5siF+21Z86r/QCl0hTZvXDOeXUPvIz4pZakVknmIHuW3UpxKwTdd9MMQIJFnI2GR/ahfHWlsXbZIevfSu/qcx7jMZ+bK0foPyvBhQFpvvEr55w/lIdE5MrzvjD8KJXpRb92/5uWWx7luShNnqJcA/nMOeffqk5vXq7fqhba5yITrZLugBPO6wCAzXh7kJyf5QneF3c4ua4Iook75dPjjx/Fnw+f/wrge+V4df+pamp9//W78lD+LD3GH365B77/UXhBfXmuB//843uV8utfga9/A/D+8b7aiOa58EX9/peqbPkQPKSVQfeP74Ef/13k9umzKM2fiwuP7+XsxKY2f/uqB/z+HmBFkvt74KHIKucOOLXVsMWkOGESCKAWFnE21Of084vU/3v/25fH6pM01i4m8xQzv5uPvP/UHgzRwnqoXf1WGq4SfikuPdaiFwUuYnwzh3/jvL6BfD429rl2Ra+kk6pZ93O5dZpO47MAIMEizob6nH5WHTgrDA5Zqh2jJH0qgxtX73w1yYtpsKsSkccGU9KYljG7L5xz/biJ8rpyls7ognWcmF6ZZ97tAEiwiLOhnRbIOee/P+hPr+woWjpkaYZeaqnuv0jButH73JP+q+FEHfmIwXLYvRKxRxFJ38f4UZ4GqB1bWIyf1RdZfaqXf3TBmuCG2YNPsgdIsIiz8ag8pebFz1+q6JVD1qNuSZ5NBLTVO3rL7fGlOkj15ZOSXbX4WSng79qVR7WU9//kLdlJS4y0IzSqdFKKsQVrMg4NMkP9RwESLOJsqA2jcm6w0hDZUVR62e9fDLaqs+ofPn6rBz8XRh//zfnL4+Pj46Nou2Vfyt2t7vUzD/OFipI+PhYXqt0GH/9Zdw97+ViVRnF2bQ748svjw8PDw4MuxifOEq7Otr+oh9P2cmvDNWxqYgPNEhLn5MevX6sPnz/pl/9euTX8/LXaCetRbYSV/PzjB4D79+ZQ/PjxA7h/NI13/fHjJ4D3tSNQ//wDQDHdCKCYJRSThn/8+Am8f2gY089LU8/v5x8/f7YUU+fuJMFKPgxNacZ1HOaqhxRkCdI0zcbVrnCY5xgJFnFevuaHdAHA57+XL/ePX7/i8dNj8fHnv34rd2x5kKcPz8s/hEg+SJN7smBdhpMEKxvxvAnXc9y28bAkTZLxVOswaNNuEizi3EiSJdyvBD+kbTv/W9q7+JM2WnVGcr2SG1hTE6ynkc7zcjzPs5psjJJoHIn0BzmPkWARZ+fH12obO1Pz6fuv38u/P31sdKoamx9/y7N9lv0UriFYGDyQvB6lBE7Yawz8sBxlXnKQ+yhAg+7E2ZFn1eSVhHqYNvd3VkoPCtnPQRp0vxgnDLqnH0bYEdn3+2/4n0Sbk3N2Dt1xalALi7gIP6Szuz7+/aH8Wx68ksa0zo7UqvtdGYq/Rgtr8J7up+/gzsLDdsABJe7ysD714Lj0Fo8jIwgAwIO0kbt0ds2/qjNT5aNUz82Pv1VLBr/Upg4vzlDBWp06BM7Cw3Kg7rDgsD6xZ7i63QMzCOK5cuEszuz7/p8fS7n6ZF61cx5+fC3+ujeflHhZBnYJT+0QsiA8cVHPZnXSAPwA1wbqEhKXQ/bK+uWvP//re/np+Z8XG2sHUO3J8P7fD8aQScwSzk5rYAV9zodqYnHKWBY79BZMEizikvz4h+kQnEsOXgnExjL3f/9cC5nOGNbmJL1ydicPQgHAcn/CEb3ZqjsOQVyRh3/Xndgfvl1u8Krg8RHA4++fL52vmUGClZ20JCfcj3RSpbPdDu9XjuRE1otEOwc0SdrDWyzVDoaNG3vIqWa1OSZxW8jHqALqUaoX5BMev9U3Xbge/b0hTjk0lY16jtJh+OB77wNShtVVyc4HAKc8uOUQMAD+oSE89Ep0S3pKztcuAKdhHwpfdjtrjUncHPJBzIZTci7D7w3Xf3t+fn5+bth+/Sxg0Es4cPEwAMA77eSaOoPF0+mb06C6qpfTEZ6yxc6HbGsOl0qqWdJTVptmGA/ZOMh+sq0xiVukmBG8pKPozWJ6H7o5oUd30ikQZtZDu4V9m3qD6qpgC7DwcNx6+WljRwaE+/2SgR2M4YBrbmHpKTkPAH932Hnm6vWlO22PSdwmvz/W93p5owwSrNrhlvac5ZzKobs0931nTxIspzjHNRBnHYf5kce7vBx6+K5RUPWU1R+eeiop55zvlq4kzW0xCeL2GSRYg2f42JnO1d0PHMjq2S06RbB25U6nRwaPc+4UXVIP7GgIXzfmpaXk3C82qt8p574XRZYEqyUmQUyAIbOEm6GTTGx3pg1K3d0wxbrg+pxE7EkIgLmIgSRFXhk+srgejhQN7UY9JbIIgYjr7Xatjh72MQniRukvWEMdmNhAWTmf6Qt6NmSAUsSk/OwBST0cGRpuSU+JuNQ6eJ7W+uVcnpVoi0kQk+A/+iYY2sA6o14BbDerOSZ1k6QXe2sDr2wxJfCAtJQdB0jr4UjhZJs0dR1fa2npKSUF68I+JkHcKL1bWEMbWNuzvits0Fzh5ZpYjle0bVZZLlhFgV1k9XAkSN4tNvFq/k4rpJ4SAFj8dHd398Hiq7GPSRC3SF/BGtrAWo/k3d6EO2QT0StsMrNZwA0ByfecmcKRIcncwHeQPamlrKVMgM0sApAsOlak28ckiBulr2AN/G0Oz34gmDfgZIn00otU0tkcrGWr1jI8Bthuv94elsC8s5RzBNvd2kMyGy8mQdwiPcewBjaw/GHn1PQijPuvyI5OWWTUm2y1Atxt48CZFO6E8F0ACLHAZgkkoknkmnu+Ow9A8BQlm6BHTIKYIn38IIZ17JyLLATpv2EM/D72+9aVztYBWO7+5FWmPHj1cAkGh5cVv6un9CoXLsCTYuaE5d96TIKYGH27hAMaMQBwwqYKPXD6N5eiCw7lzJ9ShIe8jNIMRGIKl3CRqh9rKZH7VDGv8/BZ+5gEcYv0E6xh02rhhSbTB+wKeLnXdraBd1hKyl3IUO5xVQsvEJVXNZL0lG4lYo4es2ZJiUkQk6OXYA07u2HIcPgw+p88NsB7axiLGMGukgmvzDoWs31auIRWxFpKR1awVuxjEsSN0kuwBulV26zYyHi9h9guJVjpCr5cD27ZuBOLcvTwD3cfyqRQ7kpPCa9qJybtjqH2MQniRuklWIN6hMEFux+9R7Eu1SWMAKWdyfxi/GwD162He0jyoq1S+G0p4bjFGUAbTdt07GMSxI3Sx61h0EHxzsU6hAA8t2+TKb7MixvLzVMnAIIom28BzMVaZj08WOFp6wFYreCoDghaSiB8SudrBsQLsHbFto9JEDeL9ZzioAX+o+6I3Env7mePXVZ61ZWG0sr0OOc8BJwwdMvtsLTwNQA38B0U+2RVqCk55wHAvMAFsOV1QnUDv5aYBHHj9BKs4xC96uXpNAJ9+589dvE7RbCUPIULVCgXoB5euIJ4ul5pKaULjvHHQRas9pgEceP0Okh1NeSsnMOFJ9AXPdcOufYb1I99LmG6SeH4zYPfUZIwc3gtZRqlqevatIDtYxLEzdHrINUPA6bUgstNEQrSdz0T2EsQHaRKENelz0Gq6RAXgIsP7Tp9Gw/k8U0Q08F+lnCIT8MlXRpyvJ7lJBfKQdw1hlTjDHfyBzmZHkUxaWjElpnxejtX+VyVyjDaUeZt+Hwn/2VOpRdPz1gvt8EQ1z4YinsHNaStNkxV3ZhKr0RDqubMBn9hCoaHgatVb9GBsW9hDRGsK8ydBz3XLV7M150giJOxFqwhPcIrNLCAnn1CamERxHSw7hIOaWBdZTLK7+feepGNJAiCGAVrwRrQwHKvsvyj/4JCgiAmgm2XMBvQwqI9LQmCGBVbwRow+8/IPZEgiFGx7RIO6BHqJ+oRhECf9VZcB9pcme/kv5S5dpHe4FpQUc7gGzyADZ4Meirlg0VeekGb89MTy3m1Ona3pbKpRC1Vc2ZKvbV5q5wf2xbWgB4hNbAIghgXS8EacCCWQ4PfBEGMi6VgDRjCogYWQRAjYylYQ4aw+ichCIJo42wtLEabhhMEMTJ2s4QDhrCogUU0oU+bVQuQIf2lTzqZF+02r8I2GIY8u1VNqMmRoc1+3RlToT4Tx+WyK/Gh3bF+e2UpzYuhG9YYm9dLt1aHdgcVvarekOqC2LWwBvQIacidIIixIcEiCGIynEuwXPIaJQhibOwEq/+YOzWwCIIYHSvBoh7hOMRaRSb655h25yKINqxmCQccoEpODTrRJgbgh0XNpKsoA/xlsclhvIkAOH7IACwUKVu69QsE8UbpPg2s/07H7vmPKLs4dnXVRLnXzlp83ueDfCw/0rSsY2fPOVcbqDvDhSvT+jjlFaV8qCfjcmAZVw3XUvF6ZJNVORY3f3FyWQ2pdHvmm6zdsaFsWnYNlaibaKuO1s/mXPQitCYxVz2MX1hz1Rsw2Obyt2Pxelm2sPp3CalHqLHYwA29bLPJ5q4LIJtlCH3Eq2zuOgCiFVgQsHgTp097JjdQ0xQO6hcI4o3SKWu9j1PudQL8ZLCrKzMHwD1yzvmelSfVLznnfFeeVZ8fSR9olXd0tMqsXbgKrY8TqIVlvIPmStRNtFVH62dzLnoRWpOYqx7GL+zyLSzDDTZE68X1+yzjY1dXZqrz4tfAgXPuwBGfPbAj5zsgFJ+PuaJVKZWPhgtXofmr5yRYJFhGDLZ5b8GymSWkScKTScrddnwgApK02EDaRxYDSVllzFWcSOIVUw/Prl0giDeEjWD1nySkSSyNatiJAQmQlHXkAQmQNdRZNkfotF4giLeEzaB7/xYWvVIait9/BqSlQDlACgReGSWRm6er1FWnaGsXXgPKul1e/yz/0XDys3l3X/OWylWSrlRa2tbTlQ15VR8a4XLK5o2U2zZL5lpGzQcy68Wz3tmYa7dXpSqzHDBuNAj7o+r7QIKlwRBnQpGSQrAKgXKTDHDKGltlkmClKywVO7ULBPGmOM8YFgmWhgesxF+rQrMK1EWXmwWkJtRcP2WxdoEg3hQ2gtV/vQgJlkbAsFoByJ5aT/NIZ3NIY+pxDLX/V7tAEG+L87SwaNBdg22BxZ9mH/4UMbdRzrPFuxjuvqq8ld6eql0giLeF7TFf/aC9ZXS8vYMsTuAdWJNgRR9WYMt9FRrH2uHZtQsE8cawGHTvv7cMNbDquIckAnxXOIm4VaUW7df5BghDWeojOOpG07ULr5Ryxqlhc+OuvXnLmPrslnnyzrBLsvKhmoTU5/MM05PyTJ2S152c0nyH+gwmtEDDfeqJeT2cy1FaDckTtF2zfg2VdnbOMktIDSwTrtDxNNfzNG9KZeLzLIa3Vl2uNtrG+LULBPHWsOgSDjhDdUBB3goR4BTuogAQC31fxAh2jh4zaL9AEG+NswgWtbB04tmsEigfcMuetliUkyWgCHkAACAASURBVK7g6ytuYsk7y3yBIN4a5xl0JzScON4AANINAgYwH5HwFtnAdYEINYfQLNJ7hPoFgnhznGUMi9oBOo4Xb9wASJ8gPKmCKJtvAczFKugY2FSRA4hL6uRF7QJBvDksBOuqju5x/znKfjiXGRZazrL5xktiQIyse+EqeucjThAEANLSEx6AVwiW6nNVu0AQb5GuPWj6vyUj7oZ1dsdu+82lgOH7YXGe+1cVOyKXdxaUtrUiucWOWQW1C9ekuUJ5935YvL77kyFWzZ6Wv+GD+aqSsWJe+axHLPM2l81UHcbsmjecqjJSrOqfNRNVpeiVZL7UWkkdJRz+hRnQM6riFp/1ctU41+JnooZ72KSJK7XnlsEmheOLXp7hK953XiCINwf5YV0Mve/p0L4LBNETi1lCWkpIEMRtYNHCosM9iYlgXlqjf9D7341La8R/vDlyH5OGz5dd1PI6oDEs4hUhra5rVoOOSIYNRxuNGU01LnUkgTodEizi4lRLg+XluNWKW15ft6uv84WWZLRNes1qczeKdUODTdc8ZcfnamPklkTFqmw5lRRiTHXXmMq8PlpfQV5dEp8vqMTk6U68Trq2dDAnakzVHDJaFoQFJFjEK8Lmp765R9iuJSRZtwAJFkEIOnVkNKEhyRoMCRbxmpDaTN2ioDawLERkPJ0hxRoICRbxtmiSCisJGVGxSLIGQbOExGVRtvK9qwXYJJTntUYbWLKMdoYJMXmmrtqIuatAyvyedXUMS4UyVpm++rb03abPO2VIgkW8Kri9gslv1p1tUD/FanPOOof2vX5IsIjXilERmvysZHTfdvUsjGE6w+vZkGINgMawCEKlvlPLaJZ7D/MTGmcRrHNvukcQjVirS9OEosGAcukkmaFG1YlYCBbtvUBME4O09PV1aLs4iPG0721iIVi0uxXxutFX5hloGaDvCbWxToIG3YkrUq7wRbmI9k4KU9Cn45vW+VrOE9rtE3MG5PLdmdYg85ZKkJI2OXoMTtVcJa1HSutf4HmhMSzi9VKTruGNoxFfRWpjnQB1CYnXhpUg9FrDozHi0BONYvXEoktIpwyORRqnCRzm69MYSeZWvwqJPsuRpq7ymxEzLUKsHghdMxDTgdG2tGhdD4/UzlxIpk6h62id/idt2R+d1cmrOeaL80N5CoW3VwJ21cFoh4AB8A9ysC8fmxY6AOCWh4XxtQvACXmTAS18LJorlHcc82W4VCY0fdYuKVnAEFktXGOpbaJ3JzYm7bYnx1ArTbrLJgOtVd2cbXeqhsz4CV+YgsFQdcfc8pivji+J8yGa4XZmbM3rEaw9A+B6ngOAyYp1dErB2udNqer0Qs4P0jmPx7LtFORXChF0j2YDWvhoNFcov75g9byOpuiNt9yetNueHEOtNOkumwy0VnVztt2pXotg7czZt9GZsTWvRrAOrGj4HHyASfrho5CkIwPC/X7JwA5ycClYIeBtj4e1A6w555wHgL877LxcwWoGtPDxaP3u0SZY+lUtbRWlOTPddi2JarHjOppiN99ye9pug3KM2n3petySWK40LVVXsl6puPELU2K1FtFgRcm4+NxQXZrhrkgDBGu8n/NXI1heoTHipqo+2hYoJCkElpxzviv1Zbd0IXUYi+IemTgFuozoAQeDAT18PJorlN+UYDUZsojcds+taS0MtlUdCVYzrZVacDBn38Z4Z9W/FsHaAX71yQEr/jwwuEWFOcVh9F7eBNOqcw3sy2o5cM79oqm2E0qlG9DDx6O5QvkNCFZn36/BuvU9t6a1MNhWdSRYzVi5NQyYYkr7J3nlbADpoGcfWeGrNs98L/8zSYvToaVwmVReJ5UCWYRADFp5u51fN6CH3wSc87u7O/2pFp/v7op97e7qG9xVz7tIL6LcGWJOjPLGxH1VN2ad6u7MqfSqrmTp7k75As7/bdg4jvZ3xCLB0sgi+JLwB7tdrjyLmK2Lq0mpR15+3jbnShvT8TzpAxADxQXPc+oG9PC3yNTVjFCxWZrj9vZc73+6/SsnUdeQl45RyQrr8vegakA5Zs0PSseIGI5Ts1ozoIe/HYyeTl1rUIgJcJ4WFgmWRmyWjuwJYdVVS6uqdpG1WXtKig4mi5/u7u4+rJoMKOEEMXVsWlj9OxNZRut5bFiljtTjkzSqpfoWKwBs7QNIgM0cAJIk2rG6AT38DVE1sQz7elIDa7rYtLAGjH7Q8mcbohW2w3SEFdo0R7DdrT0kM3PErvA3BI1mvQbO08JCcitzUrdMNkfYf4wp8JBs0nmSj9XvPADBU5RsAmP0rnCCmBI2LawBA7c0iGXBU+Yuu2PpOJ4XHnxsNgCAUEwDroHIGLsr/PLIngt3kKbIueyFhPpcezkPf2fwjKg5/7R5ip14B6cj3RiXbqy6vSq40eVNTqVXR7MvVFuqlsw0Vy1DiPBvaM54LGxaWIy1jQAbIcFScYFEcknADO4yjuEsACABohiBI83GdtXfOkIcAEDekmVeHCvTuYUBJfxtkg9i2fQIW8+xUVWGuA5WO47292vIkjc6n96Ap2pQHIt+dtnq2QCeAyDNu9+ZsVkbl/4QzE0ywI3LaEW3XTFgCCdq0GYvU8Jqx9EB4vNmf8/NMA+R5FkVAy6Yl+MArucxSdVi8zzhbLYpDQKKu1YGoGZAD39TNLaCqHk0ZawEa8ioe/8krxofmJcfsg3gw93l+MByt3PhljqfVC7qMk71OxCDAV71w5DARc2AHv5GuSv/uRFuqSxTg1pYlyFwEZeKtciKNX4KzEckWkIbuKY695DkPwQrwAUcF6s8QQqvbkAPf1sMaUm1SMl5hrCoudefziXSgwb+t91Wz4j9ljiX2l5mzwBvxznnBw/yflech8V+DMWWDoG0FU0VyvkOcPecc75lYhuGLeAfOee7/LNuQA8fj9bHCR27NQDqMv0yoPrQmpluW0lszsy0x4DJvtUdD7nYcDt6bP32DDYMtXHu3Rr0JFWY/KG5iPLtcS1JZWWs7WU45wN+nUfflLcXtydYYjNQZthxVJKkEHDC0FW22wvVDfzgBb6D4gchAJgXuOVn3YAePhrNFcpvT7CUmfiOm7G5YePVjouNpmr3RYLVTHOlqgzYlcqxMHs+7At8lT3d1c30JEnKyx2YQ6v7cvbqBafJgB4+Fs0Vym9GsOTc5LStN2Nxw11XO6zV76ReKXJQW/oivJ7qtQqWfkSimc28O47O/pqjvAvr1b6edWMsP+PyBNI4TeAyv2USI92kcGrH6lRkUZowx5VWTEdp6sqfNQN6+Eg0D/ZUD5VyaKeWjGv1qR/NqVS0nhnXbCuJTel4xxmj3Uc/N8QwDmy1j3YpN8NrTqRQb89gw1AbtbNYu5MNSFUlqcLkD8YaUNPrsZTH4K779bqzFKz0XXccnXCAF/dozKwH/S8pWK+I1ytYxhhNEfoLVs0SCVYvwbI7+XnIwXZXXQry9tyOiDqaHCqXzBHVyOZLJ/1okUfDiVgeVT9g1D29pisWuYHdLMrYjCG82o5X2363GgLpv0VyL52oRR5Nr7SiVhUh/u27RbLgTo6fmyit6IZOSaXsqlzekf41nRlLwRqysmPTHeVckF4RvVBVSH8lx8jB8FbT+MIALAVryKBtdL1+GQkWARgkoVEjamM3TU2HfirTaKa3JUJg28Ia0MTKrjeKRYdgED2xlI/xVIb0ahCWgjVoYcf1BIsWBhEAeqmCVVTSq2tzTsGKr9Uzy6hLSJhoVQkLCSG9ujrnFKyrDbtTA4sYQJeItPn398yJ9GootoLFhijW5kpjSSRYN4xhCq7cK1l3Y6g8H7i2hKSaiG9cCSLSNX4wRT61BWaHIRv99uTlKJUDQmPVVUl0k/ouyI2p7pQvwZhK8Si5yH7IBmwFa1JNrFvZvpyYGs1v4GjvJrWuTsJasAatRttcxbPhiv4UxNQx6slYTYmrtEleF9aC5QxZy5xd5cRh6hESJepaf9sUzR8brZuzVBl2C4SEtWBNp4l1Rf8v4upUAz2GY8IMq0rMqSSNaUmlHlmm+YgaPusmLrqm5ZVwZsHKFkNSnQb1CAnitWK3vQwA4MMg76bLb4v1rtfcJG0vM4hTt5epRZaj6Dur6HvD3ElpFVtVXK7FUgK17A3p9YwMxVe2wtE3Z6kSGpJAqxp9yxZDfENeerjBCpcDtJ19Gu5Qt9X1HWopq91xDFxwexkAA5tYuHgT61q+FARBnJ0eghV0RzEQX3pE6Srj/ARBXIIegsUGNrEuO6REDSyCeL30EKyBfcL0ok2ea4zyEwRxIf6jR1zfGdR6WXkXPMNzdctThGmcJnBYyxkTZyI27w/UcJkgbplmPzedAad9AYAz7hmebdifR1hwlWO+9t2xR6XhmMgTTo9srlBudcxXLbIcpYyop1I+6+aUuHqstuwN6fWMDMU3FNd0apkhiV419YS1+Ia8zPWmV4KSi3zTDXeo29LjdxSxVqn12jbdTvFZL0eNfl3CgcPuF+wUZgOOI7sUyYcN4HqeA8Qz2v+mhMu7s8tbjEP256w+G3wt9RdJ/nAn75OuhUG+qrzRekZ31XLfIq9qtbBuz+CO2vgS38mriVHXBcUjlWtSpPimGqRELotyb5Cr0lwjyiX921DLry5gP7PnTy/BcgYeb7e61Ezh4nZH3NNZBv+w3+0OBx/Z7LI9V3HeNEFMnl6CNbSJhfllWhSbK5570cU8w3rrAICzDS+9yHK3G/rNEcRN0U+whv5QZ/NLtCiSG54hjGP4pWgsnWseKUQQ06XPLCGAcOAgUbJYD0vYg+zphmcIN4B0Era/ymIPALIozsA8nwEAYrgsjlI4vgds4gxu4LRdB4A4SsHcoDKQbFI/AJBtkgyumKEtpwPTKMkA9/LzlAQxFp1D8zKDx0IGz0fZchz2El5mlvAI+NLHw2535JzzndAZsF2ewy6fiF0fc1eQddt1zouPbF0Y2OZ1vc1N+0deTQeW07xhHv0GZgnliLoVxZ45I/1bUaxWwW2G9BK2lkWxbbivRvvNuZR/6TVsKIj5Dhsm6xTDjcUz58r19G1TgIbb61UJxWfehelm2xneUFr3yqc/A0dpLiNYO2BZv7pngBuGHoC9yMGHt1wHAFx4y7UPsLbr/OgCbhj6KJVtzQBvLfw7gjB0xA3myrQEWBCGASujX02wqr/1KFx9S7gWDjkQekztXTWYVApqzqu5OHpBjCVsNmkqq7lghiJ03aEhblup9FzV8miCNeALM2AokXY7hrup3VvPl/DIzIWx4LyKNXRU+TKCFQK7+lUnr5Q14OQ5BHls8YcvkjVd50Gug3sGJlpSjC1z02yfx9iWyuSAHTjn/MDEbZNgkWDJtaF9jZyf8IUZMJRIux3D3dTure9LONB5FMhbEWdi8CzYFQVrWwpGCGw550XD6ZALGN8VgmW+fsj1q2zBQdjhfF38PhwZglKZyvwCEiwSrGkKVr9ZQgDh8CbWGd0l51OcdYuBXP7DYl9n4ejm1NZtmq9HpQHPyQ3krnIxHCHhLPCqL2y3O+HnhiBugN6CxYZ79GSzczmQTlKvkMItBt1dCJfXpl8D8/WkWgvoQvwa5IPwMYopiOWump30cvGKaBNpYqL0dGsAsIwGu5NnT+uzODBOU68QVzrEMKT1mSGb5X+myHJDeYh5OjeJsyS93eUABNFBf8Ea7IsFAPPBzvLNZE+3f0yOCyTynhUzuEtxOQ+Ph/mQZb1uPZ2L6N71DxZS9u3lWoi4pO/zK/6uUlUJZSsc0ka8ym7C5i2TzeMtSt6VLW7cM1hJImfH5Q/m4jYn0QvStZm5YVtiw03q9ajUkzkXvfiG7ESUHtutD2eAYAWbE8ai5snYHqTJhdb9nIQHpQkVx3AAlpXXksbOYDvusjtOSfYhg+e5joPF1QWLIAYxQLCwnHXHaWSTbocP2xuILrLq51SYF0dp1UuLAVdpVmUY4vbKWg7kLkynaRlnk+E8XXKCuBS9B90BeAM3bRDE70ZsEWWLW16PI+EDVU862wA+4CLJh5PSZJBguUiKu5/PlIWUVadvNSvzjeHmenV6nbXNPEuT1dWHejLogXKUKq6cqopiTqKEN5RKnsFvzJ7rJuuOGq3VYbjv5ju0KI5F8ZvK3eJPYTBkTmx3u4oVA+ZKkW9Hv3sDQwQLy5PaSNmH0RYpJ7OpHDkRuIhL5VhkCETrKJ8t2LQ0lVrwyyM34k3sqCGpMJ1FBst01CwxVQYJlnNix2I17IjDGouR7FyCNcNmFgNAOtuAhQA8F6sVAKxWGLSNtBNgtQCA+ElzN/HzcarsKatct1wkMQAks2yENhZBXIEhY1gnuTYAAJJZ0Ge02Ey8mI5cAe5ulsUxc5GmANs5ALCeZYuNhzgFG1YdyyRZRR6LE2CrBLD1LJu5XhZlCEopDFaYBQxpBDdJFqf+6hDEdTB3ONvpv3e6jmNYW9eHw0kDaRVX2dP9kF8qjsV293kOIVf+KJfmmK9XuzU4O9UA5/u8iyivyVmzPPJe3PgF9tAgiBEZ7juxOH3wyFsO35UpW401eHXJo+rTOE3gMl8aboqShDnuCeKbRGnmGg1ESeI4vjK0lW3S1HV9IIrgUQuLmBp3gwUr+zCCv3QQDtteK1ttRhuDuaRgEQRxCnfDBt0BsDH8PzfvZgM8GJP5n2769EGCIM7FUMGCN8rC/3j2oV9jKdvMPkxz5SBBECczfP3PKJ1CAEBg7YkaxdHYbSvqEhLEVBg+hgUg+TBaOZjXfXJeGscDVwi3QoJFEFPhJMHKnRbHwvEct8l7MkmS+EybopBgEcRUOE2w8DT6Eg+XucwFK/wd0hRJlmTndBAlwSKIqXCiYI03jHU9SLAIYioMd2sAALBxd4ohCIJo5STB6rd/HEEQxGmcJlgI6BgWgiAuxomCheUtr0g7fYk2QRC3xKmChRNWMJ+b0LvdshEEMYCTBYvtblUV3OWgfYcJgrhZThYssPVtThWydfO5pARBTJLTBQvu7iZ1YekO2yidIIibZQTBuk3FCgKAuoQE8boYQ7BuUbGEhxgbtkEgQRC3ySiCdXuKVfjgk2ARxGtiHMG6OcXa5kpFfUKCeE0MO+arjrub3dC2xetitP3GBCtNXRthj1lDubM4SSAdWqHvY1FNMjSF6BaAJINUqCSDV0/uGFqqSWZ1L8QlqJ0crj9CtQjao6iH1+J3Reg8u1x/Xhof8k5GOoFnfzuPb1AW6tAZ93LHfHHOfZSHm4VeiRpn6wGAv6+nPoZFFbP8eC7dlb+Kaw6pW+DcU+rAE1G15IbTwMqTxohrcwgYAP9QXtAfoVoErjyKtfBa/K4IymfpyfY8TxRi5wOAEx7zBOL0GXfbmKAB7Sk/jcOtNGcCqVCdkS8pWAfpJZeKoMQplzqt9dR7B2JvVgBwD5z3FiyDBc49JS9bwTo6JFg3QtFSYNv8gv4I1SJw9VHUw2vxuyKon1Vfoh3nnJcrjp0955wfS6UIGhI0UX9fTuF4G4rlymXq9MS6pGD51ddxBFxTCysE3O3xEDJA+6nZM8ATydcOwI5qMPcBvzFbv9mCB9lYJVjtcuSDBOs2ODIg3O+XDCxv4WiPUC0C5+qjqIXX4ndF0D5LDSYHOHDOtwALD8etBzhHUUJvezysHaGp9QSN4PSXUOEWVkK7ypvcuZvExQRrt3RRPSUNinAoyr9nWsmOjtx0DGoFX+YPQ50ipMGCByZJnaVgbQESrNsgBJacc77Lv93aI6RH0B9FPbwWvytCPYOcoyMCHDDx6xsAS84PxaN3ZHCMCRrBiS9hjevvj6XqFe88PvFSgpVnVzwla7OtsIyx1n5rQvVp8LQ+4w61Jpke0mDBgyf93NoJ1oHBJcG6DZzipfdEQ7n2COkR9EdRD6/F74pQS1AQirdrV44pHBk8ztfloxrWHvKO13E0t4aC8NruDbp/xa06YqXmdY4JnLwT6wPyjvnZBkz+NVgD8vGM2ROwNvbIy5AWC0uGea853nnm06qn2yBJkfdrfGQx6o9QLUKHgbrBjgiNGcQrcdxyUk5SMxcxkMqz96khQRsjCxa8/VUHsmr+YDfzXuU/KAWZeRY4LRWWAbJrQZwhkG/N8ZFI3/UsE2uR6pQhLRacEOnK8j4AYBGPcvA3MQJJ+fZ74onRH6FaBO1R1MNr8bsi1DMQZHOIycBMcy9yPOmtdAwJ2hhbsODsr7gJqcF/9TYmAmqkcLLVfLbQzr1Wii8HJYB62qwnt8AWSdNu1VVIm4XQw8rw49tAssKN7tDxBqmaK45oruiPUC1Ch4Fa/K4ITRmsUldIQbArX8sEHhDsiknoWPHwKxO0MZbjqMTS7de/GA+Tv717zjPChpMgeZcBMRZrWUYY4ozlEXTBUqXXlcI3q6bzQKSQVgvrd1js9RJWKO3U7Amh7VHdxLlJK4lykwz1R6gWocNALX5XhIYM0hXy39BKlFaZ/CjFmwTSz2yVoI3RW1gA/MN1OmKByXf1RpsCGZLMDXwH2ZM8FuUBed9spUpGbTTOrcKTBbA2tqXVkGYLcEIk2rG4i1mFErBKHdrJ/2aQJEg86vojVIvQYaAWvytCQwZzeLoMbBYo21CLu7tZxLZ+awID5xAssN3yCjoRGsdVbmYQSyEG2G6/3h6WwFxqRgcMqxWATD+jNm6ePsjmWUOTRwlpsQBg6WJld8hktAKd7nbDND5ClyWOof2spbM5tLFPlrUlMHKGLiEAhP7cfkxkFFjDcRi3OYblhPBdAAixwKZqCbPtDIuVmyVgTiILjBc3ysk8gWduSyshLRYAYDnDXPFvb9isP5sjvM06JQC0PEKXZaW1l7LVCnC3ZYECD8kmnSfrpgQNnKWFBcDZXXZc1tk1OK3e5pZYzrLQg5Ap7gve3kEWJ/AOTGsRaXJTDnWuIjhbYyZ6SJMFkXGIWJkpdCv/Y/lBesroMMrbpvkRuiBxDOWFjD6swJb7qjyO54UHH5tNQ4ImziVYQHC44EiH3+xNcZOCJeGqQuIe9mEY7ncs1WJBbbLG+YhBvEBDF00LabSQEzpYdU+WxDGcxWKxWCRAtFjY9SKJ8yE998WIpPoIGSK0GqjF74pgzCCCI49SzJ9ShHVBWFfPpJagkTN1CQGALf3FZfqFLGzRRvfCfdO+1MrniicgVXqzLhArLeZYeClkT02dNz2kyUIBWz5lc3NTTaVsEG4A79Z/Dt4Caf4lVL592iNUj9BuoBa/K0ItQbZRnq1ZDK+a/KmcGVg5raglaOZ8LSwA7m57iQfa27W15W59wKXB7SJS24Y+g+KylUZwHQi/UPPd6yFNFqoIPqLOcVomLVN1PY9G369N5awZ69OA4hFqiWA0UIvfFcGUQQS5g7eIEeyqZ202KyfGy/KoCdppX71zKub59hFh7cslu7bEuuRuDdUyL7faU8KRi7Ar9wMKAH0Vt7wZgwtsxVXXvOS5HmK2wL0y/yOD41ru1iDdC3FNjuUK0aVYoqc/QrUInHP569PDa/G7Ipgy8OVVzQdtHxGnevjLEF9bBt3ABQTr3JLlt25HUd7kjQlW9ddSWcV8KL78g2Hle3Xl6IuCr1Gsg9cxhBgtyIKVL13nnARrQvjFiuNcB2qPkB6Bc658fXp4LX5XhHoGR2ULtaW2xDkodW2Z7/OgJWjmrGNYBUGwsXTx6Y+77J4K9W5wECtY4WnrAVit4AQAFiuES8Dx4o0bAOkTNK8Utp1lm0R4VW1WKdwtkC4AV+7GlfN3phCTBZUwlqoqkquNJgZvliASQ4/zfA1y7RHSI3QZqMXvilDPIFZGYmJ5ob4TwN9gvnYBRCuwwJCgAxtlO5XdWfw3ndqunCbaJyuv08LiawBu4DtFQyjMf2L2DHBDdRfQHDEnXOwXeuT1bUWr4plD6ha40sLiBwbjjqOG+6YW1q0QAk4YumXzufYI6RHya7smA7X4XRFqCdTxDKWH5Yn48ALfQT4qUR8AaaLhYTwHh3DsAVo7ueraEutKgsULh4N8wKEQrFxUlO1sC2o7svcVrIY93aUqCEGCNTnyX+RSjmqPkB6Ba1+fHl6L3xVB/+wqI1L1961oQzh7Y4JmgDuge9/zkdjEIy4WcBu2U6mjL5LT7Fj3du4wbl1FScIcv94S3qSJ6zTcXJRkqcOsXIIbcz3VAnFrpJsUypOkP0K1CB0GavG7InRloJNFaaKc3WTJ3UUFC0ijaJzNE4IrbCA3tmARBNGPSwsWRtEsN/Cv4f9DgkUQ1+UKggUgi5Jo8I5ZnudfybuaBIsgrst1BAsAkjiJe4uW413Tt5oEiyCuy/UECwDSJElMeyCaYK7rXnkhCAkWQVyX6woWACBLkixBi2+ny1x4zg0ssiXBIojrcgOCVZCmSFNA2bLCu6kNQ0mwCOK63JBg3T4kWARxXe7Ou70MQRDEmJBgEQQxGUiwCIKYDCRYBEFMBhIsgiAmAwkWQRCTgQSLIIjJQIJFEMRkIMEiCGIykGARBDEZSLAIgpgMJFgEQUwGEiyCICYDCRZBEJOBBIsgiMlAgkUQxGQgwSIIYjKQYBEEMRlIsAiCmAwkWARBTAYSLIIgJgMJFkEQk4EEiyCIyUCCRRDEZCDBIghiMpBgEQRBEARBEARBEARBELfOHcCvXQaCIAgL7mjQnSCI6UCCRRDEZCDBIghiMpBgEQQxGUiwCIKYDCRYBEFMBhIsgiAmAwkWQRCTgQSLIIjJQIJFEMRkIMEiCGIykGARBDEZSLAIgpgMJFgEQUwGEiyCICYDCRZBEJOBBIsgiMlAgkUQxGQgwSIIYjKQYBEEMRlIsAiCmAwkWARBTAYSLIIgJsN/XLsAoxHHAJzAELIAgKV6LY2SJAUAuK7rOaYUCh5zjbm222kii5I0BgAw1/W8hiJbFkGz6DquXy+HZe0s0BRtk0rR0o0WylzH9t6rfGC4cxvLIk7ITIbjGAALbbOzuuFNasqpRHuyWjIr6fr+a7UgEYjqYUMBIAAAIABJREFUiON6kBOYvud0U7s0bfjrIAQAzxRSv8ud9oz4e0MKDRbsapa77JjZ+Zrl8Ggsch1/bWfRrcWzrB2R3HQXnhxtZyibE1jdPOec83VeTMOdWFg+AgDMVeECQGidndUNt0kPau9PS2bFPXZ+/6ZaKMifQl2TAcDLLzPFWPNXPz1MFT5V7AXr6Ne/67CewvBAHJRY3XZMHAyp2NJUZBNOXTX5wfBG6fF6CZbpZesULACerWQVVVCPb2XZBwDfZPhgNNucndUN9xOslsxEES2+/xMFC1vZmJMHvQZeU5fQmmSe1C+u4p2xi6EQf9hJvbJhdqJ5Vr+YLeJtd/YAkM7WeuN+szBYTGeh3lWxJ1kMSxt/WJreoxpZlP8RtXRyWyz7EYAoM9RYBACOZrU7u6E3bKArsxO//5JCRbMN4OVZlX3nSBLFpL1DOzXenmBluc64ngcvybIkSgEgeWr7WSvSzvblQzHMzmae/+F6cFmaprF4fuOZhWACAOZM/YmeF+MdngsPSZbkgxtWEtxUyqDXiFTFIl1bxIrKP+x1QrbsswxAZBiWSQBAb8JYZDf4hmt0ZHb6959TjHzFG8DVs5LFvGU4bKJcu5k3ErZdQvGYy32MvNkUNqXgnO/X+fNRZWBjp0b+0rGw6lwW42BKt8TwxRy2+QvqKCMexcVldXWd/+C6UsReXUJTzHqXUI6zL9t93X3ifKAJgKHfZGc5aLibo9FoS3a2N6wlMPTLbTKz/v539i/mTq2ZvB0qDfAxgL2iLqFtvdw+lq+kGOUIlAhH8U4czCly1kx5Vq3s6OzF4+Srg6x5b0B+1c1fzJ7pT2PxBmgysWR66XoKVn1Iu12wOOeHXFi2esoaBwAQ7cSavNlZ3jfU8xoAnB7Z2d6wlqBZsFozs/7+TxMsV1a/LeB4JFg3iOUraYx21CaXjPUinqJirNfKjh4s+h36CDvP+5nSC9jwxYgH3tMvsJpI7F0tp76CxfSJq07BKiS9lrLGEgCCLaDPZ9lbdoz1KAa89ctt2dnesJagWbBaM7P+/k8TrKVsywdCEqxbxPKVdABDK2AHyD/N5noJ5MtWdkxFNM3Hi6aT1CBq+mICLcAFAGbofIh3g5XPbQ/BEkO4+iSchWDxLQCLTmFedcxUg5aWQ8Awt3fU3vvu7GxvWE3QIlitmVl//6cJ1s6pLh0BHF6TYL05T/cUqA/LwnMApB3zKUItksF20hUABIaxYjcAgI1h/ki3LxcB2CQAsDTMR7EtAGSrTosG1gAQRV3R6vghAKw6biNJATi+qDyD+6ON5aA0JBMBgKsNn1tkN/iGa7RmNsL3b4dfjf1H9QqZNm9NsGKgmhKWcIFchJoRupANtrMCAGacPBJu292vjCcVobDoGZ2Y3RDodNI2I5KanCW6CB2gc14qAgA/vxdbldAsC88FPXGcW+6b3fAb1mnNbITv344ASJOyQAa/rwnz1gQLgFFQrH6FHC1xPzvCQ2dpnL1mosnQWQI1sXCkaHAkWNqIh5nQQdEe6Ie4jY73rnipfQbhRjTEsg/Ubi6LypCe2Q2+YZ22zMb4/u1w3KJu0rjoGLwW3qZg1X9Ll5x3ujQLpLT97EQZmtd0+WEYhrZulKVFoFxbVsdGPMywNQCsLLtrtTzbXRWjFIDrAr36hLrlAKiaEYVloN4Bsspu+A33yGz877+Rsk8Y5dr5enhrgiW0ZOBvaQoUHcMBdowdlgJ3uVwuu38LEynzDovGd9oS0cs0rcDugHlluZqoCi36TZYdMc2y8BxQ5TgG6u0Ju+wG33CPzMb4/i3xi+bdxjhuMWXemmAJvVkNejSV16O/nXZ5sSMpswYQZyheZBOsVwtGZckAJANqqXsssOq3+b0GbjTL9VGi9h5hR3aDb9g+szG+f0scX2SXpHln8/Xw5gRLPDGrdwMGd0QSb6Ad0X88sdUvOoH5h0Qqjgl9yK0HeR+pf/PMA9rHYjYZgHz/m16Kqln2GbT2Y1ReHpDd4Bu2zmyU798WTzTvXt2Q+xsUrHzIJ53/aW7bG8nZKD+Rve2kwMnt85Wy21EKtI7ye2Wk/vgeMKSPxIB2wZKnV0UrybKEmuV6n9A4cWud3dAbts5sjO/fGh/ABti8PsF6c4uf2XYm9CXbbOB6rfusyWQrMWBVqEVvOzFgORnZRLqIUHhYAd2vgFtmO4D1hwyIV1a7L+h5tgh4FqEQG8B3UgCRXR66ZW8DdYWxqUfYI7uBN2ydWf/v36iedg8s8yNEYZTBeWVDWG9PsODunsrfvSRZwfM8cztdac8neTPKLx8AazsyvWZstAc2TgCAVTvcdDXsTpoecsIFgJVh89KTUPtt/grWgqXjOymQVhupGHuEPbI7/YYtMuv1lZindOwUyI+QpPHra2C9QcGCu1/JPsVxDOZ7hi92ZkorOT3Z2mlBz8JXRkhND6y/rp75BLD4zTZtG2VDGCVAtth2x+zDBpDeOX8FIEmHaYS/AhCXFW4c0+6T3ck33P/e2r//U/BZhtUr7BECb20tIeec8+Na/yl21rUUBlxthWyXnVr5tHV2uv2wKaAWwXxfGi5QrHvrs5Yw/1ssrC4WxNmsJewulNjMoPpcW8Tcw/JetcVUy3bZ2d6wVgrjWsKOzPp8/y1bqukrNU1rCTkvVp26xa3QWsJJw4Ltcb+UG9fp/EP30Hmob7I20M5wVjN9QLstt9P2mhQLVkwbZA5HmeWE2WHdFteBvMFnhnp7ol92J97wmPd2Or7072vibQoWALjhju8k5+LkXfv77QQH47KKvnZOI5YUywXaZ+ROnEhfOgCyk70pZTaA8hb5wFDn1lwcipFG4xxhz+xOu+FR7w1oaKfa7tEqTnB6fYL1BsewJDwPWRzn4+nZ014JVNvlrcdYtdqR0bRMHpKtj1ipPYYsjjcAstmhkE27wakTht7XMwAbv89EU3vzRGxmIEmoK+bSbES1btlfAIjyXxF5hm5wdgNuuF9mvb7/0/BXpU/YK+PC3dBz0WcMS2Odf6+hdQpLOzJboPXwJ4sCiB5pGcm4XZ0cHSg35xowhlWkElsyW45h7VrvsmmCTktva9kFiu2ltoC+/6tNdrY3rCYwjmF1Zdbn+++xH9Zxt9tJO4AddrvdUQ/Y73b2R7DdNG+5SygRHMTTduqAQ6sdBzh1Pb4XApKzZJcne5djaTchQ89dDNrzbFgXk9o4ixksS33C5p1lemXX/4atMxvh+zfBPE8+v9fxPI/pAa6Nx81EIMECAIhDpLKTl+u32BGPTOPKOausxftUdI66FhorCw8H0X/BSqurRaNTu816QoNl4eyeFRZ0J8kB2Q1fodOZ2RjfP/HWBCteLBYL06Mldo+yfmqG2GlfZmc3Uq/YEMuBm1+uqEwxGN8HgHlXtIqmjQ2rQBM2gmWwXC3PMc4RDsmu9w3bZzbG90+8gUF3+VHIVgCYabjB79UPGGLHiwFsmmZ57H7UlRYG8yMAm6aTADftmznkdLwoyzgDEusFK3HalqfYwU5t86VzAFnUOZ1ltOxHAOKgrUfYN7ueN9wjszG+f+L1CFZj30decseA7iUtFgyx4y8AZBuzM3Nm08jQ8SIAG/Melvm0U5GbVe0Y6LlgxbjDS4FQUF0KVilkh/Veln2WAVHqiB6hdo/Dshu4Qscis/G//7fI6+kSMsDcXpCv9ev4NTPEjuMDjUc09DmAoDqKgQGNOwysUkBaqw10146J0AOQWfaREt0XScG8IZQ0ENXfct4njBt7hP2z63XDfTIb7ft/07wewRIjOob3Ly5DAYehYQtfaTdRCwbZEVuAGruMvY63qXoP4rAV449zfkRL0VCwqh0jS0AciN6NeM2bNgjIzGNqfhXW33IhWEBtr9HB2fW44X6ZjfX9v3Wu7VsxFi5Qd8UpVogVfigBUD+CjhcHORdLBbvrxc6OhnigTasN80e90xFMW5B2FAeMms4lFBpUeehY1Q4H6r5CIQAwVy5Rg7eUkIymQ/vWgOl0UbHmrqjKvpYdADg4hmJbZWd7wxXmgthlZv399/DDelu8qnpZGp8l8eaW7nu7hmfGV16U7nqxs6NxqB81LygaB30FKz9gtK5YuV5JMa1qR/ejFFTDOcUVo6wcxFtnUHFB06nYYuDnOMxyCORNF92D1io72xuuMAuWXWbW3z8JVgOvql7y5ob6MOVvbvWMiGdff7pD9Tm0qBcrOzr5hF6otsAOZY+st2DljzrTypEv0pbfRLvaMb6/1Rol5Yoa7xDm/opNJ9WLtqehMXiQy9DX8qEs28EU0JWd7Q1XGL9gy8ysv38SrAZe0ywh2PoJQDYLwuoXciNOx5TOGl1+AIBFHEoDDmIrT/RaQzbITiDGjldREJRTe+lmBQBrq3M8azsQr7MIQLaIg2rEN87Pq3LlrZ3saseIFxpHWFJptD9L8kIxfUOLkgioz+SJawkAefash2WRGIbjveyzq9Fww83YZtbv+2+YTWk81+1NcKevsZ0y83yk1PVcMSieT9A4e+lZ3+QTQI7P8pFosZUnWLmqGHdAZ73Y2GkuIjzXZUCW5InWwVMEhIWXTlMB4hkAdjRZdDzHBZCmhc+1q73hNrVzB8Cr7caUfchNFiWKTZsbAoCzbRy//5BAukEZcfbQwRlkuTi4aKm5FNhlZ3vDFXcAsNN+kiwzg+3331gLpszfEuK9eD2YfzZdta3e4GgpDwTBpl4s7BgweiSyrRhk6uwSii6GOljS4OPo1XpQFrUDGEfgiqZa8blpgzm/qT9YjO4fTEHippbDLBd9Qs2yZXa2N1wBoNYltM2Mc8vvv2UDv5YBhzdAw5cyXUxOlLVnfW9qU3vy82ZXL912TOzqqbwD17aObCyASKwO2xos1ka1OOc2tQOYpwzy/maZo+HGAa/tVQqBxs0K3Cqsv+V8p7ph2dnecAWAmmbYZsY5t/v+SbAaaPhSJsxBb0YYn/W1/tB4WyXctl667Filcrdlpt2CJX6g9VdsrXWXnNDcIOmsHZNxzosh+xbB8vxlu1LXdyeuEB2hwzDLoqGrz7xZZmd7wxUAapphm1lR4s7vnwSrgVc2hgUAyKIkzkcgmOs1LbGI46RwVGeeO3yjs2F24jguxoo9vxCbJGvfJbCVJCrL4blu88oTu9ohzsv43/8b4e4VChYAIMnQvVFBlqBwEDyJYXaSrGMb02HlcC12GLWqHeK8jP/9vwFerWARBPH6uHtFawkJgnj1kGARBDEZSLAIgpgMJFgEQUwGEiyCICYDCRZBEJOBBIsgiMlAgkUQxGQgwSIIYjKQYBEEMRlIsAiCmAwkWARBTAYSLIIgJgMJFkEQk4EEiyCIyUCCRRDEZCDBIghiMpBgEQQxGUiwCIKYDCRYBEFMBhIsgiAmAwkWQRCTgQSLIIjJQIJFEMRkIMEiCGIykGARBEEQBEEQBEEQBEEQt84dwK9dBoIgCAvuaNCdIIjpQIJFEMRkIMEiCGIykGARBDEZSLAIgpgMJFgEQUwGEiyCICYDCRZBEJOBBIsgiMlAgkUQxGQgwSIIYjKQYBEEMRlIsAiCmAwkWARBTAYSLIIgJgMJFkEQk4EEiyCIyUCCRRDEZCDBIghiMpBgEQQxGUiwCIKYDCRYBEFMBhIsgiAmAwkWQRCTgQSLIIjJQIJFEMRkIMEiCGIykGARBDEZSLAIgpgMJFgEQUwGEiyCICYDCRZBEJOBBIsgiMlAgkUQxGQgwSIIYjKQYBEEMRlIsAiCmAwkWARBTAYSLIIgJgMJFkEQk+E/OmPE2mfmAsgS8b9MksFxgCzRLbhMiiJ9QpqWf3odWdat5leVYiSZbL4kixMAXhGUJXIpYsBxJAOVQa20SFM1tzSVUhLEqyNGDE99N/tF6DQwBN6OHt3jnPNd/r+MB4QiSGNXxDgCwLpKEcqx/DKaKcu61fyqpxVhx3V2ZX35e8455wcA2yL0AFFsgQsETaXlIVTzoZySIF4XW798b9aDInQaEOzDMAzDg1WZLtwljIB686kMnM3PkuliVuYYfdgAokFVNtjiolxA3vYqYxfBMvPsLIUkiNsi/vBUvhbR/F39re2K0GmgYLNarVartDFcpbtLCEBpCXV1ghwldpwAZa9qAwBRJnfanFyFkxjYsGVjloXVbFMmseuNrVaA53sOkmSVYo4AgL+qBCsBkKZO9aFsjxlKC6SrJQjitbNYKR/TWbjsF6HTQBmy6Vu2zlaYIUZLl1CPV108iAGwZRkaSlaOPoBDS5amjLu7hEcmdfICgB0551spAwZUHb8QcBtLm/dg9/Jn6hISr5GgLhNBrwidBkry5kd9KMfEubuE6RPglsoaAb4vdcAU2Jo1dxeHs8ngrYsPaw/ZBqIRlWeVZHCrfBOpgWUsLQPO03EliNthZWj1bBY9InQaKJmb5aCR8wrWUwZWDZdvAM8HEnN3lfmAbUfWnlQalAJ80etjlUbFQMBKwYql2MbSBg4SY70TxKvB/IivYusInQYKsnnfDuFZBWueANvKpyEF8x23qYkFgz/C6agS6AAZAHhlQAz4PjJRlfIQVkNp18BmfFkliBuilBtnudsty7HilXWETgOCbPWu9wDWOQVrswGWlQ9GBARAY58Q2Tk0y1E0q/CPkFtYbtXeiiW/q4bSeiEy6hQSr5m4aAkFh9DzwkOgX++K0GkASOJoMfvTov+c+xkFK1kAvjTbFwE+EABJ3QkUQCbCR8YFonq1eIV/awR48AvBSrUhLFNpQ4ZY/6UgiFdE8RNdDP6uXS2gK0KnAdx9mD0ZeogWnE+wsqcMzrr6HKVwXDFUZWpixbMM4fh+474DrN4ttByZm3tiJYAH5iLJAGUIq7G0bA2syBmLeL0UD3zZ2FhqAV0ROg2cgJUf1kz+sNSX5DQwT8G2Uh8vBgIA8CJElUtGkttOU0D21LDOMpFjGtbvbGcZshXgeZ5kxUtE3BjwAC9BFACZ1MIylxYAfD/K5tvmAhHEpEnyn2O37G14jhhWyWLPJkKngVOwEiyl7WbZulhEmtAUPT5/jjQpA7LKtif7blhnmXU0LN29mGKNYzDPL/qc+bBVmsAH4AlHUm0Iy1BaAMAyzqJo/M4rQdwERTNI/n3Px8YTzyZCp4FTOFeXMF4BgaxAmwyeA4helnFuIH53FocBZ33chi4AZNHTh7wN5gNpVvYBPYYIihdWW2mdEBgwWkgQk6B4tKXeUfFnahWh08ApWAmW4mxqpZHpE+Cu5StxOaTuyX3Z0lH9EDKsKsWyzlL3dDfA/OX+uA4cAMksKQsRFz1CwEOWANJCwobSCkIPKY27E6+UQlSkl8lTgroidBoAdiV9S2fVJezPUwamjPNkEbARb34GZPUulbP0ZlgF59quhQVAvIqRzfcAADdG4iOG4wJipMot5auztMsPWHkj75lBELdByxhLbBWh0wBO2HDmPII1T4Ctoj15l6sgNowBeV6MKKxfHw3P28yRiHE/b4UESZbXnAck8hBWR2ndcIX54YwlJYir4xj/7BGh08AQziJYmw0QqiK6kQa0swTRup4Kbmw7om9fkgi+NJIWRDFywQJiREUf0HGTOJOHsDpKu4yTdEHbNhCvkHKYyaQ3qdMdodPASZxDsJIF4Kmvcyo3ubI/IdsYlnOfASeGMsXnls1VL0acVCNVCeJqCKu7tMsZVjRRSLxCWsfFU6c7QqeBkzjDLGH2lMHRHJUiwC2LynxzP/cMM29MGzKvsnCBOC7bUeJT0cLqLq0XSgumCIK4EGcQrHkqL3kWbJRlNx4Q1dUpPcPaHJcpE3rS8h9P7MeQB/hAXO0Hb1Ha0EE8gt8uQRB9GF+wFpG0eCgnSXPHcYEPg5d+/JTBtfSitydQdrVYZCj83T0gk2YrfGkhoU1p2fIcm+EQBNFK/6U5hf+6vCbGlUasVgCiSE0QAb7sRuZHiALVSpoCqAa3jVkOYBkn2SzwPAak8SaR1jf5ESTBcqVPzaWV8H1qYBHEpem/NKcYB2pbE6MniDTPCz9CLIbfZCtMapgZsxzCbpZgU/mqrxWJqjp+/gKyYDWUVmYdk7c7QVyYi5yaE6Xa6JSvD4YDcMPDOebd2D6sWkvevmopeZBXOzlOpVc2pQXYOV3GCIIwcQfUjgF8dURJmgGu49GxpwTRTlyMxsi6cJf/v/O6I3QaUGgMMHJ3rqU5t4VPLlME8Sq46EGqBEHcOK29ENciQqeBkyDBIgiiolpFU10r19UyiwidBk6CBIsgCAOS3hh2uLKI0GlgCCRYBEFIFKPfktdO8adrFaHTwCmQYBEEIVG0gqT9lYo/HasInQZOgQSLIAiJohUk9eiKPx2rCJ0GToEEiyAICWmbcGh/elYROg2cAgkWQRASXt6ly8oFbcU5nMy1itBp4BRIsAiCkCncrBf5yFOy0gK6InQaOAESLIIgZApZyWYRAGxmxRxfYBmh08AJvIm1hARB2DMrR58cR+z7BADwdrYROg1U9F1LSIJFEIRC8sF4ee/aRug0UHF7i5/TVB1rS1M4yuxmlqgRkmqv4vyj8lneQEtKVum4aSoiS2KAubKdJkOGCFpwZ0KCmDLu0nRegbSLZleETgPDsW1hLVZhvqtorG3cl599mm6SGJ5bPwl1sVLlc7FCqBypE8/UtuIsluNnfwKwljq/d1JUMC/wqmxK/EARrWgTGwIaDBlzYr7fIyFBTJv5pnYpWPeJ0GmgoG8LC9qp8E04CPO/9H3rdurVpZ4yBOAclc+hEmFXP29+V31aA4AvBdfqwVisoEpwVLcPPXYYasqpR0KCmDi1Qzf197orQqeBnCJ4Zw6uxbbsEm46Dlx4igDHy5IUi8xwwGi6Gnzq6AYAokxZNRmUzv8xsGGFbcc3XU1mGeD4HpAlUYoo3bEuQxVhFdwvIUFMmdBbyD0pr9ad64rQaWA4FsK2Y1WzaBdKAC7nnIcA2xa6elDTind+L3/u0cI6iHEiSZ6hBLsAjrnZ0srRr4pxdAC2lgvjthtSciothqjsdyYkiOmzK36VWWBu/nRF6DTQHxvBOmxDF9BVRhCC7TnnR1a+wstaDykEWKUSfQVrCQRLObkqF/wAYJ2brawcWX6Vcx+ijDnb6k4aDCk5qQmXlgkJ4lVw2O12u8MJEToN9MTGcXTztEoaguIVQhdAlKEYkw4dbGqnyQQOkoHnJG8AzxdHBRpxXNP5gMwvrsYRsJVao/4SWJmMmQ1JCcO8e9o3IUFMFcfzvNaDELoidBrozSme7tkcXghAOoMU8E0nzKy7R8HMJCmY77gmmznmLcHKqxtAncULvQbh6dpbLGRIjaU4fVMygiDs6BasJef1qUEAwCr9/9m72/NUlYYNw3eO422ApwR2CawSsARSApaAJWgJWkIoQUoIJUgJoQTfH3wNMCAaEx1znT/2XkEZBhNuZwYYvOpMZW7MG2Ftb4SJyvUt1UuleCIEZ5V1jpSp8ejUyvWFVbyoN8MPgN/3jRZWvtP4qivJelgnnrLdePFF1cNOYymfyorcdktl2TwkNZOCQR1jqbAVZi3IFE4E1sUVAdzJNwJrI79uvPjGoWwPFm/fzTFxhbSQH1SNm4lW0a5UODphmq1KJX5dm9EFafbgsRbU4w+fR710RQB3cvutOYdMzTOVAymts6ucCJYoSsv1x1RZ+cr8oftnVt/gHaZKLdc6ZWWaym8voG1KKQo1F9Nbh9fHiwcF2dlSadGKAO7k9sDayW+nm9iU+a5KrM3U2Po2K9N0qutU2pouanqEUrRWkXeBYcZbtG8HvY1SwrpqpSVnjEHyiYIuu3lFAN9wc5fwUHSj2V4sbda5ynRlPQEnSX4iba7sFB5KVedEvWji1J48+znT7L/2MoqFaTJR0A+uCOBaN7ewjAaWtC0POlSJEk9FVpJlk3foDG9+rmXtcHaYKu06Xs0VtGWRlbusvWOmLaU4HMqdmpu1Z+6qnCjosptXBPANtwbWoehNH7j3qyF1fz/REpK0/addeM3MBmUqHaoxsVIquw5lN3NCvirzcQr623ClXexLgaWvmXetrksFTa133YoA7uTWLuFhMN9p8vWRJMnHKdTks3yCRLrqYqxUUp5lWZZlueyn6IKt/bxkGFar+5aXc9v4+VRBl9ZbsiKAO7mxhZXn3YQFtahqAGXTo0bbLC82VzRGDsbMfWVu9gmNra6tQaYgUykplLKiH6BZKc/SzpsqqGMPrAUrAriTGwMrnXzEWDHz8LHtSrvl11gWufTRhE35P5UHyxz2F0aP/CDXoZ+Rqf06z4vDUOWtKwK4lxu7hIfewVtsNu3IVTYTWGEiLb8JOjWvUvcie59wivGcjv5djNmwM7vUrpTPBaLAQ90WWHnZa2x4u12TQ4dyLg4SX9niG/n6oRhK6fKrIoqmORQHKt+N9fJ3Kboldw47ibF14LFuC6y0P5zjhSqrOwXLzeyNdd52+VQsedFrCkWavD1nXGL2Xiqoarj3lK/aUfFsVcqbvDB9umr5+1qKJ/eM6WWAX3HbGNaw35dk2iiRsnWpZO7KhSha3MBKpcgYH/KiVKml8eYXyuuOY3uDT1FIqmMp2K6V/4vD0FOZHTLJm7hqyiioY9zso3CigWVdEcAPuCmwyuEJszA+aLMJ87K6eGHGPlvarxuO60fp6ISfJAWFDnXLx7zBx9s3FYz997K5qlWS/zHRITQK6hglJlMdQuuKAH7ATV3C8cD6PpGUlVLyOX/WzJvPs05aDDqXkWftEwayTFwTJKdu3fCUtHXyktPUAJa1oGa1cHuaHMCaWxHAPd3tyc/FIZcXRE/aN0rzXPL8gJYQ4C4eVQ/AGW/fmtMdAH4VgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnHF5PixzkqnAvtx4MbO+t1HmmeQFgTEFTVH031oU8v2bSjKLaPRmwbHXuJKXxiN6uqV5IXlh974LEJL7AAAgAElEQVQy71cnLy1rWdec3Q6ARS7P1vBm/uCFcWhbrua5y8ZSL4r6s2alhyYyorYUbXbS0XjfZldPlXd1SWYRHeMN9hpLksr/SdoPJjTdNY+v8OJmRq1sNXpK9dEyw6plzZnt1IpDnikMYmOGnvKQ5WVvUXHI89L3w/oha9kghGN/vMS6McBBb5J0njdcJ55YHlqWRl9dOV+h9ZVEkm+8LZGS20oyi7BVeKLG5/P5fN5LUtQr5dNsHQWnauGxt9b5HErH0SdmXXNyO6Nab7uC6rDx9qM3eR+2XdXRsgR4FQunSG6fmZpn0sFr597sHRz+YGmeSWnRTqCer0rJj0KpzNPCfEUqJp71fn1JbWUia4UnaiwdJCktjYLyVSlFoS/lWab8fWImeIu5Ncfbabynkh+WeaFNue0K8gIVRbmuH8exPkheEOSZyvcPJiPEn3Qx1Ixv6VMg6atZbn9388+vRF175MsfNhSC7p/S59l4KbmtJLOIthn0FUk6jeo2cKoGtLbGokDym1odvaadtqSFZV9zajtdnatG07arb1A3HxPJ+6q3ruTrXP0avK/z+XxMDFJgWwK8iqsD63yStG+W29/d/fCh9uCMJO+z/0qVS4nkmceVLbCWlWQW0aXKl9dUeCawtlK87R3dbUicz+cqKU71Py4F1sSaE9sxanns3tPsWd1XjupdjNpd/fLHsZf0Phf7EsBl1wfWObAGivlu46dE8s/nc3Xc9o7stiGRSIlvZI49sJaUZL7XSJW4LXx6X33p42SWYwTI+Xw+n8M6Hy4H1tSa9u009sbIll+3YaM2aU/1zret2/N5P6jI+XwcRdh4CeC0G67DuuqUfOKpSCXpIPVP5yVhPaAjSfvh8+RvLum2CueFvMgPjKfyHEqF5lbC8UURE+bWHG+nURhXYET161n72CA/UJFXDytq9iaU8l4J5VphcmEJ4LqfvXDUi6rjqkwH493dYSlJYaJyfZeSLMrLmZVKcb+cbPCMsfh4XHjsz6053k4jN04BBNWTpM1LvNp4at802qVdMXyi9XgJ4LqrAyuffRb9UH2kZVIwuB4oloq2jZB4Fx/tt7CkkTK9XOHqLbGUN+UMY8cLQ8vlVjZza463MyGXVPTjqZACI/uywaNs893wiqvxEsB51wbWrtT48u1pftUhykdPXu13ary9tJt/JPTCkoayVankwnGbFvKDqhFXN30yyb/tcvS5NcfbafnGLuTt/waNLi8M2yWHweewkT9oAo6XAM676lH1WZmm8rt+xsp8cWvLsXqZbYDKNxdHUVquP+a2vbSkSl5XrSj6z5i31jhTdZlTmCpt3zsZcrlZhi0oJ9e0bqcSSGkdL6W9f9uP810mz7xe/pCpf0m9ZQngvkWBZR6i0b47DHrj0HMNpHLQgZGGozDbrEzTBX3NyyVVb+uqFpoHtrXGTacxWqvIA2mmwdYv2mJuzfF2WtGmzHdVYm0unH6QVG4O0tbc7Z384X1FoyWA+67tEnq3Dotc+Lb3E2kz3ylcWNJQ9t9m/g2HUlVXy4ua843LKmIzs6ZlOy0vljbrXGW6mjvjWRf032FwQ+KhGJ6JGC8BXsCiwIrrC6fjUOVu1R2TvUskLgxKX7oqIAlVXBh3X1iSZFyjdEo87brEstW4GyYPm8GluVG64XVYfTNrWrbT2cbS4d/b/94zXWgYZat1Kf/YexcNLPwRi7qE3VwJ+arMJ278s8qrBlFgCZl80Fba/tNu5lTcFSWZ/G240m7udFmZSocqP0qpTCNJ3s2NrOk1bdsx7P3qrIO/n72qrNztxnNAHIphyo2XAK/gqkF3KdiuZ4dphvKqzeFbBnfyQXMkSHZan+5RUl8YZu2Atk2qXpFZJCmQ8v4dyutCyZILG6bXtG3HlCRpLgWRMuu4fVVm/l5I8fC050GjwBotAV7BlYGlaL30km9JbZaEUlb0j7KslNdPgG2WF5vJ1ts1JfUF2Wxz6WDMqFfmSveSPL8YJMphdL2q3fSatu30RdV6WZVO4a4799lkWL4qFWyHO5vn3XwaU0uAl3BtYF13GDRXbfpBrkM/iyzXc25X2k2dKLyupCsUufTRJGD5P5WHWFK0U6/Plspy/ZfV1Jr27VhrVK1gXqxRnxstV6Xi7ehXkI7qNl4CvISfvTVnV8oPJCke3i2YWTotYSJNndG7rqSe+dGo1Lx03ovqMf1ISs2W5PD69WlTa9q30yg2m4OxRijJ95WX3aJA0qZUvB9/ZRxGlRsvAV7FxRuke7MPtCvY1+wt3UuqZsY8B1JgTA366TXTEyTGTA1fvuRbZ2tYUlKrP1vDyWum27LWuD9Py171hAhhbyufqmdOWDC9zMSaE9upfUle91I1vUzcztbwWc1I00zaMPA5+gDGS4BXcFtgnZp/2N/d/PMzUjd73acnBe3kTEevnTTKDKxzda37KLCWldTqBdYxaOefstX4s58cX02+nDxjduPPdsauBYFlX3NqO0ZBVZ5109N8mvNh7c/n834081ezu9tLS4BXcP0YlvxCedO16d3o0t7pYtwVo7AZbgq2a+X/4jD0VGaHTPJscw5HUe/6pNtLau+fKQpJEzcTaRsolSJjdS9KlcaS/GorUSDl6a6623EZ+5pT22kkmTZKpGxdNqcjgygt3j88aZ1WF1Xl0s64VK15GkY2GrAaLwFexsVQ6zUiIvvjJpp39ReZDYJ+rLSTCPdaWOcvT7I+hGJBSa3B6bz6eQ32GvuDls6HmhZkb7DIqz+CRQ+hsK05vZ1adZehJ6ND+eVLXhh6zRSrgxCqK/I1+hWOl+BZjf4mn8CjP5MZNwy6B7o4E0zFC7cn83ReeOqudvSSk/3KKc927cBNJbX1TU4z489pMRiejrzmKvTYeH5X+HlNi8Wy5sx2avtEUlZKyWezc95nqDLLSvnH+QvoaWDhr7j8XMJ7SvNc8vzg+6ew7lfSjCItCsn3o6tvoLxlzeKQywv6a6R5Lj/gGtCXNXxW5jN4ymZf5e2XAwuAicC6ytv1g+4A7uqZAuIZA7TnZy8cBYA7IrAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAM5sMCnlqRFWWhQCHzXuu3p0gGYHrThQPwcMibf3px0n8+VHnI8yLww8EU2nmal7nC0dTaWZbnZeCHkeV5VYvr81hMkQw80oWAyNe5+aO3N59hsNvVTwb390bjq1i3zxT3t8bb802zvF/KVfV5NAILeKT5gMhXpST5vpRX4bTvWk3rQ/fGbnG9Si1pnzZ12BjLt7aHUy2oz8MRWMAjzQZEviolL459SSoOh1LSZ/PEt81OUhT6eZZJap4sV/wrJcWBX+aHUl2SZStJfhSqevt+6kFMTx9YeurnJgKvbe4A/PIlBd3jdr8CSUH9w8lT82zeRJJfL44lBdWjhb9iSd5XV1RcvWXfLb6uPk+AyxqAZ7UrpODYPafSO/pSXj9+d1dK26qdtI2kouofFgfJ+6gaYd4+kspdW1S8r9aM9+1iB9ElBB5npgtW/Cd5n73n6h7WUvQhSfpfKf9kvLNavNuYA1TFf6rf9F8h79SeHFxl8r6urs8zeKOFBTyng6S4/+Tw2JOqFlZWSu25Pj+S0lKSchmL5YdSIUlFIRkXM8RS2Z5KdAyBBTylg+QNz+aFkjLV/+mSKWgWl5JnZFyzvJBkLI6atzuIK92BZ5SXvVZRZRvXyZOriqNKICmPqsWB8fZS1dsz9Zerbnk5iMACnlGqUchUV2RJkoqqtVULVSdQ3GtJKVf/ZwOBBeB+ClkCq/dqXylJ296iPK/7jeFOysLeW3tX0DuEMSzgGc0GVjl4MawDq2+tuh3mqxdx6V0q+BgEFvCMZptAlhdHi8p1LlU3Rvu+lHZvcPYiLBFYwNP61nwy+eogefXFopGkddMGW7s6fiURWMArKtf/8vraeElKfCn/l0pStjrMrfjsGHQHntTtA+PVzDPBR3OK0PtYlSreFSovJc9zt41FCwt4Rp51HH2R7N+mlLzEuK8nOHqSlGWl5B8nLnVwAYEFPKNAMxdLWU4ftiFUbla5pPizd41DcKqnK/WSz0DSzKyjT40uIfCMgkzKR02h+uZkT/0OY9YFVjVJaZgMR+y97TbPCy8INbog3iUEFvCMfEnZcC7jTPW5Q2/UXaybTNWkf/ZJkIMmpcrJC+CfHl1C4BlFslzh2d4UGPRuX+5uwSlXpRSdpidtb0ohsADcjxdK5fAKBDOwjD5hdyv0eynFHxcGqNp2moMILOApRZI2/Z5flldBZswzUy2vlyjLpGg/LmuzWq26n1LJd3UMi8ACnlIcSuV7b9FGzZQzoWd0GMu0WZxqeAN0LcuyNt+ywpxLyzEEFvCctpKyd6ONtc4l1XP6xd307tqpSaBUimyjU5G6OwjLdbW6m5jTHXic2TnUNztJftI8qWuTq3vSYPGvlHcMpGqm9+BTqh7mFQ46e9X7V1nzFIpylZvPK7ymPo/HcwmBR5oPiOpZqV7oS2VWzdDXDlDtNtUzC7P0oOZxhYf1uIyq9Oq5hHFQPa6wirfr6/NwBBbwSBcCYrfp/2y2jCxPft5YJo6pSzezrL5P54b6PBpPzQGeWNK7oio8mj25ffuECu/j8pCUca1DMp1Xz48WFvA4l1s0RZqXmRR4QTS8FKFIs7z0g3D0rAqr8pDlpReE1lH55fV5KLqEwCM9W0A8W30G6BICcAiBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBn/N+jKwD8cW+ProBLaGEBcAaBBcAZBBYAZzCGBTzOEz8D8DnRwgLgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAM/5v0bvKLJcUBl67IJcXGG/IS1Uv5qV8X5Ky9rXq5355+WhRV1yZZ5IXdBsDAEnSm3S+9J5s16RPlNSxkq0UHo23rDIdw/ofybYuuOVHcT+0stVoI01x6aHdWBxerj+AP+NtSZdws2pbS+m/wy2bKXb/0mXvLFfv3cZW7+UtWwPwqi53CXc7KYxCX3m+K7RWvLjspPpfkRcq3z/NHqRfv1Qe5Ef1IknKV6XkR6FU5mmhtDje0i8sc/U7rFJRyNo3lVRkRVkoUNhvz+WlNOiVZpJkbfUVWVGUnu8FvVf7HV/r1m31GvaXwyte7eqaKVegIOztQqb+ThWFRl37iY8JeBLnWV+eFDc/xJL3dT6fz0cpNN8VSsfmH8n5fD6fzYK3Gry9MSjmy5e8ffNTIimYr5zdcby5QJIiy3v33eHqJV/GC+Hok4klaX8emyrD7DNLUrj9Gq5qq9dwNXnRfumr9XviLpRC81VvsAeJJM9cU5I+LLsIPIMFgbXtHfyhtD2frw2s81bSyVL4oJhI8j67Hz/UFHadcWCdqoN3lBef/XaYZxyro8BKJvLqNCije8soW8wXp+s1Xk3yP5e9ej6fz19R/9Xg2L4Uyfj2OZ/PviQZKx8v/z0Aj7PgsoZCMo7ISBqf4Lss8Zasl6XSh7mxrbQrbtjcSNr7Xytf5ZLkh2HVcyrfp4foDjtJ+3F/uPiXS1KYJEnoSSrXM8N8wxcn6jVWrOY+vt6r+X9VcUFYd3Lz1a55LVDv91AUg63nmuxjAs/g4hhWPzB86aaB8CBTHl1600HqnxhMskyHrVSN3HzjSKpjIuvnTb4qJS+uzmAWh0MprYNgtHJVwlrWvNJ7KXnbqOqDZbtMWvtGTeN2r/Ms0+DFiXpJCrZGNdNcKt9Py17NV6WksN5ufjhI2pT1CtFGysu2v1hFlRl26n09AU9ovhEWW8d+ruwSngN7565XzJdG/ca95DdvXN5VGXUJPyVFvgZ9ry9fUtBt8SuQMWjW7xLupYnxK0m+UetYTZWreph7/eENKmav17hHa46ezb96PnmSvK4TWPdYm5d9mWNUdZh2W/fV/B6BJ7SgSxhI6ea7lxcsaiBlUjA4QRVLxS1d0IFUUhipbdFUdoUUHLstekdfyq3ds8n2lTJJe6PW+1AqMssbJUUfkjKjyWqv19g+lHkl7tyr61IKPo3P2v+MJW3qrYYyW1RZ1Z5qSy4K0SXEU7sYWJEv7f7bLLyOasJaC7oatlALbxszG0glL4rUHywqdpL3YZ719xLZx5Om80qp1OvkKdZ0toRB/0VrvWxizX0OxquHTPI++rG/D6SyHsbqDWJlpbQ1a5SJvMJzuziG5X2sSpU7KQzDXubk5tXqs6mSHrJq3H2ebXjdrxeHFy/Hn9t+IUVe4BfKi+5YPkgaXIAfb0pbdszkVV1HQyj7nlQv5uaL9nrZBHOFmq/uJG2HZX38K3VI/KZ2/XwKM6OFJYaw8NwuX+kefFaHarb5979343AuM4O1z/hWe8+kILm4odJytNzlfsK64TBoyhzqJpXJ2vW6kFeDsxBeGIYLr7y018tmvsDu1bSQ/FFN/VhNr9P31e1hJoUKjV43LSw8uwW35vj7r4/qHsIyff93Ww8tWnbJ+s/c75xKflQFQzdYlJdSNNze9ng8DsPhUl4p738kx+NxO/HOJfWymm/6dK9mau8vMMVqI9EYxKoGFs2M5qoGPLtFszV4UaQyzbNCylfH+sgZ3vw81v7tB9HCjkb2E4fLoaxCIfALFXlTk1SWDLDclXIhr8JMev9Y2o/KZISyvV6T602/oXs1U1XkgB/kzRaMQayqPRX4RX8B8MQWz4flxfvTMZTK9eKyj43togPa9qb8Dq2u9iju9b0Wjtdcal9Fkop/62XnJLJeE8ZeL6tU1iAavloUo/sfK127ymhQZdV9hGG78flYBJ7AVRP4hce9lE+eX/8m3zJ2n3//ECpTqboc9IbAOqwleTPNjupK18P7/94PF6/Jz94l+c1GJ+plUa4zKZmqhPHq5D51w/J+IJXVP7Nqy6HMK0hpYeGpXeoSHlJFRvsiTrOf6bdJCqVscLYsK2fTYpGuddLrey0aizusJalc227gq31U8+GUadrd4mMo23ivrnTX/kK9KsXG+HdWSvF2waulJhqkntpzA2FeX1lf1DddhVJ9FwKBBRfMXlp6HFyinlQ/X3ul+3TpRjHjy+Hj/r26C/UvBg/UXkCfqCtPsk8g0QhVhYvn6cIt2HszagJjRgZbzHUlTdTLupr/sejVZKqqxify0WyrvSE9rK/N/7z0kQAPdrlL6A16Kz85pV4s9ftV2UFXTL9lV+T17S9adAFBz1ryjh+SdnPtsfjztG/PN+ab/2bO+Hn7tqF0Vb382YG8+VcH2kGsvLmxIKgvcedGQjy/S4EVeCp23Y9lOjf6+01xoNKcZDR/l5aeX5yUquvnBH61B035l9f2jkGYqLpUf5off3x9buvPpVxPvdmLP7v4nanXWLbaLHl1yfVfXiAVpeqrsKQuLukR4vldvKwh3mnXTaS5KRX+3LfwflXmq7aHlb2X8uohn+JQ3UVyvYMkrxlICgopq4LFKxe0Fr1jICVpoXxzaetBIGXZoZR08LtrobrZGgbn76bqVTGvGcnSg7QLosuvzgZW87GGuZRFytrrdAOvVK7qjCyBhad3odsYSIo/vs7n82kfqB6r+pExrHpShPjj63z++ghlTOd382wNn6Pd9doaW+cUNPao2fxRWjyJwdZTMyvraLYG02S9bPMxbNVNIzH36uQolDm4VU+LmHSfaCx51WQZtjlZgaex5LKGYyAd3v/39vb23zqv5wb4KfHRqzf2v/dM8o/fbs2NO1plNcY0mMuu9vb2Zjzup9581SlcNnqXHL0L3bsL9bIWarviw/Lq4N7qjjkLQ31NVmb0SKUy4yosuOByYHmfxn3L4ed3B8HnhaduY15yWnwA5auVfZjHEh3VIW3eVNd7yQjkZvPboH8pQWezGc5jEcSau1H5Yr2sIs0lVvfqxOh9ae6XF0hZb8KfSFLGEBZcsOTWnO02zYtSCvz2tt7h7AnH0T8WTa8wnoTB227TPJc8P4hm39hXThztaSEFRvcr/yelpScpWkvpfvD2qVbG/p90CC1nG3b1hFZmVXcLhvOn6zVpvoVXvRqm0mFczbQ0z7aGeTWzjBFheRVYHi0sPLllT36OfuzM4A9vbHhzXeAXUhpL8sJM5SEev9120AbJTlqPrgqV/MLamrp4ncF0vb4l2pTKRhf2lrve1sJdFVhdPIW58iKjgYXnd9WtOY4w7lAZ3YTXdZoiSYOpVLPJE2XbUCrfx8uD8fyihRZcXzBTr+/wYo12qppu1HjqYqiq0lFvyUEMYeH5vUhgeTL6YYWaNs6h7K7OrMRqZimOxxm0kWXKmcrek7LdaHFYr2WYv1FZF+v1LYkn5YMKHQ7qTzoTVpvq4in0qsCihYVn9yKBFRjn5sru2BtPmOIHapoyW1XXerXWuazTSUn1s6rHzxyLfSnvXSi6y4wbnKfM1mtmnYuventJh5XZxtqsNbh1OqiGvIxFoVQyhAUHvEhgVR28XJLKTdlERmlp7XR9ryCRlP5rribI/h1UXSNgldg7hVtJh3/dJMObjYwbnCfM18ti6YyjUpRIyv5ru4WH/3aSwt5lr1VSmQ/8CI3/Ak9s2aD780vSUsUqDpWlhZrISDXu4kUbNVOob8uDVKw3oS+VdT9x+oL2j/9KywXvUbKT8pVfHf5ZLs3MBNO4UK8x6zUY9le33kYqd7swUD2VgxR+9N4/jqc6wi5UG3gGj7569T56rZpttSyQ+RS+c7ewuep7GD/GdemjR9WfP6Tec91tG+4VMnml+3y9xteyn7+6cudfPZ/P549h6o3qEGpYgeEz64Fn9EKBde4mY/fqx4aeZNzw0tqqe9Tp+dS/gc942ziwzpEk/+s8dOpdjWAUMhVYF+pliaRz0P6i5l89n8/n81fvCUXx+AakZPRrT6xVAp6L9LbwEk8XHPI8lx+EEyf67Io0LzMp8BZPPG8royjyUl7g+9GSGRN+XprnRSEv8IOrPgzgqb29VGABeGlvL3OWEMAfQGABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZrzKn+91NTKHumxP0ZZlyBQr6T1jNVD3Fp1EUgwfS5GVVTl7231iv3HtvkRVF6fle0JsnvrQ9Wrpeb77U3pr+5dkGLdtf8smYJRTjF/v1N1+8snD8QY+e9vR+vvZRKAXhdjAr8GcSevKXLj6fz9VMxDbdlMfHuEuFcG+s6kkyfx5NPyxVM6qHGs923F+077LLS4zJma21q6s2X+pgzSCx7fzs9i9/Mn2BJEX9ZcMywu0NhX8mYSCF8b6/+Gsb+QqivWUNuE7SCwXWtkuQ2Di6T13jILm8uHbpyPkaPKUr6KZyjyTFRlHDBzwcmw89lNrnZTRkpM2pP2ezt+8XMVG1+VLHa1p2fnb7VwbWqXq1v5FxGVcXbvz6fPN5Gu0fgX8crQPXSXqdwOo9CyJoj5BP75rFjQtHTrN2ELbPgG8zYisp6Eo6DY+4rer4CCXJ629aXWCdqm2ESZLUfc42sS4G1mSpljWDiaflTGz/ysCqH0zUb/DYyriu8N6vz3jZ/COgkfVyXmkMa3eQ5EehijST8vf6b79clZIXB16RH6R89Tm7uBW2h06+kYL2eWDVWEq+KiWFcdXMyg8HSZuyflO0kfKyPaCqp6Magza5zEcAluv+QwM776XkbeuHSGS7TFr7xkhWPGjjyTyEp0s11yyKQynlq0/rCNHE9uc/mZH6ObVZPHyhq3+eZbqy8GJVSooDv8wPpbTz6+I3B0lR6OfZ8OPCy3h0at7Hl6e2lXP01D53L1bbgPo0RpcmFltYnqt18iR5Rpej6jw1Zfgyn/pXH5ddk8eXdDyf67bQ4AGB3cb2knxjhClW93iyySceXix1uOZW6rUHO3Pb78oajpYNfUqKfA36hMNafHijouYLj9W2DL9itS3KU/erTEbVhfteKLD25jGwVTPO+yWjf3RsD86JxTaWIyeUFPRHq2NJ3qn7d3c4elV7qg2QU/uZh1WrqPeow25jUZNr5laPXZ1mAmum1NGan0bQ98xtvyvrUmAlkvbJcBOjWhwl6TRcMln4yfi0q5pWpcXGhqLZryE46YWuw8okJc0PidecIM8ltW2bneYAACAASURBVKfzwqDpm00sXuaQSd7g+cr7QCp31b8DGeVlpbSVcb4+k/GY+CCRip11K6nU79LEmntevWmm1PF795J25V233y/FiyI1PeMpYXBV4amkpP0FbNviU8lPjKVXVxfP7mUCK5eMy6ECqToGM5kDRmG9ZGrxMjtJ2+GoyocnHYpxcZmkMDQWFL1NJ560m9p2fxthvfICs6UORKFU2uPk5u230kKKvMCX8vlVrys8l9QN4flhvW5WGov9SEotQQynXRdYb29vb29v7T9mDN5/8d/z5SxQ9EedTRPLb30kclpI/mgM2Y/VjDD7vrqAyqRQoVTk3YKuhSVvL2k9saX+4eaFYbjw+snZUoemW043b79V7+zlJtZ1SskzqtI0zzKZOXZdow1uuLGF9XxPiw67Cwx6i2X+1batm4nFi/Q6n51Y7UEZqu0TlnkdWO3mcpmBpSiSio19S3m/o3o8Hrf2N47MlTp6rzeVJrdvv5FWLZ1I7enCu8j7v69SVWuwf/611zPHi3iZLuHxeOxaPVVMSNVfbXs0Fmlz18rE4kX63+MtP2ibUcahUjUxAn+wwLD1pJ3lwAolvd98wE2VamPvEX9v+5VD3UcLfKOJaZXpmiZvnCTmbyBXFVhF76O9pQuLZ3drYD1fE8u0aQczvEQq1lXfpnxX0zaaWLxEUUzEW9euMhKgvosvbPOxP3qmepTY0hiKJBX/1jf2pKZKtb5XtiP7e9uvtNl+qU+YDdqdF2y3W6NPnuf1VsY7wRjWq7n5wtHz8uGlWXcqxlBmh0wK67/obXnQIYsDKTuU0j6aXbzAZP8xUHPI+EGusvAlKauOpfAgpZE06hFKSrJM2W6UmHGaSTocpoaOymGjaFGp8xW/ZvsLlKkUVPcS7qR0uj+Zvatqot5krWrnS/V/M2FGYL2cR1/pfu+82hyqv9Fo3yzZe7t2OMfrgmli8WWlJjovntpv9DCvr+0uiuoYCiXlE4Gl7T9pF41C4eM9k6QyTeWHYTjc5mE4KDRo9E6UOlFxiwvbXyBV09AN/EJF3kukLnCrK921103KTV5/PVn6nIxhvZpbuoTV+bvlncL6/fWVX/3ly9ZdXre8iozkozu+jIPWHJefWHx5C3Mv1g2VdhArVRVPXtMnzMtx1ydIpHLcffOO7WQJxeH9f/9sF0vNmCh1uW9uX9U4e/1VMB52P6wam0ySktvuo8lXh/qsKP6Cbwy6P/Mw1u5fmyubf113J/0vvbD4PtpBrLwacJaCemKo/oms2jaQUksV4s/TPmqSN9/8d92JtqlSl/ve9lXk3dfCpUEsb3/tCUhJUrn+l0vekemy/oqXOUtY2x6PH4kv5au6x7HZSV5yOp/Pn7FUvqezixdY1MkKpKJUfRWW1B2w9sHlraS1rQHjxx9fn9u6lVKuzUur4uPA8lKXm9n+ZU3zUqpie+LyVEle/Dm6sG2J3X8HScHnraNfcM53xrDuNe5+T4GkaLvZqXw/eZKynRRUt9EE++i91DrwpxcvMfu+5sgJcymLlJXNosArlUvKq+7hQJjsVG4m+jVBIGXZoZR08LtRdEsx15RquHDuf2L7lx0kec1IVVBImTlUaMw2ccU1JaZsk0vy4pvaZnDWVfce9le7VOrUZn6wipX2Llhf5uR5W9Vz600sthnehfs5+LmVqLuj96P6d9LVPZa86qbrdvbNsCvoq5nCYarwema6+obtCzc/z5RqWzPRYHKHi9vvypq5+Xk4Y48x7+pc/ZcVfj5/VdkZd7dMfw1KDZmv4dX8YJfwsa2vRNUgUl5IsXHnnl93zOyLF5m846NQ1wOqr8nKjD6RVGbjq7Bq3uXuW3L05npVNgtKlaqKX25fXr398VvLO17tnq92ksLjvqu5p/4pkWxZ/x0u+V5gzTWVrju7Zym7F6xX8v3qOByOcYfVVfATi5eZGD8uzWvYvUDKjAvuq7WyiSEs1ffSmBMsbDabwUaCWNdeuj0q1Wr44Is7bd/yGd3v1r58lUvex7H3YY57lrfeL4pn9c0W1tOcKdysVivz5zqwho2H+lqpicXLhLLeGJeW1f2E3ZuycYTltmyQJO0H99LsdrvhRoxbFJcalmpzKG23Gn17+2nRn2XsU3ecPaFclVJ0Gk6s34vE5oYdvJKXOUuYZdngaPipb9fIq7Oop9zJPO6bwOriKZTyIptoYFU3C5kTLPj21syVOzUs1eYgW6W+vf3hLZeBr/tN2fBeSvHHsDL9252tV5DAca8SWJ76HY6su8LcXFyPM00sXripWNXdij2boncBaiipyIYRdtD0MZSEUt5134JqfdOysabZUi12eTWjwsC3t99d5l674xwzWWbey9Dq/1pHt5njBbxKYA0iKFWVDL1ZGeqb26YXL5R41TMSTIeD+ndQh1JW9GYJ9KYaM7W9qrkB2/WHNy+PImCJfqljh42qK7YGvrv9Q9m7mUD1vFv3mT4hlb3O5kQ5ZVo1hvFSXiWwAl86tN2BcqPq2PL6o87r+cULeXtJh5XZxtqsNbi5pJ7ztD/dSTk5hKVqgoWuzNiX8l5nbpfdcoNwv9ShYr1WNTY/9N3tj9s3/uBr4hvSYRjWYilvttDvouNFfPfm5/PsBQzjMfm3evncCURzrbfRkgnRTlodq+OpeC/qacIVp9KmbvqUm7Tu0E0tXihKdlL2X5zUX+CHXSEp7H3nhzupuS+nXpJKs52UbWYOaW/fpUO+bd5fHHbq3SA8bONVGXOp1P6aeSbV07qP17uw/XmlpTkW5VJ6zZWnU7JyfJvkVpLiQ6l1FaqHnRQQWC/nDrM1zFzwfsUd0t+1zXKV/6IgUJGnZXs/bJjspM0hCrxqsaqR2onFizfmbaRytwsDSUU12h/2nwQYGv81l8w1Ufb/jB+iZCflK7/KvCp1zDbceNx/YhaYXqmWNUP7vl/a/rxU4w5ZtJHy4g4n7gqNd38rSX6yUbmKYz9LD7p5/gc8t6suNLWtdk3Z9eLFFVpexa9eFHjtdez9ptP+wuIx+yXXH8PjbnThdigNLiAfPrM+HBWcyNzY6Hhrt2F/QPJxQamjNf3pXZ/e/twnU+k92cxcmDRrfuNKd1srrX6JJz+/tPuMYc3Ez0Tj6ycug/eMKZIVn9r42hvZEnb32E4sXir6TMz2Q3wajQFXE9f11tHcEJZkPrqqKrRXrfDqGdWtpfaKjD9O07v+je0XeTVQ2HfvZ1FY7Nsw8z5uup8az+3tqos/zaAZjzTZDAtfElU3jWFJUnHIi0K+Hw5GZNOsyOQFQRQsWbxYmudFIS/wgx87G1WkRZGX8gLfXzQX36tt/wZFmuWlH4ScIXxBbz8eWMPSfzSwALyyt28MuvfCa8G4exc9yzqERBWAgTtdh0WuAPh5P3/h6Kg99YTT/gFwwr0C6/ozhQBwpbu1sBZ3Cq+6MB4AOr9xL+Hb5A8AcIVbzhJWDaG30b+/q38+0fw3TS8A+qXZGt6s/xwilQDM+53pZegHAriD55kPiwYWgAt+KbAuN7HIKwCX/FYLi04hgG+75Szh+Mzduf/SDc7GfzkzCMDqzi2s6ZShiQXgu55n0B0ALrjDnO49MxPN/IoiK4rS873AOvt4Uah6jH0nL6VgMNeb9dnt9ofZh7ZX7DOf37zxIivKQoH52MN27bD/vrl9nyil2WymXIGC8PK8d/MlWXYTuJf7TOA39Z7l7jNp36F70pcXJ+ND718uKeo9LWKVSeFgpvO38SJJ2cqyxbP1FS8Mx/Pz3rjx6X1aZeanNL/v869mafcQ+TCan1r4hs94KMvyvAz8qUlB/+U6DrOw+G+0rDzkeRH4xic9eizHbHJailSRZkWvzNkixzXAz3qT7vAQiun3LDcu4foZ6k/9hok3egjBqXrhy1wWStJ2tAuW5x9Yn/ww+Yr/OVj9to1/DvbpY7D2sn2fK+V8/hpMvh4cxzu/rKSJ3RwUEU6vfT5Xj5gY1WA7WrZt0s5vX7D8GmYedTEu8qtNnva3N1ekpQb4WZJuCKwlS64xt625dwycqr+fMEmSul8zTKz6IQq9xaEkef3jS3cILOO5Pd/Y+Ge1I34YNl21fX/tRfs+W0rzqoKw7eMNMnRpSVO72bM3m1WWDR0lS2D5w2W2x+NYfgszgTUq0gzj5rc3UyQP6Pl9kl4nsAJJ3r4++qvG/uDvvm7LR+aycLxoJrDi40D7SmAs3AaS5H9/45+eJC85nc/n8/lU9b8+e2sv2ff5UqoMCuvGTv38oInjfL6kyd00HSXJT47H6hGtoyP9y7f84s7b4bJEkqJ9XUr9kuVvazqwRkV+BZL85OOY+Gq/RqaLtNYAP2t5Ghjvv3dgzW5r9i09e0n+qfs51jAzPlU/4dxs0tSNil7nRJOBZf/7Hz9DL5YGB+MtG//yJQXdPn0FkoLe2tW/Zvd9vpSTJ8kzjreqc2ltMlyoz+RuDouIu1p7w/dV3VNb989cdvLaOibdvg6+TGLJn+yajoo8R5Lir3a/4vki7TXAz3qGwJrf1vLAioZ/gOFwQaL6uXXb/rs8Df6yvx9Y51CDVsYtG08kBeZrX74Zb11gze77fClhP4PO5yruvP6iRfWZ3M3B63Hzw378idaD9cbOfH7Uz1U0dzA2thBN5OvJm2r4WIs0f4lfE5FrFLmkBri3VwosDb/mPoaHgy95X5/qNwpCKUwG77xDYH0Mq3PDxk/j4NibOdgF1ty+z5eyt4VT18DouVSfyd0cvt7+FEpefxNe9QTao/kWjULs7Bk7fBrWodsL+6/LXmQkqd257TCIR0UuqQHu7QkC68K2rgqsfmh8Df6MPqrD0Df/MKvM+Bp0D+4QWKdBtW/Z+DDKzufz2TOK7QXW5L7Pl+LL0jg4ef1qnpfVZ3I3jZL7Ufihccsw6p8ltKZL/1cRydYcSiZD01rkV69mpzAMx20mo8glNcDdff9K96acm9ev//9mMEu+qvyy95MXhqF5FU4mKbQ+L93bS1pfXfc5w8t/btn4QfKSwbJQ1muDZvZ9tpS0kPzRZUR+XK13fX2md7NSqPfRRP21tcmqj8MQhGEYhoPLeLN63fotsnwmxUHa2qowUWQq8ypcvxqvmi5yQQ3wQ64KuMsr3LbxGys02O7w2qeeuhH/qV7/KZTC6iuy+8LUfVpY5hf8DRv/lKVjdjoej6dubeMLY2Lf50uJZR19OckyjHyxPuep3ewMr7FSrxH8KenDeh3Wsb8s7P2VWH8x4ewlDeMiY11sJJlFLqgB7u/h9xLecUqGUNK77e6Z2qGsvhMDXyqG79t60m5m5atlqr53v7HxtF9ExR80Gysz+z5fSr+h0L0eWKq5oD6zuzmhaP9VvkuJpTbWdYxr1MNeKXVNMvnD1uClIoc3Sc0VebkG+BE/FVi/PzlMJKn4t7b2RCTj2LT1V/xE0uaOtUnVS4JbNl7IEhB2M/s+W0oxdZiGkoaBs6A+s7vZlGv0ncreZnbF0pAZh0M5+HEjWW4bmpFVJ2zLbLM5WKO2X+TFGuDHXNUiu7xC857rNn1jhUz1N54X7W3jvV9q+mj9/kpY98BCdaeptfTCUeOV3gpfsXp9hJs2Hlz6KIxuyfS+z5ZylPV0oOUM65L6TO5mZ3A+bW/+uj9U9Wsvdwm/BrULR+PrifU3OFPkWVJyPtXfMb6lf9cr8nIN8BPuP1vDVe7bDPt4zySpTFPz1pFG1+QJ/EJFPmwrbP9Ju+jSJAOH/lC0sQOF0UQqslKKjSHfmzZ+TQ91et9nSylVtStGPI2bDJfrc2k3Jd8vlHbLd2Zd1lKyrEVpqUl/UbGTruoQVi2mw6Zs1s/2g6r0i7xYA/ycqwJuuNq4iNs2P798YfV6f2TBtjeGGqg90967eLFp5JwTtV/+Wnov4fQrfu8qnps2bq+FoTfwO7Xvs6XYLlRo92i42sX6TO7mYIvttaex+SG2jZTLLazhGHd/BPx8PkeXG1iWIkNJ8usbKoeX4PeLvFgD/IiHD7rfV/x52rdTluSb/4zmUJHXt4xoaoBlG0jp5AjYtXyz4fIbG5/Z999yeTelxJfyf6kkZSuzjrvxFQ03y9JrG1jValJ0Oh2P571XnQH4fpG4t4d2Ce/Pj2PlWV4dKuU6bw8B8zKbwC9UpqPTUduVtL4wf1286CSWpCxLui7hzRu/qpsxue/TpVw7zd58fRbspryPVaniXaHyUvK8ZvA63yzuEF6209Q0hRfsqzZfHKxKZZlZxM1F4r5eLLAkKQikLDuUkg7tWaeDJK85PxUUUjY6mMJkp3Iz/y3vTf7RmpPuZelB2gXtFm7buFdef+ZpvO+zpcwG1jA+LtZnwW5KwXFVqj5V6H9smsBa1zcp3UOR9a/VaKeUtMzK2NNOXRhs19LB+F0Pi8QDXdWFHK42LuK2zc8vv6W7u/XUjUR8jopv7mEL1b/l9Xi+x4WjWxmnjW7ceKiJ+1sa0wMnxr7PlvJp31P74Nal+kzvZt9XfXGAl3y1NxMmxqDRTWcJzVOS8eAMZVuf3q6Ox7DMa2/9/mc7LPJCDfBDXmwMqyc5elJZj6OMh1PK8SCPt5W0vsv1NIlv9J9u3HggWx+su3dpbvPdvs+WMnlLSaHxzPSX6rNoNyV526/PfbI9fm095XVDLpeC3aaSS0o3m830vS7eoCZZr61YHm5oDYWqLpc1fzYuaR0WOV8D/JxbuoTzs7mfu38uMj9P/OIG20YK+n+mQbxr/+gs47/ZeCbuKEpV7CbuQLtOtJOa0/c3btyXpVNV36zXN7fv86VEqWQZaSptm7lUn2W7WVWviYayO9AzM6AOslSg442+VYzRv4Ok3naX/g2ZkeNJKtoFoyLna4Cf8zItrN1uN/w+7y7XTov+hX2fklJLU2p/1zt06g3cunHribbBLT+VuX2fLyWU7S5npeXwAL1cn6W7OVz7lpZJ0GsY5v1SDtWtQVeaXWNc5GwN8HN+JrAe8Kwv3343V/W9N7xlLvBlbRF4ie49bcPtG/dCS6fKGlhz+z5fSuQNmjaSpHInS6/qQn2W7uZw7VBqJlCo+PXPMwnQ753mMj+TvLhpfDwYf4ZtBSxFztUAP+uqMa/hCuaS9t+/UZWh0aSb5oSWo/mdEhlD2+ZYbKhqCpHvztZgjBzfvHHLFMJHc1E76D677/OljCYRPZ+rCzotH8B8STO7aS4MQ2OZbxurXjBbw1HmlKb92aiSYT0mDIrc9lcLzFMGliLnaoAf80KBtdfodq5Q9Ymf0byY1fx6p/pN4eAF766B9Y2Nh6Nye3OBtoE1t+8XSvnyNLokfS9LZFwqaW43Db00sn+iCwLr7Bk7PJioMVh4wm5Q5KlXl2OvTFuRMzXAj/mZLuFDHv4c+1Le683tsubEz3gI2Q9k76/4yf3uu8/a/9648a2k7N1Yss5lu+B6bt8vlOLtJR1W5lY3a0mJbcR7rqSFuxmpu4OwXMsyVLZILOVN0f3+a5HfdsWUHxkjiOXGrJm1yOka4IddFXCXV7tXBa6t4odkPgP0lEj1V+iXNGqxtxdKhbZGw/dbWG2X7FsbTyTJb2bYOwbqVaG7Dmt63y+XUl1emjRV3PsTuz9f0uxumkI1bbKvwP6BLmlhnbz20YGD5uXEbOxjwyI/1T496CvofQTWIqdrgJ/zHIFlL+rawKqOJvlRkiRJfZdHN4ozbLG3/ZVRZnzeJbCOzR/x9zZefct7UZIkcTUGbHTfjAtHJ/f9cinNo0/DJEmS+m7EcGpAZrKk2d0cfjDyt8ePxJP9OF8SWOetqgckVhMZG1d8RpZtWo2KTCQpbGpmPG3DXuRkDfBzlqeB8f4LIXI5n0Zu3lbf6K6a+pgNZPmGbL7eR5lR/+GOi78qsL6a7X9z48OLwqamCJja98ulnM8fw/Nx8893t751djd7zJqOhvubj+BiYE0+d9lbOIR1oUjzud0TRfLk598n6d6BNTxwFrlxW0On3oBIWP85nmS7SWSr6s9wnBlfvr4fWFXn7g4bP0WWXar0bs2x7/uCUs7dzTKVeLaBYi9pfjf7PtqNJdaG3LLAOrdDeZ4ZlJM3G43MFanI+Axm718a1wA/SHq7ahq9+avSR29ZzFbWgm2NFWlR5KW8wPcvTsbniiLNy0wKvCCavdZnft8vlJLmeVHIC/wgunTJ9tL6TCoPWV56QfjN31CRZnnpB+HFCl9ZpBcs3bEfqAFmvd09sG48Q2gp7KbAAvC63r5xL6E1UG69oqF5FqHxAyEFYOBl7iUE8PruG1gPuWQUwF9BCwuAM+4aWDSwAPykewYWeQXgR93+EArzjN6SqBqfWxwzzw9yWQOAAcawADiDwALgDAILgDMILADOILAAOOOWs4TXXb7QnOHrzgDOrD96qCHnBwG0nqyFxaVcAKb9eGBZmkhzrSYSC8Ckh7Sw6OcBuMVPB9bV2UQTC8CUHw4s2lIA7ue79xJKSxtFS+4llKS33vMnmH0UQOsOLaxLVyncsTwAf9r3A4t8AfBLnuw6LElEIIAJ3w6sn0gXEguAzXcDi2wB8GtuP0t4ranZRKff270fAPTtFhYNLAC/53uBRV4B+EXPeJYQAKy+FVg0sAD8pu8EFnkF4Ff9xlnCqfsBz/OZZ8w+yrlCAPpWC+seDSySCMBytwfWj3cI6XEC6Hv0WUKmSwaw2KMDi04hgMUeHlhzaGIBMN1ylvDCswXb99jO8b2N/n2eKeqNBhiAzo0tLNo+AH7fbYF117yiEQVgmWcYwyKxACxyU2BdvD79fuh7Amjdu4V1U15xMRaAJd6uyphHpQedRgB6e4oxLABYhMAC4AwCC4AzCCwAziCwADjjunsJOVsH4IFoYQFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWACcQWABcAaBBcAZBBYAZxBYAJxBYAFwBoEFwBkEFgBnEFgAnEFgAXAGgQXAGQQWAGcQWAAAAAAAAAAAAAAAAAAAAAAAAAAAAACewpt0fnQdAGCBN2ZrAOAOAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA44/8eXYE/qsyr/weeuTSr/uf75sI8L/L6vWFgL6XTX3VBEXOFGbzAqF9fOLVOXs7VqdpmlhelJN+LJnat/wE1RVYbrX+qyy8KW33qpd5ot4us+kx8L5zcAzyjM37fsf7wj72l9cKkW/KV9I52PznZSjEFyWd/U/NFzBfWCs36DUyUeGpejyc/hMgoxbPvWm+FffPmveXjamJn21slNOvffSbbXoDF/V8DntX4TwK/Y2Fg7Xvti+q4tpQyTBfz0L9QxMXCzAN+8mVbidt2e/aP4HPUsEm+xrXprTHYXP+npjjvy1zHGljb0WcSDlJ+LArDsHrXNgzD0P4Z4meN/iTwS5YFVmzNjq9RKUNed/hdKmJcJasLgWVrRXVtmL3tE9haSvG7elsC67OJmWZj9Y+DwOrXxRJYX9YuYL9hNvIlSTq1RRJYj8Cg+1PbHGxLs/eLK5arZjzq5iKudBhtp+iGxGxDX+uNZWGxmhlHK1b1AFa8n36TJB3mBuOk/D/rUNxmPb+WJHl++0/GvR6DwHpe2W5iue1Y7yvX3y7iSptysMBIsHT42lSQGkk7ful9YV5JszuXr8a1kSQdZlfLJCmQpKJs/4lfx1nC59WEjRcFvqQsaw7mQzIagxnKD/F3i7hOmQ46n6n572HHNO2C1A98FXnRFLP+lFUbZYGtL9mXHawd4XoDXV6FgZQ3Jxel3dzpwkKqU6o+t3ixFvghj+6X/kkLxrCaIzdoh9CPzem+7UQpX8f2SA0WFjFbu+HyXv3O5/P5fGrH9KP+W3u5M3jt/NWetwzrqn+2JwwTexWaHQuM4bf+Gkba+N2bhmNY7Xb8ff2mz/5nNsGX6sG4xLZH+BV0CZ9YPdLiU8vaHAAAH+hJREFUHbujuxl2tg7CSPLCfdNfysvbiriSHzfJMigw7f0w6IXtmlbN9lgHSvDRxIa9r7iuFwfHJU2bYqInLGVNveLPuC4p2Ddl5tMfSjlsYS2oBX4AgfW06oM6No5Qr+4OzaRN3Bz4+c1FXCeoNzjIpCZgqv+l1heVJN2yfd32KQfvlSTt6jW8j2VdsTYRRy/U/4/Nqz3CJrHsYSnVKWUEFmPuD0JgPa36mOuN7ka2N/Y1byluL+I6TWOjN1xet6miemv9JDjU4Rb2hqOaHyzD7s14uNFUvGBiAD2rczrsD9w3oTud4l1KMeb+UAy6P7teW8GLqx/z6QOm+e431ru2iOsEg/9Lag/9MKySIy/88YtKzDXkR1XbahxYWX3O0zsurnOaWdtATettOHCfVBlaWj6UTde9zN7af/5PUnJ5+B/3RmA9u6x3WF88pf9DRcywXSXQ9OsiL6jyJzWrUL84PCkX2jqDkvLmqrFFeRVWp/3WJ9uLTbWGBXnH+rbEBRvAI9ElfFr1QZWtJ64bmtC827+9iOvULaJe+jQ9Qq/pgZpZ1DSwhm2g+gr14RX37QWj+2XtqyqQrePuWV3SuFschGEYhiEXKzw7AutpNd/2h//WE00PqyYO/NuLuE7TXrJUImyzITe6pU2fb9nAdXvB6H764qqeuuG2s4T0dVvGEyKwnlbUfN2Xh/e3f5vdwvN6TTIFtxdxjXJdRZFvxknbI5T88XnCJkkWNZjaC0aX5lXTxCot4+7NSQgaUs5iDOtpebHRq8lzSUHgT09nVdvVyRB4NxdxUd5lQd7MUNWbAKE+KRh5kqIqcA7dIJatDznpvbnAfXFeyU92knSIx3NgVf+7Kq+2W0nvqepB9vRdkvd1TQm4IwLreW3LwXVBeS75UTweGW5PrBVp04iKriziGtm4pbbvDQuZvcSoSrfixrOSzabyzfJzcvU5v83U/BNGTYr+5zP1wXQXi+aDAvDrHnux/R+1bHqZxPoLS0aljLWTQl0qYrZ2w+VTWwv6s0k1J+iqOgTDTdrn1JuoQmc8yV5/Z4xi6xOhH8ONjfd+sJmpifwkSZ/tVphb5kEYw3pu25OtI7T7d/mkX3tv8+1FLBd/9psc7TUN1f96C2/3PnX1uqVCVUyNZpC4VdXM665zp4X1MATWU/P3X/txNyW/OJ1V1DWsbi3iCodVv49Yd7Pqxk0dWMX8LFWXlVdUudr90aUNtwYN17k/DQLryXnx/vR1TKJe5GTTN71JkqLexaE3FXGVbGWW1lzCUCeV5TzhdfZ18uXzU+yZwqpZeRg0ypqbnK+tweDOZ4/rSx+GQXcHVM91ybrZrLSbO2fmJeOBqyuLmGc8BqdpWm2i7tRbv0fYnidMm1Hzeu2l/bV9HP1Xvfew/FThNi0llZuP3tK6Rsv7ljXG3J8GgeWMMFTWXElVFFNf8l4YRpOn7ZcVcVHUnbAr6ytSzfn76sBqL4Sqk6lobu+7rp2zj+Xt697gJliaFfUFHWm/r1rvsbHrXnNxxdQlaoeiqWq+UbNvG41vLMKvILBcEobNvFD9tDkuP3imiriR9/Ff1V7pWi1p/c/RxQ9pM/dV/fPw/uTmEoP+HA6xpKi6skrletF0WJK0raqx6b0/rAe1sm7OvuY04Zvsusjrer3VnhFYj8AYlluag/kb16zfoQhTc+9Nu2CyXPMafNsbs12lt7Dq3TaPEbxiGKvazf6cfM2Wx+N3P3APAH4CgfWs0tVqtVqtBqfGvGu+1+9QxA0mB9ebG3amRuGba9pt6zYT96WTc4kORZbd9Jp0HeXTz91qibuiS/gY1m5Rbr7o1QdVae0ELeoZ3aGIxdoWluUROY2szouwenMxeFZEc1ORbVW/G8Zamrf7/8bLmhls1p/9vc/vec4UP4jAegzPq47r3ld98zXvSd1xO3jijG0S0Sl3KGKxNqZm2ippfbVFc4fjpnd6oLnM016vZhhL76eFSesn49ZYXM+dXGx6F36U0z3NKKjnVY491eNz1c2YDGE9yqMvt/+bmnvvPrpFzZFYP9q9HhPvP3m9OU1fLbTf4NNZUITV8qfmdPf+1D82twXXE0zVBjvb7Lz5CJzmMTtef9e6N7Qzm05UZ3THz5c5bXu9rM2p2Nj0qc1I6wd57CoSSBMPssZvYAzrYZpjeN12RtonfPavEC9XxmVDzWTBCydIuUMR12oaWMcev/9iE3J5d4n8blX/I56qV/PYiHzpQ2A9y+3S7QwOxtX5h38XHhUtNe0+LsN6NALrQZreULn+b5NmWbZ5/9ekSt2Ba47c/L91fWyl6/Zp7cs2cocirjW8arT+sX6x6fV1ibU6ZGWe7f5rOoSe/W5tGU9Q3S0dcBrPL9PFnvLVf5s0yw7r/12aj7W7zt24pxAP8+hm3h81ObV6+4xO89D1etP3Nr2iS13CBUVY3d4lbCZqGHSbPoeLJw/6ptdoq0KTsd6nrTqWSSC6uRi6pROfezD9QQZS/eDZ7XAD+F20sB4nnmjiBO0RtTWO6jLLunaAt/g5Enco4pLm8tOq7KbTN5g1Pajf1XbDpp4nkcw9hazZm3LpHPWhpbTYuufex3S7qesHdm0tPAiB9TD2OX/NRxtPHNVXPO3qHkVc0M4bL2mqRzjqE05VYP7JWV47jLX0+tGtZUCs9wzVtjr+5AdShWwo8dDnJ0BgPc7ecjgl5r0n3qdtQCf8vCJs7lDEBc3Zg81B9TTMspzzb5o67UUP3nFcMf/jwqyi7TDW0utHfduXQvw5rJ53DKYvSzNSijH3hyOwHig5Jf3DJD4NMmz7OTziwo/FTz++WxHzmuJTTfYIuz5hd5WWtz323+UnnxefSt32ozcLb51ObHvqH/tPDItPwcx1VYy5P5M3aXLiW/yCNKtbJX5gn2ahTPOiHvoJ/CC6JWruUMTPKNK8njwrDH559oM8rZ+fEQYXZrj/l6vuq+42ksLpeanx094IrKdQlJe+tsvc/27O3KGIH1HmD3vsVr6kubSR6qdTZJmk4GIzED+GwALgjDfGsAC4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM4gsAA4g8AC4AwCC4AzCCwAziCwADiDwALgDAILgDMILADOILAAOIPAAuAMAguAMwgsAM74v0dXYJG3+v/n+t/nwXJNLKuWD5csdzb+/TZYNqzH3Hun3tPfn+vraa4//Czmtmcrw/bvW+o0VU+zNNvPlz5D2+99pu5XV3y875O/4/t8KJcqM9ju3N/U1GtmcUvfM/XeJ+FGYH3P+ef/wF7RHT+1tyf8y39q7WfPBzfwFwLLEU8Wq3etzhuH3m2q3wKB3/oTgUUT6wnwO/gGPrwGg+7o4dDAM/sTLSwnPEVSPEUlMOeP964JLHTIKyf85cwisPD73v7uAXcnw4tA/gwC60n8scbNX24k3Msf+5OpMOiOB3n7kwccvocWFh4WHCTWHfyx7jWB9Rwed+ySGq77U79BuoQAnEFgAXAGgQXAGQTWU/hTwxBjf3z3sRyBhSdAYt3FH7hS5O8E1p86+eucP3Co/YqX/xz/TmA9s1f/K8PvefG/JQILeCmv3cj6Q4FFnxB/wysn1h8KLDy9Vz7SftMLN7L+UmDRxHp6r3ug/bKX/SD/UmBBT/+X/OTVc8erfpAE1t/y9H/HT19BPNSfCiz6hA7EgQNVxOP8qcC62qsdPE7szwuPGOPbCCw8HRILUwgsPB8SCxMIrFkcOY/B5w47AguAMwisP8KxNotj1cVvIbDmvcqB49x+OFdh/AoC68F+58Dk8MdrILD+AvLqb3uh3z/PJbzg7QUuj/+Rv9fmc3nr/v1Cx8WLeYW/4gqB9ViuHePnuRqfJff2CE4hsF7fvSLkZb6lf9vZaIX2fhtn4+efbaW+TBOLwLrE+V/1nQ6Baz6GMw2tWzXhdu/P71V+HwTWq3vQXyqZ9T10r+0IrId66b/I2fEuLGB2GSGJyxoWcPsv5ru1d71DjNdCC+u1fTOviKunQFu1RQvrkZ79z/AZ8urZP6PfcX6GX8UzILAue5pD5vo/2m9VnYMET4fAemXfy6t71eKbRT3N9wWeAIEFu7s2r77VWCOx0CKwFniSI8bpHprTlcfTILDwO76RWE/yhfEc/vjIIoGFX/K3D7Q7+tMfJIG1xFN8xTv/d3p72+ApPv/n8ZcbWQQW4Jy/278msFzxh79VnT/K7u/P/jUQWOj5s0eCY27/Pbkd/gTWIu79km+s8bPmlXu/gJ/2RxOLwHLEsyYJHuVvDr0TWDA87zHgdLPgh9z623L5sySwlnHtd3xbfZ83rwBJBNbDXJkoRAkgAutFudYgxK9y+M/j7wbWlW2Wx/6OaWAB0l8OLDwO+ftg7jaxCKzH+Nm/GHf/HnGtPxb+fziwHPpNO1TVZV5uh1zj7FfaHw4sPBCJdTd/66MksB7C2S84PJ8/lVh/ObD+1C/62fDhP5arX5l/ObCAl/CXwv9PB9bDftGufr3d0186ynA3fzqw4BiC/n4c/SwJLDwITSxcj8B6AEe/3ICHI7DwqLbODZsl6u/Hzc+SwALgDALr9z3bV9vDBpMYxcK1CCy45NnC3mVOfpYEFgBnEFi/7rovtp/vNtExgzsILADOILCeG80fwEBg/bZnG+p0LBKf7eNzmYufJYEFwBkE1lO3MJ66csCvI7B+mYvNcOBZEFi0YgBnEFjPjCwdo4n6pxFYAJxBYP1uO4b2AfANBNa1fjFy6BECfQQWAGcQWPrNlsxVzTMaWLjOH/iLIbCuxjDUY/H5/2UEFgBnEFi/iR4h8C0E1vXokwAPQmABL+P1W+UE1rN6/b894GoE1g3oEwKPQWABcAaB9aToEQJjBNYt6BM+Ep/+H0ZgPScaWIAFgQXAGQQWAGcQWDf56WEUeoSADYEFvI6X/6YjsAA4g8C6zc/2CV/+exK4DYH1S7h4CPg+AguAMwisG9FiAn4fgQXAGQTW76BBBtwBgQXAGQSWicsJgKdGYP0KeoTAPRBYAJxBYPXQJ/z/9u7sum1siQJoca1OgCkoBb0Q5BCcgjoEdwhyCHYIdghSCHYIVghyCHgfnCcQBDEV7t4fbYkAWWjo8rAwEIApE1hDsEUInRBYQBoC65BtQpgwgTUAW4QMZPZDTWAd0WLBdAksIA2B1b/Zt+kwFIF1D1EEgxJYZGM3Y8EEVu+0YdAVgQWkIbDuonuCIQmsvsk06IzAmhB7k7nP/D8dBdZ95j9CYEIEFpCGwOrZDS2YLUK4QmDdyTbh0OR6yQQWzEUBn54Cq1+2CKFDAuteBXyqwVQIrKnQYMFVAqtX2i/oksC6m1CCoQisibBF2JAVVTSB1SfNF3RKYN1PLMFABNY02NCBBgQWFCrjp6TA6sD924QjDp1kG7QZ32R0R2ABaQgsIA2BNQWjbuck2yakKym3rgUWmaR8k9EdgQWkIbCwTUgaAovRSMox5dy6FlgkCo6cbzK6I7CANAQWY8nT2M1R0mZVYNVJ+kedLX+P4gksRqLB4nYCq5aPdOYp68gWWIxDg9WZklalwILcSsorgXVF1s558op6l01P2nEtsEaWduQwEWVFv8DqSlnj5l7W1qjyfkwKrCtS/mknv9DyqjOFrUqBNa7JRwtMicC6pnGkTOmjbuI5OKVVVaKJD486AmtUiUcOjEBgQWEyf0wKrKtS/nnbLfSEN9VS/hXonMDqzu1v98m9CyecWJxo+dea3Ki7hcCaqZajcqqJlfpN1pOp/q16JbCuu/nNknkkZV72srT9S+XOfoFFArnfZL0o9JNFYDXQ9O1S6BhiBK3HWvLsF1hMX/I3WQ+K/Wz8Z+wFmKFiBxMDKXiE6bCasE3YhUWZu4m7V/IwE1gMpNS9Lp0rOa9sEjKQot9mHSp8PeqwGrnlQ35CI2pCvUn7tTKh/wlGJ7A6NaGwulfrPU69vxgFE1izdld30l3I3PNKGiz2CKxmsr5t7kssfRETI7C61vBNniMBJRbTIrAaahgwk3uH3xmMmqxJWPg7rAmscQzXYOVo5agjrbach9UxY2vLquiAlXhIYM1eNcqY90a7X5frcJxR0D2BNYpBt9O6GauLpHc8y6j79TebHQMCqwBdfbouYkYjf0CL7X/OTTjzc+fm81cTWNyk5n2lr5qq+eSVwBrF0AOojx0Yg3UHsOO0hiLM6COWogmsEYwQH+kSK90CMwiBVYhkAZBscRmKwGKC5BXnCazheTdeYw1xgcBicuQVlwgspkZecZHAGtyI78cUUZBiIRmJwCpKgjBIsIiMR2CVZfJxMPkFZFQCa2gjvyMnHggTXzzGJrCYEHnVlbmuSV9+HthcB1InrJyOzHdF6rBgbuabVwIL5mbGeWWTcGBzHktMwryHmA6LKajm/TYb0MxXpMC61cwHxDis1I7MPvhtEg5q7sOpJaulGwWsRx3WzQoYFTBRAmtIsg7uIrCANATW7ebVJ83r/4aZE1jFG+/AkqzsRknr0VFCernPaoOqYxSdobLWow6rhbKGSD9mf8LQUApbjzoshlfYm4zu6LDa8IZjdFWRTaoOi51xdmZxuxKzKiIEFgeqCJk1dcWGVYRNwpaKHjNtFbkJ07nC16IOi0GU/TajKwKL86oONw6l1X2qsKm+tjCagBwW9mEBeQgsIA2BBaQhsIA0BBaQhsAC0hBYQBoCC0hDYAFpCCwgDYEFpCGwgDQEFpCGwALSEFhAGgILSENgAWkILCANgQWkIbCANAQWkIbAAtIQWEAaAgtIQ2ABaQgsIA2BBaQhsIA0BBaQhsAC0hBYQBoCC0hDYAFpCCwgDYEFpCGwgDQEFpCGwALSEFhAGgILSENgAWkILCANgQWkIbCANAQWkIbAAtIQWEAa/4y9ABPy/vP3++9YPj5+frwwx9v638fl4cNvv98iHh+fPp95Ss20xnO2LZC/eB8Llr942Sqqqqo+nner5OnX2Vm+baa/7j/6+rB93sPL0TPqpjWes22B/MX7WLD8xQsWEQJr5cdh0/TtzCwf21n2A+v54HlPH1XDaYdq5mxbIH/xPhYsf/GSRYTAqqpqr3naOJNYX7YT9wLr+eh5jx/Nph2qmbNtgfzF+1iw/MWLFhECq6qq6tcyjv04mWc3bRdYX06e97nRtEM1c7YtkL94HwuWv3jZIkJgVVVVbfayL5+eNvsOlscfak+74bMNrG2IPT5tJ39rMO1QzZxtC+Qv3seC5S9euIgQWNVug/Clqna7O5/PzxOxF1jrAziPv6qq+rNOvYcG0w7VzNm2QP7ifSxY/uKFiwiBVW2bp/Wn2Mc6sQ5arNWD6y3HTWD9Wf26/HPwvNer0w7VzNm2QP7ifSxY/uKlc+JoRES8r86velrv6ly+rP79uT/P1/eIeD46QWs9x/NqTC3Xux7erk5r/CptC+Qv3seC5S9O6LCq6sdqRex2E6yGyv6Ozj8REcuPdSu2+bRb9+5/NnOtfn28Ou1QzZxtC+Qv3seC5S9euogQWNuDMruzRVet1nJvlqeIiJfqKLCWR/OtG7Cr0w7VzNm2QP7ifSxY/uKls0m4b7e9txoyf39vH/j5FhFPx0eb//49et56d8PblWmNX6VtgfzF+1iw/MURWHX+bn/4LyLi5Xj67+MHHnbPq5vW+FXaFshfvI8Fy18cgVVn+5n29T0ivpx8JXo9hE4e/31lWuNXaVsgf/E+Fix/cQTWnl3P/X444f1r7I7W7DkZQstm0xq/StsC+Yv3sWD5iyOwIrYfZtvA+nu0u+DfiIhvDcbNpcvSXJvWeM62BfIX72PB8hcvj8CK7Yj4vtlL8PVwd8Fqj/sNVyWqa96bN/Y1c7YtkL94HwuWv3hBBFZEPKwSa7VrPeL71/Xj73sPn1zOARicwIqIWJ/i/v1/39//vv377+bh1eGZ1R73h3PPAwblEskREc9fV83U739Pp71/jYiH0z3uwOB0WBFx5hSrncZ73IG+CayIiPh8uItq74KPP98i4vNT3KJu87H5pmXNnG0L5C/ex4LlL14Qm4Qrz7G3Nfjy8D0iVkcPv0dELNe74zcnaP18O9+UrQ/knG3H6qY1nrNtgfzF+1iw/MXLI7DWnh//W599tfz2eZ1P2yHy/Wjm7xHxcuYEmb3TIeqmHaqZs22B/MX7WLD8xRFYW4+v72/vv5cPj7sTrq5tCK4D7f348Ycr0xq/StsC+Yv3sWD5iyOw9jxsd12tBsvVEXLyrdT33eN10xq/StsC+Yv3sWD5ixPhOjtnrMbGc1Ud3HridLUdr8F1N/9xbdqhmjnbFshfvI8Fy1+8dIcrplyvr6+vr6/bSzyu71ryraquBNZ64ubKfx+rX1f3C6ibdqhmzrYF8hfvY8HyFy+d0xpWPn369OnTp+1xwvU+9s8RES+v+9Yfdi+vr68R2/2jm4u/r/9dDbi6aYdq5mxbIH/xPhYsf3FCh1VtLkq7+UxbX+L96cyMR5dIXrdiy9UT/6xf5sfVaYdq5mxbIH/xPhYsf/HSRYTAqrZ3Bl/+qKqq2pxgde7WlUeBtdm9sPxW7e5n+NBg2qGaOdsWyF+8jwXLX7xwESGwqqp6jbXl7la7Z+9SchxYP3ZP3J609a3BtEM1c7YtkL94HwuWv3jhIkJgVdX2zkr7fp2b7ziwzjzxsdG0a+Ufm7zIvIv3sWD5i5ctIgRWVVXVx8npxec/0U4C6+SJyz+Npl0pv5uzbYH8xftYsPzFyxYRAquqqtMhcqEDPwms4yc+7jdmddNqy+/P2bZA/uJ9LFj+4kWLCIG18rF/xavH1wtznQZWVX3Z+1bql6Oz++qmNZ6zbYH8xftYsPzFCxYRAmvjz8vqY+3h+cYjyB8v6/NnXk4b97ppjedsWyB/8T4WLH/xckUsIjZfBSDi/b3tCXpvj5cv/1E3rfGcbQvkL97HguUvXqSFwAKyWPhqDpCHwALSEFhAGgILSENgAWkILCANgQWkIbCANAQWkIbAAtIQWEAaAgtIQ2ABaQgsIA2BBaQhsIA0BBaQhsACAAAAAAAAAAAAAAAAAAAmYRFRjb0MAA0sXK0ByENgAWkILCANgQWkIbCANAQWkIbAAtIQWEAaAgtIQ2ABaQgsIA2BBaQhsIA0BBaQhsAC0hBYQBoCC0hDYAFpCCwgDYEFpCGwgDQEFpCGwALSEFhAGgILSENgAWkILCANgQWkIbCANAQWkIbAAtIQWEAa/4y9AMC0LCIiotr8UKM6nP/qz/Wv04QOCziveY4MRmABaQgs4ILptVgCC7ikq8S6ujesKYEF9KyzvHKUEDhnfYyvcdbsHxM8fbzdc0/psIDLJrYbS2ABaQgsoMa0WiyBBdSpSazudqY3JbCAtgZPLEcJgVp1RwrvTaxbNzh1WEC9Ce3GElhAGgILSENgAWkILCANRwmBK+qvPnrp+4NV7THE/Wf5LiHQpYmcPiqwgH70kGQCC2jg9harj85LYAFNTOL0UYEF3Gm4vViOEgIX7UdRzXcKF5v2a3e8r1mINT8+uKLDApqZwEahwALudtJP9bSVKLCAhsY/GUtgAU013ii86cT4GwgsoAOLi790yVFC4IxVI7Q4+bmb1z18Nd8lBIa1OPvjsTuPNAosoBND7HcXWMBg7j2VS2AB3bjeYt196qnAAjrS/0aho4TAGadH7qrDSS1Ue/+99VuEKzos4DaXU6b3FktgAWkILOBG4122QWABtxotsQQWkIajhMAZ7e4b2Oz1dr8vauY4R4cFpCGwgP51tNdLYAG962ovvcAC0hBYQN86Ow3CUULginvz5txVRquDKU3psIA0BBbQrw7PixdYQEvDf0NHYAFtNUqsLmNNYAF96rQNc5QQOOP0joSnydPoen2LuufeevVRHRaQhsAC0hBYQBoCC0hDYAFpOEoInHHpmN3eEb0bbupVf2XR5mc+6LCANAQW0Er/N6Y/JbCANsbIK4EF5CGwgBZGabBiMeZtp4HpaXKvwNvj6vwr3XZfwoUOCxhCNx2ZwALSEFjArdq0S520WAILSENgATdq1yx10WL5LiFwxv61QPcfifbJszh9ZfclBGZLYAE3GeeU0RWBBaQhsIBbjNlgCSzgFqPmlaOEwGX7R/SaRNXpscVTp3ck3H9uPR0WkIbAAtIQWEAaAgtIQ2ABaThKCJxx2+kLmyN8uyOANc8/uamh+xICU3XHqVwCC7jXmRaprmtqn1gCC+hDL3e3EVjAnW7OptYtlsAC7jPgnQIdJQQu2mVRs6aoyXcJIyIW1X7KNb/6qA4LuO7aWQodvl4dgQVcNe5FZXYEFjCCdhEosIBr+miwWr2mwAKumMoGoaOEQIcuXU308ry7+ZvQYQH1ptNgCSyg3oTySmABeQgsoM6UGiyBBdSZVF45Sgh04dL3Aav6zNu7+qjvEgL36aLB6vBqDgILuKj3DcIbCwgsoGfdXS5ZYAF962yjUGABY7qpxXKUEDjjyr0Ft/OcO8a3OPm5qnmphe8SAneb1ilYESGwgAs6zauO9mIJLGAA3SSWwALOuXp++jClDgks4Eat8qqTk7EWg94FEZi8sfa1X0+ihQ4LyENgAWkILCANgQWkIbCANHyXEDgw5fMGdFhAGgILSENgAWkILCANgQWkIbCANAQWkIbAAtIQWEAaAgtIQ2ABaQgsIA2BBaQhsIA0BBaQhsAC0hBYQBoCC0hDYAFpCCwgDYEFpCGwgDQEFpCGwALSEFhAGgILSENgAWkILCANgQWkIbCANAQWkIbAAtIQWAAAAMX6Pw4OzyU6FDkcAAAAAElFTkSuQmCC\",\n \"label_epl2_url\": null,\n \"label_file_type\": null,\n \"updated_at\": \"2025-06-16T17:45:37Z\",\n \"id\": \"pl_40234f8c82284c89b68ddb4661ca345d\",\n \"label_zpl_url\": null,\n \"label_date\": \"2025-06-16T17:45:37Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2025-06-16T17:45:36Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2025-06-16T17:45:36Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_95ead285a19c41c78096ce53f9a65ea9\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n },\n \"fees\": [\n {\n \"amount\": \"0.00000\",\n \"refunded\": false,\n \"type\": \"LabelFee\",\n \"charged\": true,\n \"object\": \"Fee\"\n },\n {\n \"amount\": \"6.07000\",\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 \"created_at\": \"2025-06-16T17:45:36Z\",\n \"to_address\": {\n \"zip\": \"94107-1670\",\n \"country\": \"US\",\n \"city\": \"SAN FRANCISCO\",\n \"created_at\": \"2025-06-16T17:45: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\": \"2025-06-16T17:45:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_b5c8d3b64ad911f0aec9ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100208303109991634\",\n \"tax_identifiers\": null,\n \"mode\": \"test\",\n \"reference\": null,\n \"luma_info\": {\n \"matching_rule_idx\": 0.0,\n \"ruleset_description\": \"Buy the cheapest rate that satisfies all of the following:\\nRule 0\\n \\nOtherwise buy the cheapest rate\",\n \"ai_results\": [\n {\n \"meets_ruleset_requirements\": true,\n \"carrier\": \"USPS\",\n \"rate_id\": \"rate_4f2d82d062404510a5014ecda00128df\",\n \"predicted_deliver_by_date\": \"2025-06-19\",\n \"service\": \"Priority\",\n \"rate_usd\": \"7.42\",\n \"predicted_deliver_days\": 3.0\n },\n {\n \"meets_ruleset_requirements\": true,\n \"carrier\": \"USPS\",\n \"rate_id\": \"rate_03a8866aefc94098b0749f91671f981e\",\n \"predicted_deliver_by_date\": \"2025-06-19\",\n \"service\": \"GroundAdvantage\",\n \"rate_usd\": \"6.07\",\n \"predicted_deliver_days\": 3.0\n },\n {\n \"meets_ruleset_requirements\": true,\n \"carrier\": \"USPS\",\n \"rate_id\": \"rate_b51c7bddfdd4464288c2e85fc5263f5a\",\n \"predicted_deliver_by_date\": \"2025-06-17\",\n \"service\": \"Express\",\n \"rate_usd\": \"34.15\",\n \"predicted_deliver_days\": 1.0\n }\n ]\n },\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.57\",\n \"created_at\": \"2025-06-16T17:45:37Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a4398d9b962c434496bfdba2a0d7ca6a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.85\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2025-06-16T17:45:37Z\",\n \"rate\": \"6.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_18f9606c7e274ddda005a2c6aba6fdfa\",\n \"object\": \"Rate\"\n },\n \"updated_at\": \"2025-06-16T17:45:37Z\",\n \"messages\": [],\n \"id\": \"shp_a4398d9b962c434496bfdba2a0d7ca6a\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2025-06-16T17:45: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\": \"2025-06-16T17:45:36+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_b5cb171d4ad911f0aeceac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"forms\": [],\n \"object\": \"Shipment\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "72561" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "afd263ff68505840e2baa9c1006f9f1d" + ], + "x-proxied": [ + "intlb4nuq ec99f2d065", + "extlb2nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.833157" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202506161725-4166f0359d-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/luma" + }, + "duration": 947 + } +] \ 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..01fd62017 100644 --- a/src/test/cassettes/shipment/create_empty_objects.json +++ b/src/test/cassettes/shipment/create_empty_objects.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456957, + "recordedAt": 1723823928, "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}", "method": "POST", @@ -18,69 +18,69 @@ "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\": \"2024-08-16T15:58:47Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6c40f1745be811efa5903cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_c9fd5ab7f567435d81544cec1da24b6b\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6c40f1745be811efa5903cecef1b359e\",\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\": \"2024-08-16T15:58:47Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-08-16T15:58:47Z\",\n \"customs_certify\": false,\n \"eel_pfc\": null,\n \"customs_signer\": null,\n \"id\": \"cstinfo_70b9c334156446edaa3e3915cd1b464d\",\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\": \"2024-08-16T15:58:47Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:47Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_3f967a3628a3490daeef1e7f9cee0ce4\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6c3e0dff5be811efba16ac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:48Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9fd5ab7f567435d81544cec1da24b6b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:48Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d82c5d3c8485490cbd8ad4e0ab55c253\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:48Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9fd5ab7f567435d81544cec1da24b6b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:48Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_506522a9f12c4cf89261b2405b05e241\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:48Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9fd5ab7f567435d81544cec1da24b6b\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:48Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8cd1bebb0e674ac2bb15d49a801c93c0\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:47+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6c3e0dff5be811efba16ac1f6bc539ae\",\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_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_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\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "6368" + "5832" ], "expires": [ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92346307d23cf7ca6bd4000931f6" + "8a4bf43a66bf7737e786c50600360c8f" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.753790" + "0.702912" ], - "etag": [ - "W/\"17af29f72dccf2205b4a63fda47d216d\"" + "location": [ + "/api/v2/shipments/shp_c9fd5ab7f567435d81544cec1da24b6b" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_4fc2e39146b2461eb95a383fe53558c1" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +90,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 954 + "duration": 913 } ] \ 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 deleted file mode 100644 index 3e926fec5..000000000 --- a/src/test/cassettes/shipment/create_shipment_with_carbon_offset.json +++ /dev/null @@ -1,98 +0,0 @@ -[ - { - "recordedAt": 1661456956, - "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", - "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-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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 201 Created" - ], - "content-length": [ - "6312" - ], - "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": [ - "b57a92356307d23bf7a5b1f00009315e" - ], - "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "1.059440" - ], - "etag": [ - "W/\"ec47dcc02519c54ea00f4abe8b7cb9ab\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "location": [ - "/api/v2/shipments/shp_7535a545b318481cac81c65deb13dbb0" - ], - "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments" - }, - "duration": 1257 - } -] \ 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..6df9f6bdc 100644 --- a/src/test/cassettes/shipment/create_tax_identifiers.json +++ b/src/test/cassettes/shipment/create_tax_identifiers.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456975, + "recordedAt": 1723823960, "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}", "method": "POST", @@ -18,69 +18,66 @@ "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\": \"2024-08-16T15:59:19Z\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7f20fec65be811efae563cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_2f2a5fa00fef46fc8af72f1e7459e6d9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7f20fec65be811efae563cecef1b359e\",\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\": \"2024-08-16T15:59:19Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:19Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f625052ff56642de8d160445820ca40f\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7f1e60ff5be811efbf8bac1f6bc539aa\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2f2a5fa00fef46fc8af72f1e7459e6d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f73b11d674c6444bb168bfa72c098d3a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2f2a5fa00fef46fc8af72f1e7459e6d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2e90ceac4d9f4a2e9ed7fa973894c005\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2f2a5fa00fef46fc8af72f1e7459e6d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0750ab5bbd7f47f9a965cbec4c24a288\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7f1e60ff5be811efbf8bac1f6bc539aa\",\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_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_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_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}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "6074" + "5538" ], "expires": [ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92326307d24ef7de9ff6000937de" + "8a4bf43a66bf7757e786c8e200362b7b" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.037520" + "0.770196" ], - "etag": [ - "W/\"7892ba2f9eaf6364dc9b9e1a86a6c424\"" + "location": [ + "/api/v2/shipments/shp_2f2a5fa00fef46fc8af72f1e7459e6d9" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_c71785e084af494ebdc92b3837fe423c" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +87,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1192 + "duration": 983 } ] \ 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..29b0e9bf0 --- /dev/null +++ b/src/test/cassettes/shipment/create_with_ids.json @@ -0,0 +1,376 @@ +[ + { + "recordedAt": 1723823950, + "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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_798f5fa15be811efbc4cac1f6bc53342\",\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": [ + "bigweb41nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf774ee786c5a700362301" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.034627" + ], + "location": [ + "/api/v2/addresses/adr_798f5fa15be811efbc4cac1f6bc53342" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/addresses" + }, + "duration": 248 + }, + { + "recordedAt": 1723823950, + "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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_79ca970d5be811ef80d4ac1f6bc539ae\",\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": [ + "bigweb43nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43d66bf774ee786c5a90036236d" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.035994" + ], + "location": [ + "/api/v2/addresses/adr_79ca970d5be811ef80d4ac1f6bc539ae" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/addresses" + }, + "duration": 248 + }, + { + "recordedAt": 1723823950, + "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\": \"2024-08-16T15:59:10Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:10Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_07defb8fc3764c5180a234b55ac16519\",\n \"object\": \"Parcel\",\n \"height\": 4.0\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "229" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb43nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43b66bf774ee786c5ab003623d8" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.032076" + ], + "location": [ + "/api/v2/parcels/prcl_07defb8fc3764c5180a234b55ac16519" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/parcels" + }, + "duration": 241 + }, + { + "recordedAt": 1723823952, + "request": { + "body": "{\n \"shipment\": {\n \"parcel\": {\n \"id\": \"prcl_07defb8fc3764c5180a234b55ac16519\"\n },\n \"to_address\": {\n \"id\": \"adr_79ca970d5be811ef80d4ac1f6bc539ae\"\n },\n \"from_address\": {\n \"id\": \"adr_798f5fa15be811efbc4cac1f6bc53342\"\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\": \"2024-08-16T15:59:11Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_798f5fa15be811efbc4cac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_6f8b6a9cf8774f5083e0b167cf42c680\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_798f5fa15be811efbc4cac1f6bc53342\",\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\": \"2024-08-16T15:59:10Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:10Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_07defb8fc3764c5180a234b55ac16519\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_79ca970d5be811ef80d4ac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:12Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6f8b6a9cf8774f5083e0b167cf42c680\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:12Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d0ad02fc510e4a178516a192844a28d4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:12Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6f8b6a9cf8774f5083e0b167cf42c680\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:12Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_402ddd6106c34830be00c38369e0fd93\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:12Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_6f8b6a9cf8774f5083e0b167cf42c680\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:12Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3a683bd020ad4304b73e4c7d2a40180a\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_79ca970d5be811ef80d4ac1f6bc539ae\",\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_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_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": [ + "5436" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb33nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44066bf774fe786c5c40036243f" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.951816" + ], + "location": [ + "/api/v2/shipments/shp_6f8b6a9cf8774f5083e0b167cf42c680" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1162 + } +] \ No newline at end of file diff --git a/src/test/cassettes/shipment/generate_form.json b/src/test/cassettes/shipment/generate_form.json deleted file mode 100644 index d315bc09f..000000000 --- a/src/test/cassettes/shipment/generate_form.json +++ /dev/null @@ -1,197 +0,0 @@ -[ - { - "recordedAt": 1661456954, - "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", - "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.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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 201 Created" - ], - "content-length": [ - "7077" - ], - "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": [ - "b57a92346307d239f7a7418c0009309c" - ], - "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.996200" - ], - "etag": [ - "W/\"b87b93e204e69e63cbe9ae3b40e836be\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "location": [ - "/api/v2/shipments/shp_7772489f34614a3eb023c61c402ff675" - ], - "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments" - }, - "duration": 1132 - }, - { - "recordedAt": 1661456955, - "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_7772489f34614a3eb023c61c402ff675/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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 201 Created" - ], - "content-length": [ - "8545" - ], - "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": [ - "b57a92366307d23af7cd295a0009310f" - ], - "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.550263" - ], - "etag": [ - "W/\"67e06077895d15d2f435fd5ce4c67599\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "location": [ - "/api/v2/shipments/shp_7772489f34614a3eb023c61c402ff675/forms/return_packing_slip" - ], - "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_7772489f34614a3eb023c61c402ff675/forms" - }, - "duration": 679 - } -] \ No newline at end of file diff --git a/src/test/cassettes/shipment/generate_form_with.json b/src/test/cassettes/shipment/generate_form_with.json new file mode 100644 index 000000000..a15631f47 --- /dev/null +++ b/src/test/cassettes/shipment/generate_form_with.json @@ -0,0 +1,186 @@ +[ + { + "recordedAt": 1723823926, + "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\": \"GroundAdvantage\",\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.93000\",\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\": \"2024-08-16T15:58:45Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:46Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_030b1b61d7e141cfb08324374e6f3636\",\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\": \"2024-08-16T15:58:46Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"tracking_code\": \"9400100105807076063072\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzFhNDU3Mzg3NjFkZTQ3NzRhZWZhNjBjMDVlY2U1MGI5\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"signed_by\": null,\n \"id\": \"trk_1a45738761de4774aefa60c05ece50b9\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6ae2d32f5be811efb4f8ac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6ae2d32f5be811efb4f8ac1f6bc53342\",\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\": \"2024-08-16T15:58:46Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8ed0c6e5cc4b14c9aa3947af893080c7b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"id\": \"pl_53b177cdbe5642dbaf14f7160093aace\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:46Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a111c1d2487b436883419352ed3fda54\",\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\": \"2024-08-16T15:58:45+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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6ae041595be811efb601ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_70f14f2a74c4482a8500e6aa9e637366\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_abcc372cd93d43a49349583604d6573f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_030b1b61d7e141cfb08324374e6f3636\",\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\": \"2024-08-16T15:58:45+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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6ae041595be811efb601ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063072\",\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": [ + "6549" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb40nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43d66bf7735e786c50200360a38" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.968397" + ], + "location": [ + "/api/v2/shipments/shp_59adc36e44d54e6c81876fc9d58af473" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1193 + }, + { + "recordedAt": 1723823927, + "request": { + "body": "{\n \"form\": {\n \"type\": \"return_packing_slip\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_59adc36e44d54e6c81876fc9d58af473/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.93000\",\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\": \"2024-08-16T15:58:45Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:46Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_030b1b61d7e141cfb08324374e6f3636\",\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\": \"2024-08-16T15:58:46Z\",\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\": \"2024-07-16T15:58:46Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:46Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"tracking_code\": \"9400100105807076063072\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzFhNDU3Mzg3NjFkZTQ3NzRhZWZhNjBjMDVlY2U1MGI5\",\n \"est_delivery_date\": \"2024-08-16T15:58:46Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"signed_by\": null,\n \"id\": \"trk_1a45738761de4774aefa60c05ece50b9\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6ae2d32f5be811efb4f8ac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6ae2d32f5be811efb4f8ac1f6bc53342\",\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\": \"2024-08-16T15:58:46Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8ed0c6e5cc4b14c9aa3947af893080c7b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"id\": \"pl_53b177cdbe5642dbaf14f7160093aace\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:46Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a111c1d2487b436883419352ed3fda54\",\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\": \"2024-08-16T15:58:45+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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6ae041595be811efb601ac1f6bc539aa\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_70f14f2a74c4482a8500e6aa9e637366\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_abcc372cd93d43a49349583604d6573f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_030b1b61d7e141cfb08324374e6f3636\",\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\": \"2024-08-16T15:58:45+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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6ae041595be811efb601ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063072\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [\n {\n \"mode\": \"test\",\n \"submitted_electronically\": null,\n \"updated_at\": \"2024-08-16T15:58:47Z\",\n \"form_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20240816/6408d49f334e43e3b356e0550374bc4a.pdf\",\n \"created_at\": \"2024-08-16T15:58:47Z\",\n \"id\": \"form_31463e4d95294c0fb413fe6fbb5ade9c\",\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": [ + "8013" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb40nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43b66bf7736e786c50400360b9a" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.606702" + ], + "location": [ + "/api/v2/shipments/shp_59adc36e44d54e6c81876fc9d58af473/forms/return_packing_slip" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_59adc36e44d54e6c81876fc9d58af473/forms" + }, + "duration": 814 + } +] \ 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..c8bc5f768 --- /dev/null +++ b/src/test/cassettes/shipment/generate_form_with_option.json @@ -0,0 +1,186 @@ +[ + { + "recordedAt": 1723823966, + "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\": \"GroundAdvantage\",\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.93000\",\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\": \"2024-08-16T15:59:25Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:26Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:26Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:26Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2dfeb5fc585b457695877fd497bcd6b4\",\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\": \"2024-08-16T15:59:26Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"tracking_code\": \"9400100105807076063287\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzRjMDc0MjhjYWE2MzQ4OTU5ODRmZWYwNGUzOTRlNTg0\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:26Z\",\n \"signed_by\": null,\n \"id\": \"trk_4c07428caa634895984fef04e394e584\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_82b9789f5be811ef8428ac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_82b9789f5be811ef8428ac1f6bc539ae\",\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\": \"2024-08-16T15:59:26Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e83400537bf15d44279fd7ef1af6a44b8a.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:26Z\",\n \"id\": \"pl_46430efed0d545d9a7f557da2387fbba\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:59:26Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:25Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:25Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_4f0b9056dcea44f186156082701966ae\",\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\": \"2024-08-16T15:59:25+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\": \"2024-08-16T15:59:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_82b65b7b5be811ef8094ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"rates\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:25Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:25Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2dfeb5fc585b457695877fd497bcd6b4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:25Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:25Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_50969c8b169749d9b56ca0ca2da117df\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:25Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:25Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f37aff5459bd4f0a95b891d42846ccb4\",\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\": \"2024-08-16T15:59:25+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\": \"2024-08-16T15:59:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_82b65b7b5be811ef8094ac1f6bc539aa\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063287\",\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": [ + "6549" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb35nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44066bf775de786c9010036303a" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "1.020698" + ], + "location": [ + "/api/v2/shipments/shp_cbf7a2104f9e4746a67c6ffbe6532cac" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1232 + }, + { + "recordedAt": 1723823967, + "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_cbf7a2104f9e4746a67c6ffbe6532cac/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.93000\",\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\": \"2024-08-16T15:59:25Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:26Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:26Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:26Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2dfeb5fc585b457695877fd497bcd6b4\",\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\": \"2024-08-16T15:59:26Z\",\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\": \"2024-07-16T15:59:26Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:36:26Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"tracking_code\": \"9400100105807076063287\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzRjMDc0MjhjYWE2MzQ4OTU5ODRmZWYwNGUzOTRlNTg0\",\n \"est_delivery_date\": \"2024-08-16T15:59:26Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:26Z\",\n \"signed_by\": null,\n \"id\": \"trk_4c07428caa634895984fef04e394e584\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_82b9789f5be811ef8428ac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_82b9789f5be811ef8428ac1f6bc539ae\",\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\": \"2024-08-16T15:59:26Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e83400537bf15d44279fd7ef1af6a44b8a.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:26Z\",\n \"id\": \"pl_46430efed0d545d9a7f557da2387fbba\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:59:26Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:25Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:25Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_4f0b9056dcea44f186156082701966ae\",\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\": \"2024-08-16T15:59:25+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\": \"2024-08-16T15:59:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_82b65b7b5be811ef8094ac1f6bc539aa\",\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\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:25Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:25Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2dfeb5fc585b457695877fd497bcd6b4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:25Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:25Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_50969c8b169749d9b56ca0ca2da117df\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:25Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:25Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f37aff5459bd4f0a95b891d42846ccb4\",\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\": \"2024-08-16T15:59:25+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\": \"2024-08-16T15:59:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_82b65b7b5be811ef8094ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063287\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [\n {\n \"mode\": \"test\",\n \"submitted_electronically\": null,\n \"updated_at\": \"2024-08-16T15:59:27Z\",\n \"form_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20240816/9f8f75c5ae2f44db818fcf3428ff20ea.pdf\",\n \"created_at\": \"2024-08-16T15:59:27Z\",\n \"id\": \"form_121b7225729e4db1af3b540dd2312f15\",\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": [ + "8013" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb35nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf775ee786c9030036315f" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.623393" + ], + "location": [ + "/api/v2/shipments/shp_cbf7a2104f9e4746a67c6ffbe6532cac/forms/return_packing_slip" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_cbf7a2104f9e4746a67c6ffbe6532cac/forms" + }, + "duration": 843 + } +] \ 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..34ccac055 --- /dev/null +++ b/src/test/cassettes/shipment/get_lowest_smartrate.json @@ -0,0 +1,186 @@ +[ + { + "recordedAt": 1723823943, + "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\": \"2024-08-16T15:59:02Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:03Z\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7539f7695be811efa8df3cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_a47bae8202544e7fb36712593a235fca\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7539f7695be811efa8df3cecef1b359e\",\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\": \"2024-08-16T15:59:02Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:02Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_3103705e29054470b5ef1729f4c32d2f\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_753720975be811efb8c7ac1f6bc53342\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:03Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a47bae8202544e7fb36712593a235fca\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:03Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6b6d838a9efb46b0afc87b8d68a7354d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:03Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a47bae8202544e7fb36712593a235fca\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:03Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4678fe663ad84319bf2a048915c9d5b3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:03Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a47bae8202544e7fb36712593a235fca\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:03Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_023b19689d764f9bbda63f754163c3c9\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:02+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_753720975be811efb8c7ac1f6bc53342\",\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\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\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": [ + "5340" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf7746e786c56900361a2f" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.771110" + ], + "location": [ + "/api/v2/shipments/shp_a47bae8202544e7fb36712593a235fca" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 972 + }, + { + "recordedAt": 1723823943, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_a47bae8202544e7fb36712593a235fca/smartrate" + }, + "response": { + "body": "{\n \"result\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 33.1,\n \"created_at\": \"2024-08-16T15:59:03Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a47bae8202544e7fb36712593a235fca\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 37.9,\n \"updated_at\": \"2024-08-16T15:59:03Z\",\n \"rate\": 33.1,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 4.0,\n \"percentile_99\": 7.0\n },\n \"service\": \"Express\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6b6d838a9efb46b0afc87b8d68a7354d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.25,\n \"created_at\": \"2024-08-16T15:59:03Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a47bae8202544e7fb36712593a235fca\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.8,\n \"updated_at\": \"2024-08-16T15:59:03Z\",\n \"rate\": 6.9,\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\": 3.0\n },\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4678fe663ad84319bf2a048915c9d5b3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 6.4,\n \"created_at\": \"2024-08-16T15:59:03Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_a47bae8202544e7fb36712593a235fca\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 8.45,\n \"updated_at\": \"2024-08-16T15:59:03Z\",\n \"rate\": 5.93,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 2.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 3.0\n },\n \"service\": \"GroundAdvantage\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_023b19689d764f9bbda63f754163c3c9\",\n \"object\": \"Rate\"\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1965" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb43nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf7747e786c58100361b10" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.107607" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_a47bae8202544e7fb36712593a235fca/smartrate" + }, + "duration": 306 + } +] \ No newline at end of file diff --git a/src/test/cassettes/shipment/get_next_page.json b/src/test/cassettes/shipment/get_next_page.json new file mode 100644 index 000000000..546d83711 --- /dev/null +++ b/src/test/cassettes/shipment/get_next_page.json @@ -0,0 +1,174 @@ +[ + { + "recordedAt": 1723823931, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/shipments?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "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.93000\",\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\": \"2024-08-16T15:58:45Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:46Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_030b1b61d7e141cfb08324374e6f3636\",\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\": \"2024-08-16T15:58:46Z\",\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\": \"2024-07-16T15:58:46Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:46Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"tracking_code\": \"9400100105807076063072\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzFhNDU3Mzg3NjFkZTQ3NzRhZWZhNjBjMDVlY2U1MGI5\",\n \"est_delivery_date\": \"2024-08-16T15:58:46Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"signed_by\": null,\n \"id\": \"trk_1a45738761de4774aefa60c05ece50b9\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6ae2d32f5be811efb4f8ac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6ae2d32f5be811efb4f8ac1f6bc53342\",\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\": \"2024-08-16T15:58:46Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8ed0c6e5cc4b14c9aa3947af893080c7b.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:46Z\",\n \"id\": \"pl_53b177cdbe5642dbaf14f7160093aace\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:46Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a111c1d2487b436883419352ed3fda54\",\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\": \"2024-08-16T15:58:45+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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6ae041595be811efb601ac1f6bc539aa\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_70f14f2a74c4482a8500e6aa9e637366\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_abcc372cd93d43a49349583604d6573f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:45Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_59adc36e44d54e6c81876fc9d58af473\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_030b1b61d7e141cfb08324374e6f3636\",\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\": \"2024-08-16T15:58:45+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\": \"2024-08-16T15:58:45+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_6ae041595be811efb601ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063072\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [\n {\n \"mode\": \"test\",\n \"submitted_electronically\": null,\n \"updated_at\": \"2024-08-16T15:58:47Z\",\n \"form_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20240816/6408d49f334e43e3b356e0550374bc4a.pdf\",\n \"created_at\": \"2024-08-16T15:58:47Z\",\n \"id\": \"form_31463e4d95294c0fb413fe6fbb5ade9c\",\n \"form_type\": \"return_packing_slip\",\n \"object\": \"Form\"\n }\n ],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\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.93000\",\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\": \"2024-08-16T15:58:43Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:44Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:44Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3ba4fdeceae445a0a276d2825b8b97c4\",\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\": \"2024-08-16T15:58: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\": \"2024-07-16T15:58:45Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:45Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"tracking_code\": \"9400100105807076063058\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzJkMmVjZTFmY2MzMjQwZmQ5N2Y3ZmJhYjU1NTk1NjYz\",\n \"est_delivery_date\": \"2024-08-16T15:58:45Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:45Z\",\n \"signed_by\": null,\n \"id\": \"trk_2d2ece1fcc3240fd97f7fbab55595663\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_69930adf5be811efb902ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:43+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_69930adf5be811efb902ac1f6bc539ae\",\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\": \"2024-08-16T15:58:44Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8cf18db3e20874e55bf9a20f97aee8dfb.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:44Z\",\n \"id\": \"pl_dffd36f121724d69a36603eafa30b950\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:44Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_ee8d4039129f4a15bdf53915f34a6b19\",\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\": \"2024-08-16T15:58:43+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\": \"2024-08-16T15:58:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_698f52d85be811efb8fdac1f6bc539ae\",\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\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3ba4fdeceae445a0a276d2825b8b97c4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_16cdbe21590a433e8caa76725f192345\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:43Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_84ff320daac94718b511207c1538cdf0\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:43Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a4ca58d3d8704bbc81088e47f7ca9a9d\",\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\": \"2024-08-16T15:58:43+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\": \"2024-08-16T15:58:44+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_698f52d85be811efb8fdac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063058\",\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_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 \"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 \"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\": \"6.33000\",\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\": \"2024-08-16T15:58:39Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:42Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_119edccd62c24583b6e7f59ced7b5d49\",\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\": \"2024-08-16T15:58: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\": \"2024-07-16T15:58:42Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:42Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"tracking_code\": \"9434600105807076063043\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzUwOTc3YWQ1NTc2ZTQ0ZTg5OGJiMzJlODBhZTk5ZmIx\",\n \"est_delivery_date\": \"2024-08-16T15:58:42Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"signed_by\": null,\n \"id\": \"trk_50977ad5576e44e898bb32e80ae99fb1\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\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\": \"2024-08-16T15:58:42Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e807e421f9466e4883a480b82b1e71f19e.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"id\": \"pl_a8680e95f49c4f15bc068bdcd9e620f3\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:42Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:39Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_0a6f94b2055f4d7888ee1294c5b4fece\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\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.97\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_b1784194fdd8469fade7b00b5f5e9a7e\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_119edccd62c24583b6e7f59ced7b5d49\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_d3372f9181154b6cb7bb5341ac6f1890\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fe13d12f237c4ece984468ced5737017\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9434600105807076063043\",\n \"messages\": [],\n \"order_id\": \"order_64ba299ed95a46a4a3a341cb78e5fdf7\",\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.07000\",\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\": \"2024-08-16T15:58:39Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:41Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:41Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:41Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d7e2d2ac36db42ffbbc0aebb8a1e0128\",\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\": \"2024-08-16T15:58: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\": \"2024-07-16T15:58:42Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:42Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"tracking_code\": \"9400100105807076063027\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2FmMmE3NjU2YjY2NTRjYWFhMTU2N2E0NjNhMzQ3ZmI1\",\n \"est_delivery_date\": \"2024-08-16T15:58:42Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:42Z\",\n \"signed_by\": null,\n \"id\": \"trk_af2a7656b6654caaa1567a463a347fb5\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:39+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_677a32925be811efb48eac1f6bc539aa\",\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\": \"2024-08-16T15:58:41Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8bf48473c72b74f8682106707cb6abc70.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:41Z\",\n \"id\": \"pl_111ca27882714b1fb6e539f4d0e22da1\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:41Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:39Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:39Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_d081bb2780ec4e08bb5bb8f17e58a7c5\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_38ac5fb715e14cabb3029bde5b09d9f5\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_4be8395f399b4279b64677dd495f9519\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:40Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f55e6727e2a945d8941a89ccfa9f5176\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:40Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d7e2d2ac36db42ffbbc0aebb8a1e0128\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:42+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6778a38a5be811efb83aac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063027\",\n \"messages\": [],\n \"order_id\": \"order_64ba299ed95a46a4a3a341cb78e5fdf7\",\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\": \"6.33000\",\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\": \"2024-08-16T15:58:27Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:30Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"7.75\",\n \"created_at\": \"2024-08-16T15:58:30Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:30Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ec4cc7aee65e451c841afb8bf730a913\",\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\": \"2024-08-16T15:58:31Z\",\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\": \"2024-07-16T15:58:31Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:31Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"tracking_code\": \"9434600105807076063005\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Q3ZTNlNjNhYjUwNzRjYmY5NTUxODI2OGExNmNlZjU1\",\n \"est_delivery_date\": \"2024-08-16T15:58:31Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:31Z\",\n \"signed_by\": null,\n \"id\": \"trk_d7e3e63ab5074cbf95518268a16cef55\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\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\": \"2024-08-16T15:58:30Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8240f500213e54273b72a7aedaa0c0fcc.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:30Z\",\n \"id\": \"pl_c2de163b7f2a4c848f788b3f7ff881a0\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:30Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:27Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:27Z\",\n \"weight\": 17.5,\n \"id\": \"prcl_b7ce992c1a6146af9aa35ef207154021\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58:27+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\": \"2024-08-16T15:58:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\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\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"10.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"6.33\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ec4cc7aee65e451c841afb8bf730a913\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"37.20\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"42.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"37.20\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_56c7ac22afd448ee8182c2bc6697d74a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.97\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b79ed690e1284bfabfbe00ae6d608a6e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.50\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"7.58\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_142c56933c0048cea318dcb67ba08ec2\",\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\": \"2024-08-16T15:58:27+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\": \"2024-08-16T15:58:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9434600105807076063005\",\n \"messages\": [],\n \"order_id\": \"order_e4f72f9fe91a4373b85ee59ebc901c86\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "39973" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf773be786c52400360f8f" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.628856" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 836 + }, + { + "recordedAt": 1723823933, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/shipments?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%73%68%70%5F%62%37%39%65%64%36%39%30%65%31%32%38%34%62%66%61%62%66%62%65%30%30%61%65%36%64%36%30%38%61%36%65" + }, + "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.07000\",\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\": \"2024-08-16T15:58:27Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:29Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:29Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:29Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_35ad1f2c242b4dd48535ea3d9d187980\",\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\": \"2024-08-16T15:58:31Z\",\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\": \"2024-07-16T15:58:31Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:31Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"tracking_code\": \"9400100105807076062990\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2VjMTZjZGFiNjY3ZjRkMTViNWM5YjNiMjVmOWNlYjMw\",\n \"est_delivery_date\": \"2024-08-16T15:58:31Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:31Z\",\n \"signed_by\": null,\n \"id\": \"trk_ec16cdab667f4d15b5c9b3b25f9ceb30\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6053a6475be811efb143ac1f6bc539aa\",\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\": \"2024-08-16T15:58:29Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e86c978345cd4f48dc810c16053dcb3646.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:29Z\",\n \"id\": \"pl_0b1e99ab251a4803be6acd77ee9457b2\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:29Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:27Z\",\n \"predefined_package\": null,\n \"length\": null,\n \"width\": null,\n \"created_at\": \"2024-08-16T15:58:27Z\",\n \"weight\": 10.2,\n \"id\": \"prcl_a7382a7799af4894bcf12b345fd26cb8\",\n \"object\": \"Parcel\",\n \"height\": null\n },\n \"refund_status\": null,\n \"buyer_address\": {\n \"zip\": \"90277-2506\",\n \"country\": \"US\",\n \"city\": \"REDONDO BEACH\",\n \"created_at\": \"2024-08-16T15:58:27+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\": \"2024-08-16T15:58:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\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.25\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_8d70c771dffe437da59d254a905db12c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.07\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.70\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"5.07\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_35ad1f2c242b4dd48535ea3d9d187980\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:28Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4eed7a3b2dda4082b533932e10b67860\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:28Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_18f88c8de8f04e299efe6e193ffc647b\",\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\": \"2024-08-16T15:58:27+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\": \"2024-08-16T15:58:30+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_6051d02a5be811efb141ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076062990\",\n \"messages\": [],\n \"order_id\": \"order_e4f72f9fe91a4373b85ee59ebc901c86\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\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.93000\",\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\": \"2024-08-16T15:58:16Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:18Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:18Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1afc79ef71b2437e92cfd3c63b048ab9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:18Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fd24e3261ce744278f2ed3c7c8dcaf67\",\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\": {\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\": \"2024-08-16T15:58: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\": \"2024-07-16T15:58:19Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:19Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_1afc79ef71b2437e92cfd3c63b048ab9\",\n \"tracking_code\": \"9400100105807076062921\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzIzODcyZWMyYWNhYTRjMzk5OGMxMjk2OTJhMzZhMWY1\",\n \"est_delivery_date\": \"2024-08-16T15:58:19Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:19Z\",\n \"signed_by\": null,\n \"id\": \"trk_23872ec2acaa4c3998c129692a36a1f5\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_59cd49c35be811ef9be93cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_1afc79ef71b2437e92cfd3c63b048ab9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:16+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_59cd49c35be811ef9be93cecef1b359e\",\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\": \"2024-08-16T15:58:16Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-08-16T15:58:16Z\",\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\": \"2024-08-16T15:58:16Z\",\n \"currency\": null,\n \"id\": \"cstitem_336c5d5edc174b6689a59d03ec675c27\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-08-16T15:58:16Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_784643c82f9d4d32bb4bb5c26eff9891\",\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\": \"2024-08-16T15:58:18Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e80a9db992a2964b8191f41676ecdd84a4.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:18Z\",\n \"id\": \"pl_8488eb6770d74aed950e5d8a866d91ae\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:18Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:16Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:16Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_fff2452a5e1e4fa1a06e7c7eba1da93d\",\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\": \"2024-08-16T15:58:16+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\": \"2024-08-16T15:58:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_59ca397c5be811efb07fac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:17Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1afc79ef71b2437e92cfd3c63b048ab9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:17Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e450974e8330445980763f8550980068\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:17Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1afc79ef71b2437e92cfd3c63b048ab9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:17Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_466796cb688146cc9257ed2764d46e6b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:17Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_1afc79ef71b2437e92cfd3c63b048ab9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:17Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fd24e3261ce744278f2ed3c7c8dcaf67\",\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\": \"2024-08-16T15:58:16+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\": \"2024-08-16T15:58:18+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_59ca397c5be811efb07fac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076062921\",\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_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_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 \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\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.93000\",\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\": \"2024-08-16T15:58:13Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:15Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:14Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_92744ae3e4364c35b4ed9035695dd218\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:14Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6ab1c9a644434a60965f202b0bd0c015\",\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\": {\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\": \"2024-08-16T15:58:15Z\",\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\": \"2024-07-16T15:58:15Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:15Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_92744ae3e4364c35b4ed9035695dd218\",\n \"tracking_code\": \"9400100105807076062891\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2RlMGRiOWNjNzk4OTQ5NTY4MTBmOGNhMWMwZjA0Y2M1\",\n \"est_delivery_date\": \"2024-08-16T15:58:15Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:15Z\",\n \"signed_by\": null,\n \"id\": \"trk_de0db9cc79894956810f8ca1c0f04cc5\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_57b215cc5be811efaed1ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_92744ae3e4364c35b4ed9035695dd218\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:13+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_57b215cc5be811efaed1ac1f6bc539ae\",\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\": \"2024-08-16T15:58:13Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-08-16T15:58:13Z\",\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\": \"2024-08-16T15:58:13Z\",\n \"currency\": null,\n \"id\": \"cstitem_636ad30e4cf544dda272979e7f91eeb3\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-08-16T15:58:13Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_16d06543b82042f5bd35be276196fdf3\",\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\": \"2024-08-16T15:58:14Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e839d686d1009e4bc9974b735dd4969268.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:15Z\",\n \"id\": \"pl_a576d9ef88814863954eb80d44fcdd21\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:14Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:13Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:13Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_93f8cc781a9c40d5bff4fd2110e8a655\",\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\": \"2024-08-16T15:58:13+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\": \"2024-08-16T15:58:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_57ada9625be811efaa4fac1f6bc53342\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:13Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_92744ae3e4364c35b4ed9035695dd218\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:13Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7e32455f0bb84bb9931acdda29a8f6a0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:13Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_92744ae3e4364c35b4ed9035695dd218\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:13Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_cbf4db8ababe4b2aa4db29ebedae0dda\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:14Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_92744ae3e4364c35b4ed9035695dd218\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:14Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6ab1c9a644434a60965f202b0bd0c015\",\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\": \"2024-08-16T15:58:13+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\": \"2024-08-16T15:58:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_57ada9625be811efaa4fac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076062891\",\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_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_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_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 \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\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.93000\",\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\": \"2024-08-16T15:58:09Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:11Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:11Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_54ad1de739464651a50980f4b4246eee\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:11Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e7c5c42dc7df4c809d21bcc0803d009f\",\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\": {\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\": \"2024-08-16T15:58:11Z\",\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\": \"2024-07-16T15:58:11Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:11Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_54ad1de739464651a50980f4b4246eee\",\n \"tracking_code\": \"9400100105807076062877\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2IxMjQwNWY5YTI1OTQ1YjhhYmJhMGY4MjY2NzlmZDU0\",\n \"est_delivery_date\": \"2024-08-16T15:58:11Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:11Z\",\n \"signed_by\": null,\n \"id\": \"trk_b12405f9a25945b8abba0f826679fd54\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_556441dc5be811ef98f73cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_54ad1de739464651a50980f4b4246eee\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_556441dc5be811ef98f73cecef1b359e\",\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\": \"2024-08-16T15:58:09Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-08-16T15:58:09Z\",\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\": \"2024-08-16T15:58:09Z\",\n \"currency\": null,\n \"id\": \"cstitem_d5a2b35028304acd86920b91741a118f\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-08-16T15:58:09Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_caf290593d384b9781ea2fa53a749be1\",\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\": \"2024-08-16T15:58:11Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8b5bd40b77aaa480080aa2dafe01f37c2.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:58:11Z\",\n \"id\": \"pl_46cd6d9f6bf146e4876b3761e1fbc357\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:58:11Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:58:09Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:09Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_bcf062fe38294b62a42b8ba8f5b1df03\",\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\": \"2024-08-16T15:58:09+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\": \"2024-08-16T15:58:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_5561a0585be811efadbdac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:10Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_54ad1de739464651a50980f4b4246eee\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:10Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7a3d6a60c9ab4e0c9513ff3287898869\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:10Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_54ad1de739464651a50980f4b4246eee\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:10Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_129584660d90495ba5fcb9af18dd1c1f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:10Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_54ad1de739464651a50980f4b4246eee\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:10Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e7c5c42dc7df4c809d21bcc0803d009f\",\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\": \"2024-08-16T15:58:09+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\": \"2024-08-16T15:58:10+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"ELIZABETH SWAN\",\n \"company\": null,\n \"street1\": \"179 N HARBOR DR\",\n \"id\": \"adr_5561a0585be811efadbdac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076062877\",\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_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_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 \"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.93000\",\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\": \"2024-08-16T15:57:53Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:57:55Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_03f256d69a44470d8e39bb47baf93af1\",\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\": \"2024-08-16T15:57:54Z\",\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\": \"2024-07-16T15:57:54Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:34:54Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"tracking_code\": \"9400100105807076062822\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzBhZGEwYzY0YTU0NDQzYTFiMjQxMTM2MTQ2MGU2ZjBh\",\n \"est_delivery_date\": \"2024-08-16T15:57:54Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:57:54Z\",\n \"signed_by\": null,\n \"id\": \"trk_0ada0c64a54443a1b2411361460e6f0a\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4bcd16f15be811ef93b63cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_4bcd16f15be811ef93b63cecef1b359e\",\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\": \"2024-08-16T15:57:53Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e88dbc7a3cf93842f9920c71b9c3d71409.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:57:54Z\",\n \"id\": \"pl_637972bd21af452fa61c22c68aa23fae\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:57:53Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_1553867a55f84a3bae09ab7a95a2ed22\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4bc9c2125be811efa8b1ac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d61fb30bd1c74c19bbe5190441a9b677\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_68a60f118ce6487c948c09a8ed8736b3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:57:53Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:57:53Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_03f256d69a44470d8e39bb47baf93af1\",\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\": \"2024-08-16T15:57: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\": \"2024-08-16T15:57:53+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_4bc9c2125be811efa8b1ac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076062822\",\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": [ + "44293" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf773ce786c52500361070" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.739625" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%73%68%70%5F%62%37%39%65%64%36%39%30%65%31%32%38%34%62%66%61%62%66%62%65%30%30%61%65%36%64%36%30%38%61%36%65" + }, + "duration": 947 + } +] \ No newline at end of file diff --git a/src/test/cassettes/shipment/get_next_page_parameter_hand_off.json b/src/test/cassettes/shipment/get_next_page_parameter_hand_off.json new file mode 100644 index 000000000..40be5ff34 --- /dev/null +++ b/src/test/cassettes/shipment/get_next_page_parameter_hand_off.json @@ -0,0 +1,88 @@ +[ + { + "recordedAt": 1723823970, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/shipments?%70%75%72%63%68%61%73%65%64\u003d%66%61%6C%73%65\u0026%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%69%6E%63%6C%75%64%65%5F%63%68%69%6C%64%72%65%6E\u003d%74%72%75%65" + }, + "response": { + "body": "{\n \"has_more\": true,\n \"shipments\": [\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:59:27Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_842132085be811ef804aac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4b226cf19b5642d69f374880045412d1\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_842132085be811ef804aac1f6bc53342\",\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\": \"2024-08-16T15:59:27Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-08-16T15:59:27Z\",\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\": \"2024-08-16T15:59:27Z\",\n \"currency\": null,\n \"id\": \"cstitem_19dfcaf9a31147b193f4e655af5c6330\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-08-16T15:59:27Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_cccd3624b091446382e8347d4068fb69\",\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\": \"2024-08-16T15:59:27Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:27Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a8e68738eb0d4200bb159fbc00d9a38d\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_841e561c5be811ef84b5ac1f6bc539ae\",\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.25\",\n \"created_at\": \"2024-08-16T15:59:29Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4b226cf19b5642d69f374880045412d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:29Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2d18e0151d8a43ce8a07a11614689fd4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:29Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4b226cf19b5642d69f374880045412d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:29Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3b475d28703940f6a8e0153d26265c32\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:29Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4b226cf19b5642d69f374880045412d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:29Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2e6e89533af440acb464a5d2bcfb628a\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_841e561c5be811ef84b5ac1f6bc539ae\",\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_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_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 },\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.93000\",\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\": \"2024-08-16T15:59:25Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:26Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:26Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:26Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2dfeb5fc585b457695877fd497bcd6b4\",\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\": \"2024-08-16T15:59:26Z\",\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\": \"2024-07-16T15:59:26Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:36:26Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"tracking_code\": \"9400100105807076063287\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzRjMDc0MjhjYWE2MzQ4OTU5ODRmZWYwNGUzOTRlNTg0\",\n \"est_delivery_date\": \"2024-08-16T15:59:26Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:26Z\",\n \"signed_by\": null,\n \"id\": \"trk_4c07428caa634895984fef04e394e584\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_82b9789f5be811ef8428ac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_82b9789f5be811ef8428ac1f6bc539ae\",\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\": \"2024-08-16T15:59:26Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e83400537bf15d44279fd7ef1af6a44b8a.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:26Z\",\n \"id\": \"pl_46430efed0d545d9a7f557da2387fbba\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:59:26Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:25Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:25Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_4f0b9056dcea44f186156082701966ae\",\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\": \"2024-08-16T15:59:25+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\": \"2024-08-16T15:59:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_82b65b7b5be811ef8094ac1f6bc539aa\",\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\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:25Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:25Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2dfeb5fc585b457695877fd497bcd6b4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:25Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:25Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_50969c8b169749d9b56ca0ca2da117df\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:25Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_cbf7a2104f9e4746a67c6ffbe6532cac\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:25Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f37aff5459bd4f0a95b891d42846ccb4\",\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\": \"2024-08-16T15:59:25+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\": \"2024-08-16T15:59:25+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_82b65b7b5be811ef8094ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063287\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [\n {\n \"mode\": \"test\",\n \"submitted_electronically\": null,\n \"updated_at\": \"2024-08-16T15:59:27Z\",\n \"form_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20240816/9f8f75c5ae2f44db818fcf3428ff20ea.pdf\",\n \"created_at\": \"2024-08-16T15:59:27Z\",\n \"id\": \"form_121b7225729e4db1af3b540dd2312f15\",\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.93000\",\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\": \"2024-08-16T15:59:22Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:23Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d43143b1ff274c86aaa1b309a295eb17\",\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\": \"2024-08-16T15:59:23Z\",\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\": \"2024-07-16T15:59:23Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:36:23Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"tracking_code\": \"9400100105807076063263\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzA5ZDQxMDgwOTg2MTRmYWRiM2Q3OGYwYjc2NmE4ODA5\",\n \"est_delivery_date\": \"2024-08-16T15:59:23Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:23Z\",\n \"signed_by\": null,\n \"id\": \"trk_09d4108098614fadb3d78f0b766a8809\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_80d66f705be811ef838aac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_80d66f705be811ef838aac1f6bc539ae\",\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\": \"2024-08-16T15:59:22Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e84dc499ee756147d68df4b34eac679492.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:24Z\",\n \"id\": \"pl_c17618284675441cb2570e0c10395b70\",\n \"label_zpl_url\": \"https://easypost-files.s3-us-west-2.amazonaws.com/files/postage_label/20240816/d76049cad6b940dbb15b73e954242321.zpl\",\n \"label_date\": \"2024-08-16T15:59:22Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_5b0b226e670c4b4e9314d71750d65470\",\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\": \"2024-08-16T15:59:22+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\": \"2024-08-16T15:59:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_80d3cb275be811efaed93cecef1b359e\",\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.25\",\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6228387051f2418bada036d885f95c75\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_d43143b1ff274c86aaa1b309a295eb17\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:22Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_070e965fd1cb43d8940afb3f8b40113d\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:22Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6fb2039692b84311a5925407b9971c34\",\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\": \"2024-08-16T15:59:22+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\": \"2024-08-16T15:59:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_80d3cb275be811efaed93cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063263\",\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.93000\",\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\": \"2024-08-16T15:59:20Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:21Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:21Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:21Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ad8ed23080e0419984f243e28211ba7f\",\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\": \"2024-08-16T15:59:21Z\",\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\": \"2024-07-16T15:59:21Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:36:21Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"tracking_code\": \"9400100105807076063256\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2M5ZmE4OTVhYjlmYTQ5NTBiNzMzOWJmYWNiMDc2MzIw\",\n \"est_delivery_date\": \"2024-08-16T15:59:21Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:21Z\",\n \"signed_by\": null,\n \"id\": \"trk_c9fa895ab9fa4950b7339bfacb076320\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7fcb86db5be811efbfc9ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7fcb86db5be811efbfc9ac1f6bc539aa\",\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\": \"2024-08-16T15:59:21Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8730e1ee74ac140cea1c5e5b64619c264.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:21Z\",\n \"id\": \"pl_fad221aefff143f893040d14293357dd\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:59:21Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_aae7db8d78f94c98b218b441e74d7928\",\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\": \"2024-08-16T15:59:20+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\": \"2024-08-16T15:59:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7fc92f985be811efae8a3cecef1b359e\",\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.25\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bf39967c006a43fa9d91516204617ae3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ad8ed23080e0419984f243e28211ba7f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f7bf1becca794586969955ace10eddc2\",\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\": \"2024-08-16T15:59:20+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\": \"2024-08-16T15:59:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7fc92f985be811efae8a3cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063256\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n },\n {\n \"insurance\": null,\n \"fees\": [],\n \"batch_id\": null,\n \"batch_message\": null,\n \"batch_status\": null,\n \"created_at\": \"2024-08-16T15:59:19Z\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7f20fec65be811efae563cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_2f2a5fa00fef46fc8af72f1e7459e6d9\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7f20fec65be811efae563cecef1b359e\",\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\": \"2024-08-16T15:59:19Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:19Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_f625052ff56642de8d160445820ca40f\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7f1e60ff5be811efbf8bac1f6bc539aa\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2f2a5fa00fef46fc8af72f1e7459e6d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f73b11d674c6444bb168bfa72c098d3a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2f2a5fa00fef46fc8af72f1e7459e6d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2e90ceac4d9f4a2e9ed7fa973894c005\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_2f2a5fa00fef46fc8af72f1e7459e6d9\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0750ab5bbd7f47f9a965cbec4c24a288\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:19+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7f1e60ff5be811efbf8bac1f6bc539aa\",\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_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_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_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 }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "35336" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43b66bf7761e786c91f00363415" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.440606" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments?%70%75%72%63%68%61%73%65%64\u003d%66%61%6C%73%65\u0026%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%69%6E%63%6C%75%64%65%5F%63%68%69%6C%64%72%65%6E\u003d%74%72%75%65" + }, + "duration": 647 + } +] \ 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..3b806748f --- /dev/null +++ b/src/test/cassettes/shipment/get_smartrate_list.json @@ -0,0 +1,183 @@ +[ + { + "recordedAt": 1723823942, + "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\": \"2024-08-16T15:59:01Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_746a08bc5be811efa8913cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_aa8b00cce6f841709fbe816032eb404e\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_746a08bc5be811efa8913cecef1b359e\",\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\": \"2024-08-16T15:59:01Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:01Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_5cbeb7a411be42e9935a4a9a63e9ceb1\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_74670c045be811efb994ac1f6bc539aa\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:02Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_aa8b00cce6f841709fbe816032eb404e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:02Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fc1dee8518584d8e9f6405a8da326eff\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:02Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_aa8b00cce6f841709fbe816032eb404e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:02Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_781ada61f2d84f8f8cfcde477e72c38f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:02Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_aa8b00cce6f841709fbe816032eb404e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:02Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e97eeea3d50b4df58a2ad9a91146c2ac\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:01+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_74670c045be811efb994ac1f6bc539aa\",\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\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\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": [ + "5340" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb36nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43d66bf7745e786c56500361901" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.675151" + ], + "location": [ + "/api/v2/shipments/shp_aa8b00cce6f841709fbe816032eb404e" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 876 + }, + { + "recordedAt": 1723823942, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_aa8b00cce6f841709fbe816032eb404e/smartrate" + }, + "response": { + "body": "{\n \"result\": [\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 33.1,\n \"created_at\": \"2024-08-16T15:59:02Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_aa8b00cce6f841709fbe816032eb404e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 37.9,\n \"updated_at\": \"2024-08-16T15:59:02Z\",\n \"rate\": 33.1,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 4.0,\n \"percentile_99\": 7.0\n },\n \"service\": \"Express\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_fc1dee8518584d8e9f6405a8da326eff\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.25,\n \"created_at\": \"2024-08-16T15:59:02Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_aa8b00cce6f841709fbe816032eb404e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.8,\n \"updated_at\": \"2024-08-16T15:59:02Z\",\n \"rate\": 6.9,\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\": 3.0\n },\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_781ada61f2d84f8f8cfcde477e72c38f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 6.4,\n \"created_at\": \"2024-08-16T15:59:02Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_aa8b00cce6f841709fbe816032eb404e\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 8.45,\n \"updated_at\": \"2024-08-16T15:59:02Z\",\n \"rate\": 5.93,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 2.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 3.0\n },\n \"service\": \"GroundAdvantage\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e97eeea3d50b4df58a2ad9a91146c2ac\",\n \"object\": \"Rate\"\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1965" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf7746e786c567003619c0" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.111661" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_aa8b00cce6f841709fbe816032eb404e/smartrate" + }, + "duration": 328 + } +] \ No newline at end of file diff --git a/src/test/cassettes/shipment/insure.json b/src/test/cassettes/shipment/insure.json index b0fedf20c..dd7a1d16b 100644 --- a/src/test/cassettes/shipment/insure.json +++ b/src/test/cassettes/shipment/insure.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456973, + "recordedAt": 1723823955, "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 \"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\": \"GroundAdvantage\",\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,69 +18,66 @@ "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.93000\",\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\": \"2024-08-16T15:59:15Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:15Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf09342c7e414155ac82f406b71a3a82\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a3ff301f594d4d31bc4fbfd4a8310030\",\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\": \"2024-08-16T15:59:15Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_bf09342c7e414155ac82f406b71a3a82\",\n \"tracking_code\": \"9400100105807076063232\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE2OGQyMmVmMmUxNDQ2MDY4ZWQxODcwMTdkZDZkYTEy\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"signed_by\": null,\n \"id\": \"trk_168d22ef2e1446068ed187017dd6da12\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7c6d06d45be811ef820bac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_bf09342c7e414155ac82f406b71a3a82\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7c6d06d45be811ef820bac1f6bc539ae\",\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\": \"2024-08-16T15:59:15Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8d3944a2579d841e38eb51983247df5df.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"id\": \"pl_62aea740a0934613a5f0a3df28c911e4\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:59:15Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:14Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:14Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_9ce939f163e5473eb156be93d389e4be\",\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\": \"2024-08-16T15:59:14+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\": \"2024-08-16T15:59:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7c6aa0f05be811efbda6ac1f6bc53342\",\n \"street2\": \"\",\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.25\",\n \"created_at\": \"2024-08-16T15:59:15Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf09342c7e414155ac82f406b71a3a82\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_aaadded36e794ad2a85b32a6243be741\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:15Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf09342c7e414155ac82f406b71a3a82\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a3ff301f594d4d31bc4fbfd4a8310030\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:15Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf09342c7e414155ac82f406b71a3a82\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7035f396d7084290913d226fcdcf172c\",\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\": \"2024-08-16T15:59:14+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\": \"2024-08-16T15:59:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7c6aa0f05be811efbda6ac1f6bc53342\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063232\",\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": [ - "6984" + "6456" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb39nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92326307d24cf7cb83cf0009373f" + "8a4bf43b66bf7752e786c5cb003627b1" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.928615" + "0.910967" ], - "etag": [ - "W/\"1d11f78250176161f90fbc37bcd64378\"" + "location": [ + "/api/v2/shipments/shp_bf09342c7e414155ac82f406b71a3a82" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_0eae6e28526141489f1af86a0dbfbf66" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1071 + "duration": 1115 }, { - "recordedAt": 1661456973, + "recordedAt": 1723823956, "request": { "body": "{\n \"amount\": \"100\"\n}", "method": "POST", @@ -111,69 +107,69 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_0eae6e28526141489f1af86a0dbfbf66/insure" + "uri": "https://api.easypost.com/v2/shipments/shp_bf09342c7e414155ac82f406b71a3a82/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.93000\",\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\": \"2024-08-16T15:59:15Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:15Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf09342c7e414155ac82f406b71a3a82\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a3ff301f594d4d31bc4fbfd4a8310030\",\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\": \"2024-08-16T15:59:15Z\",\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\": \"2024-07-16T15:59:15Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:36:15Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_bf09342c7e414155ac82f406b71a3a82\",\n \"tracking_code\": \"9400100105807076063232\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE2OGQyMmVmMmUxNDQ2MDY4ZWQxODcwMTdkZDZkYTEy\",\n \"est_delivery_date\": \"2024-08-16T15:59:15Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"signed_by\": null,\n \"id\": \"trk_168d22ef2e1446068ed187017dd6da12\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7c6d06d45be811ef820bac1f6bc539ae\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_bf09342c7e414155ac82f406b71a3a82\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:14+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7c6d06d45be811ef820bac1f6bc539ae\",\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\": \"2024-08-16T15:59:15Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8d3944a2579d841e38eb51983247df5df.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"id\": \"pl_62aea740a0934613a5f0a3df28c911e4\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:59:15Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:14Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:14Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_9ce939f163e5473eb156be93d389e4be\",\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\": \"2024-08-16T15:59:14+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\": \"2024-08-16T15:59:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7c6aa0f05be811efbda6ac1f6bc53342\",\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.25\",\n \"created_at\": \"2024-08-16T15:59:15Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf09342c7e414155ac82f406b71a3a82\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_aaadded36e794ad2a85b32a6243be741\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:15Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf09342c7e414155ac82f406b71a3a82\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a3ff301f594d4d31bc4fbfd4a8310030\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:15Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_bf09342c7e414155ac82f406b71a3a82\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:15Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_7035f396d7084290913d226fcdcf172c\",\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\": \"2024-08-16T15:59:14+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\": \"2024-08-16T15:59:15+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7c6aa0f05be811efbda6ac1f6bc53342\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063232\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "8212" + "7680" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92346307d24df7b95e70000937af" + "8a4bf44166bf7754e786c8db003628dc" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.146196" - ], - "etag": [ - "W/\"dcc1bd3e9ffb36e8413cef2d9ae380fc\"" + "0.288387" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,9 +179,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_bf09342c7e414155ac82f406b71a3a82/insure" }, - "duration": 282 + "duration": 502 } ] \ 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..5a90bf325 100644 --- a/src/test/cassettes/shipment/lowest_rate.json +++ b/src/test/cassettes/shipment/lowest_rate.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456970, + "recordedAt": 1723823949, "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,69 +18,69 @@ "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\": \"2024-08-16T15:59:09Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:09Z\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_78e752f05be811efabb43cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_b48c71bd8ff74aac9ec390197c4fc994\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_78e752f05be811efabb43cecef1b359e\",\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\": \"2024-08-16T15:59:09Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-08-16T15:59:09Z\",\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\": \"2024-08-16T15:59:09Z\",\n \"currency\": null,\n \"id\": \"cstitem_f02b09d988fd4e7fb112bee1127e1540\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-08-16T15:59:09Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_841b3fbbaf1a4f33945eb7b3a105fe4f\",\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\": \"2024-08-16T15:59:09Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:09Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_205a85c907ac46118302b1be0dc51fc8\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_78e4a9385be811efabb23cecef1b359e\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:09Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b48c71bd8ff74aac9ec390197c4fc994\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:09Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_03d75778cc1b443190a446118017f239\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:09Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b48c71bd8ff74aac9ec390197c4fc994\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:09Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3b98ccd2e8a94f98a1cee71f6701d3f0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:09Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_b48c71bd8ff74aac9ec390197c4fc994\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:09Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1a01ba2dc94a425087e9cdf46edaebd9\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:09+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_78e4a9385be811efabb23cecef1b359e\",\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_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_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 \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "6807" + "6271" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92346307d249f7ecee6e00093656" + "8a4bf43a66bf774de786c5a4003621d6" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.231614" + "0.766259" ], - "etag": [ - "W/\"8633236fbe65495fbc5de83df269d2ab\"" + "location": [ + "/api/v2/shipments/shp_b48c71bd8ff74aac9ec390197c4fc994" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_85720fad195344148ae2f92f713d02af" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,9 +90,8 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1364 + "duration": 979 } ] \ 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..3bf2f5be7 100644 --- a/src/test/cassettes/shipment/lowest_smartrate.json +++ b/src/test/cassettes/shipment/lowest_smartrate.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456958, + "recordedAt": 1723823929, "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,69 +18,66 @@ "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\": \"2024-08-16T15:58:48Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:48+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2024-08-16T15:58:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6ce1b5f55be811efb5a1ac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_e34e17fc29014902adb45654bf5156b7\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58:48+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2024-08-16T15:58:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_6ce1b5f55be811efb5a1ac1f6bc53342\",\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\": \"2024-08-16T15:58:48Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:48Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_611c6170cad547a4bca0be2f5671843f\",\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\": \"2024-08-16T15:58:48+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2024-08-16T15:58:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6cdeaf395be811efb6bfac1f6bc539aa\",\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\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:49Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e34e17fc29014902adb45654bf5156b7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:49Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_de25e9fd61e5425b85c7bf234d1da74b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:49Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e34e17fc29014902adb45654bf5156b7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:49Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_be93c827dceb4c80beeb3143a3143c9d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:49Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e34e17fc29014902adb45654bf5156b7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:49Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6631f5206f7f4324847af9cb55b3ec57\",\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\": \"2024-08-16T15:58:48+00:00\",\n \"verifications\": {},\n \"mode\": \"test\",\n \"federal_tax_id\": null,\n \"state_tax_id\": null,\n \"carrier_facility\": null,\n \"residential\": null,\n \"updated_at\": \"2024-08-16T15:58:48+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_6cdeaf395be811efb6bfac1f6bc539aa\",\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_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_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_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": [ "HTTP/1.1 201 Created" ], "content-length": [ - "5972" + "5436" ], "expires": [ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92336307d23ee68bbe0700093264" + "8a4bf43f66bf7738e786c51f00360d91" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.748537" + "0.769976" ], - "etag": [ - "W/\"d0978c81200d6d0ff6dc8542093ebe4f\"" + "location": [ + "/api/v2/shipments/shp_e34e17fc29014902adb45654bf5156b7" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_b15a685e22b847928e3b146e43c9358c" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 879 + "duration": 977 }, { - "recordedAt": 1661456959, + "recordedAt": 1723823930, "request": { "body": "", "method": "GET", @@ -108,69 +104,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_b15a685e22b847928e3b146e43c9358c/smartrate" + "uri": "https://api.easypost.com/v2/shipments/shp_e34e17fc29014902adb45654bf5156b7/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\": 6.4,\n \"created_at\": \"2024-08-16T15:58:49Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e34e17fc29014902adb45654bf5156b7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 8.45,\n \"updated_at\": \"2024-08-16T15:58:49Z\",\n \"rate\": 5.93,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 2.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 3.0\n },\n \"service\": \"GroundAdvantage\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_de25e9fd61e5425b85c7bf234d1da74b\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 33.1,\n \"created_at\": \"2024-08-16T15:58:49Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e34e17fc29014902adb45654bf5156b7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 37.9,\n \"updated_at\": \"2024-08-16T15:58:49Z\",\n \"rate\": 33.1,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 4.0,\n \"percentile_99\": 7.0\n },\n \"service\": \"Express\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_be93c827dceb4c80beeb3143a3143c9d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.25,\n \"created_at\": \"2024-08-16T15:58:49Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_e34e17fc29014902adb45654bf5156b7\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.8,\n \"updated_at\": \"2024-08-16T15:58:49Z\",\n \"rate\": 6.9,\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\": 3.0\n },\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_6631f5206f7f4324847af9cb55b3ec57\",\n \"object\": \"Rate\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "2617" + "1965" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92336307d23ef800c557000932b9" + "8a4bf44166bf773ae786c52300360f3d" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.093278" - ], - "etag": [ - "W/\"a2193a6843d58acb96e26a514a8cf707\"" + "0.123689" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +173,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_e34e17fc29014902adb45654bf5156b7/smartrate" }, - "duration": 225 + "duration": 320 } ] \ 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..7b510cd9a 100644 --- a/src/test/cassettes/shipment/lowest_smartrate_list.json +++ b/src/test/cassettes/shipment/lowest_smartrate_list.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456967, + "recordedAt": 1723823940, "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,69 +18,66 @@ "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\": \"2024-08-16T15:59:00Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:00Z\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_73933b5a5be811efb83eac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_df33bec8dabf4e3bb89cf905ba173fd4\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_73933b5a5be811efb83eac1f6bc53342\",\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\": \"2024-08-16T15:59:00Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:00Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_19c914584f004892b507902a475029ba\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_73907aeb5be811efbca5ac1f6bc539ae\",\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\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:00Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df33bec8dabf4e3bb89cf905ba173fd4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:00Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_af297646287d427fa0ddd3192083ed17\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:00Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df33bec8dabf4e3bb89cf905ba173fd4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:00Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_788bab7d8b5644ffa8de1fb1d2c2620c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:00Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df33bec8dabf4e3bb89cf905ba173fd4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:00Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1cc346ea52564de59d2576f4eb5a167e\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:00+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_73907aeb5be811efbca5ac1f6bc539ae\",\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\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_8031f3014d2b49dba089e5c14da57413\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\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" + "5340" ], "expires": [ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92356307d246e68a06fe00093584" + "8a4bf43f66bf7744e786c562003617aa" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.648480" + "0.724411" ], - "etag": [ - "W/\"a3ea2f8789cb67d689123f1ffb4e25d4\"" + "location": [ + "/api/v2/shipments/shp_df33bec8dabf4e3bb89cf905ba173fd4" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_ccbe5b35812b4a818539e2b153160f2c" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 783 + "duration": 945 }, { - "recordedAt": 1661456967, + "recordedAt": 1723823941, "request": { "body": "", "method": "GET", @@ -108,69 +104,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_ccbe5b35812b4a818539e2b153160f2c/smartrate" + "uri": "https://api.easypost.com/v2/shipments/shp_df33bec8dabf4e3bb89cf905ba173fd4/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\": 6.4,\n \"created_at\": \"2024-08-16T15:59:00Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df33bec8dabf4e3bb89cf905ba173fd4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 8.45,\n \"updated_at\": \"2024-08-16T15:59:00Z\",\n \"rate\": 5.93,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 2.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 3.0\n },\n \"service\": \"GroundAdvantage\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_af297646287d427fa0ddd3192083ed17\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 33.1,\n \"created_at\": \"2024-08-16T15:59:00Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df33bec8dabf4e3bb89cf905ba173fd4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 37.9,\n \"updated_at\": \"2024-08-16T15:59:00Z\",\n \"rate\": 33.1,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 4.0,\n \"percentile_99\": 7.0\n },\n \"service\": \"Express\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_788bab7d8b5644ffa8de1fb1d2c2620c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.25,\n \"created_at\": \"2024-08-16T15:59:00Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_df33bec8dabf4e3bb89cf905ba173fd4\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.8,\n \"updated_at\": \"2024-08-16T15:59:00Z\",\n \"rate\": 6.9,\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\": 3.0\n },\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_1cc346ea52564de59d2576f4eb5a167e\",\n \"object\": \"Rate\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "2617" + "1965" ], "expires": [ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92366307d247f7f0ce7b000935d3" + "8a4bf43f66bf7745e786c56300361894" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.096102" - ], - "etag": [ - "W/\"a8aabb27576b28b3734a717bebf36ef1\"" + "0.115416" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +173,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_df33bec8dabf4e3bb89cf905ba173fd4/smartrate" }, - "duration": 235 + "duration": 325 } ] \ 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 deleted file mode 100644 index 492e17eea..000000000 --- a/src/test/cassettes/shipment/one_call_buy_shipment_with_carbon_offset.json +++ /dev/null @@ -1,98 +0,0 @@ -[ - { - "recordedAt": 1661456953, - "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", - "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.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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 201 Created" - ], - "content-length": [ - "7510" - ], - "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": [ - "b57a92346307d237f7a6c62f0009300c" - ], - "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "1.364795" - ], - "etag": [ - "W/\"a1e6dbc0e957ba94f29868614d5c4deb\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "location": [ - "/api/v2/shipments/shp_db36184f4a994a6ba268014ecb4f59af" - ], - "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments" - }, - "duration": 1498 - } -] \ No newline at end of file diff --git a/src/test/cassettes/shipment/refund.json b/src/test/cassettes/shipment/refund.json index 52d0be262..aedc35671 100644 --- a/src/test/cassettes/shipment/refund.json +++ b/src/test/cassettes/shipment/refund.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456976, + "recordedAt": 1723823961, "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 \"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\": \"GroundAdvantage\",\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,72 +18,66 @@ "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.93000\",\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\": \"2024-08-16T15:59:20Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:21Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:21Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:21Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ad8ed23080e0419984f243e28211ba7f\",\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\": \"2024-08-16T15:59:21Z\",\n \"weight\": null,\n \"tracking_details\": [],\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"tracking_code\": \"9400100105807076063256\",\n \"status_detail\": \"unknown\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2M5ZmE4OTVhYjlmYTQ5NTBiNzMzOWJmYWNiMDc2MzIw\",\n \"est_delivery_date\": null,\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:21Z\",\n \"signed_by\": null,\n \"id\": \"trk_c9fa895ab9fa4950b7339bfacb076320\",\n \"object\": \"Tracker\",\n \"status\": \"unknown\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7fcb86db5be811efbfc9ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7fcb86db5be811efbfc9ac1f6bc539aa\",\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\": \"2024-08-16T15:59:21Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8730e1ee74ac140cea1c5e5b64619c264.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:21Z\",\n \"id\": \"pl_fad221aefff143f893040d14293357dd\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:59:21Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_aae7db8d78f94c98b218b441e74d7928\",\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\": \"2024-08-16T15:59:20+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\": \"2024-08-16T15:59:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7fc92f985be811efae8a3cecef1b359e\",\n \"street2\": \"\",\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.25\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bf39967c006a43fa9d91516204617ae3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ad8ed23080e0419984f243e28211ba7f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f7bf1becca794586969955ace10eddc2\",\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\": \"2024-08-16T15:59:20+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\": \"2024-08-16T15:59:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7fc92f985be811efae8a3cecef1b359e\",\n \"street2\": \"\",\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063256\",\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" + "6549" ], "expires": [ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb38nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92306307d24fe689f6a20009387a" + "8a4bf44166bf7758e786c8e400362c62" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "1.001078" + "0.966052" ], - "etag": [ - "W/\"3ec7a32cee2ee421a538c09db3330c78\"" + "location": [ + "/api/v2/shipments/shp_48f1f6414f3d495c9d572a42a9605cf8" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_1bee4886dcdd4d008cdbe92a382d4a57" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -93,16 +87,15 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1138 + "duration": 1164 }, { - "recordedAt": 1661456976, + "recordedAt": 1723823962, "request": { "body": "", - "method": "GET", + "method": "POST", "headers": { "Accept-Charset": [ "UTF-8" @@ -111,69 +104,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_1bee4886dcdd4d008cdbe92a382d4a57/refund" + "uri": "https://api.easypost.com/v2/shipments/shp_48f1f6414f3d495c9d572a42a9605cf8/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.93000\",\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\": \"2024-08-16T15:59:20Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:21Z\",\n \"selected_rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:21Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:21Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ad8ed23080e0419984f243e28211ba7f\",\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\": \"2024-08-16T15:59:21Z\",\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\": \"2024-07-16T15:59:21Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:36:21Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"tracking_code\": \"9400100105807076063256\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2M5ZmE4OTVhYjlmYTQ5NTBiNzMzOWJmYWNiMDc2MzIw\",\n \"est_delivery_date\": \"2024-08-16T15:59:21Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:59:21Z\",\n \"signed_by\": null,\n \"id\": \"trk_c9fa895ab9fa4950b7339bfacb076320\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n },\n \"return_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7fcb86db5be811efbfc9ac1f6bc539aa\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"from_address\": {\n \"zip\": \"90277\",\n \"country\": \"US\",\n \"city\": \"Redondo Beach\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7fcb86db5be811efbfc9ac1f6bc539aa\",\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\": \"2024-08-16T15:59:21Z\",\n \"label_type\": \"default\",\n \"label_url\": \"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240816/e8730e1ee74ac140cea1c5e5b64619c264.png\",\n \"label_file\": null,\n \"label_epl2_url\": null,\n \"label_file_type\": \"image/png\",\n \"updated_at\": \"2024-08-16T15:59:21Z\",\n \"id\": \"pl_fad221aefff143f893040d14293357dd\",\n \"label_zpl_url\": null,\n \"label_date\": \"2024-08-16T15:59:21Z\",\n \"object\": \"PostageLabel\"\n },\n \"parcel\": {\n \"mode\": \"test\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_aae7db8d78f94c98b218b441e74d7928\",\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\": \"2024-08-16T15:59:20+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\": \"2024-08-16T15:59:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7fc92f985be811efae8a3cecef1b359e\",\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.25\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bf39967c006a43fa9d91516204617ae3\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ad8ed23080e0419984f243e28211ba7f\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:20Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_48f1f6414f3d495c9d572a42a9605cf8\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:20Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f7bf1becca794586969955ace10eddc2\",\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\": \"2024-08-16T15:59:20+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\": \"2024-08-16T15:59:20+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"JACK SPARROW\",\n \"company\": null,\n \"street1\": \"388 TOWNSEND ST APT 20\",\n \"id\": \"adr_7fc92f985be811efae8a3cecef1b359e\",\n \"street2\": null,\n \"state\": \"CA\",\n \"email\": \"TEST@EXAMPLE.COM\",\n \"object\": \"Address\"\n },\n \"tracking_code\": \"9400100105807076063256\",\n \"messages\": [],\n \"order_id\": null,\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "8218" + "7686" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92366307d250f7db5e4c000938fa" + "8a4bf43e66bf7759e786c8fc00362d41" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.222849" - ], - "etag": [ - "W/\"267fcc15ea053d80c406c2a0dfd9bd3c\"" + "0.203574" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,9 +173,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_48f1f6414f3d495c9d572a42a9605cf8/refund" }, - "duration": 357 + "duration": 423 } ] \ 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..12c595f11 100644 --- a/src/test/cassettes/shipment/regenerate_rates.json +++ b/src/test/cassettes/shipment/regenerate_rates.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456981, + "recordedAt": 1723823968, "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,69 +18,66 @@ "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\": \"2024-08-16T15:59:27Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_842132085be811ef804aac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_4b226cf19b5642d69f374880045412d1\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_842132085be811ef804aac1f6bc53342\",\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\": \"2024-08-16T15:59:27Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-08-16T15:59:27Z\",\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\": \"2024-08-16T15:59:27Z\",\n \"currency\": null,\n \"id\": \"cstitem_19dfcaf9a31147b193f4e655af5c6330\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-08-16T15:59:27Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_cccd3624b091446382e8347d4068fb69\",\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\": \"2024-08-16T15:59:27Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:27Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_a8e68738eb0d4200bb159fbc00d9a38d\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_841e561c5be811ef84b5ac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:28Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4b226cf19b5642d69f374880045412d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:28Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_83dd744ac5f74616b6372fdeae2a7a88\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:28Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4b226cf19b5642d69f374880045412d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:28Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bccebf95cb30461fbd645f44bac700bd\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:28Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4b226cf19b5642d69f374880045412d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:28Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e1e5c22f6c934439adcade7a1b7bfa0b\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:27+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_841e561c5be811ef84b5ac1f6bc539ae\",\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_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_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": [ "HTTP/1.1 201 Created" ], "content-length": [ - "6807" + "6271" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92306307d254f7eea07900093a64" + "8a4bf44166bf775fe786c9050036323f" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.871945" + "0.820652" ], - "etag": [ - "W/\"4e69c4d9e4ccb57d8980706bfd3f327d\"" + "location": [ + "/api/v2/shipments/shp_4b226cf19b5642d69f374880045412d1" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_84be9d3907844c25b47a9590b85d651c" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,15 +87,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 1003 + "duration": 1027 }, { - "recordedAt": 1661456982, + "recordedAt": 1723823969, "request": { - "body": "{\n \"carbon_offset\": false\n}", + "body": "{}", "method": "POST", "headers": { "Accept-Charset": [ @@ -111,69 +107,69 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_84be9d3907844c25b47a9590b85d651c/rerate" + "uri": "https://api.easypost.com/v2/shipments/shp_4b226cf19b5642d69f374880045412d1/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.25\",\n \"created_at\": \"2024-08-16T15:59:29Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4b226cf19b5642d69f374880045412d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:29Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2d18e0151d8a43ce8a07a11614689fd4\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:29Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4b226cf19b5642d69f374880045412d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:29Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_3b475d28703940f6a8e0153d26265c32\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:29Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_4b226cf19b5642d69f374880045412d1\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:29Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_2e6e89533af440acb464a5d2bcfb628a\",\n \"object\": \"Rate\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "2164" + "1628" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92306307d255f7cc101400093ae7" + "8a4bf43b66bf7761e786c91e0036333d" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.730580" - ], - "etag": [ - "W/\"88a1f5ac5e30eff4d2714adccc0492d3\"" + "0.711571" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,9 +179,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_4b226cf19b5642d69f374880045412d1/rerate" }, - "duration": 866 + "duration": 921 } ] \ 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 deleted file mode 100644 index 15bfff711..000000000 --- a/src/test/cassettes/shipment/regenerate_rates_with_carbon_offset.json +++ /dev/null @@ -1,192 +0,0 @@ -[ - { - "recordedAt": 1661456922, - "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", - "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.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}", - "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": [ - "07323c3e6307d219f7deb1bc0009444a" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "1.022700" - ], - "etag": [ - "W/\"838945685a573aa92a8700d5966ce0c1\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "location": [ - "/api/v2/shipments/shp_bc50933c1c7b49a9b17c1f2d099f43b1" - ], - "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments" - }, - "duration": 1180 - }, - { - "recordedAt": 1661456923, - "request": { - "body": "{\n \"carbon_offset\": true\n}", - "method": "POST", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ], - "Content-Type": [ - "application/json" - ] - }, - "uri": "https://api.easypost.com/v2/shipments/shp_bc50933c1c7b49a9b17c1f2d099f43b1/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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 200 OK" - ], - "content-length": [ - "2504" - ], - "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": [ - "4cb7bec66307d21ae68983a50007bb4d" - ], - "x-proxied": [ - "extlb4wdc 9ce216bfac", - "intlb2wdc 6aa9972c1e", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.464719" - ], - "etag": [ - "W/\"aebcc200c904a36a4eff28a17d97406b\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_bc50933c1c7b49a9b17c1f2d099f43b1/rerate" - }, - "duration": 770 - } -] \ No newline at end of file diff --git a/src/test/cassettes/shipment/retrieve.json b/src/test/cassettes/shipment/retrieve.json index b666cc55c..367da4e24 100644 --- a/src/test/cassettes/shipment/retrieve.json +++ b/src/test/cassettes/shipment/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456968, + "recordedAt": 1723823948, "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,69 +18,66 @@ "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\": \"2024-08-16T15:59:07Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:08Z\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_77fba8985be811efbf57ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_7d33e2a894cb4a7eb5e1861e845acb92\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_77fba8985be811efbf57ac1f6bc539ae\",\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\": \"2024-08-16T15:59:07Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-08-16T15:59:07Z\",\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\": \"2024-08-16T15:59:07Z\",\n \"currency\": null,\n \"id\": \"cstitem_e672815533284cef82b3a6e877488112\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-08-16T15:59:07Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_dda5bccaa39a4c3da766b4c6423346c4\",\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\": \"2024-08-16T15:59:07Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:07Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_26beb601d34c4c51ab9f3602770297ba\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_77f8c7905be811efbb02ac1f6bc53342\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:08Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d33e2a894cb4a7eb5e1861e845acb92\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:08Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_332bf557659940428092edc17f51d5a0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:08Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d33e2a894cb4a7eb5e1861e845acb92\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:08Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9e996863abca4d58b65359090825ff1a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:08Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d33e2a894cb4a7eb5e1861e845acb92\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:08Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_512f125236f14fd59c3a0bb23708b162\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_77f8c7905be811efbb02ac1f6bc53342\",\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\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\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": [ - "6807" + "6175" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92326307d248f8001c56000935eb" + "8a4bf43d66bf774be786c58a0036203a" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.747345" + "0.892881" ], - "etag": [ - "W/\"f0d64e50e63b748bcac4b513dfd982e1\"" + "location": [ + "/api/v2/shipments/shp_7d33e2a894cb4a7eb5e1861e845acb92" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_697966dec9124f97b112b46b0e8fc303" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/shipments" }, - "duration": 885 + "duration": 1097 }, { - "recordedAt": 1661456969, + "recordedAt": 1723823948, "request": { "body": "", "method": "GET", @@ -108,69 +104,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_697966dec9124f97b112b46b0e8fc303" + "uri": "https://api.easypost.com/v2/shipments/shp_7d33e2a894cb4a7eb5e1861e845acb92" }, "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\": \"2024-08-16T15:59:07Z\",\n \"mode\": \"test\",\n \"reference\": \"123\",\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:59:08Z\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_77fba8985be811efbf57ac1f6bc539ae\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_7d33e2a894cb4a7eb5e1861e845acb92\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_77fba8985be811efbf57ac1f6bc539ae\",\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\": \"2024-08-16T15:59:07Z\",\n \"declaration\": null,\n \"mode\": \"test\",\n \"customs_items\": [\n {\n \"quantity\": 2.0,\n \"code\": null,\n \"eccn\": null,\n \"created_at\": \"2024-08-16T15:59:07Z\",\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\": \"2024-08-16T15:59:07Z\",\n \"currency\": null,\n \"id\": \"cstitem_e672815533284cef82b3a6e877488112\",\n \"hs_tariff_number\": \"654321\",\n \"value\": \"23.25\",\n \"object\": \"CustomsItem\"\n }\n ],\n \"restriction_comments\": null,\n \"updated_at\": \"2024-08-16T15:59:07Z\",\n \"customs_certify\": true,\n \"eel_pfc\": \"NOEEI 30.37(a)\",\n \"customs_signer\": \"Steve Brule\",\n \"id\": \"cstinfo_dda5bccaa39a4c3da766b4c6423346c4\",\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\": \"2024-08-16T15:59:07Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:59:07Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_26beb601d34c4c51ab9f3602770297ba\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_77f8c7905be811efbb02ac1f6bc53342\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:59:08Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d33e2a894cb4a7eb5e1861e845acb92\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:08Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_332bf557659940428092edc17f51d5a0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:59:08Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d33e2a894cb4a7eb5e1861e845acb92\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:08Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9e996863abca4d58b65359090825ff1a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:59:08Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_7d33e2a894cb4a7eb5e1861e845acb92\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:59:08Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_512f125236f14fd59c3a0bb23708b162\",\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\": \"2024-08-16T15:59: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\": \"2024-08-16T15:59:07+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_77f8c7905be811efbb02ac1f6bc53342\",\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\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_687017c7f80044ab942b697a9607c439\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_3e92a82adac444a58f032ebcd8eb9028\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_6924408886ad49ac9a8468804f2b52b7\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_e6db2c19d54c4025b852d0ad81ee7f4e\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_2cdc6fb96d99484e8631d7c9620dec24\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_1c4eecb124f841d7a51e7e53cdda6cd8\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\n },\n {\n \"carrier\": \"UPS\",\n \"carrier_account_id\": \"ca_f363eb4e1b194798b015a07598be6ed4\",\n \"type\": \"rate_error\",\n \"message\": \"Too Many Requests\"\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": [ - "6807" + "6175" ], "expires": [ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92316307d249f7cc193b00093633" + "8a4bf43f66bf774ce786c5a200362160" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.066331" - ], - "etag": [ - "W/\"f0d64e50e63b748bcac4b513dfd982e1\"" + "0.081478" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +173,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/shipments/shp_697966dec9124f97b112b46b0e8fc303" + "uri": "https://api.easypost.com/v2/shipments/shp_7d33e2a894cb4a7eb5e1861e845acb92" }, - "duration": 200 + "duration": 285 } ] \ No newline at end of file diff --git a/src/test/cassettes/shipment/retrieve_estimated_delivery_date.json b/src/test/cassettes/shipment/retrieve_estimated_delivery_date.json new file mode 100644 index 000000000..5c17f069c --- /dev/null +++ b/src/test/cassettes/shipment/retrieve_estimated_delivery_date.json @@ -0,0 +1,180 @@ +[ + { + "recordedAt": 1723823935, + "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\": \"2024-08-16T15:58:54Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:54Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7027886c5be811efa6ff3cecef1b359e\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_f8c2680a36cb4202bfba2df875413d75\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_7027886c5be811efa6ff3cecef1b359e\",\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\": \"2024-08-16T15:58:54Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:54Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_1b2d84278dec4f5490d4f04809e0454b\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7024bd915be811efb804ac1f6bc539aa\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:54Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f8c2680a36cb4202bfba2df875413d75\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:54Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bb6b1c1d8dc54d54b608aac379fb5cad\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:54Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f8c2680a36cb4202bfba2df875413d75\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:54Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_86bcd3501e6444609392a1f82e024d8d\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:54Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f8c2680a36cb4202bfba2df875413d75\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:54Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ec8d75e79a494eb7ad451368d84d4c0e\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:54+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_7024bd915be811efb804ac1f6bc539aa\",\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_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_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_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": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "5436" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43c66bf773ee786c53f00361258" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.632584" + ], + "location": [ + "/api/v2/shipments/shp_f8c2680a36cb4202bfba2df875413d75" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 840 + }, + { + "recordedAt": 1723823935, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_f8c2680a36cb4202bfba2df875413d75/smartrate/delivery_date?%70%6C%61%6E%6E%65%64%5F%73%68%69%70%5F%64%61%74%65\u003d%32%30%32%34%2D%30%38%2D%31%38" + }, + "response": { + "body": "{\n \"rates\": [\n {\n \"rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 33.1,\n \"created_at\": \"2024-08-16T15:58:54Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f8c2680a36cb4202bfba2df875413d75\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 37.9,\n \"updated_at\": \"2024-08-16T15:58:54Z\",\n \"rate\": 33.1,\n \"service\": \"Express\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_bb6b1c1d8dc54d54b608aac379fb5cad\",\n \"object\": \"Rate\"\n },\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 4.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 3.0,\n \"percentile_95\": 4.0,\n \"percentile_75\": 3.0,\n \"percentile_97\": 5.0,\n \"percentile_99\": 6.0\n },\n \"easypost_estimated_delivery_date\": \"2024-08-19\",\n \"planned_ship_date\": \"2024-08-18\"\n }\n },\n {\n \"rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.25,\n \"created_at\": \"2024-08-16T15:58:54Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f8c2680a36cb4202bfba2df875413d75\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.8,\n \"updated_at\": \"2024-08-16T15:58:54Z\",\n \"rate\": 6.9,\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_86bcd3501e6444609392a1f82e024d8d\",\n \"object\": \"Rate\"\n },\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 4.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 4.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 3.0,\n \"percentile_97\": 6.0,\n \"percentile_99\": 8.0\n },\n \"easypost_estimated_delivery_date\": \"2024-08-19\",\n \"planned_ship_date\": \"2024-08-18\"\n }\n },\n {\n \"rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 6.4,\n \"created_at\": \"2024-08-16T15:58:54Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_f8c2680a36cb4202bfba2df875413d75\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 8.45,\n \"updated_at\": \"2024-08-16T15:58:54Z\",\n \"rate\": 5.93,\n \"service\": \"GroundAdvantage\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_ec8d75e79a494eb7ad451368d84d4c0e\",\n \"object\": \"Rate\"\n },\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 5.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 4.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 3.0,\n \"percentile_97\": 6.0,\n \"percentile_99\": 9.0\n },\n \"easypost_estimated_delivery_date\": \"2024-08-19\",\n \"planned_ship_date\": \"2024-08-18\"\n }\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2336" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb38nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf44066bf773fe786c5400036130d" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.102369" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_f8c2680a36cb4202bfba2df875413d75/smartrate/delivery_date?%70%6C%61%6E%6E%65%64%5F%73%68%69%70%5F%64%61%74%65\u003d%32%30%32%34%2D%30%38%2D%31%38" + }, + "duration": 299 + } +] \ No newline at end of file diff --git a/src/test/cassettes/shipment/retrieve_recommend_date.json b/src/test/cassettes/shipment/retrieve_recommend_date.json new file mode 100644 index 000000000..b30a6c944 --- /dev/null +++ b/src/test/cassettes/shipment/retrieve_recommend_date.json @@ -0,0 +1,180 @@ +[ + { + "recordedAt": 1723824082, + "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\": \"2024-08-16T16:01:22Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T16:01:22Z\",\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\": \"2024-08-16T16:01: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\": \"2024-08-16T16:01:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_c83344795be811efa7b3ac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_c9d82b54c5ad41afbdb6969f6a13f72a\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T16:01: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\": \"2024-08-16T16:01:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_c83344795be811efa7b3ac1f6bc53342\",\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\": \"2024-08-16T16:01:22Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T16:01:22Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_56599b2fa7a045c9bafddb63b171a4ca\",\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\": \"2024-08-16T16:01: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\": \"2024-08-16T16:01:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_c8309eb05be811efab86ac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T16:01:22Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9d82b54c5ad41afbdb6969f6a13f72a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T16:01:22Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a76bbe13d8f646e199a24c1c6cc7ae37\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T16:01:22Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9d82b54c5ad41afbdb6969f6a13f72a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T16:01:22Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_563bfc41b37b424b82f79f45a76bacfa\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T16:01:22Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9d82b54c5ad41afbdb6969f6a13f72a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T16:01:22Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0c84f3ba031646869f34bb78bd71e9d4\",\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\": \"2024-08-16T16:01: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\": \"2024-08-16T16:01:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_c8309eb05be811efab86ac1f6bc539ae\",\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_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 \"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_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": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "5436" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf77d2e787377b0036dfce" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.836989" + ], + "location": [ + "/api/v2/shipments/shp_c9d82b54c5ad41afbdb6969f6a13f72a" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/shipments" + }, + "duration": 1036 + }, + { + "recordedAt": 1723824083, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/shipments/shp_c9d82b54c5ad41afbdb6969f6a13f72a/smartrate/precision_shipping?%64%65%73%69%72%65%64%5F%64%65%6C%69%76%65%72%79%5F%64%61%74%65\u003d%32%30%32%34%2D%30%38%2D%32%31" + }, + "response": { + "body": "{\n \"rates\": [\n {\n \"rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 33.1,\n \"created_at\": \"2024-08-16T16:01:22Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9d82b54c5ad41afbdb6969f6a13f72a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 37.9,\n \"updated_at\": \"2024-08-16T16:01:22Z\",\n \"rate\": 33.1,\n \"service\": \"Express\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_a76bbe13d8f646e199a24c1c6cc7ae37\",\n \"object\": \"Rate\"\n },\n \"easypost_time_in_transit_data\": {\n \"days_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\": 7.0\n },\n \"delivery_date_confidence\": 0.45,\n \"ship_on_date\": \"2024-08-20\",\n \"desired_delivery_date\": \"2024-08-21\",\n \"estimated_transit_days\": 1.0\n }\n },\n {\n \"rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.25,\n \"created_at\": \"2024-08-16T16:01:22Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9d82b54c5ad41afbdb6969f6a13f72a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.8,\n \"updated_at\": \"2024-08-16T16:01:22Z\",\n \"rate\": 6.9,\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_563bfc41b37b424b82f79f45a76bacfa\",\n \"object\": \"Rate\"\n },\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 4.0,\n \"percentile_50\": 3.0,\n \"percentile_85\": 4.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 4.0,\n \"percentile_97\": 7.0,\n \"percentile_99\": 8.0\n },\n \"delivery_date_confidence\": 0.29,\n \"ship_on_date\": \"2024-08-19\",\n \"desired_delivery_date\": \"2024-08-21\",\n \"estimated_transit_days\": 2.0\n }\n },\n {\n \"rate\": {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 6.4,\n \"created_at\": \"2024-08-16T16:01:22Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_c9d82b54c5ad41afbdb6969f6a13f72a\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 8.45,\n \"updated_at\": \"2024-08-16T16:01:22Z\",\n \"rate\": 5.93,\n \"service\": \"GroundAdvantage\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0c84f3ba031646869f34bb78bd71e9d4\",\n \"object\": \"Rate\"\n },\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 4.0,\n \"percentile_50\": 3.0,\n \"percentile_85\": 4.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 4.0,\n \"percentile_97\": 7.0,\n \"percentile_99\": 9.0\n },\n \"delivery_date_confidence\": 0.26,\n \"ship_on_date\": \"2024-08-19\",\n \"desired_delivery_date\": \"2024-08-21\",\n \"estimated_transit_days\": 2.0\n }\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2465" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf77d3e787377c0036e11d" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.140292" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/shipments/shp_c9d82b54c5ad41afbdb6969f6a13f72a/smartrate/precision_shipping?%64%65%73%69%72%65%64%5F%64%65%6C%69%76%65%72%79%5F%64%61%74%65\u003d%32%30%32%34%2D%30%38%2D%32%31" + }, + "duration": 335 + } +] \ 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..2b6d7c6ac 100644 --- a/src/test/cassettes/shipment/smart_rate.json +++ b/src/test/cassettes/shipment/smart_rate.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456963, + "recordedAt": 1723823939, "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,69 +18,69 @@ "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\": \"2024-08-16T15:58:58Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 4.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_729d37df5be811efb7ccac1f6bc53342\",\n \"street2\": \"Apt 20\",\n \"state\": \"CA\",\n \"email\": \"test@example.com\",\n \"object\": \"Address\"\n },\n \"id\": \"shp_5f4dd3c13ff74547bcb2061c5a103e2f\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Jack Sparrow\",\n \"company\": null,\n \"street1\": \"388 Townsend St\",\n \"id\": \"adr_729d37df5be811efb7ccac1f6bc53342\",\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\": \"2024-08-16T15:58:58Z\",\n \"predefined_package\": null,\n \"length\": 10.0,\n \"width\": 8.0,\n \"created_at\": \"2024-08-16T15:58:58Z\",\n \"weight\": 15.4,\n \"id\": \"prcl_7a96490c9c1d4a06a727f60077a2e240\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_729ace3c5be811efbc4cac1f6bc539ae\",\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\": \"33.10\",\n \"created_at\": \"2024-08-16T15:58:59Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f4dd3c13ff74547bcb2061c5a103e2f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"37.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:59Z\",\n \"rate\": \"33.10\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f0e69c0ba58d4b57ae08d098771b9b0c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"8.25\",\n \"created_at\": \"2024-08-16T15:58:59Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f4dd3c13ff74547bcb2061c5a103e2f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"9.80\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:59Z\",\n \"rate\": \"6.90\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9b784972a375442da0d159c03b077866\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"6.40\",\n \"created_at\": \"2024-08-16T15:58:59Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f4dd3c13ff74547bcb2061c5a103e2f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"8.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:59Z\",\n \"rate\": \"5.93\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_25a6c97d8340468188d1f39005ef7488\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:58+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"Elizabeth Swan\",\n \"company\": null,\n \"street1\": \"179 N Harbor Dr\",\n \"id\": \"adr_729ace3c5be811efbc4cac1f6bc539ae\",\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_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_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_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": [ "HTTP/1.1 201 Created" ], "content-length": [ - "5972" + "5436" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a92306307d242f7a64b1300093423" + "8a4bf43e66bf7742e786c5480036161a" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.777745" + "0.927235" ], - "etag": [ - "W/\"f30cbb381e39ddaa3962cb6248a08ecb\"" + "location": [ + "/api/v2/shipments/shp_5f4dd3c13ff74547bcb2061c5a103e2f" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/shipments/shp_29396c48f45f433b9f0e0c1b4f8e84f7" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-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": 914 + "duration": 1137 }, { - "recordedAt": 1661456963, + "recordedAt": 1723823939, "request": { "body": "", "method": "GET", @@ -108,69 +107,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/shipments/shp_29396c48f45f433b9f0e0c1b4f8e84f7/smartrate" + "uri": "https://api.easypost.com/v2/shipments/shp_5f4dd3c13ff74547bcb2061c5a103e2f/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\": 33.1,\n \"created_at\": \"2024-08-16T15:58:59Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f4dd3c13ff74547bcb2061c5a103e2f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 37.9,\n \"updated_at\": \"2024-08-16T15:58:59Z\",\n \"rate\": 33.1,\n \"time_in_transit\": {\n \"percentile_90\": 3.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 3.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 4.0,\n \"percentile_99\": 7.0\n },\n \"service\": \"Express\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_f0e69c0ba58d4b57ae08d098771b9b0c\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 8.25,\n \"created_at\": \"2024-08-16T15:58:59Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f4dd3c13ff74547bcb2061c5a103e2f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 9.8,\n \"updated_at\": \"2024-08-16T15:58:59Z\",\n \"rate\": 6.9,\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\": 3.0\n },\n \"service\": \"Priority\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_9b784972a375442da0d159c03b077866\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": 6.4,\n \"created_at\": \"2024-08-16T15:58:59Z\",\n \"delivery_days\": 3.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_5f4dd3c13ff74547bcb2061c5a103e2f\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_currency\": \"USD\",\n \"retail_rate\": 8.45,\n \"updated_at\": \"2024-08-16T15:58:59Z\",\n \"rate\": 5.93,\n \"time_in_transit\": {\n \"percentile_90\": 2.0,\n \"percentile_50\": 1.0,\n \"percentile_85\": 2.0,\n \"percentile_95\": 2.0,\n \"percentile_75\": 2.0,\n \"percentile_97\": 3.0,\n \"percentile_99\": 3.0\n },\n \"service\": \"GroundAdvantage\",\n \"est_delivery_days\": 3.0,\n \"currency\": \"USD\",\n \"id\": \"rate_25a6c97d8340468188d1f39005ef7488\",\n \"object\": \"Rate\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "2617" + "1965" ], "expires": [ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb36nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "b57a922f6307d243f801347400093481" + "8a4bf43d66bf7743e786c56000361726" ], "x-proxied": [ - "extlb1nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.071810" - ], - "etag": [ - "W/\"339b033631f0f06727225303c758547e\"" + "0.091068" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +176,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_5f4dd3c13ff74547bcb2061c5a103e2f/smartrate" }, - "duration": 199 + "duration": 297 } ] \ No newline at end of file diff --git a/src/test/cassettes/smart_rate/retrieve_estimated_delivery_date.json b/src/test/cassettes/smart_rate/retrieve_estimated_delivery_date.json new file mode 100644 index 000000000..43c2a4f60 --- /dev/null +++ b/src/test/cassettes/smart_rate/retrieve_estimated_delivery_date.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1723823875, + "request": { + "body": "{\n \"planned_ship_date\": \"2024-08-18\",\n \"to_zip\": \"90277\",\n \"from_zip\": \"94107\",\n \"carriers\": [\n \"USPS\"\n ]\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/smartrate/deliver_by" + }, + "response": { + "body": "{\n \"planned_ship_date\": \"2024-08-18\",\n \"to_zip\": \"90277\",\n \"carriers_without_tint_estimates\": null,\n \"from_zip\": \"94107\",\n \"saturday_delivery\": null,\n \"results\": [\n {\n \"carrier\": \"USPS\",\n \"service\": \"express\",\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 4.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 3.0,\n \"percentile_95\": 4.0,\n \"percentile_75\": 3.0,\n \"percentile_97\": 5.0,\n \"percentile_99\": 6.0\n },\n \"easypost_estimated_delivery_date\": \"2024-08-19\"\n }\n },\n {\n \"carrier\": \"USPS\",\n \"service\": \"groundadvantage\",\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 5.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 4.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 3.0,\n \"percentile_97\": 6.0,\n \"percentile_99\": 9.0\n },\n \"easypost_estimated_delivery_date\": \"2024-08-19\"\n }\n },\n {\n \"carrier\": \"USPS\",\n \"service\": \"librarymail\",\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 5.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 4.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 3.0,\n \"percentile_97\": 6.0,\n \"percentile_99\": 9.0\n },\n \"easypost_estimated_delivery_date\": \"2024-08-19\"\n }\n },\n {\n \"carrier\": \"USPS\",\n \"service\": \"mediamail\",\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 5.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 4.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 3.0,\n \"percentile_97\": 6.0,\n \"percentile_99\": 9.0\n },\n \"easypost_estimated_delivery_date\": \"2024-08-19\"\n }\n },\n {\n \"carrier\": \"USPS\",\n \"service\": \"priority\",\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 4.0,\n \"percentile_50\": 2.0,\n \"percentile_85\": 4.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 3.0,\n \"percentile_97\": 6.0,\n \"percentile_99\": 8.0\n },\n \"easypost_estimated_delivery_date\": \"2024-08-19\"\n }\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1496" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb40nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43d66bf7703e786c09e0035d5a9" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.069770" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/smartrate/deliver_by" + }, + "duration": 270 + } +] \ No newline at end of file diff --git a/src/test/cassettes/smart_rate/retrieve_recommend_ship_date.json b/src/test/cassettes/smart_rate/retrieve_recommend_ship_date.json new file mode 100644 index 000000000..6747402ae --- /dev/null +++ b/src/test/cassettes/smart_rate/retrieve_recommend_ship_date.json @@ -0,0 +1,91 @@ +[ + { + "recordedAt": 1723824483, + "request": { + "body": "{\n \"to_zip\": \"90277\",\n \"from_zip\": \"94107\",\n \"carriers\": [\n \"USPS\"\n ],\n \"desired_delivery_date\": \"2024-08-21\"\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/smartrate/deliver_on" + }, + "response": { + "body": "{\n \"to_zip\": \"90277\",\n \"carriers_without_tint_estimates\": null,\n \"from_zip\": \"94107\",\n \"saturday_delivery\": null,\n \"desired_delivery_date\": \"2024-08-21\",\n \"results\": [\n {\n \"carrier\": \"USPS\",\n \"service\": \"express\",\n \"easypost_time_in_transit_data\": {\n \"days_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\": 7.0\n },\n \"delivery_date_confidence\": 0.45,\n \"ship_on_date\": \"2024-08-20\",\n \"estimated_transit_days\": 1.0\n }\n },\n {\n \"carrier\": \"USPS\",\n \"service\": \"groundadvantage\",\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 4.0,\n \"percentile_50\": 3.0,\n \"percentile_85\": 4.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 4.0,\n \"percentile_97\": 7.0,\n \"percentile_99\": 9.0\n },\n \"delivery_date_confidence\": 0.26,\n \"ship_on_date\": \"2024-08-19\",\n \"estimated_transit_days\": 2.0\n }\n },\n {\n \"carrier\": \"USPS\",\n \"service\": \"librarymail\",\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 4.0,\n \"percentile_50\": 3.0,\n \"percentile_85\": 4.0,\n \"percentile_95\": 7.0,\n \"percentile_75\": 4.0,\n \"percentile_97\": 7.0,\n \"percentile_99\": 9.0\n },\n \"delivery_date_confidence\": 0.21,\n \"ship_on_date\": \"2024-08-19\",\n \"estimated_transit_days\": 2.0\n }\n },\n {\n \"carrier\": \"USPS\",\n \"service\": \"mediamail\",\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 4.0,\n \"percentile_50\": 3.0,\n \"percentile_85\": 4.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 4.0,\n \"percentile_97\": 7.0,\n \"percentile_99\": 9.0\n },\n \"delivery_date_confidence\": 0.29,\n \"ship_on_date\": \"2024-08-19\",\n \"estimated_transit_days\": 2.0\n }\n },\n {\n \"carrier\": \"USPS\",\n \"service\": \"priority\",\n \"easypost_time_in_transit_data\": {\n \"days_in_transit\": {\n \"percentile_90\": 4.0,\n \"percentile_50\": 3.0,\n \"percentile_85\": 4.0,\n \"percentile_95\": 5.0,\n \"percentile_75\": 4.0,\n \"percentile_97\": 7.0,\n \"percentile_99\": 8.0\n },\n \"delivery_date_confidence\": 0.29,\n \"ship_on_date\": \"2024-08-19\",\n \"estimated_transit_days\": 2.0\n }\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1695" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb33nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "0580883666bf7963e787564a00379441" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb2nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.158530" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/smartrate/deliver_on" + }, + "duration": 378 + } +] \ 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..1b74244c0 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": 1723823902, "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,69 +18,66 @@ "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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"Airport Shipping\",\n \"street1\": \"601 Brasilia Avenue\",\n \"id\": \"adr_5cedce4f5be811efb2aaac1f6bc539ae\",\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\": \"44.05\",\n \"created_at\": null,\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_02b98ba3f3824eddb0aee558d14fd355\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"51.65\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"44.05\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_832e039754be4a72a943d14addad11f0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"9.86\",\n \"created_at\": null,\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_02b98ba3f3824eddb0aee558d14fd355\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"9.43\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0a5c02530a6049bd804fb21acd8d724a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.45\",\n \"created_at\": null,\n \"delivery_days\": 4.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_02b98ba3f3824eddb0aee558d14fd355\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": null,\n \"rate\": \"5.45\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 4.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e1c3fad844b24d2b8130d3fc130215b1\",\n \"object\": \"Rate\"\n }\n ],\n \"created_at\": \"2024-08-16T15:58:22Z\",\n \"to_address\": {\n \"zip\": \"64153\",\n \"country\": \"US\",\n \"city\": \"Kansas City\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"Airport Shipping\",\n \"street1\": \"601 Brasilia Avenue\",\n \"id\": \"adr_5cedce4f5be811efb2aaac1f6bc539ae\",\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\": \"2024-08-16T15:58:22Z\",\n \"mode\": \"test\",\n \"reference\": null,\n \"usps_zone\": 7.0,\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:22Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"EasyPost\",\n \"company\": null,\n \"street1\": \"164 Townsend St\",\n \"id\": \"adr_5cef58755be811efaee8ac1f6bc539aa\",\n \"street2\": \"Unit 1\",\n \"state\": \"CA\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"id\": \"shp_02b98ba3f3824eddb0aee558d14fd355\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"EasyPost\",\n \"company\": null,\n \"street1\": \"164 Townsend St\",\n \"id\": \"adr_5cef58755be811efaee8ac1f6bc539aa\",\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\": \"2024-08-16T15:58:22Z\",\n \"predefined_package\": null,\n \"length\": 10.8,\n \"width\": 8.3,\n \"created_at\": \"2024-08-16T15:58:22Z\",\n \"weight\": 10.0,\n \"id\": \"prcl_6a91509ee5d7466dbfb20bd7da374577\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"Airport Shipping\",\n \"street1\": \"601 Brasilia Avenue\",\n \"id\": \"adr_5cedce4f5be811efb2aaac1f6bc539ae\",\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\": \"44.05\",\n \"created_at\": \"2024-08-16T15:58:22Z\",\n \"delivery_days\": 1.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_02b98ba3f3824eddb0aee558d14fd355\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"51.65\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:22Z\",\n \"rate\": \"44.05\",\n \"service\": \"Express\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 1.0,\n \"currency\": \"USD\",\n \"id\": \"rate_832e039754be4a72a943d14addad11f0\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"9.86\",\n \"created_at\": \"2024-08-16T15:58:22Z\",\n \"delivery_days\": 2.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_02b98ba3f3824eddb0aee558d14fd355\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"12.45\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:22Z\",\n \"rate\": \"9.43\",\n \"service\": \"Priority\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 2.0,\n \"currency\": \"USD\",\n \"id\": \"rate_0a5c02530a6049bd804fb21acd8d724a\",\n \"object\": \"Rate\"\n },\n {\n \"carrier_account_id\": \"ca_f09befdb2e9c410e95c7622ea912c18c\",\n \"list_rate\": \"5.45\",\n \"created_at\": \"2024-08-16T15:58:22Z\",\n \"delivery_days\": 4.0,\n \"list_currency\": \"USD\",\n \"shipment_id\": \"shp_02b98ba3f3824eddb0aee558d14fd355\",\n \"mode\": \"test\",\n \"carrier\": \"USPS\",\n \"delivery_date\": null,\n \"delivery_date_guaranteed\": false,\n \"retail_rate\": \"6.90\",\n \"retail_currency\": \"USD\",\n \"updated_at\": \"2024-08-16T15:58:22Z\",\n \"rate\": \"5.45\",\n \"service\": \"GroundAdvantage\",\n \"billing_type\": \"easypost\",\n \"est_delivery_days\": 4.0,\n \"currency\": \"USD\",\n \"id\": \"rate_e1c3fad844b24d2b8130d3fc130215b1\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": null,\n \"company\": \"Airport Shipping\",\n \"street1\": \"601 Brasilia Avenue\",\n \"id\": \"adr_5cedce4f5be811efb2aaac1f6bc539ae\",\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_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_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_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_762874dd0d3941c6afe7cbedef177d5c\",\n \"forms\": [],\n \"status\": \"unknown\",\n \"object\": \"Shipment\"\n }\n ],\n \"mode\": \"test\",\n \"reference\": \"\",\n \"is_return\": false,\n \"updated_at\": \"2024-08-16T15:58:22Z\",\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\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"EasyPost\",\n \"company\": null,\n \"street1\": \"164 Townsend St\",\n \"id\": \"adr_5cef58755be811efaee8ac1f6bc539aa\",\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_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_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_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_762874dd0d3941c6afe7cbedef177d5c\",\n \"from_address\": {\n \"zip\": \"94107\",\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"created_at\": \"2024-08-16T15:58: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\": \"2024-08-16T15:58:22+00:00\",\n \"phone\": \"REDACTED\",\n \"name\": \"EasyPost\",\n \"company\": null,\n \"street1\": \"164 Townsend St\",\n \"id\": \"adr_5cef58755be811efaee8ac1f6bc539aa\",\n \"street2\": \"Unit 1\",\n \"state\": \"CA\",\n \"email\": null,\n \"object\": \"Address\"\n },\n \"object\": \"Order\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "11224" + "10186" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb41nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d0a0f7f1d13400088e1f" + "8a4bf43a66bf771ee786c16a0035f19c" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.714492" + "0.639739" ], - "etag": [ - "W/\"d7d537be93aeaf61699c085da37d954c\"" + "location": [ + "/api/v2/orders/order_762874dd0d3941c6afe7cbedef177d5c" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/orders/order_e57f4f08fecf4133875ac7deb0fb2b50" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,7 +87,6 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/orders" }, "duration": 850 diff --git a/src/test/cassettes/tracker/all.json b/src/test/cassettes/tracker/all.json index ec7e8b5ee..6a9e56349 100644 --- a/src/test/cassettes/tracker/all.json +++ b/src/test/cassettes/tracker/all.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456538, + "recordedAt": 1723823904, "request": { "body": "", "method": "GET", @@ -12,69 +12,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/trackers?page_size\u003d5" + "uri": "https://api.easypost.com/v2/trackers?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, "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\": \"2024-08-16T15:58: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\": \"2024-07-16T15:58:19Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:19Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_1afc79ef71b2437e92cfd3c63b048ab9\",\n \"tracking_code\": \"9400100105807076062921\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzIzODcyZWMyYWNhYTRjMzk5OGMxMjk2OTJhMzZhMWY1\",\n \"est_delivery_date\": \"2024-08-16T15:58:19Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:19Z\",\n \"signed_by\": null,\n \"id\": \"trk_23872ec2acaa4c3998c129692a36a1f5\",\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\": \"2024-08-16T15:58:15Z\",\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\": \"2024-07-16T15:58:15Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:15Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_92744ae3e4364c35b4ed9035695dd218\",\n \"tracking_code\": \"9400100105807076062891\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2RlMGRiOWNjNzk4OTQ5NTY4MTBmOGNhMWMwZjA0Y2M1\",\n \"est_delivery_date\": \"2024-08-16T15:58:15Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:15Z\",\n \"signed_by\": null,\n \"id\": \"trk_de0db9cc79894956810f8ca1c0f04cc5\",\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\": \"2024-08-16T15:58:11Z\",\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\": \"2024-07-16T15:58:11Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:11Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_54ad1de739464651a50980f4b4246eee\",\n \"tracking_code\": \"9400100105807076062877\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2IxMjQwNWY5YTI1OTQ1YjhhYmJhMGY4MjY2NzlmZDU0\",\n \"est_delivery_date\": \"2024-08-16T15:58:11Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:11Z\",\n \"signed_by\": null,\n \"id\": \"trk_b12405f9a25945b8abba0f826679fd54\",\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\": \"2024-08-16T15:57:54Z\",\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\": \"2024-07-16T15:57:54Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:34:54Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"tracking_code\": \"9400100105807076062822\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzBhZGEwYzY0YTU0NDQzYTFiMjQxMTM2MTQ2MGU2ZjBh\",\n \"est_delivery_date\": \"2024-08-16T15:57:54Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:57:54Z\",\n \"signed_by\": null,\n \"id\": \"trk_0ada0c64a54443a1b2411361460e6f0a\",\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\": \"2024-08-16T15:57:31Z\",\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\": \"2024-07-16T15:57:31Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:34:31Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_a6df738bc84b4fc3bda44745b7e97f07\",\n \"tracking_code\": \"9400100105807076062648\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2JjMjkxNzA2NzM1MjQ1YTFhYWQ4ZDkyNzEyMDcyNjFk\",\n \"est_delivery_date\": \"2024-08-16T15:57:31Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:57:31Z\",\n \"signed_by\": null,\n \"id\": \"trk_bc291706735245a1aad8d9271207261d\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n }\n ],\n \"has_more\": true\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "8260" + "8220" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb35nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d09af7b6a18f00088acc" + "8a4bf43c66bf7720e786c1860035f440" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.129180" - ], - "etag": [ - "W/\"2488a98ab83156fba4df1e0cbb956dc2\"" + "0.216903" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +81,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/trackers?page_size\u003d5" + "uri": "https://api.easypost.com/v2/trackers?%70%61%67%65%5F%73%69%7A%65\u003d%35" }, - "duration": 262 + "duration": 415 } ] \ No newline at end of file diff --git a/src/test/cassettes/tracker/all_parameter_hand_off.json b/src/test/cassettes/tracker/all_parameter_hand_off.json new file mode 100644 index 000000000..18b6ebe0f --- /dev/null +++ b/src/test/cassettes/tracker/all_parameter_hand_off.json @@ -0,0 +1,88 @@ +[ + { + "recordedAt": 1723823904, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/trackers?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%74%72%61%63%6B%69%6E%67%5F%63%6F%64%65\u003d%73%6F%6D%65%74%68%69%6E%67\u0026%63%61%72%72%69%65%72\u003d%73%6F%6D%65%74%68%69%6E%67+%65%6C%73%65" + }, + "response": { + "body": "{\n \"trackers\": [],\n \"has_more\": false\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "32" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43e66bf7720e786c1870035f4ba" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.043134" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/trackers?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%74%72%61%63%6B%69%6E%67%5F%63%6F%64%65\u003d%73%6F%6D%65%74%68%69%6E%67\u0026%63%61%72%72%69%65%72\u003d%73%6F%6D%65%74%68%69%6E%67+%65%6C%73%65" + }, + "duration": 251 + } +] \ No newline at end of file diff --git a/src/test/cassettes/tracker/create.json b/src/test/cassettes/tracker/create.json index 9b85eb003..cbbc18cfa 100644 --- a/src/test/cassettes/tracker/create.json +++ b/src/test/cassettes/tracker/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456539, + "recordedAt": 1723823906, "request": { "body": "{\n \"tracker\": {\n \"carrier\": \"USPS\",\n \"tracking_code\": \"EZ1000000001\"\n }\n}", "method": "POST", @@ -18,84 +18,80 @@ "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 \"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\": \"2024-07-24T22:21: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\": \"2024-06-24T22:21:52Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T10:58:52Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\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/djE6dHJrX2VjNDg5YTg4NWQ3MzRlNDY5MjRiZWZhZDMzMzZkNWY0\",\n \"est_delivery_date\": \"2024-07-24T22:21:52Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-24T22:21:52Z\",\n \"signed_by\": null,\n \"id\": \"trk_ec489a885d734e46924befad3336d5f4\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n}", "httpVersion": null, "headers": { "null": [ - "HTTP/1.1 201 Created" + "HTTP/1.1 200 OK" ], "content-length": [ - "1724" + "1618" ], "expires": [ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], "x-canary": [ "direct" ], - "x-content-type-options": [ - "nosniff" - ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d09bf7cda91a00088b85" + "8a4bf43c66bf7722e786c49c0035f665" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.133904" + "0.092682" ], - "etag": [ - "W/\"8fc2234e73ba319c1f6503570c70ada6\"" + "location": [ + "/api/v2/trackers/trk_ec489a885d734e46924befad3336d5f4" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/trackers/trk_2a24485cd26948619ab6cb6517b6350e" - ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" ] }, "status": { - "code": 201, - "message": "Created" + "code": 200, + "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/trackers" }, - "duration": 264 + "duration": 312 } ] \ No newline at end of file diff --git a/src/test/cassettes/tracker/delete.json b/src/test/cassettes/tracker/delete.json new file mode 100644 index 000000000..83675ba7d --- /dev/null +++ b/src/test/cassettes/tracker/delete.json @@ -0,0 +1,180 @@ +[ + { + "recordedAt": 1770145106, + "request": { + "body": "{\n \"tracker\": {\n \"carrier\": \"USPS\",\n \"tracking_code\": \"EZ1000000001\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/trackers" + }, + "response": { + "body": "{\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\": \"2025-11-06T17:22: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 \"est_delivery_date\": null,\n \"datetime\": \"2025-10-06T17:22:58Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"est_delivery_date\": null,\n \"datetime\": \"2025-10-07T05:59:58Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\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/djE6dHJrXzJlNWJmZTAyZTE3MTRjODU5MDdiYTdhYTU2ODI1NDI3\",\n \"est_delivery_date\": \"2025-11-06T17:22:58Z\",\n \"carrier\": \"USPS\",\n \"delivery_evidence\": [],\n \"is_return\": false,\n \"updated_at\": \"2025-11-06T17:22:58Z\",\n \"signed_by\": null,\n \"id\": \"trk_2e5bfe02e1714c85907ba7aa56825427\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1691" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "e05a3b9c69824552e789838a003ca558" + ], + "x-proxied": [ + "intlb4nuq 5f0235a1ab", + "extlb1nuq cbbd141214" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.109996" + ], + "location": [ + "/api/v2/trackers/trk_2e5bfe02e1714c85907ba7aa56825427" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202602022215-5a5c93c546-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/trackers" + }, + "duration": 339 + }, + { + "recordedAt": 1770145106, + "request": { + "body": "", + "method": "DELETE", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/trackers/trk_2e5bfe02e1714c85907ba7aa56825427" + }, + "response": { + "body": "{\n \"success\": true\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "16" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb64nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "e05a3b9c69824552e789838b003ca5f3" + ], + "x-proxied": [ + "intlb4nuq 5f0235a1ab", + "extlb1nuq cbbd141214" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.038769" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202602022215-5a5c93c546-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/trackers/trk_2e5bfe02e1714c85907ba7aa56825427" + }, + "duration": 270 + } +] \ No newline at end of file diff --git a/src/test/cassettes/tracker/get_next_page.json b/src/test/cassettes/tracker/get_next_page.json new file mode 100644 index 000000000..566210bed --- /dev/null +++ b/src/test/cassettes/tracker/get_next_page.json @@ -0,0 +1,174 @@ +[ + { + "recordedAt": 1723823903, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/trackers?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "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\": \"2024-08-16T15:58: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\": \"2024-07-16T15:58:19Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:19Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_1afc79ef71b2437e92cfd3c63b048ab9\",\n \"tracking_code\": \"9400100105807076062921\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzIzODcyZWMyYWNhYTRjMzk5OGMxMjk2OTJhMzZhMWY1\",\n \"est_delivery_date\": \"2024-08-16T15:58:19Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:19Z\",\n \"signed_by\": null,\n \"id\": \"trk_23872ec2acaa4c3998c129692a36a1f5\",\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\": \"2024-08-16T15:58:15Z\",\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\": \"2024-07-16T15:58:15Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:15Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_92744ae3e4364c35b4ed9035695dd218\",\n \"tracking_code\": \"9400100105807076062891\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2RlMGRiOWNjNzk4OTQ5NTY4MTBmOGNhMWMwZjA0Y2M1\",\n \"est_delivery_date\": \"2024-08-16T15:58:15Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:15Z\",\n \"signed_by\": null,\n \"id\": \"trk_de0db9cc79894956810f8ca1c0f04cc5\",\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\": \"2024-08-16T15:58:11Z\",\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\": \"2024-07-16T15:58:11Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:11Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_54ad1de739464651a50980f4b4246eee\",\n \"tracking_code\": \"9400100105807076062877\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2IxMjQwNWY5YTI1OTQ1YjhhYmJhMGY4MjY2NzlmZDU0\",\n \"est_delivery_date\": \"2024-08-16T15:58:11Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:11Z\",\n \"signed_by\": null,\n \"id\": \"trk_b12405f9a25945b8abba0f826679fd54\",\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\": \"2024-08-16T15:57:54Z\",\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\": \"2024-07-16T15:57:54Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:34:54Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_e2b01acfa9ce40a1beabb08665cac06d\",\n \"tracking_code\": \"9400100105807076062822\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzBhZGEwYzY0YTU0NDQzYTFiMjQxMTM2MTQ2MGU2ZjBh\",\n \"est_delivery_date\": \"2024-08-16T15:57:54Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:57:54Z\",\n \"signed_by\": null,\n \"id\": \"trk_0ada0c64a54443a1b2411361460e6f0a\",\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\": \"2024-08-16T15:57:31Z\",\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\": \"2024-07-16T15:57:31Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:34:31Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_a6df738bc84b4fc3bda44745b7e97f07\",\n \"tracking_code\": \"9400100105807076062648\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2JjMjkxNzA2NzM1MjQ1YTFhYWQ4ZDkyNzEyMDcyNjFk\",\n \"est_delivery_date\": \"2024-08-16T15:57:31Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:57:31Z\",\n \"signed_by\": null,\n \"id\": \"trk_bc291706735245a1aad8d9271207261d\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n }\n ],\n \"has_more\": true\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "8220" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb39nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf771fe786c1840035f32d" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.200468" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/trackers?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 399 + }, + { + "recordedAt": 1723823904, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/trackers?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%74%72%6B%5F%62%63%32%39%31%37%30%36%37%33%35%32%34%35%61%31%61%61%64%38%64%39%32%37%31%32%30%37%32%36%31%64" + }, + "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\": \"2024-08-16T15:57:29Z\",\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\": \"2024-07-16T15:57:29Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:34:29Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_761def93b984449987a38eedb7470636\",\n \"tracking_code\": \"9400100105807076062624\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2Y2MGM4NGRhMjgxOTQxNTc5NjUyMGE1M2FkZTNlMjky\",\n \"est_delivery_date\": \"2024-08-16T15:57:29Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:57:29Z\",\n \"signed_by\": null,\n \"id\": \"trk_f60c84da2819415796520a53ade3e292\",\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\": \"2024-08-16T15:57:24Z\",\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\": \"2024-07-16T15:57:24Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:34:24Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_0f2ce274ee16425a97809c452708cac8\",\n \"tracking_code\": \"9400100105807076062549\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzU1ZjVkNTc0ODFlYjQ3MDU4OGJjY2Q5NmI5ODMzNGJk\",\n \"est_delivery_date\": \"2024-08-16T15:57:24Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:57:24Z\",\n \"signed_by\": null,\n \"id\": \"trk_55f5d57481eb470588bccd96b98334bd\",\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\": \"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\": \"2024-08-16T15:57:21Z\",\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\": \"2024-07-16T15:58:21Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:21Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T14:40:21Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-18T16:16:21Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-18T19:07:21Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-19T00:47:21Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_313455b1af2843bba16b05df1803a302\",\n \"tracking_code\": \"9400100105807076062532\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrX2E1N2QxM2MyZDhkMjQ5MmE5NzU1ODQ3YzE2ZjBiOWJj\",\n \"est_delivery_date\": \"2024-08-16T15:58:21Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:21Z\",\n \"signed_by\": null,\n \"id\": \"trk_a57d13c2d8d2492a9755847c16f0b9bc\",\n \"object\": \"Tracker\",\n \"status\": \"in_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\": \"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\": \"2024-08-16T15:57: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\": \"2024-07-16T15:58:18Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:18Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T14:40:18Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-18T16:16:18Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-18T19:07:18Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-19T00:47:18Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_730842bb306645f2834578e167608cb1\",\n \"tracking_code\": \"9400100105807076062518\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzE1ODNmYzdkYTYyYjRkMmU4YzA0NzY2NTg4M2EyZDQ4\",\n \"est_delivery_date\": \"2024-08-16T15:58:18Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:18Z\",\n \"signed_by\": null,\n \"id\": \"trk_1583fc7da62b4d2e8c047665883a2d48\",\n \"object\": \"Tracker\",\n \"status\": \"in_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\": \"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\": \"2024-08-16T15:57: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\": \"2024-07-16T15:58:13Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T04:35:13Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77315\",\n \"country\": null,\n \"city\": \"NORTH HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-17T14:40:13Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29201\",\n \"country\": null,\n \"city\": \"COLUMBIA\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-18T16:16:13Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-18T19:07:13Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"29407\",\n \"country\": null,\n \"city\": \"CHARLESTON\",\n \"state\": \"SC\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-07-19T00:47:13Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Sorting Complete\",\n \"object\": \"TrackingDetail\",\n \"status\": \"in_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\n }\n ],\n \"shipment_id\": \"shp_e7ea0fa2a1294ab6b98ed4b38acc835f\",\n \"tracking_code\": \"9400100105807076062464\",\n \"status_detail\": \"status_update\",\n \"mode\": \"test\",\n \"public_url\": \"https://track.easypost.com/djE6dHJrXzc4M2QyYjY1MTczNjQxYWVhYWJjOWVlMDUzYzQyOWJm\",\n \"est_delivery_date\": \"2024-08-16T15:58:13Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-08-16T15:58:13Z\",\n \"signed_by\": null,\n \"id\": \"trk_783d2b65173641aeaabc9ee053c429bf\",\n \"object\": \"Tracker\",\n \"status\": \"in_transit\"\n }\n ],\n \"has_more\": true\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "12075" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb36nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43f66bf771fe786c1850035f3a4" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.215482" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/trackers?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%62%65%66%6F%72%65%5F%69%64\u003d%74%72%6B%5F%62%63%32%39%31%37%30%36%37%33%35%32%34%35%61%31%61%61%64%38%64%39%32%37%31%32%30%37%32%36%31%64" + }, + "duration": 413 + } +] \ No newline at end of file diff --git a/src/test/cassettes/tracker/get_next_page_parameter_hand_off.json b/src/test/cassettes/tracker/get_next_page_parameter_hand_off.json new file mode 100644 index 000000000..ef1e4eb8f --- /dev/null +++ b/src/test/cassettes/tracker/get_next_page_parameter_hand_off.json @@ -0,0 +1,88 @@ +[ + { + "recordedAt": 1723823906, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/trackers?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%74%72%61%63%6B%69%6E%67%5F%63%6F%64%65\u003d%73%6F%6D%65%74%68%69%6E%67\u0026%63%61%72%72%69%65%72\u003d%73%6F%6D%65%74%68%69%6E%67+%65%6C%73%65" + }, + "response": { + "body": "{\n \"trackers\": [],\n \"has_more\": false\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "32" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb53nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf7722e786c49d0035f6bb" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.054183" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/trackers?%70%61%67%65%5F%73%69%7A%65\u003d%35\u0026%74%72%61%63%6B%69%6E%67%5F%63%6F%64%65\u003d%73%6F%6D%65%74%68%69%6E%67\u0026%63%61%72%72%69%65%72\u003d%73%6F%6D%65%74%68%69%6E%67+%65%6C%73%65" + }, + "duration": 251 + } +] \ No newline at end of file diff --git a/src/test/cassettes/tracker/retrieve.json b/src/test/cassettes/tracker/retrieve.json index 7ed4bdd59..564747ff0 100644 --- a/src/test/cassettes/tracker/retrieve.json +++ b/src/test/cassettes/tracker/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456538, + "recordedAt": 1723823905, "request": { "body": "{\n \"tracker\": {\n \"carrier\": \"USPS\",\n \"tracking_code\": \"EZ1000000001\"\n }\n}", "method": "POST", @@ -18,85 +18,84 @@ "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 \"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\": \"2024-07-24T22:21: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\": \"2024-06-24T22:21:52Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T10:58:52Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\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/djE6dHJrX2VjNDg5YTg4NWQ3MzRlNDY5MjRiZWZhZDMzMzZkNWY0\",\n \"est_delivery_date\": \"2024-07-24T22:21:52Z\",\n \"carrier\": \"USPS\",\n \"is_return\": false,\n \"updated_at\": \"2024-07-24T22:21:52Z\",\n \"signed_by\": null,\n \"id\": \"trk_ec489a885d734e46924befad3336d5f4\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n}", "httpVersion": null, "headers": { "null": [ - "HTTP/1.1 201 Created" + "HTTP/1.1 200 OK" ], "content-length": [ - "1724" + "1618" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d09af7dfc57900088b09" + "8a4bf43b66bf7721e786c1890035f511" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.126759" + "0.090974" ], - "etag": [ - "W/\"a4ae381ba0bf929fa2cae15353fd83d4\"" + "location": [ + "/api/v2/trackers/trk_ec489a885d734e46924befad3336d5f4" ], "content-type": [ "application/json; charset\u003dutf-8" ], - "location": [ - "/api/v2/trackers/trk_f29f19b03807445e92012befe6d7e561" - ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" ] }, "status": { - "code": 201, - "message": "Created" + "code": 200, + "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/trackers" }, - "duration": 282 + "duration": 292 }, { - "recordedAt": 1661456539, + "recordedAt": 1723823905, "request": { "body": "", "method": "GET", @@ -108,69 +107,69 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/trackers/trk_f29f19b03807445e92012befe6d7e561" + "uri": "https://api.easypost.com/v2/trackers/trk_ec489a885d734e46924befad3336d5f4" }, "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 \"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\": \"2024-07-24T22:21: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\": \"2024-06-24T22:21:52Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"datetime\": \"2024-06-25T10:58:52Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\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/djE6dHJrX2VjNDg5YTg4NWQ3MzRlNDY5MjRiZWZhZDMzMzZkNWY0\",\n \"est_delivery_date\": \"2024-07-24T22:21:52Z\",\n \"carrier\": \"USPS\",\n \"updated_at\": \"2024-07-24T22:21:52Z\",\n \"signed_by\": null,\n \"id\": \"trk_ec489a885d734e46924befad3336d5f4\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "1689" + "1593" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d09af7b95f5100088b24" + "8a4bf43c66bf7721e786c18a0035f55f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.096229" - ], - "etag": [ - "W/\"d05a341c7d76fbcab82eefce6e781d63\"" + "0.072253" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,9 +179,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/trackers/trk_f29f19b03807445e92012befe6d7e561" + "uri": "https://api.easypost.com/v2/trackers/trk_ec489a885d734e46924befad3336d5f4" }, - "duration": 231 + "duration": 271 } ] \ No newline at end of file diff --git a/src/test/cassettes/tracker/retrieve_batch.json b/src/test/cassettes/tracker/retrieve_batch.json new file mode 100644 index 000000000..8f6518de1 --- /dev/null +++ b/src/test/cassettes/tracker/retrieve_batch.json @@ -0,0 +1,186 @@ +[ + { + "recordedAt": 1762449778, + "request": { + "body": "{\n \"tracker\": {\n \"carrier\": \"USPS\",\n \"tracking_code\": \"EZ1000000001\"\n }\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "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\": \"2025-11-06T17:22: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 \"est_delivery_date\": null,\n \"datetime\": \"2025-10-06T17:22: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 \"est_delivery_date\": null,\n \"datetime\": \"2025-10-07T05:59: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/djE6dHJrXzJlNWJmZTAyZTE3MTRjODU5MDdiYTdhYTU2ODI1NDI3\",\n \"est_delivery_date\": \"2025-11-06T17:22:58Z\",\n \"carrier\": \"USPS\",\n \"delivery_evidence\": [],\n \"is_return\": false,\n \"updated_at\": \"2025-11-06T17:22:58Z\",\n \"signed_by\": null,\n \"id\": \"trk_2e5bfe02e1714c85907ba7aa56825427\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 201 Created" + ], + "content-length": [ + "1797" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb32nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "a777ff39690cd972e2aac1950102100a" + ], + "x-proxied": [ + "intlb6nuq c0061e0a2e", + "extlb1nuq cbbd141214" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.172763" + ], + "location": [ + "/api/v2/trackers/trk_2e5bfe02e1714c85907ba7aa56825427" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202511061639-9e7dc69a6b-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/trackers" + }, + "duration": 287 + }, + { + "recordedAt": 1762449778, + "request": { + "body": "{\n \"tracking_codes\": [\n \"EZ1000000001\"\n ]\n}", + "method": "POST", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ], + "Content-Type": [ + "application/json" + ] + }, + "uri": "https://api.easypost.com/v2/trackers/batch" + }, + "response": { + "body": "{\n \"trackers\": [\n {\n \"fees\": [\n {\n \"amount\": \"0.02000\",\n \"refunded\": false,\n \"type\": \"TrackerFee\",\n \"charged\": true,\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\": \"2025-11-06T17:22: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 \"est_delivery_date\": null,\n \"datetime\": \"2025-10-06T17:22:58Z\",\n \"description\": \"\",\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\": \"\"\n },\n {\n \"tracking_location\": {\n \"zip\": \"77063\",\n \"country\": null,\n \"city\": \"HOUSTON\",\n \"state\": \"TX\",\n \"object\": \"TrackingLocation\"\n },\n \"est_delivery_date\": null,\n \"datetime\": \"2025-10-07T05:59:58Z\",\n \"description\": \"\",\n \"source\": \"USPS\",\n \"message\": \"Shipping Label Created\",\n \"object\": \"TrackingDetail\",\n \"status\": \"pre_transit\",\n \"status_detail\": \"status_update\",\n \"carrier_code\": \"\"\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/djE6dHJrXzJlNWJmZTAyZTE3MTRjODU5MDdiYTdhYTU2ODI1NDI3\",\n \"est_delivery_date\": \"2025-11-06T17:22:58Z\",\n \"carrier\": \"USPS\",\n \"delivery_evidence\": [],\n \"updated_at\": \"2025-11-06T17:22:58Z\",\n \"signed_by\": null,\n \"id\": \"trk_2e5bfe02e1714c85907ba7aa56825427\",\n \"object\": \"Tracker\",\n \"status\": \"pre_transit\"\n }\n ],\n \"has_more\": false\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "1785" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb55nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "a777ff3b690cd972e2aac19701021096" + ], + "x-proxied": [ + "intlb5nuq c0061e0a2e", + "extlb1nuq cbbd141214" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.062892" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202511061639-9e7dc69a6b-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/trackers/batch" + }, + "duration": 178 + } +] \ 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 deleted file mode 100644 index 94320ada3..000000000 --- a/src/test/cassettes/user/all_api_keys.json +++ /dev/null @@ -1,92 +0,0 @@ -[ - { - "recordedAt": 1661456587, - "request": { - "body": "", - "method": "GET", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ] - }, - "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 \"keys\": [],\n \"id\": \"user_04ad194774a54f6c97d1385715721091\"\n}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 200 OK" - ], - "content-length": [ - "6958" - ], - "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": [ - "07323c386307d0cbf7ca7c190008a484" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.032449" - ], - "etag": [ - "W/\"c6f992e570e1e8addfa1357defd149fb\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 200, - "message": "OK" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/api_keys" - }, - "duration": 69 - } -] \ No newline at end of file diff --git a/src/test/cassettes/user/all_children.json b/src/test/cassettes/user/all_children.json new file mode 100644 index 000000000..ff6d9809d --- /dev/null +++ b/src/test/cassettes/user/all_children.json @@ -0,0 +1,88 @@ +[ + { + "recordedAt": 1723823861, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/users/children?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"children\": [\n {\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"test user\",\n \"verified\": true,\n \"created_at\": \"2023-12-07T17:46:08Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_af930e9bd27a4445bc2741fac37850cc\",\n \"object\": \"User\"\n }\n ],\n \"has_more\": false\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "245" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb40nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf76f4e786bce60035c750" + ], + "x-proxied": [ + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.081468" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/users/children?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 283 + } +] \ No newline at end of file diff --git a/src/test/cassettes/user/create.json b/src/test/cassettes/user/create.json index 95903688b..904e9e196 100644 --- a/src/test/cassettes/user/create.json +++ b/src/test/cassettes/user/create.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456589, + "recordedAt": 1723823861, "request": { "body": "{\n \"user\": {\n \"name\": \"Test User\"\n }\n}", "method": "POST", @@ -18,66 +18,63 @@ "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\": \"2024-08-16T15:57:41Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_2f5cb2d387d84df8b7581bd2ff1f78f0\",\n \"api_keys\": [],\n \"has_elevate_access\": false,\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "634" + "691" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb41nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d0ccf7dfc9560008a511" + "8a4bf44066bf76f5e786bcff0035c7ce" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.703509" - ], - "etag": [ - "W/\"e07f33aac60da53e8368b4920efa77d1\"" + "0.488848" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +84,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 833 + "duration": 692 }, { - "recordedAt": 1661456589, + "recordedAt": 1723823862, "request": { "body": "", "method": "GET", @@ -105,69 +101,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_7c7dac760e4f419faa2ee42bc2c2905f" + "uri": "https://api.easypost.com/v2/users/user_2f5cb2d387d84df8b7581bd2ff1f78f0" }, "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\": \"2024-08-16T15:57:41Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_2f5cb2d387d84df8b7581bd2ff1f78f0\",\n \"has_elevate_access\": false,\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "227" + "284" ], "expires": [ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d0cdf800c13a0008a58d" + "8a4bf44066bf76f6e786bd000035c8aa" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.120696" - ], - "etag": [ - "W/\"8bb764c5f8e58511288fc75e1688e85e\"" + "0.107554" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +170,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_7c7dac760e4f419faa2ee42bc2c2905f" + "uri": "https://api.easypost.com/v2/users/user_2f5cb2d387d84df8b7581bd2ff1f78f0" }, - "duration": 252 + "duration": 315 }, { - "recordedAt": 1661456590, + "recordedAt": 1723823862, "request": { "body": "", "method": "DELETE", @@ -195,7 +187,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_7c7dac760e4f419faa2ee42bc2c2905f" + "uri": "https://api.easypost.com/v2/users/user_2f5cb2d387d84df8b7581bd2ff1f78f0" }, "response": { "body": "", @@ -208,47 +200,47 @@ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d0cee68cd1800008a5b0" + "8a4bf43b66bf76f6e786bd010035c908" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.118173" + "0.121439" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -258,9 +250,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_2f5cb2d387d84df8b7581bd2ff1f78f0" }, - "duration": 427 + "duration": 334 } ] \ No newline at end of file diff --git a/src/test/cassettes/user/delete.json b/src/test/cassettes/user/delete.json index 6362a96a4..1c56d4aee 100644 --- a/src/test/cassettes/user/delete.json +++ b/src/test/cassettes/user/delete.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456591, + "recordedAt": 1723823863, "request": { "body": "{\n \"user\": {\n \"name\": \"Test User\"\n }\n}", "method": "POST", @@ -18,66 +18,63 @@ "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\": \"2024-08-16T15:57:43Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_12f88240c28447e4ab03d662499a9048\",\n \"api_keys\": [],\n \"has_elevate_access\": false,\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "634" + "691" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb33nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d0cef7db7cbd0008a5f1" + "8a4bf43e66bf76f6e786bd020035c95f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.753074" - ], - "etag": [ - "W/\"eb40c89b723a084b9c6b0bc789f891d6\"" + "0.582883" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +84,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 875 + "duration": 780 }, { - "recordedAt": 1661456591, + "recordedAt": 1723823863, "request": { "body": "", "method": "DELETE", @@ -105,7 +101,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_c7e290a08e454feb9e093d1283a8bb2d" + "uri": "https://api.easypost.com/v2/users/user_12f88240c28447e4ab03d662499a9048" }, "response": { "body": "", @@ -118,47 +114,50 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d0cff7bb984f0008a669" + "8a4bf43e66bf76f7e786bd030035ca21" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.119947" + "0.052142" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -168,13 +167,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_12f88240c28447e4ab03d662499a9048" }, - "duration": 246 + "duration": 256 }, { - "recordedAt": 1661456591, + "recordedAt": 1723823863, "request": { "body": "", "method": "GET", @@ -186,10 +184,10 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_c7e290a08e454feb9e093d1283a8bb2d" + "uri": "https://api.easypost.com/v2/users/user_12f88240c28447e4ab03d662499a9048" }, "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": [ @@ -202,50 +200,50 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb34nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d0cff7bb984f0008a677" + "8a4bf43e66bf76f7e786bd030035ca3f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.042449" + "0.117425" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -255,9 +253,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_12f88240c28447e4ab03d662499a9048" }, - "duration": 77 + "duration": 186 } ] \ No newline at end of file diff --git a/src/test/cassettes/user/get_next_page.json b/src/test/cassettes/user/get_next_page.json new file mode 100644 index 000000000..ca191689e --- /dev/null +++ b/src/test/cassettes/user/get_next_page.json @@ -0,0 +1,88 @@ +[ + { + "recordedAt": 1723823858, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/users/children?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "response": { + "body": "{\n \"children\": [\n {\n \"parent_id\": \"user_04ad194774a54f6c97d1385715721091\",\n \"name\": \"test user\",\n \"verified\": true,\n \"created_at\": \"2023-12-07T17:46:08Z\",\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_af930e9bd27a4445bc2741fac37850cc\",\n \"object\": \"User\"\n }\n ],\n \"has_more\": false\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "245" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb38nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "8a4bf43a66bf76f1e786bcde0035c442" + ], + "x-proxied": [ + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.187380" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202408152333-48cda4a73e-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/users/children?%70%61%67%65%5F%73%69%7A%65\u003d%35" + }, + "duration": 393 + } +] \ No newline at end of file diff --git a/src/test/cassettes/user/retrieve.json b/src/test/cassettes/user/retrieve.json index c3d66e653..fc6b13829 100644 --- a/src/test/cassettes/user/retrieve.json +++ b/src/test/cassettes/user/retrieve.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456588, + "recordedAt": 1723823860, "request": { "body": "", "method": "GET", @@ -15,66 +15,63 @@ "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 \"has_elevate_access\": false,\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\": \"2023-12-07T17:46:08Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_af930e9bd27a4445bc2741fac37850cc\",\n \"has_elevate_access\": false,\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.50\",\n \"email\": \"dev+easypost-java@easypost.com\",\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "3737" + "887" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb53nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d0ccf7dc76d00008a49b" + "8a4bf43b66bf76f4e786bce40035c6ac" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.162689" - ], - "etag": [ - "W/\"a942726b062008f60decc3bee1bca0e2\"" + "0.060609" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,13 +81,12 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 300 + "duration": 127 }, { - "recordedAt": 1661456588, + "recordedAt": 1723823860, "request": { "body": "", "method": "GET", @@ -105,66 +101,63 @@ "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 \"has_elevate_access\": false,\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\": \"2023-12-07T17:46:08Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_af930e9bd27a4445bc2741fac37850cc\",\n \"has_elevate_access\": false,\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.50\",\n \"email\": \"dev+easypost-java@easypost.com\",\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "3737" + "887" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb41nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d0ccf7b8cdce0008a4cb" + "8a4bf43e66bf76f4e786bce50035c6ef" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.161176" - ], - "etag": [ - "W/\"a942726b062008f60decc3bee1bca0e2\"" + "0.117699" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -174,9 +167,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/users/user_04ad194774a54f6c97d1385715721091" }, - "duration": 284 + "duration": 330 } ] \ 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..fdc07ad5f 100644 --- a/src/test/cassettes/user/retrieve_me.json +++ b/src/test/cassettes/user/retrieve_me.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456593, + "recordedAt": 1723823865, "request": { "body": "", "method": "GET", @@ -15,66 +15,63 @@ "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 \"has_elevate_access\": false,\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\": \"2023-12-07T17:46:08Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_af930e9bd27a4445bc2741fac37850cc\",\n \"has_elevate_access\": false,\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.50\",\n \"email\": \"dev+easypost-java@easypost.com\",\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "3737" + "887" ], "expires": [ "0" ], "x-node": [ - "bigweb3nuq" + "bigweb39nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d0d1f7dd938e0008a782" + "8a4bf43d66bf76f9e786bd200035cc65" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.297852" - ], - "etag": [ - "W/\"a942726b062008f60decc3bee1bca0e2\"" + "0.059515" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -84,9 +81,8 @@ "code": 200, "message": "OK" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 332 + "duration": 128 } ] \ No newline at end of file diff --git a/src/test/cassettes/user/update.json b/src/test/cassettes/user/update.json index 4506e115f..cc5f139cb 100644 --- a/src/test/cassettes/user/update.json +++ b/src/test/cassettes/user/update.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456592, + "recordedAt": 1723823864, "request": { "body": "{\n \"user\": {\n \"name\": \"Test User\"\n }\n}", "method": "POST", @@ -18,66 +18,63 @@ "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\": \"2024-08-16T15:57:44Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_290a56b0f3a24883b1f6fa7b186b708f\",\n \"api_keys\": [],\n \"has_elevate_access\": false,\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "634" + "691" ], "expires": [ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c396307d0cff7ee18180008a69b" + "8a4bf43a66bf76f8e786bd050035caa4" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.777642" - ], - "etag": [ - "W/\"a4bb176d97de3687e5fb03836705c2fb\"" + "0.503789" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +84,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 916 + "duration": 713 }, { - "recordedAt": 1661456593, + "recordedAt": 1723823865, "request": { "body": "{\n \"user\": {\n \"name\": \"New Name\"\n }\n}", "method": "PUT", @@ -108,69 +104,66 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/users/user_735628b0573649c3a19e9ffccad57043" + "uri": "https://api.easypost.com/v2/users/user_290a56b0f3a24883b1f6fa7b186b708f" }, "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\": \"2024-08-16T15:57:44Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_290a56b0f3a24883b1f6fa7b186b708f\",\n \"has_elevate_access\": false,\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "226" + "283" ], "expires": [ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb40nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d0d0f7a8fc740008a72c" + "8a4bf43f66bf76f9e786bd070035cb6c" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.131631" - ], - "etag": [ - "W/\"f5412648f869d962649e15c882b61b5e\"" + "0.146859" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -180,13 +173,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_735628b0573649c3a19e9ffccad57043" + "uri": "https://api.easypost.com/v2/users/user_290a56b0f3a24883b1f6fa7b186b708f" }, - "duration": 262 + "duration": 351 }, { - "recordedAt": 1661456593, + "recordedAt": 1723823865, "request": { "body": "", "method": "GET", @@ -198,69 +190,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_735628b0573649c3a19e9ffccad57043" + "uri": "https://api.easypost.com/v2/users/user_290a56b0f3a24883b1f6fa7b186b708f" }, "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\": \"2024-08-16T15:57:44Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_290a56b0f3a24883b1f6fa7b186b708f\",\n \"has_elevate_access\": false,\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "226" + "283" ], "expires": [ "0" ], "x-node": [ - "bigweb8nuq" + "bigweb39nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c396307d0d1e68c281e0008a74d" + "8a4bf44166bf76f9e786bd080035cbcc" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.034989" - ], - "etag": [ - "W/\"f5412648f869d962649e15c882b61b5e\"" + "0.154919" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -270,13 +259,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_735628b0573649c3a19e9ffccad57043" + "uri": "https://api.easypost.com/v2/users/user_290a56b0f3a24883b1f6fa7b186b708f" }, - "duration": 152 + "duration": 364 }, { - "recordedAt": 1661456593, + "recordedAt": 1723823865, "request": { "body": "", "method": "DELETE", @@ -288,7 +276,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_735628b0573649c3a19e9ffccad57043" + "uri": "https://api.easypost.com/v2/users/user_290a56b0f3a24883b1f6fa7b186b708f" }, "response": { "body": "", @@ -301,47 +289,50 @@ "0" ], "x-node": [ - "bigweb2nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3a6307d0d1f7dd938e0008a774" + "8a4bf43d66bf76f9e786bd200035cc36" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.123041" + "0.050539" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -351,9 +342,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_290a56b0f3a24883b1f6fa7b186b708f" }, - "duration": 251 + "duration": 258 } ] \ 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..a9c41984b 100644 --- a/src/test/cassettes/user/update_brand.json +++ b/src/test/cassettes/user/update_brand.json @@ -1,6 +1,6 @@ [ { - "recordedAt": 1661456585, + "recordedAt": 1723823859, "request": { "body": "{\n \"user\": {\n \"name\": \"Test User\"\n }\n}", "method": "POST", @@ -18,69 +18,66 @@ "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\": \"2024-08-16T15:57:38Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_2997e23591f8442ca1663dd873882cc6\",\n \"api_keys\": [],\n \"has_elevate_access\": false,\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "634" + "691" ], "expires": [ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], "x-canary": [ "direct" ], - "x-content-type-options": [ - "nosniff" - ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d0c8f7dd97f00008a2ca" + "8a4bf43b66bf76f2e786bce00035c4cd" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.775498" - ], - "etag": [ - "W/\"6ec43dffa53b80925b7eb34841b68f24\"" + "0.562266" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -90,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/users" }, - "duration": 938 + "duration": 769 }, { - "recordedAt": 1661456585, + "recordedAt": 1723823859, "request": { "body": "{\n \"brand\": {\n \"color\": \"#123456\"\n }\n}", "method": "PUT", @@ -111,69 +107,69 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/users/user_56f078bb71ab4511bc410f278902cfd9/brand" + "uri": "https://api.easypost.com/v2/users/user_2997e23591f8442ca1663dd873882cc6/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 \"background_color\": null,\n \"color\": \"#123456\",\n \"user_id\": \"user_2997e23591f8442ca1663dd873882cc6\",\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 \"ad_href\": null,\n \"id\": \"brd_39253e61b6854a8c84b58065f6108860\",\n \"object\": \"Brand\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "350" + "373" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d0c9f80031190008a344" + "8a4bf43f66bf76f3e786bce20035c5bd" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.044488" - ], - "etag": [ - "W/\"ee6040d491237233b9335d03baa7bfae\"" + "0.162316" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -183,13 +179,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_2997e23591f8442ca1663dd873882cc6/brand" }, - "duration": 170 + "duration": 375 }, { - "recordedAt": 1661456585, + "recordedAt": 1723823859, "request": { "body": "", "method": "GET", @@ -201,69 +196,69 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_56f078bb71ab4511bc410f278902cfd9" + "uri": "https://api.easypost.com/v2/users/user_2997e23591f8442ca1663dd873882cc6" }, "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\": \"2024-08-16T15:57:38Z\",\n \"default_carbon_offset\": false,\n \"phone_number\": \"REDACTED\",\n \"id\": \"user_2997e23591f8442ca1663dd873882cc6\",\n \"has_elevate_access\": false,\n \"object\": \"User\"\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "227" + "284" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c386307d0c9f7cc21dc0008a372" + "8a4bf44166bf76f3e786bce30035c61f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.038159" - ], - "etag": [ - "W/\"ff1f258c54d2408e94f005b2f056aad2\"" + "0.123552" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -273,13 +268,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/users/user_56f078bb71ab4511bc410f278902cfd9" + "uri": "https://api.easypost.com/v2/users/user_2997e23591f8442ca1663dd873882cc6" }, - "duration": 172 + "duration": 326 }, { - "recordedAt": 1661456585, + "recordedAt": 1723823860, "request": { "body": "", "method": "DELETE", @@ -291,7 +285,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/users/user_56f078bb71ab4511bc410f278902cfd9" + "uri": "https://api.easypost.com/v2/users/user_2997e23591f8442ca1663dd873882cc6" }, "response": { "body": "", @@ -304,47 +298,47 @@ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb42nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d0c9f7db624f0008a38d" + "8a4bf43b66bf76f4e786bce40035c67a" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq c0f5e722d1", + "extlb1nuq b6e1b5034c" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.121399" + "0.153857" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202408152333-48cda4a73e-master" ], "cache-control": [ "private, no-cache, no-store" @@ -354,9 +348,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_2997e23591f8442ca1663dd873882cc6" }, - "duration": 247 + "duration": 355 } ] \ No newline at end of file diff --git a/src/test/cassettes/webhook/all.json b/src/test/cassettes/webhook/all.json index 92e3d55ac..6549f7c53 100644 --- a/src/test/cassettes/webhook/all.json +++ b/src/test/cassettes/webhook/all.json @@ -1,83 +1,252 @@ [ { - "recordedAt": 1661456500, + "recordedAt": 1740070340, "request": { - "body": "", - "method": "GET", + "body": "{\n \"webhook\": {\n \"webhook_secret\": \"sécret\",\n \"url\": \"http://example.com\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n }\n}", + "method": "POST", "headers": { "Accept-Charset": [ "UTF-8" ], "User-Agent": [ "REDACTED" + ], + "Content-Type": [ + "application/json" ] }, - "uri": "https://api.easypost.com/v2/webhooks?" + "uri": "https://api.easypost.com/v2/webhooks" }, "response": { - "body": "{\n \"webhooks\": []\n}", + "body": "{\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2025-02-20T16:52:20Z\",\n \"id\": \"hook_0cb0f41cefab11ef807963ca33822ef2\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ - "HTTP/1.1 200 OK" + "HTTP/1.1 201 Created" ], "content-length": [ - "15" + "213" ], "expires": [ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb59nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" ], "strict-transport-security": [ "max-age\u003d31536000; includeSubDomains; preload" ], + "x-xss-protection": [ + "1; mode\u003dblock" + ], + "x-content-type-options": [ + "nosniff" + ], + "x-ep-request-uuid": [ + "c6a31f9167b75dc4e2b7e27500432cfc" + ], + "x-proxied": [ + "intlb4nuq 51d74985a2", + "extlb2nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.441378" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202502192243-499e5bdec0-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 201, + "message": "Created" + }, + "uri": "https://api.easypost.com/v2/webhooks" + }, + "duration": 555 + }, + { + "recordedAt": 1740070340, + "request": { + "body": "", + "method": "GET", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/webhooks" + }, + "response": { + "body": "{\n \"webhooks\": [\n {\n \"mode\": \"test\",\n \"disabled_at\": null,\n \"created_at\": \"2025-02-20T16:52:20Z\",\n \"id\": \"hook_0cb0f41cefab11ef807963ca33822ef2\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n }\n ]\n}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "228" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb56nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], "pragma": [ "no-cache" ], - "x-canary": [ - "direct" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-xss-protection": [ + "1; mode\u003dblock" ], "x-content-type-options": [ "nosniff" ], + "x-ep-request-uuid": [ + "c6a31f9367b75dc4e2b7e29000432d93" + ], + "x-proxied": [ + "intlb3nuq 51d74985a2", + "extlb2nuq 99aac35317" + ], + "referrer-policy": [ + "strict-origin-when-cross-origin" + ], + "x-runtime": [ + "0.032402" + ], + "content-type": [ + "application/json; charset\u003dutf-8" + ], + "x-version-label": [ + "easypost-202502192243-499e5bdec0-master" + ], + "cache-control": [ + "private, no-cache, no-store" + ] + }, + "status": { + "code": 200, + "message": "OK" + }, + "uri": "https://api.easypost.com/v2/webhooks" + }, + "duration": 145 + }, + { + "recordedAt": 1740070341, + "request": { + "body": "", + "method": "DELETE", + "headers": { + "Accept-Charset": [ + "UTF-8" + ], + "User-Agent": [ + "REDACTED" + ] + }, + "uri": "https://api.easypost.com/v2/webhooks/hook_0cb0f41cefab11ef807963ca33822ef2" + }, + "response": { + "body": "{}", + "httpVersion": null, + "headers": { + "null": [ + "HTTP/1.1 200 OK" + ], + "content-length": [ + "2" + ], + "expires": [ + "0" + ], + "x-node": [ + "bigweb34nuq" + ], + "x-frame-options": [ + "SAMEORIGIN" + ], + "x-download-options": [ + "noopen" + ], + "x-permitted-cross-domain-policies": [ + "none" + ], + "x-backend": [ + "easypost" + ], + "pragma": [ + "no-cache" + ], + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d074f7dec19c0008779f" + "c6a31f9267b75dc5e2b7e29100432dcb" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.022597" - ], - "etag": [ - "W/\"d03ff1e2df7ad33907b2086ec5f9e0a9\"" + "0.394873" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202502192243-499e5bdec0-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,9 +256,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks?" + "uri": "https://api.easypost.com/v2/webhooks/hook_0cb0f41cefab11ef807963ca33822ef2" }, - "duration": 144 + "duration": 494 } ] \ No newline at end of file diff --git a/src/test/cassettes/webhook/create.json b/src/test/cassettes/webhook/create.json index af9898260..c4b397d25 100644 --- a/src/test/cassettes/webhook/create.json +++ b/src/test/cassettes/webhook/create.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456501, + "recordedAt": 1740070316, "request": { - "body": "{\n \"webhook\": {\n \"url\": \"http://example.com\"\n }\n}", + "body": "{\n \"webhook\": {\n \"webhook_secret\": \"sécret\",\n \"url\": \"http://example.com\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,175 +18,78 @@ "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\": \"2025-02-20T16:51:56Z\",\n \"id\": \"hook_fe5d2a84efaa11efb84e61dfc018c5b8\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "161" + "213" ], "expires": [ "0" ], "x-node": [ - "bigweb4nuq" + "bigweb36nuq" ], "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": [ - "07323c396307d075f7dc7b980008788a" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.177325" - ], - "etag": [ - "W/\"1def22b7375f7ecefcc54f9fc5dd6956\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks" - }, - "duration": 322 - }, - { - "recordedAt": 1661456502, - "request": { - "body": "", - "method": "GET", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ] - }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f184a3b624ad11edb37143b422952c06" - }, - "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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 200 OK" - ], - "content-length": [ - "161" - ], - "expires": [ - "0" - ], - "x-node": [ - "bigweb7nuq" - ], - "x-frame-options": [ - "SAMEORIGIN" + "x-permitted-cross-domain-policies": [ + "none" ], "x-backend": [ "easypost" ], - "x-permitted-cross-domain-policies": [ - "none" - ], - "x-download-options": [ - "noopen" + "pragma": [ + "no-cache" ], "strict-transport-security": [ "max-age\u003d31536000; includeSubDomains; preload" ], - "pragma": [ - "no-cache" - ], - "x-canary": [ - "direct" + "x-xss-protection": [ + "1; mode\u003dblock" ], "x-content-type-options": [ "nosniff" ], - "x-xss-protection": [ - "1; mode\u003dblock" - ], "x-ep-request-uuid": [ - "07323c3d6307d076f7b9e338000878cd" + "c6a31f8f67b75dace2b7da570043128a" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.029727" - ], - "etag": [ - "W/\"1def22b7375f7ecefcc54f9fc5dd6956\"" + "0.427009" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202502192243-499e5bdec0-master" ], "cache-control": [ "private, no-cache, no-store" ] }, "status": { - "code": 200, - "message": "OK" + "code": 201, + "message": "Created" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f184a3b624ad11edb37143b422952c06" + "uri": "https://api.easypost.com/v2/webhooks" }, - "duration": 155 + "duration": 534 }, { - "recordedAt": 1661456502, + "recordedAt": 1740070317, "request": { "body": "", "method": "DELETE", @@ -198,7 +101,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f184a3b624ad11edb37143b422952c06" + "uri": "https://api.easypost.com/v2/webhooks/hook_fe5d2a84efaa11efb84e61dfc018c5b8" }, "response": { "body": "{}", @@ -214,53 +117,50 @@ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb36nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c396307d076f7b7ca71000878e4" + "c6a31f8d67b75dace2b7da6f0043130a" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb4nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.335443" - ], - "etag": [ - "W/\"44136fa355b3678a1146ad16f7e8649e\"" + "0.338361" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202502192243-499e5bdec0-master" ], "cache-control": [ "private, no-cache, no-store" @@ -270,9 +170,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f184a3b624ad11edb37143b422952c06" + "uri": "https://api.easypost.com/v2/webhooks/hook_fe5d2a84efaa11efb84e61dfc018c5b8" }, - "duration": 575 + "duration": 435 } ] \ No newline at end of file diff --git a/src/test/cassettes/webhook/delete.json b/src/test/cassettes/webhook/delete.json index e8593df82..4ce5d1bca 100644 --- a/src/test/cassettes/webhook/delete.json +++ b/src/test/cassettes/webhook/delete.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456503, + "recordedAt": 1740070361, "request": { - "body": "{\n \"webhook\": {\n \"url\": \"http://example.com\"\n }\n}", + "body": "{\n \"webhook\": {\n \"webhook_secret\": \"sécret\",\n \"url\": \"http://example.com\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,66 +18,66 @@ "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\": \"2025-02-20T16:52:41Z\",\n \"id\": \"hook_190c06d4efab11efb7663b222d4bf486\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "161" + "213" ], "expires": [ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb43nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d077f7bba13900087946" + "c6a31f9267b75dd9e2b7eace0043480b" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.189921" - ], - "etag": [ - "W/\"a73dec9f54509a4e633899e335f236f4\"" + "0.436254" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202502192243-499e5bdec0-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +87,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/webhooks" }, - "duration": 324 + "duration": 563 }, { - "recordedAt": 1661456503, + "recordedAt": 1740070361, "request": { "body": "", "method": "GET", @@ -105,69 +104,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f24c6dc424ad11eda3fb69a139fb4483" + "uri": "https://api.easypost.com/v2/webhooks/hook_190c06d4efab11efb7663b222d4bf486" }, "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\": \"2025-02-20T16:52:41Z\",\n \"id\": \"hook_190c06d4efab11efb7663b222d4bf486\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "161" + "213" ], "expires": [ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb38nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d077f8014a1c0008798c" + "c6a31f9167b75dd9e2b7eacf0043489f" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.025068" - ], - "etag": [ - "W/\"a73dec9f54509a4e633899e335f236f4\"" + "0.025882" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202502192243-499e5bdec0-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +173,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f24c6dc424ad11eda3fb69a139fb4483" + "uri": "https://api.easypost.com/v2/webhooks/hook_190c06d4efab11efb7663b222d4bf486" }, - "duration": 166 + "duration": 142 }, { - "recordedAt": 1661456503, + "recordedAt": 1740070362, "request": { "body": "", "method": "DELETE", @@ -195,7 +190,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f24c6dc424ad11eda3fb69a139fb4483" + "uri": "https://api.easypost.com/v2/webhooks/hook_190c06d4efab11efb7663b222d4bf486" }, "response": { "body": "{}", @@ -211,53 +206,53 @@ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb32nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" + ], + "x-canary": [ + "direct" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3d6307d077f7cc907500087998" + "c6a31f8e67b75dd9e2b7ead0004348cc" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.338496" - ], - "etag": [ - "W/\"44136fa355b3678a1146ad16f7e8649e\"" + "0.354045" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202502192243-499e5bdec0-master" ], "cache-control": [ "private, no-cache, no-store" @@ -267,9 +262,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f24c6dc424ad11eda3fb69a139fb4483" + "uri": "https://api.easypost.com/v2/webhooks/hook_190c06d4efab11efb7663b222d4bf486" }, - "duration": 462 + "duration": 456 } ] \ No newline at end of file diff --git a/src/test/cassettes/webhook/retrieve.json b/src/test/cassettes/webhook/retrieve.json index 5345fff9c..1eca34221 100644 --- a/src/test/cassettes/webhook/retrieve.json +++ b/src/test/cassettes/webhook/retrieve.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456500, + "recordedAt": 1740070379, "request": { - "body": "{\n \"webhook\": {\n \"url\": \"http://example.com\"\n }\n}", + "body": "{\n \"webhook\": {\n \"webhook_secret\": \"sécret\",\n \"url\": \"http://example.com\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,66 +18,63 @@ "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\": \"2025-02-20T16:52:59Z\",\n \"id\": \"hook_23c7531cefab11efbe44197603026978\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "161" + "213" ], "expires": [ "0" ], "x-node": [ - "bigweb6nuq" + "bigweb34nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3b6307d074f7ba9519000877cb" + "c6a31f9267b75debe2b7eff800435dd3" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.136465" - ], - "etag": [ - "W/\"be1b8066b9517edd677d856e9934eaf0\"" + "0.402787" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202502192243-499e5bdec0-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,13 +84,12 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/webhooks" }, - "duration": 280 + "duration": 516 }, { - "recordedAt": 1661456500, + "recordedAt": 1740070379, "request": { "body": "", "method": "GET", @@ -105,69 +101,66 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f0baa43024ad11eda05f11aa38ece04b" + "uri": "https://api.easypost.com/v2/webhooks/hook_23c7531cefab11efbe44197603026978" }, "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\": \"2025-02-20T16:52:59Z\",\n \"id\": \"hook_23c7531cefab11efbe44197603026978\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 200 OK" ], "content-length": [ - "161" + "213" ], "expires": [ "0" ], "x-node": [ - "bigweb9nuq" + "bigweb54nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d074f7b7d79700087812" + "c6a31f8c67b75debe2b7eff900435e6e" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.026068" - ], - "etag": [ - "W/\"be1b8066b9517edd677d856e9934eaf0\"" + "0.034835" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202502192243-499e5bdec0-master" ], "cache-control": [ "private, no-cache, no-store" @@ -177,13 +170,12 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f0baa43024ad11eda05f11aa38ece04b" + "uri": "https://api.easypost.com/v2/webhooks/hook_23c7531cefab11efbe44197603026978" }, - "duration": 155 + "duration": 153 }, { - "recordedAt": 1661456501, + "recordedAt": 1740070380, "request": { "body": "", "method": "DELETE", @@ -195,7 +187,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f0baa43024ad11eda05f11aa38ece04b" + "uri": "https://api.easypost.com/v2/webhooks/hook_23c7531cefab11efbe44197603026978" }, "response": { "body": "{}", @@ -211,53 +203,50 @@ "0" ], "x-node": [ - "bigweb1nuq" + "bigweb54nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3f6307d075f7edfb360008783b" + "c6a31f8f67b75debe2b7effa00435ea0" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb1nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.293311" - ], - "etag": [ - "W/\"44136fa355b3678a1146ad16f7e8649e\"" + "0.337242" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208242214-2a3e1e3aa6-master" + "easypost-202502192243-499e5bdec0-master" ], "cache-control": [ "private, no-cache, no-store" @@ -267,9 +256,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f0baa43024ad11eda05f11aa38ece04b" + "uri": "https://api.easypost.com/v2/webhooks/hook_23c7531cefab11efbe44197603026978" }, - "duration": 425 + "duration": 438 } ] \ No newline at end of file diff --git a/src/test/cassettes/webhook/update.json b/src/test/cassettes/webhook/update.json index 49d7ed8ab..a9e8602b5 100644 --- a/src/test/cassettes/webhook/update.json +++ b/src/test/cassettes/webhook/update.json @@ -1,8 +1,8 @@ [ { - "recordedAt": 1661456504, + "recordedAt": 1740070397, "request": { - "body": "{\n \"webhook\": {\n \"url\": \"http://example.com\"\n }\n}", + "body": "{\n \"webhook\": {\n \"webhook_secret\": \"sécret\",\n \"url\": \"http://example.com\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n }\n}", "method": "POST", "headers": { "Accept-Charset": [ @@ -18,66 +18,63 @@ "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\": \"2025-02-20T16:53:17Z\",\n \"id\": \"hook_2e88ac92efab11ef96cc57dc6c60627e\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "161" + "213" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb35nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3e6307d078e688ff7e000879e0" + "c6a31f8e67b75dfde2b85a2f004372cb" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.162779" - ], - "etag": [ - "W/\"e08820888dc36b690385bf7fbc7572fb\"" + "0.384566" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202502192243-499e5bdec0-master" ], "cache-control": [ "private, no-cache, no-store" @@ -87,15 +84,14 @@ "code": 201, "message": "Created" }, - "errors": null, "uri": "https://api.easypost.com/v2/webhooks" }, - "duration": 301 + "duration": 491 }, { - "recordedAt": 1661456505, + "recordedAt": 1740070398, "request": { - "body": "{\n \"webhook\": {}\n}", + "body": "{\n \"webhook_secret\": \"sécret\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n}", "method": "PUT", "headers": { "Accept-Charset": [ @@ -108,175 +104,81 @@ "application/json" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f307913a24ad11ed868c03cbdb318f09" + "uri": "https://api.easypost.com/v2/webhooks/hook_2e88ac92efab11ef96cc57dc6c60627e" }, "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\": \"2025-02-20T16:53:17Z\",\n \"id\": \"hook_2e88ac92efab11ef96cc57dc6c60627e\",\n \"url\": \"http://example.com\",\n \"object\": \"Webhook\",\n \"custom_headers\": [\n {\n \"name\": \"test\",\n \"value\": \"header\"\n }\n ]\n}", "httpVersion": null, "headers": { "null": [ "HTTP/1.1 201 Created" ], "content-length": [ - "161" + "213" ], "expires": [ "0" ], "x-node": [ - "bigweb5nuq" + "bigweb57nuq" ], "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": [ - "07323c3c6307d078f7b73dca00087a23" - ], - "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" - ], - "referrer-policy": [ - "strict-origin-when-cross-origin" - ], - "x-runtime": [ - "0.452775" - ], - "etag": [ - "W/\"e08820888dc36b690385bf7fbc7572fb\"" - ], - "content-type": [ - "application/json; charset\u003dutf-8" - ], - "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" - ], - "cache-control": [ - "private, no-cache, no-store" - ] - }, - "status": { - "code": 201, - "message": "Created" - }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f307913a24ad11ed868c03cbdb318f09" - }, - "duration": 590 - }, - { - "recordedAt": 1661456505, - "request": { - "body": "", - "method": "GET", - "headers": { - "Accept-Charset": [ - "UTF-8" - ], - "User-Agent": [ - "REDACTED" - ] - }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f307913a24ad11ed868c03cbdb318f09" - }, - "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}", - "httpVersion": null, - "headers": { - "null": [ - "HTTP/1.1 200 OK" - ], - "content-length": [ - "161" - ], - "expires": [ - "0" - ], - "x-node": [ - "bigweb5nuq" - ], - "x-frame-options": [ - "SAMEORIGIN" + "x-permitted-cross-domain-policies": [ + "none" ], "x-backend": [ "easypost" ], - "x-permitted-cross-domain-policies": [ - "none" - ], - "x-download-options": [ - "noopen" + "pragma": [ + "no-cache" ], "strict-transport-security": [ "max-age\u003d31536000; includeSubDomains; preload" ], - "pragma": [ - "no-cache" + "x-xss-protection": [ + "1; mode\u003dblock" ], "x-content-type-options": [ "nosniff" ], - "x-xss-protection": [ - "1; mode\u003dblock" - ], "x-ep-request-uuid": [ - "07323c3c6307d079f7a9055800087a77" + "c6a31f9067b75dfde2b85a3100437361" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb4nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.025438" - ], - "etag": [ - "W/\"e08820888dc36b690385bf7fbc7572fb\"" + "0.743142" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202502192243-499e5bdec0-master" ], "cache-control": [ "private, no-cache, no-store" ] }, "status": { - "code": 200, - "message": "OK" + "code": 201, + "message": "Created" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f307913a24ad11ed868c03cbdb318f09" + "uri": "https://api.easypost.com/v2/webhooks/hook_2e88ac92efab11ef96cc57dc6c60627e" }, - "duration": 153 + "duration": 871 }, { - "recordedAt": 1661456505, + "recordedAt": 1740070398, "request": { "body": "", "method": "DELETE", @@ -288,7 +190,7 @@ "REDACTED" ] }, - "uri": "https://api.easypost.com/v2/webhooks/hook_f307913a24ad11ed868c03cbdb318f09" + "uri": "https://api.easypost.com/v2/webhooks/hook_2e88ac92efab11ef96cc57dc6c60627e" }, "response": { "body": "{}", @@ -304,56 +206,50 @@ "0" ], "x-node": [ - "bigweb7nuq" + "bigweb56nuq" ], "x-frame-options": [ "SAMEORIGIN" ], - "x-backend": [ - "easypost" + "x-download-options": [ + "noopen" ], "x-permitted-cross-domain-policies": [ "none" ], - "x-download-options": [ - "noopen" - ], - "strict-transport-security": [ - "max-age\u003d31536000; includeSubDomains; preload" + "x-backend": [ + "easypost" ], "pragma": [ "no-cache" ], - "x-canary": [ - "direct" - ], - "x-content-type-options": [ - "nosniff" + "strict-transport-security": [ + "max-age\u003d31536000; includeSubDomains; preload" ], "x-xss-protection": [ "1; mode\u003dblock" ], + "x-content-type-options": [ + "nosniff" + ], "x-ep-request-uuid": [ - "07323c3c6307d079e68d5a6a00087a8c" + "c6a31f8e67b75dfee2b85a3200437449" ], "x-proxied": [ - "extlb2nuq 9ce216bfac", - "intlb2nuq 6aa9972c1e" + "intlb3nuq 51d74985a2", + "extlb2nuq 99aac35317" ], "referrer-policy": [ "strict-origin-when-cross-origin" ], "x-runtime": [ - "0.317772" - ], - "etag": [ - "W/\"44136fa355b3678a1146ad16f7e8649e\"" + "0.325343" ], "content-type": [ "application/json; charset\u003dutf-8" ], "x-version-label": [ - "easypost-202208251932-b2da22d2d6-master" + "easypost-202502192243-499e5bdec0-master" ], "cache-control": [ "private, no-cache, no-store" @@ -363,9 +259,8 @@ "code": 200, "message": "OK" }, - "errors": null, - "uri": "https://api.easypost.com/v2/webhooks/hook_f307913a24ad11ed868c03cbdb318f09" + "uri": "https://api.easypost.com/v2/webhooks/hook_2e88ac92efab11ef96cc57dc6c60627e" }, - "duration": 486 + "duration": 441 } ] \ 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 bfc674d31..1aa8ba8a0 100644 --- a/src/test/java/com/easypost/AddressTest.java +++ b/src/test/java/com/easypost/AddressTest.java @@ -1,8 +1,12 @@ package com.easypost; +import com.easypost.exception.API.InvalidRequestError; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; import com.easypost.model.Address; import com.easypost.model.AddressCollection; +import com.easypost.model.AddressDetail; +import com.easypost.model.AddressVerificationFieldError; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -13,8 +17,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; public final class AddressTest { private static TestUtils.VCR vcr; @@ -33,10 +41,10 @@ public static void setup() throws EasyPostException { * Create a basic address. * * @return basic Address object - * @throws EasyPostException + * @throws EasyPostException if an exception is thrown. */ - public static Address createBasicAddress() throws EasyPostException { - return Address.create(Fixtures.caAddress1()); + public Address createBasicAddress() throws EasyPostException { + return vcr.client.address.create(Fixtures.caAddress1()); } /** @@ -52,6 +60,7 @@ public void testCreate() throws EasyPostException { assertInstanceOf(Address.class, address); assertTrue(address.getId().startsWith("adr_")); + assertEquals("Address", address.getObject()); assertEquals("388 Townsend St", address.getStreet1()); } @@ -67,13 +76,42 @@ public void testCreateVerify() throws EasyPostException { vcr.setUpTest("create_verify"); Map addressData = Fixtures.incorrectAddress(); - addressData.put("verify", true); - Address address = Address.create(addressData); + // Creating normally (without specifying "verify") will make the address, perform no verifications + Address address = vcr.client.address.create(addressData); assertInstanceOf(Address.class, address); - assertTrue(address.getId().startsWith("adr_")); - assertEquals("417 MONTGOMERY ST FL 5", address.getStreet1()); + assertNull(address.getVerifications().getDelivery()); + assertNull(address.getVerifications().getZip4()); + + // Creating with verify would make the address and perform verifications + // internally, we're just checking for the presence of "verify" in the dictionary, so the value doesn't matter + addressData.put("verify", true); + address = vcr.client.address.create(addressData); + + assertInstanceOf(Address.class, address); + + assertEquals(false, address.getVerifications().getDelivery().getSuccess()); + assertInstanceOf(AddressDetail.class, address.getVerifications().getDelivery().getDetails()); + AddressVerificationFieldError addressVerificationFieldErrorGetDelivery = address.getVerifications() + .getDelivery() + .getErrors() + .get(0); + assertEquals("E.ADDRESS.NOT_FOUND", addressVerificationFieldErrorGetDelivery.getCode()); + assertEquals("address", addressVerificationFieldErrorGetDelivery.getField()); + assertNull(addressVerificationFieldErrorGetDelivery.getSuggestion()); + assertEquals("Address not found", addressVerificationFieldErrorGetDelivery.getMessage()); + + assertEquals(false, address.getVerifications().getZip4().getSuccess()); + assertNull(address.getVerifications().getZip4().getDetails()); + AddressVerificationFieldError addressVerificationFieldErrorZip4 = address.getVerifications() + .getZip4() + .getErrors() + .get(0); + assertEquals("E.ADDRESS.NOT_FOUND", addressVerificationFieldErrorZip4.getCode()); + assertEquals("address", addressVerificationFieldErrorZip4.getField()); + assertNull(addressVerificationFieldErrorZip4.getSuggestion()); + assertEquals("Address not found", addressVerificationFieldErrorZip4.getMessage()); } /** @@ -88,7 +126,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_")); @@ -107,15 +145,25 @@ public void testCreateVerifyArray() throws EasyPostException { vcr.setUpTest("create_verify_array"); Map addressData = Fixtures.incorrectAddress(); + + // Creating normally (without specifying "verify") will make the address, perform no verifications + Address address = vcr.client.address.create(addressData); + + assertInstanceOf(Address.class, address); + assertNull(address.getVerifications().getDelivery()); + assertNull(address.getVerifications().getZip4()); + + // Creating with verify would make the address and perform verifications + // internally, we're just checking for the presence of "verify" in the dictionary, so the value doesn't matter List verificationList = new ArrayList<>(); verificationList.add(true); addressData.put("verify", verificationList); - Address address = Address.create(addressData); + address = vcr.client.address.create(addressData); assertInstanceOf(Address.class, address); - assertTrue(address.getId().startsWith("adr_")); - assertEquals("417 MONTGOMERY ST FL 5", address.getStreet1()); + assertNotNull(address.getVerifications().getDelivery()); + assertNotNull(address.getVerifications().getZip4()); } /** @@ -128,11 +176,10 @@ 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); - assertEquals(address.getId(), retrievedAddress.getId()); - + assertTrue(address.equals(retrievedAddress)); } /** @@ -147,13 +194,42 @@ 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(); assertTrue(addressesList.size() <= Fixtures.pageSize()); assertNotNull(addresses.getHasMore()); - assertTrue(addressesList.stream().allMatch(address -> address instanceof Address)); + assertTrue(addressesList.stream().allMatch(address -> address != null)); + } + + /** + * Test retrieving the next page. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPage() throws EasyPostException { + vcr.setUpTest("get_next_page"); + + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + AddressCollection collection = vcr.client.address.all(params); + + try { + AddressCollection nextPage = vcr.client.address.getNextPage(collection, Fixtures.pageSize()); + + assertNotNull(nextPage); + + String firstIdOfFirstPage = collection.getAddresses().get(0).getId(); + String firstIdOfSecondPage = nextPage.getAddresses().get(0).getId(); + + assertNotEquals(firstIdOfFirstPage, firstIdOfSecondPage); + } catch (EndOfPaginationError e) { // There's no next page, that's not a failure + assertTrue(true); + } catch (Exception e) { // Any other exception is a failure + fail(); + } } /** @@ -169,7 +245,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,10 +263,88 @@ public void testVerify() throws EasyPostException { Address address = createBasicAddress(); - Address verifiedAddress = address.verify(); + Address verifiedAddress = vcr.client.address.verify(address.getId()); - assertInstanceOf(Address.class, address); + assertInstanceOf(Address.class, verifiedAddress); 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 if an exception is thrown. + */ + @Test + public void testInvalidAddressCreation() throws EasyPostException { + vcr.setUpTest("error_address_creation"); + Map params = new HashMap<>(); + InvalidRequestError exception = + assertThrows(InvalidRequestError.class, () -> vcr.client.address.createAndVerify(params)); + + assertEquals("PARAMETER.REQUIRED", exception.getCode()); + assertEquals(422, exception.getStatusCode()); + assertEquals("Missing required parameter.", exception.getMessage()); + } + + /** + * Test creating an address with the verify_carrier param. + * We purposefully pass in slightly incorrect data to get the corrected address + * back once verified. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateVerifyCarrier() throws EasyPostException { + vcr.setUpTest("create_verify_carrier"); + + Map addressData = Fixtures.incorrectAddress(); + + addressData.put("verify", true); + addressData.put("verify_carrier", "UPS"); + Address address = vcr.client.address.create(addressData); + + assertInstanceOf(Address.class, address); + + AddressVerificationFieldError addressVerificationFieldErrorGetDelivery = address.getVerifications() + .getDelivery() + .getErrors() + .get(0); + AddressVerificationFieldError addressVerificationFieldErrorZip4 = address.getVerifications() + .getZip4() + .getErrors() + .get(0); + assertEquals("Address not found", addressVerificationFieldErrorGetDelivery.getMessage()); + assertEquals("Address not found", addressVerificationFieldErrorZip4.getMessage()); + } + + /** + * Test creating and verifying an address with the verify_carrier param. + * We purposefully pass in slightly incorrect data to get the corrected address + * back once verified. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateAndVerifyCarrier() throws EasyPostException { + vcr.setUpTest("create_and_verify_carrier"); + + Map addressData = Fixtures.incorrectAddress(); + + addressData.put("verify_carrier", "UPS"); + Address address = vcr.client.address.createAndVerify(addressData); + + assertInstanceOf(Address.class, address); + + AddressVerificationFieldError addressVerificationFieldErrorGetDelivery = address.getVerifications() + .getDelivery() + .getErrors() + .get(0); + AddressVerificationFieldError addressVerificationFieldErrorZip4 = address.getVerifications() + .getZip4() + .getErrors() + .get(0); + assertEquals("Address not found", addressVerificationFieldErrorGetDelivery.getMessage()); + assertEquals("Address not found", addressVerificationFieldErrorZip4.getMessage()); + } } diff --git a/src/test/java/com/easypost/ApiKeyTest.java b/src/test/java/com/easypost/ApiKeyTest.java new file mode 100644 index 000000000..06748cfe7 --- /dev/null +++ b/src/test/java/com/easypost/ApiKeyTest.java @@ -0,0 +1,130 @@ +package com.easypost; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +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; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +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.User; + +public final class ApiKeyTest { + private static String testUserId = null; + 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("api_key", TestUtils.ApiKey.PRODUCTION); + } + + /** + * Clean up test attributes after each unit test. + */ + @AfterEach + public void cleanup() { + if (testUserId != null) { + try { + 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 + } + } + } + + /** + * Create a user. + * + * @return User object + */ + private static User createUser() throws EasyPostException { + Map params = new HashMap<>(); + params.put("name", "Test User"); + User user = vcr.client.user.create(params); + testUserId = user.getId(); // trigger deletion after test + return user; + } + + /** + * Test retrieving all API keys for a user. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testApiKeys() throws EasyPostException { + vcr.setUpTest("api_keys"); + + User user = createUser(); + + List apiKeys = vcr.client.apiKey.retrieveApiKeysForUser(user.getId()); + + assertNotNull(apiKeys); + + assertThrows(FilteringError.class, () -> vcr.client.apiKey.retrieveApiKeysForUser("invalid_id")); + } + + /** + * Test retrieving all API keys. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testAllApiKeys() throws EasyPostException { + vcr.setUpTest("all_api_keys"); + + ApiKeys apikeys = vcr.client.apiKey.all(); + + assertInstanceOf(ApiKeys.class, apikeys); + + List apiKeys = vcr.client.apiKey.retrieveApiKeysForUser(apikeys.getId()); + + assertNotNull(apiKeys); + } + + /** + * Test creating an API key for a child user. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testApiKeyLifecycle() throws EasyPostException { + vcr.setUpTest("lifecycle"); + + // Create an API key + TestUtils.VCR referralVcr = new TestUtils.VCR("api_key", TestUtils.ApiKey.REFERRAL); + ApiKey apiKey = referralVcr.client.apiKey.create("production"); + assertInstanceOf(ApiKey.class, apiKey); + assertTrue(apiKey.getId().startsWith("ak_")); + assertEquals("production", apiKey.getMode()); + + // Disable the API key + apiKey = referralVcr.client.apiKey.disable(apiKey.getId()); + assertFalse(apiKey.getActive()); + + // Enable the API key + apiKey = referralVcr.client.apiKey.enable(apiKey.getId()); + assertTrue(apiKey.getActive()); + + // Delete the API key + referralVcr.client.apiKey.delete(apiKey.getId()); + } +} diff --git a/src/test/java/com/easypost/BatchTest.java b/src/test/java/com/easypost/BatchTest.java index d08ff4143..5c51f4051 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; @@ -58,7 +59,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 +73,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,36 +92,13 @@ 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(); assertTrue(batchesList.size() <= Fixtures.pageSize()); assertNotNull(batches.getHasMore()); - assertTrue(batchesList.stream().allMatch(batch -> batch instanceof Batch)); - } - - /** - * Test creating and buying a Batch in a single call. - * - * @throws EasyPostException when the request fails. - */ - @Test - public void testCreateAndBuy() throws EasyPostException { - vcr.setUpTest("create_and_buy"); - - Map params = new HashMap<>(); - - List shipmentData = new ArrayList<>(); - shipmentData.add(Fixtures.oneCallBuyShipment()); - - params.put("shipments", shipmentData); - - Batch batch = Batch.createAndBuy(params); - - assertInstanceOf(Batch.class, batch); - assertTrue(batch.getId().startsWith("batch_")); - assertEquals(1, batch.getNumShipments().intValue()); + assertTrue(batchesList.stream().allMatch(batch -> batch != null)); } /** @@ -134,7 +112,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 +125,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 +138,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 @@ -174,17 +152,17 @@ 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 = 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 +170,33 @@ 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 = vcr.client.batch.removeShipments(batch.getId(), params); + + 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 testAddRemoveShipmentWithList() 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 = batch.removeShipments(params); + Batch batchWithoutShipment = vcr.client.batch.removeShipments(batch.getId(), shipmentData); 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/BetaRateTest.java b/src/test/java/com/easypost/BetaRateTest.java new file mode 100644 index 000000000..ddaf651ec --- /dev/null +++ b/src/test/java/com/easypost/BetaRateTest.java @@ -0,0 +1,72 @@ +package com.easypost; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import com.easypost.exception.EasyPostException; +import com.easypost.model.StatelessRate; +import com.easypost.utils.Utilities; + +public class BetaRateTest { + 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_stateless_rate", TestUtils.ApiKey.TEST); + } + + /** + * Test retrieving stateless rates. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testRetrieveStatelessRates() throws EasyPostException { + vcr.setUpTest("retrieve_stateless_rates"); + + HashMap shipment = Fixtures.basicShipment(); + + List rates = vcr.client.betaRate.retrieveStatelessRates(shipment); + + // Test that deserialization worked by accessing a field with an underscore + for (StatelessRate rate : rates) { + assertTrue(rate.getListRate() != null); + } + } + + /** + * Test retrieving the lowest rate of stateless rate. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testRetrieveLowestStatelessRate() throws EasyPostException { + vcr.setUpTest("retrieve_lowest_stateless_rate"); + + HashMap shipment = Fixtures.basicShipment(); + + List rates = vcr.client.betaRate.retrieveStatelessRates(shipment); + StatelessRate lowestRate = Utilities.getLowestStatelessRate(rates, null, null); + + assertEquals("GroundAdvantage", lowestRate.getService()); + + List carriers = Arrays.asList("invalidCarrierName"); + EasyPostException exception = assertThrows(EasyPostException.class, + () -> Utilities.getLowestStatelessRate(rates, carriers, null)); + + assertEquals("No rates found.", exception.getMessage()); + } +} diff --git a/src/test/java/com/easypost/BetaReferralCustomerTest.java b/src/test/java/com/easypost/BetaReferralCustomerTest.java new file mode 100644 index 000000000..c47784f95 --- /dev/null +++ b/src/test/java/com/easypost/BetaReferralCustomerTest.java @@ -0,0 +1,102 @@ +package com.easypost; + +import com.easypost.exception.API.InvalidRequestError; +import com.easypost.exception.EasyPostException; +import com.easypost.model.ClientSecret; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +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 When the request fails. + */ + @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 connect integration.", exception.getMessage()); + } + + /** + * Test refund by amount for a previous payment. + * + * @throws EasyPostException if an exception is thrown. + */ + @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 if an exception is thrown. + */ + @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()); + } + + /** + * Test creating a client secret for credit cards. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateCreditCardClientSecret() throws EasyPostException { + vcr.setUpTest("create_credit_card_client_secret"); + + ClientSecret response = vcr.client.betaReferralCustomer.createCreditCardClientSecret(); + + assertTrue(response.getClientSecret().startsWith("seti_")); + } + + /** + * Test creating a client secret for bank accounts. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateBankAccountClientSecret() throws EasyPostException { + vcr.setUpTest("create_bank_account_client_secret"); + + ClientSecret response = vcr.client.betaReferralCustomer.createBankAccountClientSecret(); + + assertTrue(response.getClientSecret().startsWith("fcsess_client_secret_")); + } +} diff --git a/src/test/java/com/easypost/BillingTest.java b/src/test/java/com/easypost/BillingTest.java index 7cb58b7ef..40ff321dc 100644 --- a/src/test/java/com/easypost/BillingTest.java +++ b/src/test/java/com/easypost/BillingTest.java @@ -1,17 +1,31 @@ package com.easypost; import com.easypost.exception.EasyPostException; -import com.easypost.model.Billing; +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.assertEquals; 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; + private String jsonResponse = "{\"id\":\"cust_...\",\"object\":\"PaymentMethods\",\"primary_" + + "payment_method\":{\"id\":\"pm_...\",\"disabled_at\":null,\"object\":\"CreditCard\",\"na" + + "me\":null,\"last4\":\"4242\",\"exp_month\":1,\"exp_year\":2025,\"brand\":\"Visa\"},\"secondar" + + "y_payment_method\":{\"id\":\"pm_...\",\"disabled_at\":null,\"object\":\"BankAccount\",\"name\":nu" + + "ll,\"last4\":\"4444\",\"exp_month\":1,\"exp_year\":2025,\"brand\":\"Mastercard\"}}"; + private PaymentMethod paymentMethod = Constants.Http.GSON.fromJson(jsonResponse, PaymentMethod.class); + + private static MockedStatic requestMock = Mockito.mockStatic(Requestor.class); /** * Setup the testing environment for this file. @@ -23,19 +37,34 @@ 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"); + requestMock.when(() -> Requestor.request( + RequestMethod.GET, "payment_methods", null, PaymentMethod.class, vcr.client)) + .thenReturn(paymentMethod); + + PaymentMethodObject paymentMethodObject = + vcr.client.billing.retrievePaymentMethods().getSecondaryPaymentMethod(); - boolean success = Billing.deletePaymentMethod(PaymentMethod.Priority.PRIMARY); + requestMock.when(() -> Requestor.request(RequestMethod.GET, + paymentMethodObject.getEndpoint() + "/" + paymentMethodObject.getId(), + null, PaymentMethod.class, + vcr.client)).thenReturn(null); - assertTrue(success); + assertDoesNotThrow(() -> vcr.client.billing.deletePaymentMethod(PaymentMethod.Priority.SECONDARY)); } /** @@ -44,13 +73,18 @@ 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"); + requestMock.when(() -> Requestor.request( + RequestMethod.GET, "payment_methods", null, PaymentMethod.class, vcr.client)) + .thenReturn(paymentMethod); - boolean success = Billing.fundWallet("2000", PaymentMethod.Priority.PRIMARY); + PaymentMethodObject paymentMethodObject = vcr.client.billing.retrievePaymentMethods().getPrimaryPaymentMethod(); - assertTrue(success); + requestMock.when(() -> Requestor.request(RequestMethod.GET, + paymentMethodObject.getEndpoint() + "/" + paymentMethodObject.getId() + "/charges", null, + PaymentMethod.class, vcr.client)).thenReturn(paymentMethod); + + assertDoesNotThrow(() -> vcr.client.billing.fundWallet("2000")); } /** @@ -59,13 +93,40 @@ 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"); + requestMock.when(() -> Requestor.request( + RequestMethod.GET, "payment_methods", null, PaymentMethod.class, vcr.client)) + .thenReturn(paymentMethod); + + PaymentMethod paymentMethods = vcr.client.billing.retrievePaymentMethods(); + + assertNotNull(paymentMethods.getPrimaryPaymentMethod()); + assertNotNull(paymentMethods.getSecondaryPaymentMethod()); + } + + /** + * Test determining a payment method type by its object type. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testDeterminePaymentMethodTypeByObjectType() throws EasyPostException { + requestMock.when(() -> Requestor.request( + RequestMethod.GET, "payment_methods", null, PaymentMethod.class, vcr.client)) + .thenReturn(paymentMethod); - PaymentMethod paymentMethods = Billing.retrievePaymentMethods(); + // Should be a credit card with "CreditCard" object type and "pm_" prefix + PaymentMethodObject creditCard = + vcr.client.billing.retrievePaymentMethods().getPrimaryPaymentMethod(); + assertTrue(creditCard.getId().startsWith("pm_")); + assertEquals("CreditCard", creditCard.getObject()); + assertEquals(PaymentMethodObject.PaymentMethodType.CREDIT_CARD, creditCard.getType()); - assertNotNull(paymentMethods.getPrimaryPaymentMethodObject()); - assertNotNull(paymentMethods.getSecondaryPaymentMethodObject()); + // Should be a bank account with "BankAccount" object type and "pm_" prefix + PaymentMethodObject bankAccount = + vcr.client.billing.retrievePaymentMethods().getSecondaryPaymentMethod(); + assertTrue(bankAccount.getId().startsWith("pm_")); + assertEquals("BankAccount", bankAccount.getObject()); + assertEquals(PaymentMethodObject.PaymentMethodType.BANK_ACCOUNT, bankAccount.getType()); } } diff --git a/src/test/java/com/easypost/CarrierAccountTest.java b/src/test/java/com/easypost/CarrierAccountTest.java index 60307c9d9..18b672912 100644 --- a/src/test/java/com/easypost/CarrierAccountTest.java +++ b/src/test/java/com/easypost/CarrierAccountTest.java @@ -1,17 +1,25 @@ package com.easypost; +import com.easypost.exception.API.InvalidRequestError; import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; import com.easypost.model.CarrierAccount; import com.easypost.model.CarrierType; +import com.easypost.model.FieldError; +import com.easypost.model.Pickup; +import com.easypost.model.Shipment; +import com.google.common.collect.ImmutableMap; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.mockito.MockedStatic; +import org.mockito.Mockito; import java.util.HashMap; 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; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -21,6 +29,22 @@ public final class CarrierAccountTest { private static TestUtils.VCR vcr; + private static CarrierAccount createBasicCarrierAccount() throws EasyPostException { + CarrierAccount carrierAccount = vcr.client.carrierAccount.create(Fixtures.basicCarrierAccount()); + testCarrierAccountId = carrierAccount.getId(); // trigger deletion after test + return carrierAccount; + } + + private static CarrierAccount createUpsCarrierAccount() throws EasyPostException { + Map data = new HashMap<>(); + data.put("type", "UpsAccount"); + data.put("account_number", "123456789"); + + CarrierAccount carrierAccount = vcr.client.carrierAccount.create(data); + testCarrierAccountId = carrierAccount.getId(); // trigger deletion after test + return carrierAccount; + } + /** * Set up the testing environment for this file. * @@ -38,8 +62,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 @@ -63,10 +87,67 @@ public void testCreate() throws EasyPostException { assertEquals("DhlEcsAccount", carrierAccount.getType()); } - private static CarrierAccount createBasicCarrierAccount() throws EasyPostException { - CarrierAccount carrierAccount = CarrierAccount.create(Fixtures.basicCarrierAccount()); + /** + * 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", ImmutableMap.of("some", "data")); + + try { + CarrierAccount carrierAccount = vcr.client.carrierAccount.create(data); + testCarrierAccountId = carrierAccount.getId(); // clean up after test, should never get here + } 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 + FieldError fieldError = (FieldError) e.getErrors().get(0); + assertEquals("shipping_streets", fieldError.getField()); + assertEquals("must be present and a string", fieldError.getMessage()); + } + } + + + /** + * Test creating a UPS carrier account. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateWithUPS() throws EasyPostException { + vcr.setUpTest("create_with_ups"); + + CarrierAccount carrierAccount = createUpsCarrierAccount(); + + assertInstanceOf(CarrierAccount.class, carrierAccount); + assertTrue(carrierAccount.getId().startsWith("ca_")); + assertEquals("UpsAccount", carrierAccount.getType()); + } + + /** + * Test creating an Amazon carrier account. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateWithAmazon() throws EasyPostException { + vcr.setUpTest("create_with_amazon"); + + Map data = new HashMap<>(); + data.put("type", "AmazonShippingAccount"); + + CarrierAccount carrierAccount = vcr.client.carrierAccount.create(data); testCarrierAccountId = carrierAccount.getId(); // trigger deletion after test - return carrierAccount; + + assertInstanceOf(CarrierAccount.class, carrierAccount); + assertTrue(carrierAccount.getId().startsWith("ca_")); + assertEquals("AmazonShippingAccount", carrierAccount.getType()); } /** @@ -80,11 +161,11 @@ 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_")); - assertThat(carrierAccount).usingRecursiveComparison().isEqualTo(retrieveCarrierAccount); + assertTrue(carrierAccount.equals(retrieveCarrierAccount)); } /** @@ -96,9 +177,9 @@ 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)); + assertTrue(carrierAccounts.stream().allMatch(carrier -> carrier != null)); } /** @@ -117,13 +198,33 @@ public void testUpdate() throws EasyPostException { Map updateParams = new HashMap<>(); updateParams.put("description", testDescription); - CarrierAccount updatedCarrierAccount = carrierAccount.update(updateParams); + CarrierAccount updatedCarrierAccount = vcr.client.carrierAccount.update(carrierAccount.getId(), updateParams); assertInstanceOf(CarrierAccount.class, carrierAccount); assertTrue(updatedCarrierAccount.getId().startsWith("ca_")); assertEquals(testDescription, updatedCarrierAccount.getDescription()); } + /** + * Test updating an UPS account. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testUpdateUpsAccount() throws EasyPostException { + vcr.setUpTest("update_ups"); + + CarrierAccount carrierAccount = createUpsCarrierAccount(); + Map updateParams = new HashMap<>(); + updateParams.put("account_number", "987654321"); + + CarrierAccount updatedCarrierAccount = vcr.client.carrierAccount.update(carrierAccount.getId(), updateParams); + + assertInstanceOf(CarrierAccount.class, updatedCarrierAccount); + assertTrue(updatedCarrierAccount.getId().startsWith("ca_")); + assertEquals("UpsAccount", updatedCarrierAccount.getType()); + } + /** * Test deleting a carrier account. * @@ -135,7 +236,7 @@ public void testDelete() throws EasyPostException { CarrierAccount carrierAccount = createBasicCarrierAccount(); - carrierAccount.delete(); + assertDoesNotThrow(() -> vcr.client.carrierAccount.delete(carrierAccount.getId())); } /** @@ -147,9 +248,65 @@ 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)); + assertTrue(types.stream().allMatch(type -> type != null)); + } + + /** + * Test that the CarrierAccount fields are correctly deserialized from the API response. + * None of the demo carrier accounts used in the above tests have credentials or test credentials fields, + * so we need to use some mock data. + */ + @Test + public void testCarrierFieldsJsonDeserialization() { + String carrierAccountJson = "[{\"id\":\"ca_123\",\"object\":\"CarrierAccount\"," + + "\"fields\":{\"credentials\":{\"account_number\":{\"visibility\":\"visible\"," + + "\"label\":\"DHL Account Number\",\"value\":\"123456\"},\"country\":{\"visibility\":\"visible\"," + + "\"label\":\"Account Country Code (2 Letter)\",\"value\":\"US\"},\"site_id\":{\"visibility\":" + + "\"visible\",\"label\":\"Site ID (Optional)\",\"value\": null },\"password\":{\"visibility\":" + + "\"password\",\"label\":\"Password (Optional)\",\"value\":\"\"},\"is_reseller\":{\"visibility\":" + + "\"checkbox\",\"label\":\"Reseller Account? (check if yes)\",\"value\":null}}}}]"; + CarrierAccount[] carrierAccounts = Constants.Http.GSON.fromJson(carrierAccountJson, CarrierAccount[].class); + + CarrierAccount carrierAccount = carrierAccounts[0]; + assertEquals("ca_123", carrierAccount.getId()); + assertEquals("CarrierAccount", carrierAccount.getObject()); + assertEquals("DHL Account Number", + carrierAccount.getFields().getCredentials().get("account_number").getLabel()); + } + + /** + * Test that the CarrierAccount fields are correctly serialized to the API request. + */ + @Test + public void testCarrierFieldsJsonSerialization() { + MockedStatic requestMock = Mockito.mockStatic(Requestor.class); + + String carrierAccountJson = "[{\"id\":\"ca_123\",\"object\":\"CarrierAccount\",\"fields\":{\"credentials\":" + + "{\"account_number\":{\"visibility\":\"visible\",\"label\":\"DHL Account Number\"," + + "\"value\":\"123456\"},\"country\":{\"visibility\":\"visible\",\"label\":" + + "\"Account Country Code (2 Letter)\",\"value\":\"US\"},\"site_id\":{\"visibility\":\"visible\"," + + "\"label\":\"Site ID (Optional)\",\"value\": null },\"password\":{\"visibility\":\"password\"," + + "\"label\":\"Password (Optional)\",\"value\":\"\"},\"is_reseller\":{\"visibility\":\"checkbox\"," + + "\"label\":\"Reseller Account? (check if yes)\",\"value\":null}}}}]"; + CarrierAccount[] carrierAccounts = Constants.Http.GSON.fromJson(carrierAccountJson, CarrierAccount[].class); + CarrierAccount carrierAccount = carrierAccounts[0]; + + // Prepare a parameter set for creating a pickup, using the carrier account object + Map pickupData = Fixtures.basicPickup(); + pickupData.put("shipment", new Shipment()); + pickupData.put("carrier_accounts", new CarrierAccount[] { carrierAccount }); + + // Avoid making a real request to the API, interested in pre-request serialization, not interested in response + requestMock.when(() -> Requestor.request(Requestor.RequestMethod.POST, "pickups", pickupData, Shipment.class, + vcr.client)).thenReturn(new Pickup()); + + // This will throw an exception if the carrier account fields could not be serialized properly + assertDoesNotThrow(() -> vcr.client.pickup.create(pickupData)); + + // Close mock + requestMock.close(); } } diff --git a/src/test/java/com/easypost/CarrierMetadataTest.java b/src/test/java/com/easypost/CarrierMetadataTest.java new file mode 100644 index 000000000..e1ce57442 --- /dev/null +++ b/src/test/java/com/easypost/CarrierMetadataTest.java @@ -0,0 +1,63 @@ +package com.easypost; + +import com.easypost.exception.EasyPostException; +import com.easypost.model.CarrierMetadata; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import java.util.Arrays; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class CarrierMetadataTest { + 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("carrier_metadata", TestUtils.ApiKey.TEST); + } + + /** + * Test retrieving all carrier metadata. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testRetrieveCarrierMetadata() throws EasyPostException { + vcr.setUpTest("retrieve_carrier_metadata"); + + CarrierMetadata carrierMetadata = vcr.client.carrierMetadata.retrieve(); + + assertTrue(carrierMetadata.getCarriers().stream().anyMatch(carrier -> carrier.getName().equals("usps"))); + assertTrue(carrierMetadata.getCarriers().stream().anyMatch(carrier -> carrier.getName().equals("fedex"))); + } + + /** + * Test retrieving carrier metadata for a specific carrier. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testRetrieveCarrierMetadataWithFilter() throws EasyPostException { + vcr.setUpTest("retrieve_carrier_metadata_with_filter"); + List carriers = Arrays.asList("usps"); + List types = Arrays.asList("service_levels", "predefined_packages"); + CarrierMetadata carrierMetadata = vcr.client.carrierMetadata.retrieve(carriers, types); + + assertTrue(carrierMetadata.getCarriers().stream() + .allMatch(carrier -> carrier.getName().equals("usps"))); + assertEquals(1, carrierMetadata.getCarriers().size()); + assertNotNull(carrierMetadata.getCarriers().get(0).getServiceLevels()); + assertNotNull(carrierMetadata.getCarriers().get(0).getPredefinedPackages()); + assertNull(carrierMetadata.getCarriers().get(0).getSupportedFeatures()); + } +} diff --git a/src/test/java/com/easypost/ClaimTest.java b/src/test/java/com/easypost/ClaimTest.java new file mode 100644 index 000000000..a762a98a5 --- /dev/null +++ b/src/test/java/com/easypost/ClaimTest.java @@ -0,0 +1,163 @@ +package com.easypost; + +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.model.Claim; +import com.easypost.model.ClaimCollection; +import com.easypost.model.Shipment; +import org.junit.jupiter.api.BeforeAll; +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.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + +public final class ClaimTest { + 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("claim", TestUtils.ApiKey.TEST); + } + + /** + * Create a insured shipment object. + * @param amount the amount to insure the shipment. + * + * @return Shipment object + */ + private static Shipment createInsuredShipment(String amount) throws EasyPostException { + Shipment shipment = vcr.client.shipment.create(Fixtures.fullShipment()); + + HashMap params = new HashMap<>(); + params.put("rate", shipment.lowestRate()); + params.put("insurance", amount); + + return vcr.client.shipment.buy(shipment.getId(), params); + } + + /** + * Test creating a claim object. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreate() throws EasyPostException { + vcr.setUpTest("create"); + String amount = "100"; + Shipment shipment = ClaimTest.createInsuredShipment(amount); + HashMap claimData = Fixtures.basicClaim(); + claimData.put("amount", amount); + claimData.put("tracking_code", shipment.getTrackingCode()); + Claim claim = vcr.client.claim.create(claimData); + + assertInstanceOf(Claim.class, claim); + assertTrue(claim.getId().startsWith("clm_")); + } + + /** + * Test retrieving an claim object. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testRetrieve() throws EasyPostException { + vcr.setUpTest("retrieve"); + + String amount = "100"; + Shipment shipment = ClaimTest.createInsuredShipment(amount); + HashMap claimData = Fixtures.basicClaim(); + claimData.put("amount", amount); + claimData.put("tracking_code", shipment.getTrackingCode()); + Claim claim = vcr.client.claim.create(claimData); + + Claim retrievedClaim = vcr.client.claim.retrieve(claim.getId()); + + assertInstanceOf(Claim.class, retrievedClaim); + assertEquals(claim.getId(), retrievedClaim.getId()); + } + + /** + * Test retrieving all claim 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()); + + ClaimCollection claimCollection = vcr.client.claim.all(params); + + List claims = claimCollection.getClaims(); + + assertTrue(claims.size() <= Fixtures.pageSize()); + assertNotNull(claimCollection.getHasMore()); + assertTrue(claims.stream().allMatch(claim -> claim != null)); + } + + /** + * Test retrieving the next page. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPage() throws EasyPostException { + vcr.setUpTest("get_next_page"); + + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + ClaimCollection collection = vcr.client.claim.all(params); + + try { + ClaimCollection nextPage = vcr.client.claim.getNextPage(collection, Fixtures.pageSize()); + + assertNotNull(nextPage); + + String firstIdOfFirstPage = collection.getClaims().get(0).getId(); + String firstIdOfSecondPage = nextPage.getClaims().get(0).getId(); + + assertNotEquals(firstIdOfFirstPage, firstIdOfSecondPage); + } catch (EndOfPaginationError e) { // There's no next page, that's not a failure + assertTrue(true); + } catch (Exception e) { // Any other exception is a failure + fail(); + } + } + + /** + * Test cancelling a filed claim. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCancelClaim() throws EasyPostException { + vcr.setUpTest("cancel"); + + String amount = "100"; + Shipment shipment = ClaimTest.createInsuredShipment(amount); + HashMap claimData = Fixtures.basicClaim(); + claimData.put("amount", amount); + claimData.put("tracking_code", shipment.getTrackingCode()); + Claim claim = vcr.client.claim.create(claimData); + Claim cancelledClaim = vcr.client.claim.cancel(claim.getId()); + + assertInstanceOf(Claim.class, cancelledClaim); + assertTrue(cancelledClaim.getId().startsWith("clm_")); + assertEquals("cancelled", cancelledClaim.getStatus()); + } +} diff --git a/src/test/java/com/easypost/CustomerPortalTest.java b/src/test/java/com/easypost/CustomerPortalTest.java new file mode 100644 index 000000000..259eff0bf --- /dev/null +++ b/src/test/java/com/easypost/CustomerPortalTest.java @@ -0,0 +1,48 @@ +package com.easypost; + +import com.easypost.exception.EasyPostException; +import com.easypost.model.ChildUserCollection; +import com.easypost.model.CustomerPortalAccountLink; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import java.util.HashMap; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public final class CustomerPortalTest { + 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("customer_portal", TestUtils.ApiKey.PRODUCTION); + } + + /** + * Test creating a Portal Session. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateAccountLink() throws EasyPostException { + vcr.setUpTest("create_account_link"); + + HashMap userParams = new HashMap<>(); + userParams.put("page_size", Fixtures.pageSize()); + ChildUserCollection children = vcr.client.user.allChildren(userParams); + + HashMap params = new HashMap<>(); + params.put("session_type", "account_onboarding"); + params.put("user_id", children.getChildren().get(0).getId()); + params.put("refresh_url", "https://example.com/refresh"); + params.put("return_url", "https://example.com/return"); + CustomerPortalAccountLink accountLink = vcr.client.customerPortal.createAccountLink(params); + + assertEquals("CustomerPortalAccountLink", accountLink.getObject()); + } +} diff --git a/src/test/java/com/easypost/CustomsInfoTest.java b/src/test/java/com/easypost/CustomsInfoTest.java index cfeef11fa..8fb25bb69 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; @@ -23,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. * @@ -39,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. * @@ -59,9 +58,9 @@ 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); - 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..a308d2e02 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; @@ -23,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. * @@ -39,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. * @@ -59,9 +58,9 @@ 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); - assertThat(customsItem).usingRecursiveComparison().isEqualTo(retrieveCustomsItem); + assertTrue(customsItem.equals(retrieveCustomsItem)); } } diff --git a/src/test/java/com/easypost/EasyPostResourceTest.java b/src/test/java/com/easypost/EasyPostResourceTest.java new file mode 100644 index 000000000..973b55783 --- /dev/null +++ b/src/test/java/com/easypost/EasyPostResourceTest.java @@ -0,0 +1,99 @@ +package com.easypost; + +import com.easypost.exception.EasyPostException; +import com.easypost.model.Address; +import com.google.common.collect.ImmutableList; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +public final class EasyPostResourceTest { + 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("easypost_resource", TestUtils.ApiKey.TEST); + } + + /** + * Test string representation of an EasyPostResource. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testToString() throws EasyPostException { + vcr.setUpTest("to_string"); + + Address address = vcr.client.address.create(Fixtures.caAddress1()); + + String stringRepresentation = address.toString(); + List substringsToContain = new ArrayList(ImmutableList.of( + "<", + address.getClass().getName(), + "@", + "" + System.identityHashCode(address), // cast to string + " id=", + address.getId(), + ">" + )); + + // Regex matching doesn't work in run mode, only in debug mode (timing issue?) + boolean matches = false; + + for (String substring : substringsToContain) { + matches = stringRepresentation.contains(substring); + if (!matches) { + break; + } + } + + assertTrue(matches); + } + + /** + * Test pretty print of an EasyPostResource. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testPrettyPrint() throws EasyPostException { + vcr.setUpTest("pretty_print"); + + Address address = vcr.client.address.create(Fixtures.caAddress1()); + + String prettyPrint = address.prettyPrint(); + + List substringsToContain = new ArrayList(ImmutableList.of( + "<", + address.getClass().getName(), + "@", + "" + System.identityHashCode(address), // cast to string + " id=", + address.getId(), + ">", + " JSON: {", + "}" + )); + + // Regex matching doesn't work in run mode, only in debug mode (timing issue?) + boolean matches = false; + + for (String substring : substringsToContain) { + matches = prettyPrint.contains(substring); + if (!matches) { + break; + } + } + + assertTrue(matches); + } +} diff --git a/src/test/java/com/easypost/EasyPostTest.java b/src/test/java/com/easypost/EasyPostTest.java index 8a824faee..24161c95d 100644 --- a/src/test/java/com/easypost/EasyPostTest.java +++ b/src/test/java/com/easypost/EasyPostTest.java @@ -1,50 +1,58 @@ package com.easypost; -import com.easypost.net.EasyPostResource; -import org.junit.jupiter.api.BeforeAll; +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.MissingParameterError; +import com.easypost.service.EasyPostClient; import org.junit.jupiter.api.Test; 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. + * Test connection timeout getter and setter. + * + * @throws EasyPostException if any exception is thrown. */ - @BeforeAll - public static void setup() { - vcr = new TestUtils.VCR("client", TestUtils.ApiKey.TEST); + @Test + public void testConnectionTimeout() throws EasyPostException { + EasyPostClient client = new EasyPostClient("fake_api_key", 1); + + assertEquals(1, client.getConnectionTimeoutMilliseconds()); } /** - * Test connection timeout getter and setter. + * Test read timeout getter and setter. + * + * @throws EasyPostException if any exception is thrown. */ @Test - public void testConnectionTimeout() { - - int testTimeout = 1; - - EasyPostResource.setConnectTimeoutMilliseconds(testTimeout); + public void testRequestTimeout() throws EasyPostException { + EasyPostClient client = new EasyPostClient("fake_api_key", 1, 10); - assertEquals(1, EasyPostResource.getConnectTimeoutMilliseconds()); - - // We have to set the connection timeout back to default to avoid other unit tests getting timeout. - EasyPostResource.setConnectTimeoutMilliseconds(30000); + assertEquals(10, client.getReadTimeoutMilliseconds()); } /** - * Test read timeout getter and setter. + * Test setting API base. + * + * @throws EasyPostException if any exception is thrown. */ @Test - public void testRequestTimeout() { - int testTimeout = 1; + public void testApiBase() throws EasyPostException { + EasyPostClient client = new EasyPostClient("fake_api_key", "https://api.easypostExample.com"); - EasyPostResource.setReadTimeoutMilliseconds(testTimeout); - - assertEquals(1, EasyPostResource.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. - EasyPostResource.setReadTimeoutMilliseconds(60000); + /** + * Test create EasyPostClient with invalid API key. + * + * @throws MissingParameterError if any required parameter is missing. + */ + @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/EmbeddableTest.java b/src/test/java/com/easypost/EmbeddableTest.java new file mode 100644 index 000000000..8a6ed18a9 --- /dev/null +++ b/src/test/java/com/easypost/EmbeddableTest.java @@ -0,0 +1,46 @@ +package com.easypost; + +import com.easypost.exception.EasyPostException; +import com.easypost.model.ChildUserCollection; +import com.easypost.model.EmbeddablesSession; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import java.util.HashMap; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public final class EmbeddableTest { + 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("embeddable", TestUtils.ApiKey.PRODUCTION); + } + + /** + * Test creating an Embeddables Session. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateSession() throws EasyPostException { + vcr.setUpTest("create_session"); + + HashMap userParams = new HashMap<>(); + userParams.put("page_size", Fixtures.pageSize()); + ChildUserCollection children = vcr.client.user.allChildren(userParams); + + HashMap params = new HashMap<>(); + params.put("origin_host", "https://example.com"); + params.put("user_id", children.getChildren().get(0).getId()); + EmbeddablesSession session = vcr.client.embeddable.createSession(params); + + assertEquals("EmbeddablesSession", session.getObject()); + } +} diff --git a/src/test/java/com/easypost/EndShipperTest.java b/src/test/java/com/easypost/EndShipperTest.java index 17a7a3b1a..d5bf350d5 100644 --- a/src/test/java/com/easypost/EndShipperTest.java +++ b/src/test/java/com/easypost/EndShipperTest.java @@ -25,7 +25,16 @@ 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); + } + + /** + * Create an EndShipper. + * + * @return EndShipper object. + */ + private static EndShipper createEndShipper() throws EasyPostException { + return vcr.client.endShipper.create(Fixtures.caAddress1()); } /** @@ -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,13 +82,13 @@ 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(); assertTrue(endShippers.size() <= Fixtures.pageSize()); assertNotNull(endShipperCollection.getHasMore()); - assertTrue(endShippers.stream().allMatch(endShipper -> endShipper instanceof EndShipper)); + assertTrue(endShippers.stream().allMatch(endShipper -> endShipper != null)); } /** @@ -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(endShipper.getId(), updateParams); 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 704bf40ad..49e142a5f 100644 --- a/src/test/java/com/easypost/ErrorTest.java +++ b/src/test/java/com/easypost/ErrorTest.java @@ -1,27 +1,48 @@ package com.easypost; +import com.easypost.exception.API.BadRequestError; +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.ServiceUnavailableError; +import com.easypost.exception.API.TimeoutError; +import com.easypost.exception.API.UnauthorizedError; +import com.easypost.exception.API.UnknownApiError; +import com.easypost.exception.APIException; import com.easypost.exception.EasyPostException; -import com.easypost.model.Shipment; +import com.easypost.http.Requestor; +import com.easypost.model.FieldError; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import java.util.HashMap; +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.assertThrows; -public final class ErrorTest { +public final class ErrorTest extends Requestor { private static TestUtils.VCR vcr; /** * Set up the testing environment for this file. * - * @throws EasyPostException when the request fails. + * @throws EasyPostException if any exception is thrown. */ @BeforeAll - public static void setup() { + public static void setup() throws EasyPostException { vcr = new TestUtils.VCR("error", TestUtils.ApiKey.TEST); } /** - * Test creating a bad shipment and retrieving errors. + * Tests that we assign properties of an error correctly. * * @throws EasyPostException when the request fails. */ @@ -29,9 +50,179 @@ public static void setup() { public void testError() throws EasyPostException { vcr.setUpTest("error"); - // 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)); + APIException exception = assertThrows(InvalidRequestError.class, () -> vcr.client.shipment.create(null)); + + assertEquals(422, exception.getStatusCode()); + assertEquals("PARAMETER.REQUIRED", exception.getCode()); + assertEquals("Missing required parameter.", exception.getMessage()); + FieldError fieldError = (FieldError) exception.getErrors().get(0); + assertEquals("cannot be blank", fieldError.getMessage()); + assertEquals("shipment", fieldError.getField()); + } + + /** + * Tests that we assign properties of an error correctly when returned via the alternative format. + * NOTE: Claims (among other things) uses the alternative errors format. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testErrorAlternativeFormat() throws EasyPostException { + vcr.setUpTest("error_alternative_format"); + + HashMap claimData = Fixtures.basicClaim(); + claimData.put("tracking_code", "123"); // Intentionally pass a bad tracking code + + APIException exception = assertThrows(NotFoundError.class, () -> vcr.client.claim.create(claimData)); + + assertEquals(404, exception.getStatusCode()); + assertEquals("NOT_FOUND", exception.getCode()); + assertEquals("The requested resource could not be found.", exception.getMessage()); + assertEquals("No eligible insurance found with provided tracking code.", exception.getErrors().get(0)); + } + + /** + * Test every error type and make sure each error has the correct properties. + * + * @throws EasyPostException if any exception is thrown. + */ + @Test + public void testKnownApiException() throws EasyPostException { + 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(400, BadRequestError.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, + () -> handleAPIError("{}", entry.getKey())); + + 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); + } + } + + /** + * Test parsing error message. + * + * @throws EasyPostException if any exception is thrown. + */ + @Test + public void testExceptionErrorMessageParsing() throws EasyPostException { + String errorMessageStringJson = "{\n" + + " \"error\": {\n" + + " \"code\": \"ERROR_CODE\",\n" + + " \"message\": \"ERROR_MESSAGE_1\",\n" + + " \"errors\": []\n" + + " }\n" + + "}"; + EasyPostException exception = assertThrows(EasyPostException.class, + () -> handleAPIError(errorMessageStringJson, 400)); + + assertEquals("ERROR_MESSAGE_1", exception.getMessage()); + } + + /** + * Test parsing error message that is an array. + * + * @throws EasyPostException if any exception is thrown. + */ + @Test + public void testExceptionErrorArrayParsing() throws EasyPostException { + String errorMessageArrayJson = "{\n" + + " \"error\": {\n" + + " \"code\": \"ERROR_CODE\",\n" + + " \"message\": [\n" + + " \"ERROR_MESSAGE_1\",\n" + + " \"ERROR_MESSAGE_2\"\n" + + " ],\n" + + " \"errors\": []\n" + + " }\n" + + "}"; + EasyPostException exception = assertThrows(EasyPostException.class, + () -> handleAPIError(errorMessageArrayJson, 400)); + + assertEquals("ERROR_MESSAGE_1, ERROR_MESSAGE_2", exception.getMessage()); + } + + /** + * Test parsing error message that is an object. + * + * @throws EasyPostException is any exception thrown. + */ + @Test + public void testExceptionErrorObjectParsing() throws EasyPostException { + String errorMessageObjectJson = "{\n" + + " \"error\": {\n" + + " \"code\": \"UNPROCESSABLE_ENTITY\",\n" + + " \"message\": {\n" + + " \"errors\": [\n" + + " \"bad error.\",\n" + + " \"second bad error.\"\n" + + " ]\n" + + " },\n" + + " \"errors\": []\n" + + " }\n" + + "}"; + + EasyPostException exception = assertThrows(EasyPostException.class, + () -> handleAPIError(errorMessageObjectJson, 400)); + + assertEquals("bad error., second bad error.", exception.getMessage()); + } + + /** + * Test parsing error message that has really bad format. + * + * @throws EasyPostException if any exception is thrown. + */ + @Test + public void testExceptionErrorEdgeCaseParsing() throws EasyPostException { + String json = "{\n" + + " \"error\": {\n" + + " \"code\": \"UNPROCESSABLE_ENTITY\",\n" + + " \"message\": {\n" + + " \"errors\": [\n" + + " \"Bad format 1\",\n" + + " \"Bad format 2\"\n" + + " ],\n" + + " \"bad_data\": [\n" + + " {\n" + + " \"first_message\": \"Bad format 3\",\n" + + " \"second_message\": \"Bad format 4\",\n" + + " \"thrid_message\": \"Bad format 5\"\n" + + " }\n" + + " ]\n" + + " },\n" + + " \"errors\": []\n" + + " }\n" + + "}"; + + EasyPostException exception = assertThrows(EasyPostException.class, + () -> handleAPIError(json, 400)); + + assertEquals("Bad format 1, Bad format 2, Bad format 3, Bad format 4, Bad format 5", + exception.getMessage()); } } diff --git a/src/test/java/com/easypost/EventTest.java b/src/test/java/com/easypost/EventTest.java index 5b5ee7c4c..3ce915261 100644 --- a/src/test/java/com/easypost/EventTest.java +++ b/src/test/java/com/easypost/EventTest.java @@ -1,19 +1,27 @@ package com.easypost; +import com.easypost.exception.APIException; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; 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; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; public final class EventTest { private static TestUtils.VCR vcr; @@ -43,7 +51,36 @@ public void testAll() throws EasyPostException { assertTrue(eventsList.size() <= Fixtures.pageSize()); assertNotNull(events.getHasMore()); - assertTrue(eventsList.stream().allMatch(event -> event instanceof Event)); + assertTrue(eventsList.stream().allMatch(event -> event != null)); + } + + /** + * Test retrieving the next page. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPage() throws EasyPostException { + vcr.setUpTest("get_next_page"); + + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + EventCollection collection = vcr.client.event.all(params); + + try { + EventCollection nextPage = vcr.client.event.getNextPage(collection, Fixtures.pageSize()); + + assertNotNull(nextPage); + + String firstIdOfFirstPage = collection.getEvents().get(0).getId(); + String firstIdOfSecondPage = nextPage.getEvents().get(0).getId(); + + assertNotEquals(firstIdOfFirstPage, firstIdOfSecondPage); + } catch (EndOfPaginationError e) { // There's no next page, that's not a failure + assertTrue(true); + } catch (Exception e) { // Any other exception is a failure + fail(); + } } /** @@ -54,7 +91,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,10 +107,79 @@ 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 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 != null)); + 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()); + } } diff --git a/src/test/java/com/easypost/FedExRegistrationTest.java b/src/test/java/com/easypost/FedExRegistrationTest.java new file mode 100644 index 000000000..ff0de37a7 --- /dev/null +++ b/src/test/java/com/easypost/FedExRegistrationTest.java @@ -0,0 +1,197 @@ +package com.easypost; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.Map; + +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.mockito.MockedStatic; +import org.mockito.Mockito; + +import com.easypost.exception.EasyPostException; +import com.easypost.http.Requestor; +import com.easypost.http.Requestor.RequestMethod; +import com.easypost.model.FedExAccountValidationResponse; +import com.easypost.model.FedExRequestPinResponse; + +public final class FedExRegistrationTest { + private static TestUtils.VCR vcr; + private static MockedStatic requestMock = Mockito.mockStatic(Requestor.class); + + /** + * Setup the testing environment for this file. + * + * @throws EasyPostException when the request fails. + */ + @BeforeAll + public static void setup() throws EasyPostException { + vcr = new TestUtils.VCR("fedex_registration", TestUtils.ApiKey.PRODUCTION); + } + + /** + * Release the static mock once it has been used. + */ + @AfterAll + public static void cleanup() { + requestMock.close(); + } + + /** + * Test registering a billing address. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testRegisterAddress() throws EasyPostException { + String fedexAccountNumber = "123456789"; + Map addressValidation = new java.util.HashMap<>(); + addressValidation.put("name", "BILLING NAME"); + addressValidation.put("street1", "1234 BILLING STREET"); + addressValidation.put("city", "BILLINGCITY"); + addressValidation.put("state", "ST"); + addressValidation.put("postal_code", "12345"); + addressValidation.put("country_code", "US"); + + Map easypostDetails = new java.util.HashMap<>(); + easypostDetails.put("carrier_account_id", "ca_123"); + + Map params = new java.util.HashMap<>(); + params.put("address_validation", addressValidation); + params.put("easypost_details", easypostDetails); + + String jsonResponse = "{\"email_address\":null,\"options\":[\"SMS\",\"CALL\",\"INVOICE\"]," + + "\"phone_number\":\"***-***-9721\"}"; + FedExAccountValidationResponse expectedResponse = Constants.Http.GSON.fromJson(jsonResponse, + FedExAccountValidationResponse.class); + + requestMock.when(() -> Requestor.request( + RequestMethod.POST, + String.format("fedex_registrations/%s/address", fedexAccountNumber), + params, + FedExAccountValidationResponse.class, + vcr.client)).thenReturn(expectedResponse); + + FedExAccountValidationResponse response = vcr.client.fedexRegistration.registerAddress(fedexAccountNumber, + params); + assertNull(response.getEmailAddress()); + assertTrue(response.getOptions().contains("SMS")); + assertTrue(response.getOptions().contains("CALL")); + assertTrue(response.getOptions().contains("INVOICE")); + assertEquals("***-***-9721", response.getPhoneNumber()); + } + + /** + * Test requesting a pin. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testRequestPin() throws EasyPostException { + String fedexAccountNumber = "123456789"; + Map pinMethodMap = new java.util.HashMap<>(); + pinMethodMap.put("option", "SMS"); + Map params = new java.util.HashMap<>(); + params.put("pin_method", pinMethodMap); + + String jsonResponse = "{\"message\":\"sent secured Pin\"}"; + FedExRequestPinResponse pinResponse = Constants.Http.GSON.fromJson(jsonResponse, FedExRequestPinResponse.class); + + requestMock.when(() -> Requestor.request( + RequestMethod.POST, + String.format("fedex_registrations/%s/pin", + fedexAccountNumber), + params, + FedExRequestPinResponse.class, + vcr.client)) + .thenReturn(pinResponse); + + FedExRequestPinResponse response = vcr.client.fedexRegistration.requestPin(fedexAccountNumber, "SMS"); + assertEquals("sent secured Pin", response.getMessage()); + } + + /** + * Test validating a pin. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testValidatePin() throws EasyPostException { + String fedexAccountNumber = "123456789"; + Map pinValidation = new java.util.HashMap<>(); + pinValidation.put("pin_code", "123456"); + pinValidation.put("name", "BILLING NAME"); + + Map easypostDetails = new java.util.HashMap<>(); + easypostDetails.put("carrier_account_id", "ca_123"); + + Map params = new java.util.HashMap<>(); + params.put("pin_validation", pinValidation); + params.put("easypost_details", easypostDetails); + + String jsonResponse = "{\"id\":\"ca_123\",\"object\":\"CarrierAccount\",\"type\":\"FedexAccount\"," + + "\"credentials\":{\"account_number\":\"123456789\",\"mfa_key\":\"123456789-XXXXX\"}}"; + FedExAccountValidationResponse expectedResponse = Constants.Http.GSON.fromJson(jsonResponse, + FedExAccountValidationResponse.class); + + requestMock.when(() -> Requestor.request( + RequestMethod.POST, + String.format("fedex_registrations/%s/pin/validate", fedexAccountNumber), + params, + FedExAccountValidationResponse.class, + vcr.client)).thenReturn(expectedResponse); + + FedExAccountValidationResponse response = vcr.client.fedexRegistration.validatePin(fedexAccountNumber, params); + assertEquals("ca_123", response.getId()); + assertEquals("CarrierAccount", response.getObject()); + assertEquals("FedexAccount", response.getType()); + assertEquals("123456789", response.getCredentials().get("account_number")); + assertEquals("123456789-XXXXX", response.getCredentials().get("mfa_key")); + } + + /** + * Test submitting details about an invoice. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testSubmitInvoice() throws EasyPostException { + String fedexAccountNumber = "123456789"; + Map invoiceValidation = new java.util.HashMap<>(); + invoiceValidation.put("name", "BILLING NAME"); + invoiceValidation.put("invoice_number", "INV-12345"); + invoiceValidation.put("invoice_date", "2025-12-08"); + invoiceValidation.put("invoice_amount", "100.00"); + invoiceValidation.put("invoice_currency", "USD"); + + Map easypostDetails = new java.util.HashMap<>(); + easypostDetails.put("carrier_account_id", "ca_123"); + + Map params = new java.util.HashMap<>(); + params.put("invoice_validation", invoiceValidation); + params.put("easypost_details", easypostDetails); + + String jsonResponse = "{\"id\":\"ca_123\",\"object\":\"CarrierAccount\",\"type\":\"FedexAccount\"," + + "\"credentials\":{\"account_number\":\"123456789\",\"mfa_key\":\"123456789-XXXXX\"}}"; + FedExAccountValidationResponse expectedResponse = Constants.Http.GSON.fromJson(jsonResponse, + FedExAccountValidationResponse.class); + + requestMock.when(() -> Requestor.request( + RequestMethod.POST, + String.format("fedex_registrations/%s/invoice", fedexAccountNumber), + params, + FedExAccountValidationResponse.class, + vcr.client)).thenReturn(expectedResponse); + + FedExAccountValidationResponse response = vcr.client.fedexRegistration.submitInvoice(fedexAccountNumber, + params); + assertEquals("ca_123", response.getId()); + assertEquals("CarrierAccount", response.getObject()); + assertEquals("FedexAccount", response.getType()); + assertEquals("123456789", response.getCredentials().get("account_number")); + assertEquals("123456789-XXXXX", response.getCredentials().get("mfa_key")); + } +} diff --git a/src/test/java/com/easypost/Fixtures.java b/src/test/java/com/easypost/Fixtures.java index 18786167d..a3a1b0546 100644 --- a/src/test/java/com/easypost/Fixtures.java +++ b/src/test/java/com/easypost/Fixtures.java @@ -1,26 +1,31 @@ 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; import java.io.IOException; +import java.io.UncheckedIOException; import java.lang.reflect.Type; +import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; 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.List; import java.util.Objects; +import com.easypost.fixtures.components.Billing; + import static com.easypost.TestUtils.getSourceFileDirectory; import static com.easypost.TestUtils.readFile; public abstract class Fixtures { private static String readFixtureData() { - Path fixtureDataPath = - Paths.get(getSourceFileDirectory(), "examples/official/fixtures/client-library-fixtures.json"); + Path fixtureDataPath = Paths.get(getSourceFileDirectory(), + "examples/official/fixtures/client-library-fixtures.json"); return readFile(fixtureDataPath); } @@ -52,8 +57,8 @@ public static int pageSize() { */ public static String uspsCarrierAccountID() { // Fallback to the EasyPost Java Client Library Test User USPS carrier account - return System.getenv("USPS_CARRIER_ACCOUNT_ID") != null ? System.getenv("USPS_CARRIER_ACCOUNT_ID") : - "ca_f09befdb2e9c410e95c7622ea912c18c"; + return System.getenv("USPS_CARRIER_ACCOUNT_ID") != null ? System.getenv("USPS_CARRIER_ACCOUNT_ID") + : "ca_f09befdb2e9c410e95c7622ea912c18c"; } /** @@ -101,24 +106,6 @@ public static String reportDate() { return "2022-05-04"; } - /** - * Get the default report prefix. - * - * @return The default report prefix - */ - public static String reportIdPrefix() { - return "shprep_"; - } - - /** - * Get the default webhook URL. - * - * @return The default webhook URL - */ - public static String webhookUrl() { - return Objects.requireNonNull(getFixtureData()).webhookUrl; - } - /** * Get the first default address. * @@ -206,16 +193,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; } /** @@ -228,10 +214,10 @@ public static HashMap basicPickup() { HashMap fixture = Objects.requireNonNull(getFixtureData()).pickups.basic; /* - 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. + * 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 = "2025-01-03"; fixture.put("min_datetime", pickupDate); fixture.put("max_datetime", pickupDate); @@ -248,6 +234,18 @@ public static HashMap basicCarrierAccount() { return Objects.requireNonNull(getFixtureData()).carrierAccounts.basic; } + /** + * Get the default claim. + * + * @return The default claim + */ + public static HashMap basicClaim() { + /* + * This fixture will require you to append a `tracking_code` and `amount`. + */ + return Objects.requireNonNull(getFixtureData()).claims.basic; + } + /** * Get the default insurance. * @@ -255,7 +253,8 @@ public static HashMap basicCarrierAccount() { */ public static HashMap basicInsurance() { /* - This fixture will require you to append a `tracking_code` key with the shipment's tracking code. + * This fixture will require you to append a `tracking_code` key with the + * shipment's tracking code. */ return Objects.requireNonNull(getFixtureData()).insurances.basic; } @@ -280,14 +279,51 @@ public static byte[] eventBytes() { byte[] data = null; try { - data = Files.readAllLines(Paths.get(fullFilePath), StandardCharsets.UTF_8).get(0).getBytes(); + data = Files.readAllLines(Paths.get(fullFilePath), StandardCharsets.UTF_8) + .get(0).getBytes(Charset.defaultCharset()); } catch (IOException error) { - error.printStackTrace(); + throw new UncheckedIOException(error); } return data; } + /** + * Get the default webhook HMAC signature. + * + * @return The default webhook HMAC signature + */ + public static String webhookHmacSignature() { + return Objects.requireNonNull(getFixtureData()).webhooks.hmacSignature; + } + + /** + * Get the default webhook secret. + * + * @return The default webhook secret + */ + public static String webhookSecret() { + return Objects.requireNonNull(getFixtureData()).webhooks.secret; + } + + /** + * Get the default webhook URL. + * + * @return The default webhook URL + */ + public static String webhookUrl() { + return Objects.requireNonNull(getFixtureData()).webhooks.url; + } + + /** + * Get the default webhook custom headers. + * + * @return The default webhook custom headers + */ + public static List webhookCustomHeaders() { + return Objects.requireNonNull(getFixtureData()).webhooks.customHeaders; + } + /** * Get the default credit card details. * @@ -295,9 +331,9 @@ public static byte[] eventBytes() { */ public static HashMap creditCardDetails() { /* - The credit card details below are for a valid proxy card usable for tests only - and cannot be used for real transactions. - DO NOT alter these details with real credit card information. + * The credit card details below are for a valid proxy card usable for tests + * only and cannot be used for real transactions. + * DO NOT alter these details with real credit card information. */ return Objects.requireNonNull(getFixtureData()).creditCards.test; } @@ -319,4 +355,49 @@ public static HashMap rmaFormOptions() { public static HashMap referralUser() { return Objects.requireNonNull(getFixtureData()).users.referral; } + + /** + * Get the default planned ship date. + * + * @return The default planned ship date + */ + public static String plannedShipDate() { + return "2024-08-18"; + } + + /** + * Get the default desired delivery date. + * + * @return The default desired delivery date + */ + public static String desiredDeliveryDate() { + return "2024-08-21"; + } + + /** + * Get the billing fixture data. + * + * @return The billing fixture data + */ + public static Billing billing() { + return Objects.requireNonNull(getFixtureData()).billing; + } + + /** + * Get the Luma ruleset name fixture data. + * + * @return The Luma ruleset name fixture data + */ + public static String lumaRulesetName() { + return Objects.requireNonNull(getFixtureData()).luma.rulesetName; + } + + /** + * Get the Luma planned ship date fixture data. + * + * @return The Luma planned ship date fixture data + */ + public static String lumaPlannedShipDate() { + return "2025-06-16"; + } } diff --git a/src/test/java/com/easypost/HookTest.java b/src/test/java/com/easypost/HookTest.java new file mode 100644 index 000000000..3f275750f --- /dev/null +++ b/src/test/java/com/easypost/HookTest.java @@ -0,0 +1,185 @@ +package com.easypost; + +import com.easypost.exception.API.NotFoundError; +import com.easypost.exception.EasyPostException; +import com.easypost.hooks.RequestHookResponses; +import com.easypost.hooks.ResponseHookResponses; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + +import java.util.function.Function; + +public class HookTest { + private static TestUtils.VCR vcr; + + private static boolean hookHit = false; + + /** + * 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("hook", TestUtils.ApiKey.TEST); + } + + /** + * Test failing a hook if we subscribed to a request hook. + * + * @param data The RequestHookResponses object representing the hook data. + * @return The result of the test. + */ + public static Object failIfSubscribedToRequest(RequestHookResponses data) { + fail("Test failed"); + + return false; + } + + /** + * Test failing a hook if we subscribed to a response hook. + * + * @param data The ResponseHookResponses object representing the hook data. + * @return The result of the test. + */ + public static Object failIfSubscribedToResponse(ResponseHookResponses data) { + fail("Test failed"); + + return false; + } + + /** + * Test subscribing a request hook. + * + * @param data The RequestHookResponses object representing the hook data. + * @return The result of the test. + */ + public static Object testRequestHooks(RequestHookResponses data) { + assertEquals("https://api.easypost.com/v2/parcels", data.getPath()); + assertEquals("POST", data.getMethod()); + assertNotNull(data.getHeaders()); + assertNotNull(data.getRequestBody()); + assertNotNull(data.getRequestTimestamp()); + assertNotNull(data.getRequestUuid()); + + return true; + } + + /** + * Test subscribing a response hook when an HTTP error occurs. + * + * @param data The ResponseHookResponses object representing the hook data. + * @return The result of the test. + */ + public static Object testResponseHookOnHttpError(ResponseHookResponses data) { + assertEquals("https://api.easypost.com/v2/parcels/par_123", data.getPath()); + assertEquals("GET", data.getMethod()); + assertEquals(404, data.getHttpStatus()); + assertNotNull(data.getHeaders()); + assertNotNull(data.getResponseBody()); + assertNotNull(data.getRequestTimestamp()); + assertNotNull(data.getRequestTimestamp()); + assertNotNull(data.getRequestUuid()); + + hookHit = true; + + return true; + } + + /** + * Test subscribing a response hook. + * + * @param data The ResponseHookResponses object representing the hook data. + * @return The result of the test. + */ + public static Object testResponseHooks(ResponseHookResponses data) { + assertEquals("https://api.easypost.com/v2/parcels", data.getPath()); + assertEquals("POST", data.getMethod()); + assertEquals(201, data.getHttpStatus()); + assertNotNull(data.getHeaders()); + assertNotNull(data.getResponseBody()); + assertNotNull(data.getRequestTimestamp()); + assertNotNull(data.getRequestTimestamp()); + assertNotNull(data.getRequestUuid()); + + return true; + } + + /** + * Test creating a Parcel with request hook subscribed. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateParcelWithRequestHook() throws EasyPostException { + vcr.setUpTest("create"); + Function requestHook = HookTest::testRequestHooks; + vcr.client.subscribeToRequestHook(requestHook); + vcr.client.parcel.create(Fixtures.basicParcel()); + } + + /** + * Test creating a Parcel with response hook subscribed. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateParcelWithResponseHook() throws EasyPostException { + vcr.setUpTest("create"); + Function requestHook = HookTest::testResponseHooks; + vcr.client.subscribeToResponseHook(requestHook); + vcr.client.parcel.create(Fixtures.basicParcel()); + } + + /** + * Test creating a Parcel with unsubscribed hooks. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testUnsubscribeHooks() throws EasyPostException { + vcr.setUpTest("create"); + + Function failedRequestHook = HookTest::failIfSubscribedToRequest; + + vcr.client.subscribeToRequestHook(failedRequestHook); + vcr.client.unsubscribeFromRequestHook(failedRequestHook); + + Function failedResponseHook = HookTest::failIfSubscribedToResponse; + + vcr.client.subscribeToResponseHook(failedResponseHook); + vcr.client.unsubscribeFromResponseHook(failedResponseHook); + + vcr.client.parcel.create(Fixtures.basicParcel()); + } + + /** + * Test that response hooks are still fired even if the HTTP call fails. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testResponseHookFiredOnHTTPError() throws EasyPostException { + vcr.setUpTest("http_error"); + + hookHit = false; + + Function requestHook = HookTest::testResponseHookOnHttpError; + + vcr.client.subscribeToResponseHook(requestHook); + + try { + vcr.client.parcel.retrieve("par_123"); + } catch (NotFoundError e) { + assertEquals(404, e.getStatusCode()); + } + + assertTrue(hookHit); + } +} diff --git a/src/test/java/com/easypost/InsuranceTest.java b/src/test/java/com/easypost/InsuranceTest.java index 3e002e9aa..5f6d783e0 100644 --- a/src/test/java/com/easypost/InsuranceTest.java +++ b/src/test/java/com/easypost/InsuranceTest.java @@ -1,6 +1,7 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; import com.easypost.model.Insurance; import com.easypost.model.InsuranceCollection; import com.easypost.model.Shipment; @@ -13,8 +14,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; public final class InsuranceTest { private static TestUtils.VCR vcr; @@ -29,6 +32,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. * @@ -42,21 +59,7 @@ public void testCreate() throws EasyPostException { assertInstanceOf(Insurance.class, insurance); assertTrue(insurance.getId().startsWith("ins_")); - assertEquals(100.0, insurance.getAmount(), 0.01); - } - - /** - * 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); + assertEquals("100.00000", insurance.getAmount()); } /** @@ -70,7 +73,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,12 +92,61 @@ 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(); assertTrue(insurances.size() <= Fixtures.pageSize()); assertNotNull(insuranceCollection.getHasMore()); - assertTrue(insurances.stream().allMatch(insurance -> insurance instanceof Insurance)); + assertTrue(insurances.stream().allMatch(insurance -> insurance != null)); + } + + /** + * Test retrieving the next page. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPage() throws EasyPostException { + vcr.setUpTest("get_next_page"); + + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + InsuranceCollection collection = vcr.client.insurance.all(params); + + try { + InsuranceCollection nextPage = vcr.client.insurance.getNextPage(collection, Fixtures.pageSize()); + + assertNotNull(nextPage); + + String firstIdOfFirstPage = collection.getInsurances().get(0).getId(); + String firstIdOfSecondPage = nextPage.getInsurances().get(0).getId(); + + assertNotEquals(firstIdOfFirstPage, firstIdOfSecondPage); + } catch (EndOfPaginationError e) { // There's no next page, that's not a failure + assertTrue(true); + } catch (Exception e) { // Any other exception is a failure + fail(); + } + } + + /** + * Test refunding an insurance. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testRefundInsurance() throws EasyPostException { + vcr.setUpTest("refund"); + + HashMap params = Fixtures.basicInsurance(); + params.put("tracking_code", "EZ1000000001"); + Insurance insurance = vcr.client.insurance.create(params); + Insurance cancelledInsurance = vcr.client.insurance.refund(insurance.getId()); + + assertInstanceOf(Insurance.class, cancelledInsurance); + assertTrue(insurance.getId().startsWith("ins_")); + assertEquals("cancelled", cancelledInsurance.getStatus()); + assertEquals("Insurance was cancelled by the user.", cancelledInsurance.getMessages().get(0)); } } diff --git a/src/test/java/com/easypost/LumaTest.java b/src/test/java/com/easypost/LumaTest.java new file mode 100644 index 000000000..5527abb00 --- /dev/null +++ b/src/test/java/com/easypost/LumaTest.java @@ -0,0 +1,42 @@ +package com.easypost; + +import com.easypost.exception.EasyPostException; +import com.easypost.model.LumaInfo; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public final class LumaTest { + 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("luma", TestUtils.ApiKey.TEST); + } + + /** + * Test that we get service recommendations from Luma based on your ruleset. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetPromise() throws EasyPostException { + vcr.setUpTest("get_promise"); + + Map shipmentData = Fixtures.basicShipment(); + shipmentData.put("ruleset_name", Fixtures.lumaRulesetName()); + shipmentData.put("planned_ship_date", Fixtures.lumaPlannedShipDate()); + + LumaInfo response = vcr.client.luma.getPromise(shipmentData); + + assertNotNull(response.getLumaSelectedRate()); + } +} diff --git a/src/test/java/com/easypost/OrderTest.java b/src/test/java/com/easypost/OrderTest.java index e51d3a343..1729f4533 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 @@ -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 { - vcr.setUpTest("buy"); + public void testBuyWithParams() throws EasyPostException, InterruptedException { + vcr.setUpTest("buy_with_params"); Order order = createBasicOrder(); @@ -110,9 +110,30 @@ 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 = boughtOrder.getShipments(); + + assertInstanceOf(Order.class, order); + for (Shipment shipment : shipments) { + assertNotNull(shipment.getPostageLabel()); + } + } + + /** + * 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 = order.getShipments(); + List shipments = boughtOrder.getShipments(); assertInstanceOf(Order.class, order); for (Shipment shipment : shipments) { @@ -120,6 +141,27 @@ public void testBuy() throws EasyPostException { } } + /** + * Test getting new rates of a order. + * + * @throws EasyPostException if an exception is thrown. + */ + @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. * @@ -133,15 +175,16 @@ public void testLowestRate() throws EasyPostException { // Test lowest rate with no filters Rate lowestRate = order.lowestRate(); - assertEquals("First", lowestRate.getService()); - assertEquals(5.57, lowestRate.getRate(), 0.01); + assertEquals("GroundAdvantage", lowestRate.getService()); + assertEquals(11.40, lowestRate.getRate(), 0.01); assertEquals("USPS", lowestRate.getCarrier()); - // Test lowest rate with service filter (this rate is higher than the lowest but should filter) + // 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); assertEquals("Priority", lowestRateService.getService()); - assertEquals(7.90, lowestRateService.getRate(), 0.01); + assertEquals(14.48, lowestRateService.getRate(), 0.01); assertEquals("USPS", lowestRateService.getCarrier()); // Test lowest rate with carrier filter (should error due to bad carrier) diff --git a/src/test/java/com/easypost/PaginatedCollectionTest.java b/src/test/java/com/easypost/PaginatedCollectionTest.java new file mode 100644 index 000000000..af56244a0 --- /dev/null +++ b/src/test/java/com/easypost/PaginatedCollectionTest.java @@ -0,0 +1,116 @@ +package com.easypost; + +import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.http.Requestor; +import com.easypost.model.AddressCollection; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.mockito.MockedStatic; +import org.mockito.Mockito; + +import java.util.HashMap; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public final class PaginatedCollectionTest { + private static TestUtils.VCR vcr; + + /** + * Set up the testing environment for this file. + * + * @throws EasyPostException when the setup fails. + */ + @BeforeAll + public static void setup() throws EasyPostException { + vcr = new TestUtils.VCR("paginated_collections", TestUtils.ApiKey.TEST); + } + + /** + * Test getting the next page of a paginated collection. + * This getNextPage method is implemented on a per-service, + * but rather than testing in each service, we'll test it once here. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPage() throws EasyPostException { + vcr.setUpTest("next_page"); + + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + AddressCollection addresses = vcr.client.address.all(params); + + AddressCollection nextPage = vcr.client.address.getNextPage(addresses); + + assertNotNull(nextPage); + + String firstIdOfFirstPage = addresses.getAddresses().get(0).getId(); + String firstIdOfSecondPage = nextPage.getAddresses().get(0).getId(); + + assertNotEquals(firstIdOfFirstPage, firstIdOfSecondPage); + } + + /** + * Test that the getNextPage method works with page limits. + * This method is implemented on a per-service, but rather than testing in each service, we'll test it once here.. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPageSizeLimit() throws EasyPostException { + vcr.setUpTest("next_page_size_limit"); + + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + AddressCollection addresses = vcr.client.address.all(params); + + AddressCollection nextPage = vcr.client.address.getNextPage(addresses, Fixtures.pageSize()); + + assertNotNull(nextPage); + + assertTrue(nextPage.getAddresses().size() <= Fixtures.pageSize()); + } + + /** + * Test that the getNextPage method will throw an EndOfPaginationError when it reaches the end of the list. + * This method is implemented on a per-service, but rather than testing in each service, we'll test it once here. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPageReachEnd() throws EasyPostException { + vcr.setUpTest("next_page_reach_end"); + + final MockedStatic requestMock = Mockito.mockStatic(Requestor.class); + + String fakeData = "{ \"addresses\": [], \"has_more\": false }"; + AddressCollection fakeCollection = Constants.Http.GSON.fromJson(fakeData, AddressCollection.class); + + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + + requestMock.when( + () -> Requestor.request(Requestor.RequestMethod.GET, "addresses", params, AddressCollection.class, + vcr.client)).thenReturn(fakeCollection); + + AddressCollection collection = vcr.client.address.all(params); + + boolean hitEnd = false; + + while (!hitEnd) { + try { + collection = vcr.client.address.getNextPage(collection); + } catch (EndOfPaginationError e) { // only catch the error we're expecting + hitEnd = true; + } + } + + assertTrue(hitEnd); + + requestMock.close(); + } +} diff --git a/src/test/java/com/easypost/ParcelTest.java b/src/test/java/com/easypost/ParcelTest.java index e4440cd68..8ffcab73e 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; @@ -45,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()); } /** @@ -59,9 +58,9 @@ 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); - assertThat(parcel).usingRecursiveComparison().isEqualTo(retrievedParcel); + assertTrue(parcel.equals(retrievedParcel)); } } diff --git a/src/test/java/com/easypost/PaymentMethodTest.java b/src/test/java/com/easypost/PaymentMethodTest.java new file mode 100644 index 000000000..d355d98e3 --- /dev/null +++ b/src/test/java/com/easypost/PaymentMethodTest.java @@ -0,0 +1,38 @@ +package com.easypost; + +import com.easypost.exception.EasyPostException; +import com.easypost.model.PaymentMethod; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertTrue; + +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.billing.retrievePaymentMethods(); + + 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 d5951f9c3..280f6e585 100644 --- a/src/test/java/com/easypost/PickupTest.java +++ b/src/test/java/com/easypost/PickupTest.java @@ -1,7 +1,9 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; 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; @@ -13,12 +15,13 @@ 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.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; public final class PickupTest { // Remember to bump the pickup date if you need to re-record the cassette @@ -35,33 +38,83 @@ public static void setup() throws EasyPostException { } /** - * Test creating a pickup. + * 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 retrieving all shipments. * * @throws EasyPostException when the request fails. */ @Test - public void testCreate() throws EasyPostException { - vcr.setUpTest("create"); + public void testAll() throws EasyPostException { + vcr.setUpTest("all"); - Pickup pickup = createBasicPickup(); + Map params = new HashMap(); + params.put("page_size", Fixtures.pageSize()); - assertInstanceOf(Pickup.class, pickup); - assertTrue(pickup.getId().startsWith("pickup_")); - assertNotNull(pickup.getPickupRates()); + 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 != null)); } /** - * Create a pickup. + * Test retrieving the next page. * - * @return Pickup object + * @throws EasyPostException when the request fails. */ - private static Pickup createBasicPickup() throws EasyPostException { - Shipment shipment = Shipment.create(Fixtures.oneCallBuyShipment()); + @Test + public void testGetNextPage() throws EasyPostException { + vcr.setUpTest("get_next_page"); - Map pickupData = Fixtures.basicPickup(); - pickupData.put("shipment", shipment); + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + PickupCollection collection = vcr.client.pickup.all(params); + + try { + PickupCollection nextPage = vcr.client.pickup.getNextPage(collection, Fixtures.pageSize()); + + assertNotNull(nextPage); + + String firstIdOfFirstPage = collection.getPickups().get(0).getId(); + String firstIdOfSecondPage = nextPage.getPickups().get(0).getId(); - return Pickup.create(pickupData); + assertNotEquals(firstIdOfFirstPage, firstIdOfSecondPage); + } catch (EndOfPaginationError e) { // There's no next page, that's not a failure + assertTrue(true); + } catch (Exception e) { // Any other exception is a failure + fail(); + } + } + + /** + * Test creating a pickup. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreate() throws EasyPostException { + vcr.setUpTest("create"); + + Pickup pickup = createBasicPickup(); + + assertInstanceOf(Pickup.class, pickup); + assertTrue(pickup.getId().startsWith("pickup_")); + assertNotNull(pickup.getPickupRates()); } /** @@ -75,10 +128,10 @@ 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); - assertThat(pickup).usingRecursiveComparison().isEqualTo(retrievedPickup); + assertTrue(pickup.equals(retrievedPickup)); } /** @@ -92,11 +145,30 @@ public void testBuy() throws EasyPostException, InterruptedException { Pickup pickup = createBasicPickup(); - Map params = new HashMap<>(); + 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); + + assertInstanceOf(Pickup.class, boughtPickup); + assertTrue(boughtPickup.getId().startsWith("pickup_")); + assertNotNull(boughtPickup.getConfirmation()); + assertEquals("scheduled", boughtPickup.getStatus()); + } + + /** + * Test buying a pickup by specifying a pickup 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_")); @@ -118,9 +190,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_")); diff --git a/src/test/java/com/easypost/RateTest.java b/src/test/java/com/easypost/RateTest.java index d66f019d5..782eb6ce3 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; @@ -31,12 +31,12 @@ 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); - assertThat(rate).usingRecursiveComparison().isEqualTo(retrievedRate); + assertTrue(rate.equals(retrievedRate)); } } diff --git a/src/test/java/com/easypost/ReferralCustomerTest.java b/src/test/java/com/easypost/ReferralCustomerTest.java new file mode 100644 index 000000000..fecd51a5e --- /dev/null +++ b/src/test/java/com/easypost/ReferralCustomerTest.java @@ -0,0 +1,218 @@ +package com.easypost; + +import com.easypost.exception.API.ExternalApiError; +import com.easypost.exception.EasyPostException; +import com.easypost.exception.API.InvalidRequestError; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.exception.API.NotFoundError; +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.Test; + +import java.util.HashMap; +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.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + +public final class ReferralCustomerTest { + 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("referral_customer", 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); + } + + /** + * Create a referral. + * + * @return Referral object + */ + private static ReferralCustomer createReferral() throws EasyPostException { + return vcr.client.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(); + + assertDoesNotThrow(() -> vcr.client.referralCustomer.updateEmail("email@example.com", referralUser.getId())); + } + + /** + * 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 = vcr.client.referralCustomer.all(params); + + List referralUsers = referralCustomerCollection.getReferralCustomers(); + + assertTrue(referralUsers.size() <= Fixtures.pageSize()); + assertNotNull(referralCustomerCollection.getHasMore()); + assertTrue(referralUsers.stream().allMatch(referral -> referral != null)); + } + + /** + * Test retrieving the next page. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPage() throws EasyPostException { + vcr.setUpTest("get_next_page"); + + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + ReferralCustomerCollection collection = vcr.client.referralCustomer.all(params); + + try { + ReferralCustomerCollection nextPage = + vcr.client.referralCustomer.getNextPage(collection, Fixtures.pageSize()); + + assertNotNull(nextPage); + + String firstIdOfFirstPage = collection.getReferralCustomers().get(0).getId(); + String firstIdOfSecondPage = nextPage.getReferralCustomers().get(0).getId(); + + assertNotEquals(firstIdOfFirstPage, firstIdOfSecondPage); + } catch (EndOfPaginationError e) { // There's no next page, that's not a failure + assertTrue(true); + } catch (Exception e) { // Any other exception is a failure + fail(); + } + } + + /** + * Test adding a credit card to a Referral user. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testReferralAddCreditCard() throws Exception { + vcr.setUpTest("referral_add_credit_card"); + + Map creditCardDetails = Fixtures.creditCardDetails(); + 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("pm_")); + 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)); + } + + /** + * Test adding a credit card from Stripe for a Referral user raises an error when it fails. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testAddCreditCardFromStripe() throws EasyPostException { + vcr.setUpTest("add_credit_card_from_stripe"); + + NotFoundError exception = assertThrows(NotFoundError.class, () -> { + vcr.client.referralCustomer.addCreditCardFromStripe( + referralUserKey(), + Fixtures.billing().paymentMethodId, + PaymentMethod.Priority.PRIMARY + ); + }); + + assertEquals("Stripe::PaymentMethod does not exist for the specified reference_id", exception.getMessage()); + } + + /** + * Test adding a bank account from Stripe for a Referral user raises an error when it fails. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testAddBankAccountFromStripe() throws EasyPostException { + vcr.setUpTest("add_bank_account_from_stripe"); + + InvalidRequestError exception = assertThrows(InvalidRequestError.class, () -> { + vcr.client.referralCustomer.addBankAccountFromStripe( + referralUserKey(), + Fixtures.billing().financialConnectionsId, + Fixtures.billing().mandateData, + PaymentMethod.Priority.PRIMARY + ); + }); + + assertEquals( + "account_holder_name must be present when creating a Financial Connections payment method", + exception.getMessage() + ); + } +} diff --git a/src/test/java/com/easypost/ReferralTest.java b/src/test/java/com/easypost/ReferralTest.java deleted file mode 100644 index 408e76fd2..000000000 --- a/src/test/java/com/easypost/ReferralTest.java +++ /dev/null @@ -1,120 +0,0 @@ -package com.easypost; - -import com.easypost.exception.EasyPostException; -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; - -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("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/RefundTest.java b/src/test/java/com/easypost/RefundTest.java index d0ff60526..f0896c131 100644 --- a/src/test/java/com/easypost/RefundTest.java +++ b/src/test/java/com/easypost/RefundTest.java @@ -1,21 +1,24 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; import com.easypost.model.Refund; import com.easypost.model.RefundCollection; import com.easypost.model.Shipment; 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; -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.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; public final class RefundTest { private static TestUtils.VCR vcr; @@ -39,32 +42,22 @@ public static void setup() throws EasyPostException { public void testCreate() throws EasyPostException { vcr.setUpTest("create"); - List refunds = createBasicRefundList(); + Shipment shipment = vcr.client.shipment.create(Fixtures.oneCallBuyShipment()); - assertInstanceOf(List.class, refunds); - assertTrue(refunds.stream().allMatch(refund -> refund instanceof Refund)); - - Refund refund = refunds.get(0); - assertTrue(refund.getId().startsWith("rfnd_")); - assertEquals("submitted", refund.getStatus()); - } - - /** - * Create a list of refunds. - * - * @return List of Refund objects - */ - private static List createBasicRefundList() throws EasyPostException { - Shipment shipment = 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()); + // We need to retrieve the shipment so that the tracking_code has time to + // populate + Shipment retrievedShipment = vcr.client.shipment.retrieve(shipment.getId()); Map params = new HashMap<>(); params.put("carrier", Fixtures.usps()); - params.put("tracking_codes", retrievedShipment.getTrackingCode()); + List trackingCodes = new ArrayList<>(); + trackingCodes.add(retrievedShipment.getTrackingCode()); + params.put("tracking_codes", trackingCodes); - return Refund.create(params); + List refunds = vcr.client.refund.create(params); + + assertTrue(refunds.get(0).getId().startsWith("rfnd_")); + assertEquals("submitted", refunds.get(0).getStatus()); } /** @@ -79,17 +72,46 @@ 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(); assertTrue(refunds.size() <= Fixtures.pageSize()); assertNotNull(refundCollection.getHasMore()); - assertTrue(refunds.stream().allMatch(refund -> refund instanceof Refund)); + assertTrue(refunds.stream().allMatch(refund -> refund != null)); + } + + /** + * Test retrieving the next page. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPage() throws EasyPostException { + vcr.setUpTest("get_next_page"); + + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + RefundCollection collection = vcr.client.refund.all(params); + + try { + RefundCollection nextPage = vcr.client.refund.getNextPage(collection, Fixtures.pageSize()); + + assertNotNull(nextPage); + + String firstIdOfFirstPage = collection.getRefunds().get(0).getId(); + String firstIdOfSecondPage = nextPage.getRefunds().get(0).getId(); + + assertNotEquals(firstIdOfFirstPage, firstIdOfSecondPage); + } catch (EndOfPaginationError e) { // There's no next page, that's not a failure + assertTrue(true); + } catch (Exception e) { // Any other exception is a failure + fail(); + } } /** - * Test retrieving a refunds. + * Test retrieving a refund. * * @throws EasyPostException when the request fails. */ @@ -97,12 +119,15 @@ public void testAll() throws EasyPostException { public void testRetrieve() throws EasyPostException { vcr.setUpTest("retrieve"); - List refunds = createBasicRefundList(); - Refund refund = refunds.get(0); + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + + RefundCollection refundCollection = vcr.client.refund.all(params); + List refunds = refundCollection.getRefunds(); - Refund retrievedRefund = Refund.retrieve(refund.getId()); + Refund retrievedRefund = vcr.client.refund.retrieve(refunds.get(0).getId()); assertInstanceOf(Refund.class, retrievedRefund); - assertThat(refund).usingRecursiveComparison().isEqualTo(retrievedRefund); + assertTrue(refunds.get(0).equals(retrievedRefund)); } } diff --git a/src/test/java/com/easypost/ReportTest.java b/src/test/java/com/easypost/ReportTest.java index 3919ef960..79c3077e3 100644 --- a/src/test/java/com/easypost/ReportTest.java +++ b/src/test/java/com/easypost/ReportTest.java @@ -1,6 +1,8 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; +import com.easypost.exception.General.MissingParameterError; import com.easypost.model.Report; import com.easypost.model.ReportCollection; import org.junit.jupiter.api.BeforeAll; @@ -13,9 +15,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; public final class ReportTest { private static TestUtils.VCR vcr; @@ -31,33 +35,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); + } - return Report.create(reportParams); + /** + * Test creating a report. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateReport() throws EasyPostException { + vcr.setUpTest("create_report"); + + Report report = createBasicReport(); + + assertInstanceOf(Report.class, report); + assertTrue(report.getId().startsWith("shprep_")); } /** @@ -79,22 +97,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 +125,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 +146,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,48 +167,57 @@ 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(); assertTrue(reportsList.size() <= Fixtures.pageSize()); assertNotNull(reports.getHasMore()); - assertTrue(reportsList.stream().allMatch(report -> report instanceof Report)); + assertTrue(reportsList.stream().allMatch(report -> report != null)); } /** - * Test throwing an error when creating a report with no report type set. + * Test retrieving the next page. * * @throws EasyPostException when the request fails. */ @Test - public void testCreateNoType() throws EasyPostException { - vcr.setUpTest("create_report_no_type"); + public void testGetNextPage() throws EasyPostException { + vcr.setUpTest("get_next_page"); Map params = new HashMap<>(); - params.put("type", "test"); + params.put("page_size", Fixtures.pageSize()); + params.put("type", Fixtures.reportType()); + ReportCollection collection = vcr.client.report.all(params); + + try { + ReportCollection nextPage = vcr.client.report.getNextPage(collection, Fixtures.pageSize()); - // 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, () -> Report.create(params)); + assertNotNull(nextPage); + + String firstIdOfFirstPage = collection.getReports().get(0).getId(); + String firstIdOfSecondPage = nextPage.getReports().get(0).getId(); + + assertNotEquals(firstIdOfFirstPage, firstIdOfSecondPage); + } catch (EndOfPaginationError e) { // There's no next page, that's not a failure + assertTrue(true); + } catch (Exception e) { // Any other exception is a failure + fail(); + } } /** - * Test throwing an error when retrieving all reports with no report type set. + * Test creating a report without type. * * @throws EasyPostException when the request fails. */ @Test - public void testAllNoType() throws EasyPostException { - vcr.setUpTest("all_reports_no_type"); + public void testCreateReportWithoutType() throws EasyPostException { + Map reportParams = new HashMap<>(); - Map params = new HashMap<>(); - params.put("type", "test"); + reportParams.put("start_date", Fixtures.reportDate()); + reportParams.put("end_date", Fixtures.reportDate()); - // 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, () -> Report.all(params)); + assertThrows(MissingParameterError.class, () -> vcr.client.report.create(reportParams)); } } diff --git a/src/test/java/com/easypost/ScanFormTest.java b/src/test/java/com/easypost/ScanFormTest.java index 6ebd900b1..c169d1c1c 100644 --- a/src/test/java/com/easypost/ScanFormTest.java +++ b/src/test/java/com/easypost/ScanFormTest.java @@ -1,6 +1,7 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; import com.easypost.model.ScanForm; import com.easypost.model.ScanFormCollection; import com.easypost.model.Shipment; @@ -12,10 +13,11 @@ 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.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; public final class ScanFormTest { private static TestUtils.VCR vcr; @@ -51,7 +53,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); @@ -59,7 +61,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; } @@ -74,10 +76,10 @@ 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); - assertThat(scanForm).usingRecursiveComparison().isEqualTo(retrievedScanForm); + assertTrue(scanForm.equals(retrievedScanForm)); } /** @@ -92,11 +94,40 @@ 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()); assertNotNull(scanForms.getHasMore()); - assertTrue(scanFormsList.stream().allMatch(scanForm -> scanForm instanceof ScanForm)); + assertTrue(scanFormsList.stream().allMatch(scanForm -> scanForm != null)); + } + + /** + * Test retrieving the next page. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPage() throws EasyPostException { + vcr.setUpTest("get_next_page"); + + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + ScanFormCollection collection = vcr.client.scanForm.all(params); + + try { + ScanFormCollection nextPage = vcr.client.scanForm.getNextPage(collection, Fixtures.pageSize()); + + assertNotNull(nextPage); + + String firstIdOfFirstPage = collection.getScanForms().get(0).getId(); + String firstIdOfSecondPage = nextPage.getScanForms().get(0).getId(); + + assertNotEquals(firstIdOfFirstPage, firstIdOfSecondPage); + } catch (EndOfPaginationError e) { // There's no next page, that's not a failure + assertTrue(true); + } catch (Exception e) { // Any other exception is a failure + fail(); + } } } diff --git a/src/test/java/com/easypost/ShipmentTest.java b/src/test/java/com/easypost/ShipmentTest.java index 2aa470317..18360718a 100644 --- a/src/test/java/com/easypost/ShipmentTest.java +++ b/src/test/java/com/easypost/ShipmentTest.java @@ -1,17 +1,21 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; import com.easypost.model.Address; -import com.easypost.model.Fee; +import com.easypost.model.EndShipper; +import com.easypost.model.EstimatedDeliveryDate; import com.easypost.model.Form; import com.easypost.model.Parcel; import com.easypost.model.Rate; +import com.easypost.model.RecommendShipDateForShipmentResult; import com.easypost.model.Shipment; import com.easypost.model.ShipmentCollection; -import com.easypost.model.Smartrate; -import com.easypost.model.SmartrateAccuracy; +import com.easypost.model.SmartRate; +import com.easypost.model.SmartRateAccuracy; +import com.easypost.utils.Utilities; +import com.google.common.collect.ImmutableList; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import java.util.ArrayList; @@ -21,13 +25,14 @@ 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.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; public final class ShipmentTest { private static TestUtils.VCR vcr; @@ -42,6 +47,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. * @@ -67,7 +81,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,10 +95,10 @@ 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); - assertThat(shipment).usingRecursiveComparison().isEqualTo(retrievedShipment); + assertTrue(shipment.equals(retrievedShipment)); } /** @@ -99,38 +113,157 @@ 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(); assertTrue(shipments.size() <= Fixtures.pageSize()); assertNotNull(shipmentCollection.getHasMore()); - assertTrue(shipments.stream().allMatch(shipment -> shipment instanceof Shipment)); + assertTrue(shipments.stream().allMatch(shipment -> shipment != null)); + } + + /** + * Test the parameter handoff when retrieving all shipments. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testAllParameterHandOff() throws EasyPostException { + vcr.setUpTest("all_parameter_hand_off"); + + boolean includeChildren = true; + boolean purchased = false; + + Map params = new HashMap(); + params.put("page_size", Fixtures.pageSize()); + + params.put("include_children", includeChildren); + params.put("purchased", purchased); + + ShipmentCollection shipmentCollection = vcr.client.shipment.all(params); + + assertEquals(includeChildren, shipmentCollection.getIncludeChildren()); + assertEquals(purchased, shipmentCollection.getPurchased()); + } + + /** + * Test retrieving the next page. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPage() throws EasyPostException { + vcr.setUpTest("get_next_page"); + + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + ShipmentCollection collection = vcr.client.shipment.all(params); + + try { + ShipmentCollection nextPage = vcr.client.shipment.getNextPage(collection, Fixtures.pageSize()); + + assertNotNull(nextPage); + + String firstIdOfFirstPage = collection.getShipments().get(0).getId(); + String firstIdOfSecondPage = nextPage.getShipments().get(0).getId(); + + assertNotEquals(firstIdOfFirstPage, firstIdOfSecondPage); + } catch (EndOfPaginationError e) { // There's no next page, that's not a failure + assertTrue(true); + } catch (Exception e) { // Any other exception is a failure + fail(); + } + } + + /** + * Test the parameter handoff when constructing the next page parameter map. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPageParameterHandOff() throws EasyPostException { + vcr.setUpTest("get_next_page_parameter_hand_off"); + + boolean includeChildren = true; + boolean purchased = false; + + Map params = new HashMap(); + params.put("page_size", Fixtures.pageSize()); + + params.put("include_children", includeChildren); + params.put("purchased", purchased); + + ShipmentCollection shipmentCollection = vcr.client.shipment.all(params); + + // Can't access protected method directly, need to make a temporary extended + // class, yay + // Downside, ShipmentCollection and Shipment are no longer final because they + // need to be extended + final class ExtendedShipmentCollection extends ShipmentCollection { + + ExtendedShipmentCollection(ShipmentCollection shipmentCollection) { + setPurchased(shipmentCollection.getPurchased()); + setIncludeChildren(shipmentCollection.getIncludeChildren()); + } + + @Override + public List getShipments() { + + final class ExtendedShipment extends Shipment { + @Override + public String getId() { + return "shp_123"; + } + } + + return new ArrayList(ImmutableList.of(new ExtendedShipment())); + } + + public Map getNextPageParams() throws EndOfPaginationError { + return super.buildNextPageParameters(getShipments(), null); + } + } + + ExtendedShipmentCollection extendedShipmentCollection = new ExtendedShipmentCollection(shipmentCollection); + Map nextPageParams = extendedShipmentCollection.getNextPageParams(); + + assertEquals(includeChildren, nextPageParams.get("include_children")); + assertEquals(purchased, nextPageParams.get("purchased")); } /** - * 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(); - Shipment boughtShipment = shipment.buy(shipment.lowestRate()); + Shipment boughtShipment = vcr.client.shipment.buy(shipment.getId(), shipment.lowestRate()); assertNotNull(boughtShipment.getPostageLabel()); } /** - * 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 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()); } /** @@ -144,7 +277,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 +302,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(shipment.getId(), params); assertNotNull(shipmentWithLabel.getPostageLabel().getLabelZplUrl()); } @@ -180,7 +313,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 +338,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(shipment.getId(), insuranceData); assertEquals("100.00", shipmentWithInsurance.getInsurance()); } @@ -229,13 +362,13 @@ public void testRefund() throws EasyPostException { Shipment shipment = createOneCallBuyShipment(); - Shipment refundedShipment = shipment.refund(); + Shipment refundedShipment = vcr.client.shipment.refund(shipment.getId()); assertEquals("submitted", refundedShipment.getRefundStatus()); } /** - * Test getting Smartrates from a shipment. + * Test getting SmartRates from a shipment. * * @throws EasyPostException when the request fails. */ @@ -248,9 +381,9 @@ 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); + SmartRate smartRate = smartRates.get(0); assertEquals(rate.getId(), smartRate.getId()); assertNotNull(smartRate.getTimeInTransit().getPercentile50()); @@ -282,7 +415,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 +441,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_")); @@ -321,22 +454,24 @@ 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"); - Address fromAddress = Address.create(Fixtures.caAddress1()); - Address toAddress = Address.create(Fixtures.caAddress1()); - Parcel parcel = Parcel.create(Fixtures.basicParcel()); + // 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.caAddress2()); + 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("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_")); @@ -359,8 +494,8 @@ 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("GroundAdvantage", lowestRate.getService()); + assertEquals(5.93, lowestRate.getRate(), 0.01); assertEquals("USPS", lowestRate.getCarrier()); // Test lowest rate with service filter (this rate is higher than the lowest but @@ -368,18 +503,18 @@ 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(6.90, 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); }); } /** - * Test getting the lowest Smartrate of a shipment. + * Test getting the lowest SmartRate of a shipment. * * @throws EasyPostException when the request fails. */ @@ -388,20 +523,60 @@ 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(), 3, + SmartRateAccuracy.Percentile90); // Test lowest smartrate with valid filters - assertEquals("First", lowestSmartRateFilters.getService()); - assertEquals(5.57, lowestSmartRateFilters.getRate(), 0.01); + assertEquals("GroundAdvantage", lowestSmartRateFilters.getService()); + assertEquals(5.93, 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); }); } + /** + * Test getting smart rates for a shipment. + * + * @throws EasyPostException if an exception is thrown. + */ + @Test + public void testGetSmartRate() throws EasyPostException { + vcr.setUpTest("get_smartrate_list"); + + Shipment shipment = createBasicShipment(); + + List rates = vcr.client.shipment.smartRates(shipment.getId()); + + assertInstanceOf(List.class, rates); + + for (SmartRate rate : rates) { + assertInstanceOf(SmartRate.class, rate); + } + } + + /** + * Test retriving lowest smart rate. + * + * @throws EasyPostException if an exception is thrown. + */ + @Test + public void testFindLowestSmartRate() throws EasyPostException { + vcr.setUpTest("get_lowest_smartrate"); + + Shipment shipment = createBasicShipment(); + + List rates = vcr.client.shipment.smartRates(shipment.getId()); + SmartRate lowestSmartRate = vcr.client.shipment.findLowestSmartRate(rates, 3, SmartRateAccuracy.Percentile85); + + assertEquals("GroundAdvantage", lowestSmartRate.getService()); + assertEquals(5.93, lowestSmartRate.getRate(), 0.01); + assertEquals("USPS", lowestSmartRate.getCarrier()); + } + /** * Test getting the lowest smartrate from a list of smartrates. * @@ -412,18 +587,18 @@ 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 = Utilities.findLowestSmartRate(smartRates, 3, SmartRateAccuracy.Percentile90); + assertEquals("GroundAdvantage", lowestSmartRate.getService()); + assertEquals(5.93, 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); + Utilities.findLowestSmartRate(smartRates, 0, SmartRateAccuracy.Percentile90); }); } @@ -434,117 +609,162 @@ 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.generateForm(formType, Fixtures.rmaFormOptions()); + Shipment shipmentWithForm = vcr.client.shipment.generateForm(shipment.getId(), formType); - 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); } /** - * Test creating a shipment with a carbon offset. + * Test generating a form from a shipment with option. * * @throws EasyPostException when the request fails. */ @Test - public void testCreateShipmentWithCarbonOffset() throws EasyPostException { - vcr.setUpTest("create_shipment_with_carbon_offset"); + public void testGenerateFormWithOption() throws EasyPostException { + vcr.setUpTest("generate_form_with_option"); + + Shipment shipment = createOneCallBuyShipment(); + String formType = "return_packing_slip"; - Shipment shipment = Shipment.create(Fixtures.basicShipment(), true); + Shipment shipmentWithForm = vcr.client.shipment.generateForm(shipment.getId(), formType, + Fixtures.rmaFormOptions()); - assertInstanceOf(Shipment.class, shipment); + assertTrue(shipmentWithForm.getForms().size() > 0); - List rates = shipment.getRates(); - assertNotNull(rates); + Form form = shipmentWithForm.getForms().get(0); - Rate rate = rates.get(0); - assertNotNull(rate.getCarbonOffset()); - assertNotNull(rate.getCarbonOffset().getPrice()); + assertEquals(formType, form.getFormType()); + assertTrue(form.getFormUrl() != null); } /** - * Test buying a shipment with a carbon offset. + * Test buying a shipment with an EndShipper ID with lowest rate. * * @throws EasyPostException when the request fails. */ @Test - public void testBuyShipmentWithCarbonOffset() throws EasyPostException { - vcr.setUpTest("buy_shipment_with_carbon_offset"); + public void testBuyShipmentWithEndShipperIdWithRate() throws EasyPostException { + vcr.setUpTest("buy_shipment_with_end_shipper_id_with_rate"); - Shipment shipment = Shipment.create(Fixtures.fullShipment()); + EndShipper endShipper = vcr.client.endShipper.create(Fixtures.caAddress1()); - Rate rate = shipment.lowestRate(); + Shipment shipment = vcr.client.shipment.create(Fixtures.basicShipment()); + Shipment boughtShipment = vcr.client.shipment.buy(shipment.getId(), shipment.lowestRate(), endShipper.getId()); - Shipment boughtShipment = shipment.buy(rate, true); + assertNotNull(boughtShipment.getPostageLabel()); + } - assertInstanceOf(Shipment.class, shipment); + /** + * 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"); - List fees = boughtShipment.getFees(); - assertNotNull(fees); + EndShipper endShipper = vcr.client.endShipper.create(Fixtures.caAddress1()); - boolean foundCarbonOffset = false; - for (Fee fee : fees) { - if (fee.getType().equals("CarbonOffsetFee")) { - foundCarbonOffset = true; - break; - } + 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()); + } + + /** + * Tests that we retrieve time-in-transit data for each of the Rates of a + * Shipment. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testRetrieveEstimatedDeliveryDate() throws EasyPostException { + vcr.setUpTest("retrieve_estimated_delivery_date"); + + Shipment shipment = vcr.client.shipment.create(Fixtures.basicShipment()); + + List estimatedDeliveryDates = vcr.client.shipment + .retrieveEstimatedDeliveryDate(shipment.getId(), Fixtures.plannedShipDate()); + for (EstimatedDeliveryDate estimatedDeliveryDate : estimatedDeliveryDates) { + assertNotNull(estimatedDeliveryDate.getEasypostTimeInTransitData()); + assertNotNull(estimatedDeliveryDate.getEasypostTimeInTransitData().getEasypostEstimatedDeliveryDate()); + assertNotNull(estimatedDeliveryDate.getEasypostTimeInTransitData().getDaysInTransit()); + assertNotNull(estimatedDeliveryDate.getEasypostTimeInTransitData().getDaysInTransit().getPercentile99()); } - assertTrue(foundCarbonOffset); } /** - * Test one-call buying a shipment with a carbon offset. + * Test that we retrieve SmartRates when providing a shipment and desired + * delivery date. * * @throws EasyPostException when the request fails. */ @Test - public void testOneCallBuyShipmentWithCarbonOffset() throws EasyPostException { - vcr.setUpTest("one_call_buy_shipment_with_carbon_offset"); + public void testRetrieveRecommendDate() throws EasyPostException { + vcr.setUpTest("retrieve_recommend_date"); - Shipment shipment = Shipment.create(Fixtures.oneCallBuyShipment(), true); + Shipment shipment = vcr.client.shipment.create(Fixtures.basicShipment()); - assertInstanceOf(Shipment.class, shipment); + List estimatedDeliveryDates = vcr.client.shipment + .recommendShipDate(shipment.getId(), Fixtures.desiredDeliveryDate()); + for (RecommendShipDateForShipmentResult estimatedDeliveryDate : estimatedDeliveryDates) { + assertNotNull(estimatedDeliveryDate.getEasypostTimeInTransitData()); + } + } - List fees = shipment.getFees(); - assertNotNull(fees); + /** + * Test that we create and buy a Shipment with Luma. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testCreateAndBuyLuma() throws EasyPostException { + vcr.setUpTest("create_and_buy_luma"); - boolean foundCarbonOffset = false; - for (Fee fee : fees) { - if (fee.getType().equals("CarbonOffsetFee")) { - foundCarbonOffset = true; - break; - } - } - assertTrue(foundCarbonOffset); + Map shipmentData = Fixtures.oneCallBuyShipment(); + shipmentData.remove("service"); + shipmentData.put("ruleset_name", Fixtures.lumaRulesetName()); + shipmentData.put("planned_ship_date", Fixtures.lumaPlannedShipDate()); + + Shipment shipment = vcr.client.shipment.createAndBuyLuma(shipmentData); + + assertNotNull(shipment.getPostageLabel()); } /** - * Test re-rating a shipment with a carbon offset. + * Test that we buy a Shipment with Luma. * * @throws EasyPostException when the request fails. */ @Test - public void testRegenerateRatesWithCarbonOffset() throws EasyPostException { - vcr.setUpTest("regenerate_rates_with_carbon_offset"); + public void testBuyLuma() throws EasyPostException { + vcr.setUpTest("buy_luma"); - Shipment shipment = Shipment.create(Fixtures.oneCallBuyShipment()); - List baseRates = shipment.getRates(); + Shipment shipment = vcr.client.shipment.create(Fixtures.basicShipment()); - Shipment shipmentWithNewRatesWithCarbon = shipment.newRates(true); - List newCarbonRates = shipmentWithNewRatesWithCarbon.getRates(); + Map params = new HashMap(); + params.put("ruleset_name", Fixtures.lumaRulesetName()); + params.put("planned_ship_date", Fixtures.lumaPlannedShipDate()); - Rate baseRate = baseRates.get(0); - Rate newCarbonRate = newCarbonRates.get(0); + Shipment boughtShipment = vcr.client.shipment.buyLuma( + shipment.getId(), + params + ); - assertNull(baseRate.getCarbonOffset()); - assertNotNull(newCarbonRate.getCarbonOffset()); + assertNotNull(boughtShipment.getPostageLabel()); } } diff --git a/src/test/java/com/easypost/SmartRateTest.java b/src/test/java/com/easypost/SmartRateTest.java new file mode 100644 index 000000000..a51c913a5 --- /dev/null +++ b/src/test/java/com/easypost/SmartRateTest.java @@ -0,0 +1,70 @@ +package com.easypost; + +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import com.easypost.exception.EasyPostException; +import com.easypost.model.DeliveryDateForZipPairEstimate; +import com.easypost.model.EstimateDeliveryDateForZipPairResult; +import com.easypost.model.RecommendShipDateForZipPairResult; +import com.easypost.model.ShipDateForZipPairRecommendation; + +public class SmartRateTest { + 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("smart_rate", TestUtils.ApiKey.TEST); + } + + /** + * Test that we retrieve SmartRates when provided a from/to zip and desired delivery date. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testRetrieveRecommendShipDate() throws EasyPostException { + vcr.setUpTest("retrieve_recommend_ship_date"); + Map params = new HashMap(); + params.put("from_zip", Fixtures.caAddress1().get("zip")); + params.put("to_zip", Fixtures.caAddress2().get("zip")); + params.put("desired_delivery_date", Fixtures.desiredDeliveryDate()); + params.put("carriers", Collections.singletonList(Fixtures.usps())); + + RecommendShipDateForZipPairResult results = vcr.client.smartRate.recommendShipDate(params); + for (ShipDateForZipPairRecommendation entry : results.getResults()) { + assertNotNull(entry.getEasypostTimeInTransitData()); + } + } + + /** + * Test that we retrieve SmartRates when provided a from/to zip and planned ship date. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testRetrieveEstimatedDeliveryDate() throws EasyPostException { + vcr.setUpTest("retrieve_estimated_delivery_date"); + Map params = new HashMap(); + params.put("from_zip", Fixtures.caAddress1().get("zip")); + params.put("to_zip", Fixtures.caAddress2().get("zip")); + params.put("planned_ship_date", Fixtures.plannedShipDate()); + params.put("carriers", Collections.singletonList(Fixtures.usps())); + + EstimateDeliveryDateForZipPairResult results = vcr.client.smartRate.estimateDeliveryDate(params); + for (DeliveryDateForZipPairEstimate entry : results.getResults()) { + assertNotNull(entry.getEasypostTimeInTransitData()); + } + } +} diff --git a/src/test/java/com/easypost/TestUtils.java b/src/test/java/com/easypost/TestUtils.java index 0597e669a..2f4b04237 100644 --- a/src/test/java/com/easypost/TestUtils.java +++ b/src/test/java/com/easypost/TestUtils.java @@ -4,15 +4,21 @@ 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 com.easypost.exception.General.MissingParameterError; +import com.easypost.service.EasyPostClient; +import com.google.common.collect.ImmutableList; +import javax.net.ssl.HttpsURLConnection; 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; +import java.util.function.Function; public abstract class TestUtils { public enum ApiKey { @@ -24,29 +30,13 @@ 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. @@ -100,7 +90,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"; @@ -110,17 +100,17 @@ 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; } 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. @@ -131,12 +121,22 @@ public boolean isRecording() { return vcr.getMode() == Mode.Record; } + /** + * Constructor. + * + * @throws MissingParameterError if a required parameter is missing. + */ + public VCR() throws MissingParameterError { + this(null, ApiKey.TEST); + } + /** * Constructor. * * @param testCassettesFolder The folder where the cassettes will be stored. + * @throws MissingParameterError if a required parameter is missing. */ - public VCR(String testCassettesFolder) { + public VCR(String testCassettesFolder) throws MissingParameterError { this(testCassettesFolder, ApiKey.TEST); } @@ -145,30 +145,45 @@ public VCR(String testCassettesFolder) { * * @param testCassettesFolder The folder where the cassettes will be stored. * @param apiKey The API key to use. + * @throws MissingParameterError if a required parameter is missing. */ - 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 if a required parameter is missing. + */ + 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 if a required parameter is missing. */ - 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); advancedSettings.censors = new Censors("REDACTED").censorHeadersByKeys(HEADER_CENSORS) .censorQueryParametersByKeys(QUERY_CENSORS).censorBodyElementsByKeys(BODY_CENSORS); + advancedSettings.timeFrame = TimeFrame.months12(); + advancedSettings.whenExpired = ExpirationActions.Warn; + vcr = new com.easypost.easyvcr.VCR(advancedSettings); this.apiKey = apiKey; - - this.testCassettesFolder = Paths.get(getSourceFileDirectory(), CASSETTES_PATH) - .toString(); // create the "cassettes" folder + this.client = new EasyPostClient(apiKey); + this.testCassettesFolder = + Paths.get(getSourceFileDirectory(), CASSETTES_PATH).toString(); // create the "cassettes" folder if (testCassettesFolder != null) { this.testCassettesFolder = Paths.get(this.testCassettesFolder, testCassettesFolder) @@ -182,29 +197,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 if a required parameter is missing. */ - public void setUpTest(String cassetteName) { - setUpTest(cassetteName, null); + public void setUpTest(String cassetteName) throws MissingParameterError { + setUpTest(cassetteName, ""); } /** @@ -212,10 +212,11 @@ public void setUpTest(String cassetteName) { * * @param cassetteName The name of the cassette to use. * @param overrideApiKey The API key to use. + * @throws MissingParameterError if a required parameter is missing. */ - 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); @@ -234,8 +235,16 @@ public void setUpTest(String cassetteName, String overrideApiKey) { vcr.replay(); } + Function vcrUrlFunction = (url) -> { + try { + return vcr.getHttpUrlConnection(url).openConnectionSecure(); + } catch (Exception vcrException) { + throw new RuntimeException(vcrException); + } + }; + // set VCR to be used during requests - EasyPost._vcr = vcr; + EasyPost._vcrUrlFunction = vcrUrlFunction; } } } diff --git a/src/test/java/com/easypost/ThreadTest.java b/src/test/java/com/easypost/ThreadTest.java index 77e7e548b..1d19199ae 100644 --- a/src/test/java/com/easypost/ThreadTest.java +++ b/src/test/java/com/easypost/ThreadTest.java @@ -2,6 +2,7 @@ import com.easypost.exception.EasyPostException; import com.easypost.model.Order; +import com.easypost.service.EasyPostClient; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -10,6 +11,8 @@ import java.util.List; import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; + public final class ThreadTest { private static Map defaultFromAddress = new HashMap(); private static Map defaultToAddress = new HashMap(); @@ -22,7 +25,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"); @@ -97,8 +100,6 @@ static Map orderShipment() throws EasyPostException { /** * Test creating orders. - * - * @throws EasyPostException when the request fails. */ private static class CreateOrders implements Runnable { private List> orders; @@ -107,12 +108,14 @@ private static class CreateOrders implements Runnable { this.orders = orders; } + @Override public void run() { try { 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 +125,23 @@ public void run() { } } } -} + /** + * Test create multiple EasyPostClient with different API keys. + * + * @throws EasyPostException if an exception is thrown. + */ + @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(Constants.Http.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 82c99826d..f673781ad 100644 --- a/src/test/java/com/easypost/TrackerTest.java +++ b/src/test/java/com/easypost/TrackerTest.java @@ -1,19 +1,24 @@ package com.easypost; import com.easypost.exception.EasyPostException; +import com.easypost.exception.General.EndOfPaginationError; import com.easypost.model.Tracker; import com.easypost.model.TrackerCollection; +import com.google.common.collect.ImmutableList; 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; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; public final class TrackerTest { private static TestUtils.VCR vcr; @@ -54,7 +59,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); } /** @@ -68,7 +73,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_")); @@ -87,41 +92,155 @@ 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(); assertTrue(trackersList.size() <= Fixtures.pageSize()); assertNotNull(trackers.getHasMore()); - assertTrue(trackersList.stream().allMatch(tracker -> tracker instanceof Tracker)); + assertTrue(trackersList.stream().allMatch(tracker -> tracker != null)); } /** - * Test creating a list of trackers. + * Test the parameter handoff when retrieving all trackers. * * @throws EasyPostException when the request fails. */ @Test - public void testCreateList() throws EasyPostException { - vcr.setUpTest("create_list"); + public void testAllParameterHandOff() throws EasyPostException { + vcr.setUpTest("all_parameter_hand_off"); + + String trackingCode = "something"; + String carrier = "something else"; + + Map params = new HashMap(); + params.put("page_size", Fixtures.pageSize()); + + params.put("tracking_code", trackingCode); + params.put("carrier", carrier); + + TrackerCollection trackerCollection = vcr.client.tracker.all(params); + + assertEquals(trackingCode, trackerCollection.getTrackingCode()); + assertEquals(carrier, trackerCollection.getCarrier()); + } + + /** + * Test retrieving the next page. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPage() throws EasyPostException { + vcr.setUpTest("get_next_page"); Map params = new HashMap<>(); - String[] trackingCodes = new String[] { - "EZ1000000001", - "EZ1000000002", - "EZ1000000003" - }; + params.put("page_size", Fixtures.pageSize()); + TrackerCollection collection = vcr.client.tracker.all(params); + + try { + TrackerCollection nextPage = vcr.client.tracker.getNextPage(collection, Fixtures.pageSize()); + + assertNotNull(nextPage); + + String firstIdOfFirstPage = collection.getTrackers().get(0).getId(); + String firstIdOfSecondPage = nextPage.getTrackers().get(0).getId(); + + assertNotEquals(firstIdOfFirstPage, firstIdOfSecondPage); + } catch (EndOfPaginationError e) { // There's no next page, that's not a failure + assertTrue(true); + } catch (Exception e) { // Any other exception is a failure + fail(); + } + } + + /** + * Test the parameter handoff when constructing the next page parameter map. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testGetNextPageParameterHandOff() throws EasyPostException { + vcr.setUpTest("get_next_page_parameter_hand_off"); + + String trackingCode = "something"; + String carrier = "something else"; + + Map params = new HashMap(); + params.put("page_size", Fixtures.pageSize()); + + params.put("tracking_code", trackingCode); + params.put("carrier", carrier); - for (int i = 0; i < trackingCodes.length; i++) { - Map tracker = new HashMap<>(); + TrackerCollection trackerCollection = vcr.client.tracker.all(params); - tracker.put("tracking_code", trackingCodes[i]); - params.put(String.valueOf(i), tracker); + // Can't access protected method directly, need to make a temporary extended class, yay + // Downside, TrackerCollection and Tracker are no longer final because they need to be extended + final class ExtendedTrackerCollection extends TrackerCollection { + + ExtendedTrackerCollection(TrackerCollection trackerCollection) { + setTrackingCode(trackerCollection.getTrackingCode()); + setCarrier(trackerCollection.getCarrier()); + } + + @Override + public List getTrackers() { + + final class ExtendedTracker extends Tracker { + @Override + public String getId() { + return "trk_123"; + } + } + + return new ArrayList(ImmutableList.of(new ExtendedTracker())); + } + + public Map getNextPageParams() throws EndOfPaginationError { + return super.buildNextPageParameters(getTrackers(), null); + } } - boolean response = Tracker.createList(params); + ExtendedTrackerCollection extendedShipmentCollection = new ExtendedTrackerCollection(trackerCollection); + Map nextPageParams = extendedShipmentCollection.getNextPageParams(); + + assertEquals(trackingCode, nextPageParams.get("tracking_code")); + assertEquals(carrier, nextPageParams.get("carrier")); + } + + /** + * Test retrieving a batch of trackers. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testRetrieveBatch() throws EasyPostException { + vcr.setUpTest("retrieve_batch"); + + Tracker tracker = createBasicTracker(); + + Map params = new HashMap<>(); + params.put("tracking_codes", ImmutableList.of(tracker.getTrackingCode())); + + TrackerCollection trackers = vcr.client.tracker.retrieveBatch(params); + + List trackersList = trackers.getTrackers(); + + assertTrue(trackersList.stream().allMatch(singleTracker -> singleTracker != null)); + } + + /** + * Test deleting a tracker. + * + * @throws EasyPostException when the request fails. + */ + @Test + public void testDelete() throws EasyPostException { + vcr.setUpTest("delete"); + + Tracker tracker = createBasicTracker(); - // This endpoint returns nothing so we assert the function returns true - assertTrue(response); + // Nothing gets returned here, simply ensure no error gets raised + vcr.client.tracker.delete(tracker.getId()); } } diff --git a/src/test/java/com/easypost/UserTest.java b/src/test/java/com/easypost/UserTest.java index b56e7bdb2..b33ee2bcf 100644 --- a/src/test/java/com/easypost/UserTest.java +++ b/src/test/java/com/easypost/UserTest.java @@ -1,9 +1,9 @@ package com.easypost; import com.easypost.exception.EasyPostException; -import com.easypost.model.ApiKey; -import com.easypost.model.ApiKeys; +import com.easypost.exception.General.EndOfPaginationError; import com.easypost.model.Brand; +import com.easypost.model.ChildUserCollection; import com.easypost.model.User; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; @@ -13,10 +13,13 @@ 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.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; public final class UserTest { private static String testUserId = null; @@ -39,8 +42,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 @@ -72,7 +75,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; } @@ -90,7 +93,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_")); @@ -103,7 +106,7 @@ public void testRetrieve() throws EasyPostException { * @return User object */ private static User retrieveMe() throws EasyPostException { - return User.retrieveMe(); + return vcr.client.user.retrieveMe(); } /** @@ -115,7 +118,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_")); @@ -137,7 +140,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_")); @@ -155,58 +158,79 @@ public void testDelete() throws EasyPostException { User user = createUser(); - user.delete(); + assertDoesNotThrow(() -> vcr.client.user.delete(user.getId())); } /** - * Test retrieving all API keys. + * Test updating a brand. * * @throws EasyPostException when the request fails. */ @Test - public void testAllApiKeys() throws EasyPostException { - vcr.setUpTest("all_api_keys"); + public void testUpdateBrand() throws EasyPostException { + vcr.setUpTest("update_brand"); + + User user = createUser(); - ApiKeys apikeys = ApiKeys.all(); + String color = "#123456"; - assertInstanceOf(ApiKeys.class, apikeys); + Map params = new HashMap<>(); + params.put("color", color); + + Brand brand = vcr.client.user.updateBrand(user.getId(), params); + + assertInstanceOf(Brand.class, brand); + assertTrue(brand.getId().startsWith("brd_")); + assertEquals(color, brand.getColor()); } /** - * Test retrieving all API keys for a user. + * Test retrieving a paginated list of children. * * @throws EasyPostException when the request fails. */ @Test - public void testApiKeys() throws EasyPostException { - vcr.setUpTest("api_keys"); + public void testAllChildren() throws EasyPostException { + vcr.setUpTest("all_children"); - User user = createUser(); + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); - List apiKeys = user.apiKeys(); - assertNotNull(apiKeys); + ChildUserCollection children = vcr.client.user.allChildren(params); + + List childrenList = children.getChildren(); + + assertTrue(childrenList.size() <= Fixtures.pageSize()); + assertNotNull(children.getHasMore()); + assertTrue(childrenList.stream().allMatch(children_user -> children_user != null)); } /** - * Test updating a brand. + * Test retrieving the next page of child users. * * @throws EasyPostException when the request fails. */ @Test - public void testUpdateBrand() throws EasyPostException { - vcr.setUpTest("update_brand"); + public void testGetNextPage() throws EasyPostException { + vcr.setUpTest("get_next_page"); - User user = createUser(); + Map params = new HashMap<>(); + params.put("page_size", Fixtures.pageSize()); + ChildUserCollection collection = vcr.client.user.allChildren(params); - String color = "#123456"; + try { + ChildUserCollection nextPage = vcr.client.user.getNextPage(collection, Fixtures.pageSize()); - Map params = new HashMap<>(); - params.put("color", color); + assertNotNull(nextPage); - Brand brand = user.updateBrand(params); + String firstIdOfFirstPage = collection.getChildren().get(0).getId(); + String firstIdOfSecondPage = nextPage.getChildren().get(0).getId(); - assertInstanceOf(Brand.class, brand); - assertTrue(brand.getId().startsWith("brd_")); - assertEquals(color, brand.getColor()); + assertNotEquals(firstIdOfFirstPage, firstIdOfSecondPage); + } catch (EndOfPaginationError e) { // There's no next page, that's not a failure + assertTrue(true); + } catch (Exception e) { // Any other exception is a failure + fail(); + } } } diff --git a/src/test/java/com/easypost/WebhookTest.java b/src/test/java/com/easypost/WebhookTest.java index a2376e1ab..c35f2400f 100644 --- a/src/test/java/com/easypost/WebhookTest.java +++ b/src/test/java/com/easypost/WebhookTest.java @@ -1,24 +1,27 @@ package com.easypost; -import com.easypost.exception.EasyPostException; -import com.easypost.model.Event; -import com.easypost.model.Webhook; -import com.easypost.model.WebhookCollection; +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; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; -import java.util.HashMap; -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.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; +import com.easypost.exception.EasyPostException; +import com.easypost.model.Event; +import com.easypost.model.Webhook; +import com.easypost.model.WebhookCustomHeader; +import com.easypost.utils.Utilities; +import com.google.common.collect.ImmutableMap; @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public final class WebhookTest { @@ -42,8 +45,7 @@ public static void setup() throws EasyPostException { public void cleanup() { if (testWebhookId != null) { try { - Webhook webhook = Webhook.retrieve(testWebhookId); - webhook.delete(); + vcr.client.webhook.delete(testWebhookId); testWebhookId = null; } catch (Exception e) { // in case we try to delete something that's already been deleted @@ -51,6 +53,22 @@ public void cleanup() { } } + /** + * Create a webhook. + * + * @return Webhook object + */ + private static Webhook createBasicWebhook() throws EasyPostException { + Map params = new HashMap<>(); + params.put("url", Fixtures.webhookUrl()); + params.put("webhook_secret", Fixtures.webhookSecret()); + params.put("custom_headers", Fixtures.webhookCustomHeaders()); + + Webhook webhook = vcr.client.webhook.create(params); + testWebhookId = webhook.getId(); // trigger deletion after test + return webhook; + } + /** * Test creating a webhook. * @@ -65,20 +83,9 @@ public void testCreate() throws EasyPostException { assertInstanceOf(Webhook.class, webhook); assertTrue(webhook.getId().startsWith("hook_")); assertEquals(Fixtures.webhookUrl(), webhook.getUrl()); - } - - /** - * Create a webhook. - * - * @return Webhook object - */ - private static Webhook createBasicWebhook() throws EasyPostException { - Map params = new HashMap<>(); - params.put("url", Fixtures.webhookUrl()); - - Webhook webhook = Webhook.create(params); - testWebhookId = webhook.getId(); // trigger deletion after test - return webhook; + WebhookCustomHeader customHeader = webhook.getCustomHeaders().get(0); + assertEquals("test", customHeader.getName()); + assertEquals("header", customHeader.getValue()); } /** @@ -92,10 +99,10 @@ 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); - assertThat(webhook).usingRecursiveComparison().isEqualTo(retrievedWebhook); + assertTrue(webhook.equals(retrievedWebhook)); } /** @@ -107,11 +114,16 @@ public void testRetrieve() throws EasyPostException { public void testAll() throws EasyPostException { vcr.setUpTest("all"); - WebhookCollection webhooks = Webhook.all(); + createBasicWebhook(); - List webhooksList = webhooks.getWebhooks(); + List webhooks = vcr.client.webhook.all(); - assertTrue(webhooksList.stream().allMatch(webhook -> webhook instanceof Webhook)); + assertTrue(webhooks.size() > 0); + assertTrue(webhooks.stream().allMatch(webhook -> webhook != null)); + // Test that deserialization worked by accessing a field with an underscore + for (Webhook webhook : webhooks) { + assertTrue(webhook.getCreatedAt() != null); + } } /** @@ -124,10 +136,16 @@ public void testUpdate() throws EasyPostException { vcr.setUpTest("update"); Webhook webhook = createBasicWebhook(); + Map params = new HashMap<>(); + params.put("webhook_secret", Fixtures.webhookSecret()); + params.put("custom_headers", Fixtures.webhookCustomHeaders()); - webhook.update(); + Webhook updatedWebhook = vcr.client.webhook.update(webhook.getId(), params); - assertInstanceOf(Webhook.class, webhook); + assertInstanceOf(Webhook.class, updatedWebhook); + WebhookCustomHeader customHeader = updatedWebhook.getCustomHeaders().get(0); + assertEquals("test", customHeader.getName()); + assertEquals("header", customHeader.getValue()); } /** @@ -140,9 +158,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()); - retrievedWebhook.delete(); + assertDoesNotThrow(() -> vcr.client.webhook.delete(retrievedWebhook.getId())); testWebhookId = null; // need to disable post-test deletion for test to work } @@ -150,21 +168,17 @@ public void testDelete() throws EasyPostException { /** * Test validating a webhook. * - * @throws EasyPostException when the request fails. + * @throws EasyPostException when the request fails. */ @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", + Fixtures.webhookHmacSignature()); - Event event = Webhook.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); + Event event = Utilities.validateWebhook(Fixtures.eventBytes(), headers, Fixtures.webhookSecret()); - assertEquals("batch.created", event.getDescription()); + assertEquals("tracker.updated", event.getDescription()); + assertEquals(614.4, event.getResult().get("weight")); // Ensure we convert floats properly } /** @@ -173,14 +187,10 @@ 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, () -> { - Webhook.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); + Utilities.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); }); } @@ -190,14 +200,10 @@ 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, () -> { - Webhook.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); + Utilities.validateWebhook(Fixtures.eventBytes(), headers, webhookSecret); }); } } 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/fixtures/FixtureStructure.java b/src/test/java/com/easypost/fixtures/FixtureStructure.java index 1ffff9416..ea4fc94b9 100644 --- a/src/test/java/com/easypost/fixtures/FixtureStructure.java +++ b/src/test/java/com/easypost/fixtures/FixtureStructure.java @@ -1,13 +1,16 @@ package com.easypost.fixtures; import com.easypost.fixtures.components.Addresses; +import com.easypost.fixtures.components.Billing; import com.easypost.fixtures.components.CarrierAccounts; import com.easypost.fixtures.components.CarrierStrings; +import com.easypost.fixtures.components.Claims; import com.easypost.fixtures.components.CreditCards; import com.easypost.fixtures.components.CustomsInfos; import com.easypost.fixtures.components.CustomsItems; import com.easypost.fixtures.components.FormOptions; import com.easypost.fixtures.components.Insurances; +import com.easypost.fixtures.components.Luma; import com.easypost.fixtures.components.Orders; import com.easypost.fixtures.components.PageSizes; import com.easypost.fixtures.components.Parcels; @@ -17,6 +20,7 @@ import com.easypost.fixtures.components.Shipments; import com.easypost.fixtures.components.TaxIdentifiers; import com.easypost.fixtures.components.Users; +import com.easypost.fixtures.components.Webhooks; import com.google.gson.annotations.SerializedName; public final class FixtureStructure { @@ -24,12 +28,18 @@ public final class FixtureStructure { @SerializedName ("addresses") public Addresses addresses; + @SerializedName ("billing") + public Billing billing; + @SerializedName ("carrier_accounts") public CarrierAccounts carrierAccounts; @SerializedName ("carrier_strings") public CarrierStrings carrierStrings; + @SerializedName ("claims") + public Claims claims; + @SerializedName ("credit_cards") public CreditCards creditCards; @@ -45,6 +55,9 @@ public final class FixtureStructure { @SerializedName ("insurances") public Insurances insurances; + @SerializedName ("luma") + public Luma luma; + @SerializedName ("orders") public Orders orders; @@ -72,7 +85,7 @@ public final class FixtureStructure { @SerializedName ("users") public Users users; - @SerializedName ("webhook_url") - public String webhookUrl; + @SerializedName ("webhooks") + public Webhooks webhooks; } diff --git a/src/test/java/com/easypost/fixtures/components/Addresses.java b/src/test/java/com/easypost/fixtures/components/Addresses.java index 22eec8d19..302a30b28 100644 --- a/src/test/java/com/easypost/fixtures/components/Addresses.java +++ b/src/test/java/com/easypost/fixtures/components/Addresses.java @@ -5,12 +5,12 @@ import java.util.HashMap; public final class Addresses { - @SerializedName("ca_address_1") + @SerializedName ("ca_address_1") public HashMap caAddress1; - @SerializedName("ca_address_2") + @SerializedName ("ca_address_2") public HashMap caAddress2; - @SerializedName("incorrect") + @SerializedName ("incorrect") public HashMap incorrectAddress; } diff --git a/src/test/java/com/easypost/fixtures/components/Billing.java b/src/test/java/com/easypost/fixtures/components/Billing.java new file mode 100644 index 000000000..b7432c7a0 --- /dev/null +++ b/src/test/java/com/easypost/fixtures/components/Billing.java @@ -0,0 +1,20 @@ +package com.easypost.fixtures.components; + +import com.google.gson.annotations.SerializedName; + +import java.util.HashMap; + +public final class Billing { + @SerializedName ("payment_method_id") + public String paymentMethodId; + + @SerializedName ("financial_connections_id") + public String financialConnectionsId; + + @SerializedName ("mandate_data") + public HashMap mandateData; + + @SerializedName ("priority") + public String priority; + +} diff --git a/src/test/java/com/easypost/fixtures/components/CarrierAccounts.java b/src/test/java/com/easypost/fixtures/components/CarrierAccounts.java index bdd1d1987..ce3594f77 100644 --- a/src/test/java/com/easypost/fixtures/components/CarrierAccounts.java +++ b/src/test/java/com/easypost/fixtures/components/CarrierAccounts.java @@ -5,7 +5,7 @@ import java.util.HashMap; public final class CarrierAccounts { - @SerializedName("basic") + @SerializedName ("basic") public HashMap basic; } diff --git a/src/test/java/com/easypost/fixtures/components/CarrierStrings.java b/src/test/java/com/easypost/fixtures/components/CarrierStrings.java index 55c4a9a26..af70594d1 100644 --- a/src/test/java/com/easypost/fixtures/components/CarrierStrings.java +++ b/src/test/java/com/easypost/fixtures/components/CarrierStrings.java @@ -3,6 +3,6 @@ import com.google.gson.annotations.SerializedName; public final class CarrierStrings { - @SerializedName("usps") + @SerializedName ("usps") public String usps; } diff --git a/src/test/java/com/easypost/fixtures/components/Claims.java b/src/test/java/com/easypost/fixtures/components/Claims.java new file mode 100644 index 000000000..616d532c4 --- /dev/null +++ b/src/test/java/com/easypost/fixtures/components/Claims.java @@ -0,0 +1,10 @@ +package com.easypost.fixtures.components; + +import com.google.gson.annotations.SerializedName; + +import java.util.HashMap; + +public final class Claims { + @SerializedName ("basic") + public HashMap basic; +} diff --git a/src/test/java/com/easypost/fixtures/components/CreditCards.java b/src/test/java/com/easypost/fixtures/components/CreditCards.java index 643291971..7580b9d44 100644 --- a/src/test/java/com/easypost/fixtures/components/CreditCards.java +++ b/src/test/java/com/easypost/fixtures/components/CreditCards.java @@ -5,7 +5,7 @@ import java.util.HashMap; public final class CreditCards { - @SerializedName("test") + @SerializedName ("test") public HashMap test; } diff --git a/src/test/java/com/easypost/fixtures/components/CustomsInfos.java b/src/test/java/com/easypost/fixtures/components/CustomsInfos.java index ffdabc5b7..85d4fd035 100644 --- a/src/test/java/com/easypost/fixtures/components/CustomsInfos.java +++ b/src/test/java/com/easypost/fixtures/components/CustomsInfos.java @@ -5,7 +5,7 @@ import java.util.HashMap; public final class CustomsInfos { - @SerializedName("basic") + @SerializedName ("basic") public HashMap basic; } diff --git a/src/test/java/com/easypost/fixtures/components/CustomsItems.java b/src/test/java/com/easypost/fixtures/components/CustomsItems.java index 9f3f9eeef..79ab7386b 100644 --- a/src/test/java/com/easypost/fixtures/components/CustomsItems.java +++ b/src/test/java/com/easypost/fixtures/components/CustomsItems.java @@ -5,7 +5,7 @@ import java.util.HashMap; public final class CustomsItems { - @SerializedName("basic") + @SerializedName ("basic") public HashMap basic; } diff --git a/src/test/java/com/easypost/fixtures/components/FormOptions.java b/src/test/java/com/easypost/fixtures/components/FormOptions.java index 26a914755..ab687749a 100644 --- a/src/test/java/com/easypost/fixtures/components/FormOptions.java +++ b/src/test/java/com/easypost/fixtures/components/FormOptions.java @@ -5,7 +5,7 @@ import java.util.HashMap; public final class FormOptions { - @SerializedName("rma") + @SerializedName ("rma") public HashMap rma; } diff --git a/src/test/java/com/easypost/fixtures/components/Insurances.java b/src/test/java/com/easypost/fixtures/components/Insurances.java index af4f30e2c..82ef07273 100644 --- a/src/test/java/com/easypost/fixtures/components/Insurances.java +++ b/src/test/java/com/easypost/fixtures/components/Insurances.java @@ -5,7 +5,7 @@ import java.util.HashMap; public final class Insurances { - @SerializedName("basic") + @SerializedName ("basic") public HashMap basic; } diff --git a/src/test/java/com/easypost/fixtures/components/Luma.java b/src/test/java/com/easypost/fixtures/components/Luma.java new file mode 100644 index 000000000..d79be36ce --- /dev/null +++ b/src/test/java/com/easypost/fixtures/components/Luma.java @@ -0,0 +1,9 @@ +package com.easypost.fixtures.components; + +import com.google.gson.annotations.SerializedName; + +public final class Luma { + @SerializedName ("ruleset_name") + public String rulesetName; + +} diff --git a/src/test/java/com/easypost/fixtures/components/Orders.java b/src/test/java/com/easypost/fixtures/components/Orders.java index 3ec25169a..2b7791fa2 100644 --- a/src/test/java/com/easypost/fixtures/components/Orders.java +++ b/src/test/java/com/easypost/fixtures/components/Orders.java @@ -5,7 +5,7 @@ import java.util.HashMap; public final class Orders { - @SerializedName("basic") + @SerializedName ("basic") public HashMap basic; } diff --git a/src/test/java/com/easypost/fixtures/components/Parcels.java b/src/test/java/com/easypost/fixtures/components/Parcels.java index cb7c0fecd..c0499e863 100644 --- a/src/test/java/com/easypost/fixtures/components/Parcels.java +++ b/src/test/java/com/easypost/fixtures/components/Parcels.java @@ -5,7 +5,7 @@ import java.util.HashMap; public final class Parcels { - @SerializedName("basic") + @SerializedName ("basic") public HashMap basic; } diff --git a/src/test/java/com/easypost/fixtures/components/Pickups.java b/src/test/java/com/easypost/fixtures/components/Pickups.java index f799d5c69..34f379e3e 100644 --- a/src/test/java/com/easypost/fixtures/components/Pickups.java +++ b/src/test/java/com/easypost/fixtures/components/Pickups.java @@ -5,7 +5,7 @@ import java.util.HashMap; public final class Pickups { - @SerializedName("basic") + @SerializedName ("basic") public HashMap basic; } diff --git a/src/test/java/com/easypost/fixtures/components/ReportTypes.java b/src/test/java/com/easypost/fixtures/components/ReportTypes.java index e7be31c22..aa9d52317 100644 --- a/src/test/java/com/easypost/fixtures/components/ReportTypes.java +++ b/src/test/java/com/easypost/fixtures/components/ReportTypes.java @@ -3,7 +3,7 @@ import com.google.gson.annotations.SerializedName; public final class ReportTypes { - @SerializedName("shipment") + @SerializedName ("shipment") public String shipment; } diff --git a/src/test/java/com/easypost/fixtures/components/ServiceNames.java b/src/test/java/com/easypost/fixtures/components/ServiceNames.java index 7d1fc8e03..94dc74836 100644 --- a/src/test/java/com/easypost/fixtures/components/ServiceNames.java +++ b/src/test/java/com/easypost/fixtures/components/ServiceNames.java @@ -3,7 +3,7 @@ import com.google.gson.annotations.SerializedName; public final class ServiceNames { - @SerializedName("usps") + @SerializedName ("usps") public ServiceNamesUsps usps; } diff --git a/src/test/java/com/easypost/fixtures/components/ServiceNamesUsps.java b/src/test/java/com/easypost/fixtures/components/ServiceNamesUsps.java index b36b817bf..17bbca12b 100644 --- a/src/test/java/com/easypost/fixtures/components/ServiceNamesUsps.java +++ b/src/test/java/com/easypost/fixtures/components/ServiceNamesUsps.java @@ -3,9 +3,9 @@ import com.google.gson.annotations.SerializedName; public final class ServiceNamesUsps { - @SerializedName("first_service") + @SerializedName ("first_service") public String firstService; - @SerializedName("pickup_service") + @SerializedName ("pickup_service") public String pickupService; } diff --git a/src/test/java/com/easypost/fixtures/components/Shipments.java b/src/test/java/com/easypost/fixtures/components/Shipments.java index 9bd8bff20..5cc767dc2 100644 --- a/src/test/java/com/easypost/fixtures/components/Shipments.java +++ b/src/test/java/com/easypost/fixtures/components/Shipments.java @@ -5,10 +5,10 @@ import java.util.HashMap; public final class Shipments { - @SerializedName("basic_domestic") + @SerializedName ("basic_domestic") public HashMap basicDomestic; - @SerializedName("full") + @SerializedName ("full") public HashMap full; } diff --git a/src/test/java/com/easypost/fixtures/components/TaxIdentifiers.java b/src/test/java/com/easypost/fixtures/components/TaxIdentifiers.java index 6be6c95e2..2e68f8074 100644 --- a/src/test/java/com/easypost/fixtures/components/TaxIdentifiers.java +++ b/src/test/java/com/easypost/fixtures/components/TaxIdentifiers.java @@ -5,7 +5,7 @@ import java.util.HashMap; public final class TaxIdentifiers { - @SerializedName("basic") + @SerializedName ("basic") public HashMap basic; } diff --git a/src/test/java/com/easypost/fixtures/components/Users.java b/src/test/java/com/easypost/fixtures/components/Users.java index 2b4e788e2..9224c1c4b 100644 --- a/src/test/java/com/easypost/fixtures/components/Users.java +++ b/src/test/java/com/easypost/fixtures/components/Users.java @@ -5,7 +5,7 @@ import java.util.HashMap; public final class Users { - @SerializedName("referral") + @SerializedName ("referral") public HashMap referral; } diff --git a/src/test/java/com/easypost/fixtures/components/Webhooks.java b/src/test/java/com/easypost/fixtures/components/Webhooks.java new file mode 100644 index 000000000..c2456c8d3 --- /dev/null +++ b/src/test/java/com/easypost/fixtures/components/Webhooks.java @@ -0,0 +1,20 @@ +package com.easypost.fixtures.components; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; + +public final class Webhooks { + @SerializedName ("hmac_signature") + public String hmacSignature; + + @SerializedName ("secret") + public String secret; + + @SerializedName ("url") + public String url; + + @SerializedName ("custom_headers") + public List customHeaders; + +} diff --git a/style_suppressions.xml b/style_suppressions.xml deleted file mode 100644 index ac994b1d0..000000000 --- a/style_suppressions.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - -