From 0bb9fc3d3f193c4bd6413f40e31dc32186c6e886 Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Fri, 19 Jul 2024 10:10:10 -0600 Subject: [PATCH 1/7] - Add claims API service --- CHANGELOG.md | 4 + easypost/easypost_client.py | 2 + easypost/easypost_object.py | 1 + easypost/models/__init__.py | 1 + easypost/models/claim.py | 5 + easypost/services/__init__.py | 1 + easypost/services/base_service.py | 20 +- easypost/services/claim_service.py | 70 ++ tests/cassettes/test_claim_all.yaml | 105 +++ tests/cassettes/test_claim_cancel.yaml | 701 +++++++++++++++++ tests/cassettes/test_claim_create.yaml | 628 ++++++++++++++++ tests/cassettes/test_claim_get_next_page.yaml | 103 +++ tests/cassettes/test_claim_retrieve.yaml | 703 ++++++++++++++++++ tests/conftest.py | 9 +- tests/test_claim.py | 100 +++ 15 files changed, 2442 insertions(+), 11 deletions(-) create mode 100644 easypost/models/claim.py create mode 100644 easypost/services/claim_service.py create mode 100644 tests/cassettes/test_claim_all.yaml create mode 100644 tests/cassettes/test_claim_cancel.yaml create mode 100644 tests/cassettes/test_claim_create.yaml create mode 100644 tests/cassettes/test_claim_get_next_page.yaml create mode 100644 tests/cassettes/test_claim_retrieve.yaml create mode 100644 tests/test_claim.py diff --git a/CHANGELOG.md b/CHANGELOG.md index fff29f24..bcaa24ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## Next Release + +- Adds new `Claim` service for filing claims on EasyPost shipments and insurances + ## v9.3.0 (2024-07-12) - Adds new `shipment.recommend_ship_date`, `smartrate.recommend_ship_date`, and `smartrate.estimate_delivery_date` functions diff --git a/easypost/easypost_client.py b/easypost/easypost_client.py index 9cf12766..262833c1 100644 --- a/easypost/easypost_client.py +++ b/easypost/easypost_client.py @@ -18,6 +18,7 @@ BillingService, CarrierAccountService, CarrierMetadataService, + ClaimService, CustomsInfoService, CustomsItemService, EndShipperService, @@ -62,6 +63,7 @@ def __init__( self.billing = BillingService(self) self.carrier_account = CarrierAccountService(self) self.carrier_metadata = CarrierMetadataService(self) + self.claim = ClaimService(self) self.customs_info = CustomsInfoService(self) self.customs_item = CustomsItemService(self) self.end_shipper = EndShipperService(self) diff --git a/easypost/easypost_object.py b/easypost/easypost_object.py index 61bb09d5..abc17d8c 100644 --- a/easypost/easypost_object.py +++ b/easypost/easypost_object.py @@ -18,6 +18,7 @@ "brd": "Brand", "ca": "CarrierAccount", "cfrep": "Report", + "clm": "Claim", "cstinfo": "CustomsInfo", "cstitem": "CustomsItem", "es": "EndShipper", diff --git a/easypost/models/__init__.py b/easypost/models/__init__.py index 79320a7d..9df262ba 100644 --- a/easypost/models/__init__.py +++ b/easypost/models/__init__.py @@ -5,6 +5,7 @@ from easypost.models.billing import Billing from easypost.models.brand import Brand from easypost.models.carrier_account import CarrierAccount +from easypost.models.claim import Claim from easypost.models.customs_info import CustomsInfo from easypost.models.customs_item import CustomsItem from easypost.models.end_shipper import EndShipper diff --git a/easypost/models/claim.py b/easypost/models/claim.py new file mode 100644 index 00000000..c0c6dd69 --- /dev/null +++ b/easypost/models/claim.py @@ -0,0 +1,5 @@ +from easypost.easypost_object import EasyPostObject + + +class Claim(EasyPostObject): + pass diff --git a/easypost/services/__init__.py b/easypost/services/__init__.py index 66e8346b..f042f517 100644 --- a/easypost/services/__init__.py +++ b/easypost/services/__init__.py @@ -7,6 +7,7 @@ from easypost.services.billing_service import BillingService from easypost.services.carrier_account_service import CarrierAccountService from easypost.services.carrier_metadata_service import CarrierMetadataService +from easypost.services.claim_service import ClaimService from easypost.services.customs_info_service import CustomsInfoService from easypost.services.customs_item_service import CustomsItemService from easypost.services.end_shipper_service import EndShipperService diff --git a/easypost/services/base_service.py b/easypost/services/base_service.py index 203aa5f2..4bc0235a 100644 --- a/easypost/services/base_service.py +++ b/easypost/services/base_service.py @@ -42,47 +42,47 @@ def _instance_url(self, class_name: str, id: str) -> str: """Generate an instance URL based on a class name and ID.""" return f"{self._class_url(class_name)}/{id}" - def _create_resource(self, class_name: str, **params) -> Any: + def _create_resource(self, class_name: str, beta: bool = False, **params) -> Any: """Create an EasyPost object via the EasyPost API.""" url = self._class_url(class_name) wrapped_params = {self._snakecase_name(class_name): params} - response = Requestor(self._client).request(method=RequestMethod.POST, url=url, params=wrapped_params) + response = Requestor(self._client).request(method=RequestMethod.POST, url=url, params=wrapped_params, beta=beta) return convert_to_easypost_object(response=response) - def _all_resources(self, class_name: str, filters: Optional[Dict[str, Any]] = None, **params) -> Any: + def _all_resources(self, class_name: str, filters: Optional[Dict[str, Any]] = None, beta: bool = False, **params) -> Any: """Retrieve a list of EasyPostObjects from the EasyPost API.""" url = self._class_url(class_name) - response = Requestor(self._client).request(method=RequestMethod.GET, url=url, params=params) + response = Requestor(self._client).request(method=RequestMethod.GET, url=url, params=params, beta=beta) if filters: # presence of filters indicates we are dealing with a paginated response response[_FILTERS_KEY] = filters # Save the filters used to reference in potential get_next_page call return convert_to_easypost_object(response=response) - def _retrieve_resource(self, class_name: str, id: str) -> Any: + def _retrieve_resource(self, class_name: str, id: str, beta: bool = False) -> Any: """Retrieve an object from the EasyPost API.""" url = self._instance_url(class_name, id) - response = Requestor(self._client).request(method=RequestMethod.GET, url=url) + response = Requestor(self._client).request(method=RequestMethod.GET, url=url, beta=beta) return convert_to_easypost_object(response=response) - def _update_resource(self, class_name: str, id: str, method: RequestMethod = RequestMethod.PATCH, **params) -> Any: + def _update_resource(self, class_name: str, id: str, method: RequestMethod = RequestMethod.PATCH, beta: bool = False, **params) -> Any: """Update an EasyPost object via the EasyPost API.""" url = self._instance_url(class_name, id) wrapped_params = {self._snakecase_name(class_name): params} - response = Requestor(self._client).request(method=method, url=url, params=wrapped_params) + response = Requestor(self._client).request(method=method, url=url, params=wrapped_params, beta=beta) return convert_to_easypost_object(response=response) - def _delete_resource(self, class_name: str, id: str) -> Any: + def _delete_resource(self, class_name: str, id: str, beta: bool = False) -> Any: """Delete an EasyPost object via the EasyPost API.""" url = self._instance_url(class_name, id) - response = Requestor(self._client).request(method=RequestMethod.DELETE, url=url) + response = Requestor(self._client).request(method=RequestMethod.DELETE, url=url, beta=beta) return convert_to_easypost_object(response=response) diff --git a/easypost/services/claim_service.py b/easypost/services/claim_service.py new file mode 100644 index 00000000..fec3a762 --- /dev/null +++ b/easypost/services/claim_service.py @@ -0,0 +1,70 @@ +from typing import ( + Any, + Dict, + Optional, +) + +from easypost.easypost_object import convert_to_easypost_object +from easypost.models import Claim +from easypost.requestor import ( + RequestMethod, + Requestor, +) +from easypost.services.base_service import BaseService + + +class ClaimService(BaseService): + def __init__(self, client): + self._client = client + self._model_class = Claim.__name__ + + def create(self, **params) -> Claim: + """Create a Claim.""" + url = "/claims" + + response = Requestor(self._client).request(method=RequestMethod.POST, url=url, params=params, beta=True) + + return convert_to_easypost_object(response=response) + + def all(self, **params) -> Dict[str, Any]: + """Retrieve a list of Claims.""" + filters = { + "key": "claims", + } + + return self._all_resources(class_name=self._model_class, filters=filters, beta=True, **params) + + def retrieve(self, id: str) -> Claim: + """Retrieve a Claim.""" + return self._retrieve_resource(class_name=self._model_class, id=id, beta=True) + + def get_next_page( + self, + claims: Dict[str, Any], + page_size: int, + optional_params: Optional[Dict[str, Any]] = None, + ) -> Dict[str, Any]: + """Retrieve the next page of the list Claim response.""" + self._check_has_next_page(collection=claims) + + params = { + "before_id": claims["claims"][-1].id, + "page_size": page_size, + } + + if optional_params: + params.update(optional_params) + + return self.all(**params) + + def cancel(self, id: str) -> Claim: + """Cancel a Claim.""" + url = f"/claims/{id}/cancel" + + response = Requestor(self._client).request( + method=RequestMethod.POST, + url=url, + beta=True, + ) + + return convert_to_easypost_object(response=response) diff --git a/tests/cassettes/test_claim_all.yaml b/tests/cassettes/test_claim_all.yaml new file mode 100644 index 00000000..b8aebf3a --- /dev/null +++ b/tests/cassettes/test_claim_all.yaml @@ -0,0 +1,105 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + authorization: + - + user-agent: + - + method: GET + uri: https://api.easypost.com/beta/claims?page_size=5 + response: + body: + string: '{"claims": [{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1a9f84376e1a4afcba7fb4c60ffc9402.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7e58fa152dc7446e9dc6959d03d216fe.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1f3ba9cae53444579df05405310e8a97.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-18T21:41:13", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:41:13"}], + "id": "clm_097dd0b1b06d4cea92d5493c26c2b0a4", "insurance_amount": "100.00", + "insurance_id": "ins_8fa0759538ba4630a1bcd7d65a72a0fe", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-18T21:41:13", "tracking_code": "9400100110368063699336", "type": + "damage", "updated_at": "2024-07-18T21:41:13"}, {"approved_amount": null, + "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/74b7dae47c5349a4876837984aade087.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/295f8c97f6cb4a72a0b302296e5b08b5.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7034ce5274e948faa541e7aee1c90deb.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-18T21:36:31", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:36:31"}], + "id": "clm_097dd2d0c5f944f7b51924422f6341b7", "insurance_amount": "100.00", + "insurance_id": "ins_26eed360e3dc4b2095263f1af0435892", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-18T21:36:31", "tracking_code": "9400100110368063698216", "type": + "damage", "updated_at": "2024-07-18T21:36:31"}, {"approved_amount": null, + "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/a169ac0ffa1d46dcb56118f0b5c02bcc.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/d32b135079e944ceb558eb8a24151346.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/f4712df4d9bc448b85d68d1c3fdd3fb4.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-18T21:25:33", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:25:33"}], + "id": "clm_097d7a0ce4274578896ea9b65a9f5d2b", "insurance_amount": "100.00", + "insurance_id": "ins_4ac7b08d2bd34ad28f017f72b04b820e", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_be019d9828b84bbc8d33e211a55b1c08", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-18T21:25:33", "tracking_code": "9400100110368063695628", "type": + "damage", "updated_at": "2024-07-18T21:25:33"}], "has_more": false}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '3363' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Origin + x-backend: + - easypost + x-canary: + - direct + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - bfd174a766998c03e789f5c1002f4d69 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb43nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb4nuq 4e1e840afe + - extlb2nuq fa152d4755 + x-runtime: + - '0.044147' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/test_claim_cancel.yaml b/tests/cassettes/test_claim_cancel.yaml new file mode 100644 index 00000000..dacf7eae --- /dev/null +++ b/tests/cassettes/test_claim_cancel.yaml @@ -0,0 +1,701 @@ +interactions: +- request: + body: '{"shipment": {"from_address": {"name": "Jack Sparrow", "street1": "388 + Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": + "94107", "country": "US", "email": "test@example.com", "phone": "5555555555"}, + "to_address": {"name": "Elizabeth Swan", "street1": "179 N Harbor Dr", "city": + "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "email": "test@example.com", + "phone": "5555555555"}, "parcel": {"length": 10, "width": 8, "height": 4, "weight": + 15.4}, "customs_info": {"eel_pfc": "NOEEI 30.37(a)", "customs_certify": true, + "customs_signer": "Steve Brule", "contents_type": "merchandise", "contents_explanation": + "", "restriction_type": "none", "non_delivery_option": "return", "customs_items": + [{"description": "Sweet shirts", "quantity": 2, "weight": 11, "value": 23.25, + "hs_tariff_number": "654321", "origin_country": "US"}]}, "options": {"label_format": + "PNG", "invoice_number": "123"}, "reference": "123"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '954' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/shipments + response: + body: + string: '{"created_at": "2024-07-18T21:43:37Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": + "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": + "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", + "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": + "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid + Access License number"}], "mode": "test", "options": {"label_format": "PNG", + "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, + "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": + null, "updated_at": "2024-07-18T21:43:38Z", "batch_id": null, "batch_status": + null, "batch_message": null, "customs_info": {"id": "cstinfo_30138f0a4d3f42a2bfa995228416b273", + "object": "CustomsInfo", "created_at": "2024-07-18T21:43:37Z", "updated_at": + "2024-07-18T21:43:37Z", "contents_explanation": "", "contents_type": "merchandise", + "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI + 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, + "restriction_type": "none", "mode": "test", "declaration": null, "customs_items": + [{"id": "cstitem_c61eda43531e4329bdaeded334654d3e", "object": "CustomsItem", + "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", + "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": + "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": + "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": + null}]}, "from_address": {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": + "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", + "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_70a4b478a5ef4ae9902401b71cefb121", + "object": "Parcel", "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", + "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": + 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_402c785ac872468996a78d123672b764", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_75a5b4ce62aa4dc68beed53abb278ace", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": + null, "selected_rate": null, "tracker": null, "to_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", + "object": "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": + "2024-07-18T21:43:37+00:00", "name": "Elizabeth Swan", "company": null, "street1": + "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", + "zip": "90277", "country": "US", "phone": "", "email": "", + "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": + null, "state_tax_id": null, "verifications": {}}, "usps_zone": 4, "return_address": + {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": "Address", "created_at": + "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", "name": + "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "buyer_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": + "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", + "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": + null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", + "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "forms": [], "fees": [], "id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", + "object": "Shipment"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '6912' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + location: + - /api/v2/shipments/shp_c29979af17bd4bc29bbf0d5a5a5a5d76 + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-canary: + - direct + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 95a1228066998c89e78a1452002d5523 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb43nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq 4e1e840afe + - extlb1nuq fa152d4755 + x-runtime: + - '0.664457' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 201 + message: Created +- request: + body: '{"rate": {"id": "rate_4ecb037f22d2433fb207e7292e5fe007"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '57' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/shipments/shp_c29979af17bd4bc29bbf0d5a5a5a5d76/buy + response: + body: + string: '{"created_at": "2024-07-18T21:43:37Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": + "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": + "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", + "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": + "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid + Access License number"}], "mode": "test", "options": {"label_format": "PNG", + "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, + "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": + "9400100110368063699763", "updated_at": "2024-07-18T21:43:39Z", "batch_id": + null, "batch_status": null, "batch_message": null, "customs_info": {"id": + "cstinfo_30138f0a4d3f42a2bfa995228416b273", "object": "CustomsInfo", "created_at": + "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", "contents_explanation": + "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": + "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", + "restriction_comments": null, "restriction_type": "none", "mode": "test", + "declaration": null, "customs_items": [{"id": "cstitem_c61eda43531e4329bdaeded334654d3e", + "object": "CustomsItem", "created_at": "2024-07-18T21:43:37Z", "updated_at": + "2024-07-18T21:43:37Z", "description": "Sweet shirts", "hs_tariff_number": + "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": + 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, + "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": + "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": "Address", "created_at": + "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", "name": + "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_70a4b478a5ef4ae9902401b71cefb121", + "object": "Parcel", "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", + "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_63c14805ae2b41878f94fe7ae2c76b99", + "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:39Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:43:38Z", + "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e87b339edbaf7c492881a6834267297a4e.png", + "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": + null}, "rates": [{"id": "rate_402c785ac872468996a78d123672b764", "object": + "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_75a5b4ce62aa4dc68beed53abb278ace", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": + null, "selected_rate": {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", "object": + "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_224c80915ed1460eb2702a4070e4a75a", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063699763", + "status": "unknown", "status_detail": "unknown", "created_at": "2024-07-18T21:43:39Z", + "updated_at": "2024-07-18T21:43:39Z", "signed_by": null, "weight": null, "est_delivery_date": + null, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier": "USPS", + "tracking_details": [], "fees": [], "carrier_detail": null, "public_url": + "https://track.easypost.com/djE6dHJrXzIyNGM4MDkxNWVkMTQ2MGViMjcwMmE0MDcwZTRhNzVh"}, + "to_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": "Address", + "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": + 4, "return_address": {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": + "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", + "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "buyer_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": + "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": + [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": + true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": + "5.93000", "charged": true, "refunded": false}], "id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", + "object": "Shipment"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '9037' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 95a1228066998c8ae78a1452002d55a4 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb42nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb4nuq 4e1e840afe + - extlb1nuq fa152d4755 + x-runtime: + - '0.835998' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: '{"amount": "100.00"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/shipments/shp_c29979af17bd4bc29bbf0d5a5a5a5d76/insure + response: + body: + string: '{"created_at": "2024-07-18T21:43:37Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": + "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": + "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", + "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": + "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid + Access License number"}], "mode": "test", "options": {"label_format": "PNG", + "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, + "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": + "9400100110368063699763", "updated_at": "2024-07-18T21:43:39Z", "batch_id": + null, "batch_status": null, "batch_message": null, "customs_info": {"id": + "cstinfo_30138f0a4d3f42a2bfa995228416b273", "object": "CustomsInfo", "created_at": + "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", "contents_explanation": + "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": + "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", + "restriction_comments": null, "restriction_type": "none", "mode": "test", + "declaration": null, "customs_items": [{"id": "cstitem_c61eda43531e4329bdaeded334654d3e", + "object": "CustomsItem", "created_at": "2024-07-18T21:43:37Z", "updated_at": + "2024-07-18T21:43:37Z", "description": "Sweet shirts", "hs_tariff_number": + "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": + 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, + "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": + "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": "Address", "created_at": + "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", "name": + "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "insurance": "100.00", "order_id": null, "parcel": {"id": "prcl_70a4b478a5ef4ae9902401b71cefb121", + "object": "Parcel", "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", + "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_63c14805ae2b41878f94fe7ae2c76b99", + "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:39Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:43:38Z", + "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e87b339edbaf7c492881a6834267297a4e.png", + "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": + null}, "rates": [{"id": "rate_402c785ac872468996a78d123672b764", "object": + "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_75a5b4ce62aa4dc68beed53abb278ace", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": + null, "selected_rate": {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", "object": + "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_224c80915ed1460eb2702a4070e4a75a", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063699763", + "status": "pre_transit", "status_detail": "status_update", "created_at": "2024-07-18T21:43:39Z", + "updated_at": "2024-07-18T21:43:39Z", "signed_by": null, "weight": null, "est_delivery_date": + "2024-07-18T21:43:39Z", "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", + "carrier": "USPS", "tracking_details": [{"object": "TrackingDetail", "message": + "Pre-Shipment Info Sent to USPS", "description": "", "status": "pre_transit", + "status_detail": "status_update", "datetime": "2024-06-18T21:43:39Z", "source": + "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", + "city": null, "state": null, "country": null, "zip": null}}, {"object": "TrackingDetail", + "message": "Shipping Label Created", "description": "", "status": "pre_transit", + "status_detail": "status_update", "datetime": "2024-06-19T10:20:39Z", "source": + "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", + "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063"}}], "fees": + [], "carrier_detail": {"object": "CarrierDetail", "service": "First-Class + Package Service", "container_type": null, "est_delivery_date_local": null, + "est_delivery_time_local": null, "origin_location": "HOUSTON TX, 77001", "origin_tracking_location": + {"object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": + null, "zip": "77063"}, "destination_location": "CHARLESTON SC, 29401", "destination_tracking_location": + null, "guaranteed_delivery_date": null, "alternate_identifier": null, "initial_delivery_attempt": + null}, "public_url": "https://track.easypost.com/djE6dHJrXzIyNGM4MDkxNWVkMTQ2MGViMjcwMmE0MDcwZTRhNzVh"}, + "to_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": "Address", + "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": + 4, "return_address": {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": + "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", + "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "buyer_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": + "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": + [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": + true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": + "5.93000", "charged": true, "refunded": false}, {"object": "Fee", "type": + "InsuranceFee", "amount": "1.00000", "charged": true, "refunded": false}], + "id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "object": "Shipment"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '10261' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 95a1228066998c8be78a1452002d5644 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb34nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq 4e1e840afe + - extlb1nuq fa152d4755 + x-runtime: + - '0.261961' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: '{"type": "damage", "email_evidence_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], + "invoice_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], + "supporting_documentation_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], + "description": "Test description", "contact_email": "test@example.com", "tracking_code": + "9400100110368063699763", "amount": "100.00"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '618' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/beta/claims + response: + body: + string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/4e62e52053664b7abb701015766c4ece.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7741f824477f4798b1d66039432438e9.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1060847ab66f420db523d8e2f4f479eb.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-18T21:43:39", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:43:39"}], + "id": "clm_097d52b60bc946dea768d889adfb6ba9", "insurance_amount": "100.00", + "insurance_id": "ins_ac6d538faacb4cb398a4f9599a533e3d", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-18T21:43:39", "tracking_code": "9400100110368063699763", "type": + "damage", "updated_at": "2024-07-18T21:43:39"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '1111' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Origin + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 95a1228066998c8be78a1452002d5681 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb36nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb4nuq 4e1e840afe + - extlb1nuq fa152d4755 + x-runtime: + - '0.869779' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 201 + message: Created +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/beta/claims/clm_097d52b60bc946dea768d889adfb6ba9/cancel + response: + body: + string: '{"error": {"errors": ["{\"error\": {\"title\": \"Invalid attribute\", + \"message\": \"You passed an invalid value for the id attribute. Invalid parameter: + id must be an integer from api/v2/tickets/show\"}}"], "message": "{\"error\": + {\"title\": \"Invalid attribute\", \"message\": \"You passed an invalid value + for the id attribute. Invalid parameter: id must be an integer from api/v2/tickets/show\"}}"}}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '401' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Origin + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 95a1228066998c8ce78a1452002d5734 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb38nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq 4e1e840afe + - extlb1nuq fa152d4755 + x-runtime: + - '0.497966' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 500 + message: Internal Server Error +version: 1 diff --git a/tests/cassettes/test_claim_create.yaml b/tests/cassettes/test_claim_create.yaml new file mode 100644 index 00000000..c39febfa --- /dev/null +++ b/tests/cassettes/test_claim_create.yaml @@ -0,0 +1,628 @@ +interactions: +- request: + body: '{"shipment": {"from_address": {"name": "Jack Sparrow", "street1": "388 + Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": + "94107", "country": "US", "email": "test@example.com", "phone": "5555555555"}, + "to_address": {"name": "Elizabeth Swan", "street1": "179 N Harbor Dr", "city": + "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "email": "test@example.com", + "phone": "5555555555"}, "parcel": {"length": 10, "width": 8, "height": 4, "weight": + 15.4}, "customs_info": {"eel_pfc": "NOEEI 30.37(a)", "customs_certify": true, + "customs_signer": "Steve Brule", "contents_type": "merchandise", "contents_explanation": + "", "restriction_type": "none", "non_delivery_option": "return", "customs_items": + [{"description": "Sweet shirts", "quantity": 2, "weight": 11, "value": 23.25, + "hs_tariff_number": "654321", "origin_country": "US"}]}, "options": {"label_format": + "PNG", "invoice_number": "123"}, "reference": "123"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '954' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/shipments + response: + body: + string: '{"created_at": "2024-07-18T21:36:29Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": + "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": + "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", + "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": + "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid + Access License number"}], "mode": "test", "options": {"label_format": "PNG", + "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, + "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": + null, "updated_at": "2024-07-18T21:36:30Z", "batch_id": null, "batch_status": + null, "batch_message": null, "customs_info": {"id": "cstinfo_f480399a93b44fffa042f909a56e4872", + "object": "CustomsInfo", "created_at": "2024-07-18T21:36:29Z", "updated_at": + "2024-07-18T21:36:29Z", "contents_explanation": "", "contents_type": "merchandise", + "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI + 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, + "restriction_type": "none", "mode": "test", "declaration": null, "customs_items": + [{"id": "cstitem_fe476d8dc33045c4ba37d22ded7eba44", "object": "CustomsItem", + "created_at": "2024-07-18T21:36:29Z", "updated_at": "2024-07-18T21:36:29Z", + "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": + "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": + "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": + null}]}, "from_address": {"id": "adr_cb3e90f7454d11efb208ac1f6bc539ae", "object": + "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", + "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_d670d15cb20d40d68017155552c75ec4", + "object": "Parcel", "created_at": "2024-07-18T21:36:29Z", "updated_at": "2024-07-18T21:36:29Z", + "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": + 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_429514358c284466b317168db6ef9278", + "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_372bb29bff5a486b94bf0cd4306356d4", + "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_bb5bd30541bb41fcbb611cb7d0905d19", + "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": + null, "selected_rate": null, "tracker": null, "to_address": {"id": "adr_cb3c055b454d11ef8287ac1f6bc539aa", + "object": "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": + "2024-07-18T21:36:29+00:00", "name": "Elizabeth Swan", "company": null, "street1": + "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", + "zip": "90277", "country": "US", "phone": "", "email": "", + "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": + null, "state_tax_id": null, "verifications": {}}, "usps_zone": 4, "return_address": + {"id": "adr_cb3e90f7454d11efb208ac1f6bc539ae", "object": "Address", "created_at": + "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", "name": + "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "buyer_address": {"id": "adr_cb3c055b454d11ef8287ac1f6bc539aa", "object": + "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", + "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": + null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", + "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "forms": [], "fees": [], "id": "shp_100e485b59294ece94b66f0a6427f032", + "object": "Shipment"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '6912' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + location: + - /api/v2/shipments/shp_100e485b59294ece94b66f0a6427f032 + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - bfd174a366998adde788ee05002e68ed + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb38nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb4nuq 4e1e840afe + - extlb2nuq fa152d4755 + x-runtime: + - '0.667029' + x-version-label: + - easypost-202407182050-c8a24f13ee-master + x-xss-protection: + - 1; mode=block + status: + code: 201 + message: Created +- request: + body: '{"rate": {"id": "rate_372bb29bff5a486b94bf0cd4306356d4"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '57' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/shipments/shp_100e485b59294ece94b66f0a6427f032/buy + response: + body: + string: '{"created_at": "2024-07-18T21:36:29Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": + "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": + "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", + "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": + "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid + Access License number"}], "mode": "test", "options": {"label_format": "PNG", + "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, + "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": + "9400100110368063698216", "updated_at": "2024-07-18T21:36:31Z", "batch_id": + null, "batch_status": null, "batch_message": null, "customs_info": {"id": + "cstinfo_f480399a93b44fffa042f909a56e4872", "object": "CustomsInfo", "created_at": + "2024-07-18T21:36:29Z", "updated_at": "2024-07-18T21:36:29Z", "contents_explanation": + "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": + "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", + "restriction_comments": null, "restriction_type": "none", "mode": "test", + "declaration": null, "customs_items": [{"id": "cstitem_fe476d8dc33045c4ba37d22ded7eba44", + "object": "CustomsItem", "created_at": "2024-07-18T21:36:29Z", "updated_at": + "2024-07-18T21:36:29Z", "description": "Sweet shirts", "hs_tariff_number": + "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": + 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, + "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": + "adr_cb3e90f7454d11efb208ac1f6bc539ae", "object": "Address", "created_at": + "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", "name": + "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_d670d15cb20d40d68017155552c75ec4", + "object": "Parcel", "created_at": "2024-07-18T21:36:29Z", "updated_at": "2024-07-18T21:36:29Z", + "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_2507f1a9ec5f42e886bd9545d6abbcd5", + "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:31Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:36:30Z", + "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e8510ac623543a46f7a796f70290e85400.png", + "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": + null}, "rates": [{"id": "rate_429514358c284466b317168db6ef9278", "object": + "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_372bb29bff5a486b94bf0cd4306356d4", + "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_bb5bd30541bb41fcbb611cb7d0905d19", + "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": + null, "selected_rate": {"id": "rate_372bb29bff5a486b94bf0cd4306356d4", "object": + "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_5d88217097c34dcf8ee4be986cd09a28", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063698216", + "status": "unknown", "status_detail": "unknown", "created_at": "2024-07-18T21:36:31Z", + "updated_at": "2024-07-18T21:36:31Z", "signed_by": null, "weight": null, "est_delivery_date": + null, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier": "USPS", + "tracking_details": [], "fees": [], "carrier_detail": null, "public_url": + "https://track.easypost.com/djE6dHJrXzVkODgyMTcwOTdjMzRkY2Y4ZWU0YmU5ODZjZDA5YTI4"}, + "to_address": {"id": "adr_cb3c055b454d11ef8287ac1f6bc539aa", "object": "Address", + "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:30+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": + 4, "return_address": {"id": "adr_cb3e90f7454d11efb208ac1f6bc539ae", "object": + "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", + "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "buyer_address": {"id": "adr_cb3c055b454d11ef8287ac1f6bc539aa", "object": + "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:30+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": + [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": + true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": + "5.93000", "charged": true, "refunded": false}], "id": "shp_100e485b59294ece94b66f0a6427f032", + "object": "Shipment"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '9037' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - bfd174a366998adee788ee05002e6989 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb40nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb4nuq 4e1e840afe + - extlb2nuq fa152d4755 + x-runtime: + - '0.893326' + x-version-label: + - easypost-202407182050-c8a24f13ee-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: '{"amount": "100.00"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/shipments/shp_100e485b59294ece94b66f0a6427f032/insure + response: + body: + string: '{"created_at": "2024-07-18T21:36:29Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": + "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": + "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", + "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": + "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid + Access License number"}], "mode": "test", "options": {"label_format": "PNG", + "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, + "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": + "9400100110368063698216", "updated_at": "2024-07-18T21:36:31Z", "batch_id": + null, "batch_status": null, "batch_message": null, "customs_info": {"id": + "cstinfo_f480399a93b44fffa042f909a56e4872", "object": "CustomsInfo", "created_at": + "2024-07-18T21:36:29Z", "updated_at": "2024-07-18T21:36:29Z", "contents_explanation": + "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": + "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", + "restriction_comments": null, "restriction_type": "none", "mode": "test", + "declaration": null, "customs_items": [{"id": "cstitem_fe476d8dc33045c4ba37d22ded7eba44", + "object": "CustomsItem", "created_at": "2024-07-18T21:36:29Z", "updated_at": + "2024-07-18T21:36:29Z", "description": "Sweet shirts", "hs_tariff_number": + "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": + 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, + "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": + "adr_cb3e90f7454d11efb208ac1f6bc539ae", "object": "Address", "created_at": + "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", "name": + "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "insurance": "100.00", "order_id": null, "parcel": {"id": "prcl_d670d15cb20d40d68017155552c75ec4", + "object": "Parcel", "created_at": "2024-07-18T21:36:29Z", "updated_at": "2024-07-18T21:36:29Z", + "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_2507f1a9ec5f42e886bd9545d6abbcd5", + "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:31Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:36:30Z", + "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e8510ac623543a46f7a796f70290e85400.png", + "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": + null}, "rates": [{"id": "rate_429514358c284466b317168db6ef9278", "object": + "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_372bb29bff5a486b94bf0cd4306356d4", + "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_bb5bd30541bb41fcbb611cb7d0905d19", + "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": + null, "selected_rate": {"id": "rate_372bb29bff5a486b94bf0cd4306356d4", "object": + "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_5d88217097c34dcf8ee4be986cd09a28", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063698216", + "status": "pre_transit", "status_detail": "status_update", "created_at": "2024-07-18T21:36:31Z", + "updated_at": "2024-07-18T21:36:31Z", "signed_by": null, "weight": null, "est_delivery_date": + "2024-07-18T21:36:31Z", "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", + "carrier": "USPS", "tracking_details": [{"object": "TrackingDetail", "message": + "Pre-Shipment Info Sent to USPS", "description": "", "status": "pre_transit", + "status_detail": "status_update", "datetime": "2024-06-18T21:36:31Z", "source": + "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", + "city": null, "state": null, "country": null, "zip": null}}, {"object": "TrackingDetail", + "message": "Shipping Label Created", "description": "", "status": "pre_transit", + "status_detail": "status_update", "datetime": "2024-06-19T10:13:31Z", "source": + "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", + "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063"}}], "fees": + [], "carrier_detail": {"object": "CarrierDetail", "service": "First-Class + Package Service", "container_type": null, "est_delivery_date_local": null, + "est_delivery_time_local": null, "origin_location": "HOUSTON TX, 77001", "origin_tracking_location": + {"object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": + null, "zip": "77063"}, "destination_location": "CHARLESTON SC, 29401", "destination_tracking_location": + null, "guaranteed_delivery_date": null, "alternate_identifier": null, "initial_delivery_attempt": + null}, "public_url": "https://track.easypost.com/djE6dHJrXzVkODgyMTcwOTdjMzRkY2Y4ZWU0YmU5ODZjZDA5YTI4"}, + "to_address": {"id": "adr_cb3c055b454d11ef8287ac1f6bc539aa", "object": "Address", + "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:30+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": + 4, "return_address": {"id": "adr_cb3e90f7454d11efb208ac1f6bc539ae", "object": + "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", + "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "buyer_address": {"id": "adr_cb3c055b454d11ef8287ac1f6bc539aa", "object": + "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:30+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": + [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": + true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": + "5.93000", "charged": true, "refunded": false}, {"object": "Fee", "type": + "InsuranceFee", "amount": "1.00000", "charged": true, "refunded": false}], + "id": "shp_100e485b59294ece94b66f0a6427f032", "object": "Shipment"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '10261' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - bfd174a366998adfe788ee05002e6a40 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb34nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq 4e1e840afe + - extlb2nuq fa152d4755 + x-runtime: + - '0.279336' + x-version-label: + - easypost-202407182050-c8a24f13ee-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: '{"type": "damage", "email_evidence_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], + "invoice_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], + "supporting_documentation_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], + "description": "Test description", "contact_email": "test@example.com", "tracking_code": + "9400100110368063698216", "amount": "100.00"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '618' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/beta/claims + response: + body: + string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/74b7dae47c5349a4876837984aade087.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/295f8c97f6cb4a72a0b302296e5b08b5.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7034ce5274e948faa541e7aee1c90deb.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-18T21:36:31", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:36:31"}], + "id": "clm_097dd2d0c5f944f7b51924422f6341b7", "insurance_amount": "100.00", + "insurance_id": "ins_26eed360e3dc4b2095263f1af0435892", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-18T21:36:31", "tracking_code": "9400100110368063698216", "type": + "damage", "updated_at": "2024-07-18T21:36:31"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '1111' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Origin + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - bfd174a366998adfe788ee05002e6a86 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb40nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb4nuq 4e1e840afe + - extlb2nuq fa152d4755 + x-runtime: + - '0.871007' + x-version-label: + - easypost-202407182050-c8a24f13ee-master + x-xss-protection: + - 1; mode=block + status: + code: 201 + message: Created +version: 1 diff --git a/tests/cassettes/test_claim_get_next_page.yaml b/tests/cassettes/test_claim_get_next_page.yaml new file mode 100644 index 00000000..d893b33c --- /dev/null +++ b/tests/cassettes/test_claim_get_next_page.yaml @@ -0,0 +1,103 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + authorization: + - + user-agent: + - + method: GET + uri: https://api.easypost.com/beta/claims?page_size=5 + response: + body: + string: '{"claims": [{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1a9f84376e1a4afcba7fb4c60ffc9402.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7e58fa152dc7446e9dc6959d03d216fe.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1f3ba9cae53444579df05405310e8a97.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-18T21:41:13", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:41:13"}], + "id": "clm_097dd0b1b06d4cea92d5493c26c2b0a4", "insurance_amount": "100.00", + "insurance_id": "ins_8fa0759538ba4630a1bcd7d65a72a0fe", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-18T21:41:13", "tracking_code": "9400100110368063699336", "type": + "damage", "updated_at": "2024-07-18T21:41:13"}, {"approved_amount": null, + "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/74b7dae47c5349a4876837984aade087.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/295f8c97f6cb4a72a0b302296e5b08b5.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7034ce5274e948faa541e7aee1c90deb.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-18T21:36:31", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:36:31"}], + "id": "clm_097dd2d0c5f944f7b51924422f6341b7", "insurance_amount": "100.00", + "insurance_id": "ins_26eed360e3dc4b2095263f1af0435892", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-18T21:36:31", "tracking_code": "9400100110368063698216", "type": + "damage", "updated_at": "2024-07-18T21:36:31"}, {"approved_amount": null, + "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/a169ac0ffa1d46dcb56118f0b5c02bcc.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/d32b135079e944ceb558eb8a24151346.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/f4712df4d9bc448b85d68d1c3fdd3fb4.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-18T21:25:33", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:25:33"}], + "id": "clm_097d7a0ce4274578896ea9b65a9f5d2b", "insurance_amount": "100.00", + "insurance_id": "ins_4ac7b08d2bd34ad28f017f72b04b820e", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_be019d9828b84bbc8d33e211a55b1c08", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-18T21:25:33", "tracking_code": "9400100110368063695628", "type": + "damage", "updated_at": "2024-07-18T21:25:33"}], "has_more": false}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '3363' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Origin + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 95a1227e66998c80e78a13ac002d4ec5 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb42nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq 4e1e840afe + - extlb1nuq fa152d4755 + x-runtime: + - '0.045254' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/test_claim_retrieve.yaml b/tests/cassettes/test_claim_retrieve.yaml new file mode 100644 index 00000000..81034a2d --- /dev/null +++ b/tests/cassettes/test_claim_retrieve.yaml @@ -0,0 +1,703 @@ +interactions: +- request: + body: '{"shipment": {"from_address": {"name": "Jack Sparrow", "street1": "388 + Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": + "94107", "country": "US", "email": "test@example.com", "phone": "5555555555"}, + "to_address": {"name": "Elizabeth Swan", "street1": "179 N Harbor Dr", "city": + "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "email": "test@example.com", + "phone": "5555555555"}, "parcel": {"length": 10, "width": 8, "height": 4, "weight": + 15.4}, "customs_info": {"eel_pfc": "NOEEI 30.37(a)", "customs_certify": true, + "customs_signer": "Steve Brule", "contents_type": "merchandise", "contents_explanation": + "", "restriction_type": "none", "non_delivery_option": "return", "customs_items": + [{"description": "Sweet shirts", "quantity": 2, "weight": 11, "value": 23.25, + "hs_tariff_number": "654321", "origin_country": "US"}]}, "options": {"label_format": + "PNG", "invoice_number": "123"}, "reference": "123"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '954' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/shipments + response: + body: + string: '{"created_at": "2024-07-18T21:41:11Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", + "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": + "UPS", "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": + "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", + "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", + "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": + "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid + Access License number"}], "mode": "test", "options": {"label_format": "PNG", + "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, + "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": + null, "updated_at": "2024-07-18T21:41:12Z", "batch_id": null, "batch_status": + null, "batch_message": null, "customs_info": {"id": "cstinfo_8297beb2446c477590c41122f7c7f4ea", + "object": "CustomsInfo", "created_at": "2024-07-18T21:41:11Z", "updated_at": + "2024-07-18T21:41:11Z", "contents_explanation": "", "contents_type": "merchandise", + "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI + 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, + "restriction_type": "none", "mode": "test", "declaration": null, "customs_items": + [{"id": "cstitem_ca3909bcd87d40e9b4a787ca3303b941", "object": "CustomsItem", + "created_at": "2024-07-18T21:41:11Z", "updated_at": "2024-07-18T21:41:11Z", + "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": + "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": + "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": + null}]}, "from_address": {"id": "adr_736c77a0454e11efa92dac1f6bc539ae", "object": + "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", + "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_466e858c98e349ed9520217051f5b919", + "object": "Parcel", "created_at": "2024-07-18T21:41:11Z", "updated_at": "2024-07-18T21:41:11Z", + "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": + 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_f533a05151d74d28aa722fa8cc8f5784", + "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_783c8ac03a8c4039913ad013e8079343", + "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_8e11c1a6dbe94d42ac017d6d775eda22", + "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": + null, "selected_rate": null, "tracker": null, "to_address": {"id": "adr_736a4afb454e11efbb843cecef1b359e", + "object": "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": + "2024-07-18T21:41:11+00:00", "name": "Elizabeth Swan", "company": null, "street1": + "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", + "zip": "90277", "country": "US", "phone": "", "email": "", + "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": + null, "state_tax_id": null, "verifications": {}}, "usps_zone": 4, "return_address": + {"id": "adr_736c77a0454e11efa92dac1f6bc539ae", "object": "Address", "created_at": + "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", "name": + "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "buyer_address": {"id": "adr_736a4afb454e11efbb843cecef1b359e", "object": + "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", + "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": + null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", + "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "forms": [], "fees": [], "id": "shp_f9dd8b8ad442489f9b7334d957892609", + "object": "Shipment"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '6912' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + location: + - /api/v2/shipments/shp_f9dd8b8ad442489f9b7334d957892609 + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - bfd174a766998bf7e789f1e7002f4386 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb38nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq 4e1e840afe + - extlb2nuq fa152d4755 + x-runtime: + - '0.656932' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 201 + message: Created +- request: + body: '{"rate": {"id": "rate_783c8ac03a8c4039913ad013e8079343"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '57' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/shipments/shp_f9dd8b8ad442489f9b7334d957892609/buy + response: + body: + string: '{"created_at": "2024-07-18T21:41:11Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", + "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": + "UPS", "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": + "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", + "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", + "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": + "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid + Access License number"}], "mode": "test", "options": {"label_format": "PNG", + "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, + "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": + "9400100110368063699336", "updated_at": "2024-07-18T21:41:13Z", "batch_id": + null, "batch_status": null, "batch_message": null, "customs_info": {"id": + "cstinfo_8297beb2446c477590c41122f7c7f4ea", "object": "CustomsInfo", "created_at": + "2024-07-18T21:41:11Z", "updated_at": "2024-07-18T21:41:11Z", "contents_explanation": + "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": + "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", + "restriction_comments": null, "restriction_type": "none", "mode": "test", + "declaration": null, "customs_items": [{"id": "cstitem_ca3909bcd87d40e9b4a787ca3303b941", + "object": "CustomsItem", "created_at": "2024-07-18T21:41:11Z", "updated_at": + "2024-07-18T21:41:11Z", "description": "Sweet shirts", "hs_tariff_number": + "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": + 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, + "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": + "adr_736c77a0454e11efa92dac1f6bc539ae", "object": "Address", "created_at": + "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", "name": + "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_466e858c98e349ed9520217051f5b919", + "object": "Parcel", "created_at": "2024-07-18T21:41:11Z", "updated_at": "2024-07-18T21:41:11Z", + "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_7ee03b63be8e4d41904bfe931b6465e9", + "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:13Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:41:12Z", + "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e80e915880a6b54ffd8c17adfbd7c4a4a4.png", + "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": + null}, "rates": [{"id": "rate_f533a05151d74d28aa722fa8cc8f5784", "object": + "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_783c8ac03a8c4039913ad013e8079343", + "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_8e11c1a6dbe94d42ac017d6d775eda22", + "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": + null, "selected_rate": {"id": "rate_783c8ac03a8c4039913ad013e8079343", "object": + "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_8596380b4a794d909375fe43b76dfa0d", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063699336", + "status": "unknown", "status_detail": "unknown", "created_at": "2024-07-18T21:41:13Z", + "updated_at": "2024-07-18T21:41:13Z", "signed_by": null, "weight": null, "est_delivery_date": + null, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier": "USPS", + "tracking_details": [], "fees": [], "carrier_detail": null, "public_url": + "https://track.easypost.com/djE6dHJrXzg1OTYzODBiNGE3OTRkOTA5Mzc1ZmU0M2I3NmRmYTBk"}, + "to_address": {"id": "adr_736a4afb454e11efbb843cecef1b359e", "object": "Address", + "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:12+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": + 4, "return_address": {"id": "adr_736c77a0454e11efa92dac1f6bc539ae", "object": + "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", + "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "buyer_address": {"id": "adr_736a4afb454e11efbb843cecef1b359e", "object": + "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:12+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": + [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": + true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": + "5.93000", "charged": true, "refunded": false}], "id": "shp_f9dd8b8ad442489f9b7334d957892609", + "object": "Shipment"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '9037' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - bfd174a766998bf8e789f1e7002f4415 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb33nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq 4e1e840afe + - extlb2nuq fa152d4755 + x-runtime: + - '0.833023' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: '{"amount": "100.00"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/shipments/shp_f9dd8b8ad442489f9b7334d957892609/insure + response: + body: + string: '{"created_at": "2024-07-18T21:41:11Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", + "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": + "UPS", "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": + "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", + "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", + "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": + "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid + Access License number"}], "mode": "test", "options": {"label_format": "PNG", + "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, + "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": + "9400100110368063699336", "updated_at": "2024-07-18T21:41:13Z", "batch_id": + null, "batch_status": null, "batch_message": null, "customs_info": {"id": + "cstinfo_8297beb2446c477590c41122f7c7f4ea", "object": "CustomsInfo", "created_at": + "2024-07-18T21:41:11Z", "updated_at": "2024-07-18T21:41:11Z", "contents_explanation": + "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": + "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", + "restriction_comments": null, "restriction_type": "none", "mode": "test", + "declaration": null, "customs_items": [{"id": "cstitem_ca3909bcd87d40e9b4a787ca3303b941", + "object": "CustomsItem", "created_at": "2024-07-18T21:41:11Z", "updated_at": + "2024-07-18T21:41:11Z", "description": "Sweet shirts", "hs_tariff_number": + "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": + 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, + "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": + "adr_736c77a0454e11efa92dac1f6bc539ae", "object": "Address", "created_at": + "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", "name": + "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "insurance": "100.00", "order_id": null, "parcel": {"id": "prcl_466e858c98e349ed9520217051f5b919", + "object": "Parcel", "created_at": "2024-07-18T21:41:11Z", "updated_at": "2024-07-18T21:41:11Z", + "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_7ee03b63be8e4d41904bfe931b6465e9", + "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:13Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:41:12Z", + "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e80e915880a6b54ffd8c17adfbd7c4a4a4.png", + "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": + null}, "rates": [{"id": "rate_f533a05151d74d28aa722fa8cc8f5784", "object": + "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_783c8ac03a8c4039913ad013e8079343", + "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_8e11c1a6dbe94d42ac017d6d775eda22", + "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": + null, "selected_rate": {"id": "rate_783c8ac03a8c4039913ad013e8079343", "object": + "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_8596380b4a794d909375fe43b76dfa0d", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063699336", + "status": "pre_transit", "status_detail": "status_update", "created_at": "2024-07-18T21:41:13Z", + "updated_at": "2024-07-18T21:41:13Z", "signed_by": null, "weight": null, "est_delivery_date": + "2024-07-18T21:41:13Z", "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", + "carrier": "USPS", "tracking_details": [{"object": "TrackingDetail", "message": + "Pre-Shipment Info Sent to USPS", "description": "", "status": "pre_transit", + "status_detail": "status_update", "datetime": "2024-06-18T21:41:13Z", "source": + "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", + "city": null, "state": null, "country": null, "zip": null}}, {"object": "TrackingDetail", + "message": "Shipping Label Created", "description": "", "status": "pre_transit", + "status_detail": "status_update", "datetime": "2024-06-19T10:18:13Z", "source": + "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", + "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063"}}], "fees": + [], "carrier_detail": {"object": "CarrierDetail", "service": "First-Class + Package Service", "container_type": null, "est_delivery_date_local": null, + "est_delivery_time_local": null, "origin_location": "HOUSTON TX, 77001", "origin_tracking_location": + {"object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": + null, "zip": "77063"}, "destination_location": "CHARLESTON SC, 29401", "destination_tracking_location": + null, "guaranteed_delivery_date": null, "alternate_identifier": null, "initial_delivery_attempt": + null}, "public_url": "https://track.easypost.com/djE6dHJrXzg1OTYzODBiNGE3OTRkOTA5Mzc1ZmU0M2I3NmRmYTBk"}, + "to_address": {"id": "adr_736a4afb454e11efbb843cecef1b359e", "object": "Address", + "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:12+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": + 4, "return_address": {"id": "adr_736c77a0454e11efa92dac1f6bc539ae", "object": + "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", + "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "buyer_address": {"id": "adr_736a4afb454e11efbb843cecef1b359e", "object": + "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:12+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": + [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": + true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": + "5.93000", "charged": true, "refunded": false}, {"object": "Fee", "type": + "InsuranceFee", "amount": "1.00000", "charged": true, "refunded": false}], + "id": "shp_f9dd8b8ad442489f9b7334d957892609", "object": "Shipment"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '10261' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - bfd174a766998bf9e789f1e7002f44e0 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb42nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq 4e1e840afe + - extlb2nuq fa152d4755 + x-runtime: + - '0.278456' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: '{"type": "damage", "email_evidence_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], + "invoice_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], + "supporting_documentation_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], + "description": "Test description", "contact_email": "test@example.com", "tracking_code": + "9400100110368063699336", "amount": "100.00"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '618' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/beta/claims + response: + body: + string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1a9f84376e1a4afcba7fb4c60ffc9402.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7e58fa152dc7446e9dc6959d03d216fe.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1f3ba9cae53444579df05405310e8a97.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-18T21:41:13", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:41:13"}], + "id": "clm_097dd0b1b06d4cea92d5493c26c2b0a4", "insurance_amount": "100.00", + "insurance_id": "ins_8fa0759538ba4630a1bcd7d65a72a0fe", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-18T21:41:13", "tracking_code": "9400100110368063699336", "type": + "damage", "updated_at": "2024-07-18T21:41:13"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '1111' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Origin + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - bfd174a766998bf9e789f1e7002f4533 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb40nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq 4e1e840afe + - extlb2nuq fa152d4755 + x-runtime: + - '0.861430' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + authorization: + - + user-agent: + - + method: GET + uri: https://api.easypost.com/beta/claims/clm_097dd0b1b06d4cea92d5493c26c2b0a4 + response: + body: + string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1a9f84376e1a4afcba7fb4c60ffc9402.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7e58fa152dc7446e9dc6959d03d216fe.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1f3ba9cae53444579df05405310e8a97.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-18T21:41:13", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:41:13"}], + "id": "clm_097dd0b1b06d4cea92d5493c26c2b0a4", "insurance_amount": "100.00", + "insurance_id": "ins_8fa0759538ba4630a1bcd7d65a72a0fe", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-18T21:41:13", "tracking_code": "9400100110368063699336", "type": + "damage", "updated_at": "2024-07-18T21:41:13"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '1111' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Origin + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - bfd174a766998bfae789f1e7002f4605 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb41nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq 4e1e840afe + - extlb2nuq fa152d4755 + x-runtime: + - '0.035800' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +version: 1 diff --git a/tests/conftest.py b/tests/conftest.py index a5b836d2..6b8b8c58 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,8 +10,8 @@ ) import pytest -from easypost.easypost_client import EasyPostClient +from easypost.easypost_client import EasyPostClient EASYPOST_TEST_API_KEY = os.getenv("EASYPOST_TEST_API_KEY") EASYPOST_PROD_API_KEY = os.getenv("EASYPOST_PROD_API_KEY") @@ -306,6 +306,13 @@ def basic_insurance(): return read_fixture_data()["insurances"]["basic"] +@pytest.fixture +def basic_claim(): + """This fixture will require you to append a `tracking_code` key with the shipment's tracking code, + and a `amount` key with the insurance amount.""" + return read_fixture_data()["claims"]["basic"] + + @pytest.fixture def basic_order(): return read_fixture_data()["orders"]["basic"] diff --git a/tests/test_claim.py b/tests/test_claim.py new file mode 100644 index 00000000..83bb8f6e --- /dev/null +++ b/tests/test_claim.py @@ -0,0 +1,100 @@ +import pytest +from easypost.constant import ( + _FILTERS_KEY, + _TEST_FAILED_INTENTIONALLY_ERROR, + NO_MORE_PAGES_ERROR, +) +from easypost.models import Claim, Shipment + + +def _prepare_insured_shipment(client, shipment_data, claim_amount) -> Shipment: + shipment = client.shipment.create(**shipment_data) + rate = shipment.lowest_rate() + purchased_shipment = client.shipment.buy(shipment.id, rate=rate) + _ = client.shipment.insure(shipment.id, amount=claim_amount) + + return purchased_shipment + +@pytest.mark.vcr() +def test_claim_create(full_shipment, basic_claim, test_client): + claim_amount = "100.00" + + insured_shipment = _prepare_insured_shipment(test_client, full_shipment, claim_amount) + + claim_data = basic_claim + claim_data["tracking_code"] = insured_shipment.tracking_code + claim_data["amount"] = claim_amount + + claim = test_client.claim.create(**claim_data) + + assert isinstance(claim, Claim) + assert str.startswith(claim.id, "clm_") + assert claim.type == claim_data["type"] + + +@pytest.mark.vcr() +def test_claim_retrieve(full_shipment, basic_claim, test_client): + claim_amount = "100.00" + + insured_shipment = _prepare_insured_shipment(test_client, full_shipment, claim_amount) + + claim_data = basic_claim + claim_data["tracking_code"] = insured_shipment.tracking_code + claim_data["amount"] = claim_amount + + claim = test_client.claim.create(**claim_data) + + retrieved_claim = test_client.claim.retrieve(claim.id) + + assert isinstance(retrieved_claim, Claim) + # status changes between creation and retrieval, so we can't compare the whole object + assert claim.id == retrieved_claim.id + + +@pytest.mark.vcr() +def test_claim_all(page_size, test_client): + claims = test_client.claim.all(page_size=page_size) + + claim_array = claims["claims"] + + assert len(claim_array) <= page_size + assert claims["has_more"] is not None + assert all(isinstance(claim, Claim) for claim in claim_array) + + +@pytest.mark.vcr() +def test_claim_get_next_page(page_size, test_client): + try: + first_page = test_client.claim.all(page_size=page_size) + next_page = test_client.claim.get_next_page(claims=first_page, page_size=page_size) + + first_id_of_first_page = first_page["claims"][0].id + first_id_of_second_page = next_page["claims"][0].id + + assert first_id_of_first_page != first_id_of_second_page + + # Verify that the filters are being passed along for behind-the-scenes reference + assert first_page[_FILTERS_KEY] == next_page[_FILTERS_KEY] + except Exception as e: + if e.message != NO_MORE_PAGES_ERROR: + raise Exception(_TEST_FAILED_INTENTIONALLY_ERROR) + + +@pytest.mark.vcr() +def test_claim_cancel(test_client, full_shipment, basic_claim): + claim_amount = "100.00" + + insured_shipment = _prepare_insured_shipment(test_client, full_shipment, claim_amount) + + claim_data = basic_claim + claim_data["tracking_code"] = insured_shipment.tracking_code + claim_data["amount"] = claim_amount + + claim = test_client.claim.create(**claim_data) + + cancelled_claim = test_client.claim.cancel(id=claim.id) + + assert isinstance(cancelled_claim, Claim) + assert str.startswith(cancelled_claim.id, "clm_") + assert cancelled_claim.status == "cancelled" + assert cancelled_claim.messages[0] == "Insurance was cancelled by the user." From 68619b41848f565d87bd343c926968013d918263 Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Fri, 19 Jul 2024 11:05:32 -0600 Subject: [PATCH 2/7] Update fixture data --- examples | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples b/examples index b9fde9be..bcfb3b90 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit b9fde9bead7750256bc986802841ce7576eee0a4 +Subproject commit bcfb3b900550b99e9e4ded9acf4fbd35f1df349f From a659738e4b4687a642b7535f3cbb1c944a46faf5 Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Fri, 19 Jul 2024 13:54:49 -0600 Subject: [PATCH 3/7] - Remove cancel claim function --- easypost/services/base_service.py | 8 +- easypost/services/claim_service.py | 12 - tests/cassettes/test_claim_cancel.yaml | 701 ------------------------- tests/conftest.py | 2 +- tests/test_claim.py | 28 +- 5 files changed, 13 insertions(+), 738 deletions(-) delete mode 100644 tests/cassettes/test_claim_cancel.yaml diff --git a/easypost/services/base_service.py b/easypost/services/base_service.py index 4bc0235a..b9499d06 100644 --- a/easypost/services/base_service.py +++ b/easypost/services/base_service.py @@ -51,7 +51,9 @@ def _create_resource(self, class_name: str, beta: bool = False, **params) -> Any return convert_to_easypost_object(response=response) - def _all_resources(self, class_name: str, filters: Optional[Dict[str, Any]] = None, beta: bool = False, **params) -> Any: + def _all_resources( + self, class_name: str, filters: Optional[Dict[str, Any]] = None, beta: bool = False, **params + ) -> Any: """Retrieve a list of EasyPostObjects from the EasyPost API.""" url = self._class_url(class_name) response = Requestor(self._client).request(method=RequestMethod.GET, url=url, params=params, beta=beta) @@ -69,7 +71,9 @@ def _retrieve_resource(self, class_name: str, id: str, beta: bool = False) -> An return convert_to_easypost_object(response=response) - def _update_resource(self, class_name: str, id: str, method: RequestMethod = RequestMethod.PATCH, beta: bool = False, **params) -> Any: + def _update_resource( + self, class_name: str, id: str, method: RequestMethod = RequestMethod.PATCH, beta: bool = False, **params + ) -> Any: """Update an EasyPost object via the EasyPost API.""" url = self._instance_url(class_name, id) wrapped_params = {self._snakecase_name(class_name): params} diff --git a/easypost/services/claim_service.py b/easypost/services/claim_service.py index fec3a762..c73594ca 100644 --- a/easypost/services/claim_service.py +++ b/easypost/services/claim_service.py @@ -56,15 +56,3 @@ def get_next_page( params.update(optional_params) return self.all(**params) - - def cancel(self, id: str) -> Claim: - """Cancel a Claim.""" - url = f"/claims/{id}/cancel" - - response = Requestor(self._client).request( - method=RequestMethod.POST, - url=url, - beta=True, - ) - - return convert_to_easypost_object(response=response) diff --git a/tests/cassettes/test_claim_cancel.yaml b/tests/cassettes/test_claim_cancel.yaml deleted file mode 100644 index dacf7eae..00000000 --- a/tests/cassettes/test_claim_cancel.yaml +++ /dev/null @@ -1,701 +0,0 @@ -interactions: -- request: - body: '{"shipment": {"from_address": {"name": "Jack Sparrow", "street1": "388 - Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": - "94107", "country": "US", "email": "test@example.com", "phone": "5555555555"}, - "to_address": {"name": "Elizabeth Swan", "street1": "179 N Harbor Dr", "city": - "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "email": "test@example.com", - "phone": "5555555555"}, "parcel": {"length": 10, "width": 8, "height": 4, "weight": - 15.4}, "customs_info": {"eel_pfc": "NOEEI 30.37(a)", "customs_certify": true, - "customs_signer": "Steve Brule", "contents_type": "merchandise", "contents_explanation": - "", "restriction_type": "none", "non_delivery_option": "return", "customs_items": - [{"description": "Sweet shirts", "quantity": 2, "weight": 11, "value": 23.25, - "hs_tariff_number": "654321", "origin_country": "US"}]}, "options": {"label_format": - "PNG", "invoice_number": "123"}, "reference": "123"}}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '954' - Content-Type: - - application/json - authorization: - - - user-agent: - - - method: POST - uri: https://api.easypost.com/v2/shipments - response: - body: - string: '{"created_at": "2024-07-18T21:43:37Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", - "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": - "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": - "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", - "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": - "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid - Access License number"}], "mode": "test", "options": {"label_format": "PNG", - "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, - "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - null, "updated_at": "2024-07-18T21:43:38Z", "batch_id": null, "batch_status": - null, "batch_message": null, "customs_info": {"id": "cstinfo_30138f0a4d3f42a2bfa995228416b273", - "object": "CustomsInfo", "created_at": "2024-07-18T21:43:37Z", "updated_at": - "2024-07-18T21:43:37Z", "contents_explanation": "", "contents_type": "merchandise", - "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI - 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, - "restriction_type": "none", "mode": "test", "declaration": null, "customs_items": - [{"id": "cstitem_c61eda43531e4329bdaeded334654d3e", "object": "CustomsItem", - "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", - "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": - "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": - "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": - null}]}, "from_address": {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": - "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", - "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": - "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": - "US", "phone": "", "email": "", "mode": "test", "carrier_facility": - null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_70a4b478a5ef4ae9902401b71cefb121", - "object": "Parcel", "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", - "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_402c785ac872468996a78d123672b764", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", - "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": - "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_75a5b4ce62aa4dc68beed53abb278ace", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", - "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": - "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", - "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": - "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": null, "tracker": null, "to_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", - "object": "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": - "2024-07-18T21:43:37+00:00", "name": "Elizabeth Swan", "company": null, "street1": - "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", - "zip": "90277", "country": "US", "phone": "", "email": "", - "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": - null, "state_tax_id": null, "verifications": {}}, "usps_zone": 4, "return_address": - {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": "Address", "created_at": - "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", "name": - "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": - "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": - "US", "phone": "", "email": "", "mode": "test", "carrier_facility": - null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": - "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", - "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": - null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", - "phone": "", "email": "", "mode": "test", "carrier_facility": - null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "forms": [], "fees": [], "id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", - "object": "Shipment"}' - headers: - cache-control: - - private, no-cache, no-store - content-length: - - '6912' - content-type: - - application/json; charset=utf-8 - expires: - - '0' - location: - - /api/v2/shipments/shp_c29979af17bd4bc29bbf0d5a5a5a5d76 - pragma: - - no-cache - referrer-policy: - - strict-origin-when-cross-origin - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - x-backend: - - easypost - x-canary: - - direct - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-ep-request-uuid: - - 95a1228066998c89e78a1452002d5523 - x-frame-options: - - SAMEORIGIN - x-node: - - bigweb43nuq - x-permitted-cross-domain-policies: - - none - x-proxied: - - intlb3nuq 4e1e840afe - - extlb1nuq fa152d4755 - x-runtime: - - '0.664457' - x-version-label: - - easypost-202407182129-c0d97eb024-master - x-xss-protection: - - 1; mode=block - status: - code: 201 - message: Created -- request: - body: '{"rate": {"id": "rate_4ecb037f22d2433fb207e7292e5fe007"}}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '57' - Content-Type: - - application/json - authorization: - - - user-agent: - - - method: POST - uri: https://api.easypost.com/v2/shipments/shp_c29979af17bd4bc29bbf0d5a5a5a5d76/buy - response: - body: - string: '{"created_at": "2024-07-18T21:43:37Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", - "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": - "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": - "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", - "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": - "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid - Access License number"}], "mode": "test", "options": {"label_format": "PNG", - "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, - "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - "9400100110368063699763", "updated_at": "2024-07-18T21:43:39Z", "batch_id": - null, "batch_status": null, "batch_message": null, "customs_info": {"id": - "cstinfo_30138f0a4d3f42a2bfa995228416b273", "object": "CustomsInfo", "created_at": - "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", "contents_explanation": - "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": - "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", - "restriction_comments": null, "restriction_type": "none", "mode": "test", - "declaration": null, "customs_items": [{"id": "cstitem_c61eda43531e4329bdaeded334654d3e", - "object": "CustomsItem", "created_at": "2024-07-18T21:43:37Z", "updated_at": - "2024-07-18T21:43:37Z", "description": "Sweet shirts", "hs_tariff_number": - "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": - 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, - "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": - "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": "Address", "created_at": - "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", "name": - "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": - "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": - "US", "phone": "", "email": "", "mode": "test", "carrier_facility": - null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_70a4b478a5ef4ae9902401b71cefb121", - "object": "Parcel", "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", - "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_63c14805ae2b41878f94fe7ae2c76b99", - "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:39Z", - "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:43:38Z", - "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": - "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e87b339edbaf7c492881a6834267297a4e.png", - "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": - null}, "rates": [{"id": "rate_402c785ac872468996a78d123672b764", "object": - "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", - "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": - "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_75a5b4ce62aa4dc68beed53abb278ace", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", - "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": - "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", - "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": - "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", "object": - "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", - "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": - "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_224c80915ed1460eb2702a4070e4a75a", - "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063699763", - "status": "unknown", "status_detail": "unknown", "created_at": "2024-07-18T21:43:39Z", - "updated_at": "2024-07-18T21:43:39Z", "signed_by": null, "weight": null, "est_delivery_date": - null, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier": "USPS", - "tracking_details": [], "fees": [], "carrier_detail": null, "public_url": - "https://track.easypost.com/djE6dHJrXzIyNGM4MDkxNWVkMTQ2MGViMjcwMmE0MDcwZTRhNzVh"}, - "to_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": "Address", - "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", - "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": - "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": - "US", "phone": "", "email": "", "mode": "test", "carrier_facility": - null, "residential": false, "federal_tax_id": null, "state_tax_id": null, - "verifications": {"zip4": {"success": true, "errors": [], "details": null}, - "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, - "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": - 4, "return_address": {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": - "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", - "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": - "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": - "US", "phone": "", "email": "", "mode": "test", "carrier_facility": - null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": - "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", - "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": - "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": - "US", "phone": "", "email": "", "mode": "test", "carrier_facility": - null, "residential": false, "federal_tax_id": null, "state_tax_id": null, - "verifications": {"zip4": {"success": true, "errors": [], "details": null}, - "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, - "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": - [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": - true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": - "5.93000", "charged": true, "refunded": false}], "id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", - "object": "Shipment"}' - headers: - cache-control: - - private, no-cache, no-store - content-length: - - '9037' - content-type: - - application/json; charset=utf-8 - expires: - - '0' - pragma: - - no-cache - referrer-policy: - - strict-origin-when-cross-origin - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - x-backend: - - easypost - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-ep-request-uuid: - - 95a1228066998c8ae78a1452002d55a4 - x-frame-options: - - SAMEORIGIN - x-node: - - bigweb42nuq - x-permitted-cross-domain-policies: - - none - x-proxied: - - intlb4nuq 4e1e840afe - - extlb1nuq fa152d4755 - x-runtime: - - '0.835998' - x-version-label: - - easypost-202407182129-c0d97eb024-master - x-xss-protection: - - 1; mode=block - status: - code: 200 - message: OK -- request: - body: '{"amount": "100.00"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '20' - Content-Type: - - application/json - authorization: - - - user-agent: - - - method: POST - uri: https://api.easypost.com/v2/shipments/shp_c29979af17bd4bc29bbf0d5a5a5a5d76/insure - response: - body: - string: '{"created_at": "2024-07-18T21:43:37Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", - "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": - "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": - "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", - "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": - "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid - Access License number"}], "mode": "test", "options": {"label_format": "PNG", - "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, - "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - "9400100110368063699763", "updated_at": "2024-07-18T21:43:39Z", "batch_id": - null, "batch_status": null, "batch_message": null, "customs_info": {"id": - "cstinfo_30138f0a4d3f42a2bfa995228416b273", "object": "CustomsInfo", "created_at": - "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", "contents_explanation": - "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": - "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", - "restriction_comments": null, "restriction_type": "none", "mode": "test", - "declaration": null, "customs_items": [{"id": "cstitem_c61eda43531e4329bdaeded334654d3e", - "object": "CustomsItem", "created_at": "2024-07-18T21:43:37Z", "updated_at": - "2024-07-18T21:43:37Z", "description": "Sweet shirts", "hs_tariff_number": - "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": - 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, - "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": - "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": "Address", "created_at": - "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", "name": - "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": - "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": - "US", "phone": "", "email": "", "mode": "test", "carrier_facility": - null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": "100.00", "order_id": null, "parcel": {"id": "prcl_70a4b478a5ef4ae9902401b71cefb121", - "object": "Parcel", "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", - "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_63c14805ae2b41878f94fe7ae2c76b99", - "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:39Z", - "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:43:38Z", - "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": - "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e87b339edbaf7c492881a6834267297a4e.png", - "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": - null}, "rates": [{"id": "rate_402c785ac872468996a78d123672b764", "object": - "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", - "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": - "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_75a5b4ce62aa4dc68beed53abb278ace", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", - "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": - "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", - "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": - "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", "object": - "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", - "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": - "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_224c80915ed1460eb2702a4070e4a75a", - "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063699763", - "status": "pre_transit", "status_detail": "status_update", "created_at": "2024-07-18T21:43:39Z", - "updated_at": "2024-07-18T21:43:39Z", "signed_by": null, "weight": null, "est_delivery_date": - "2024-07-18T21:43:39Z", "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", - "carrier": "USPS", "tracking_details": [{"object": "TrackingDetail", "message": - "Pre-Shipment Info Sent to USPS", "description": "", "status": "pre_transit", - "status_detail": "status_update", "datetime": "2024-06-18T21:43:39Z", "source": - "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", - "city": null, "state": null, "country": null, "zip": null}}, {"object": "TrackingDetail", - "message": "Shipping Label Created", "description": "", "status": "pre_transit", - "status_detail": "status_update", "datetime": "2024-06-19T10:20:39Z", "source": - "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", - "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063"}}], "fees": - [], "carrier_detail": {"object": "CarrierDetail", "service": "First-Class - Package Service", "container_type": null, "est_delivery_date_local": null, - "est_delivery_time_local": null, "origin_location": "HOUSTON TX, 77001", "origin_tracking_location": - {"object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": - null, "zip": "77063"}, "destination_location": "CHARLESTON SC, 29401", "destination_tracking_location": - null, "guaranteed_delivery_date": null, "alternate_identifier": null, "initial_delivery_attempt": - null}, "public_url": "https://track.easypost.com/djE6dHJrXzIyNGM4MDkxNWVkMTQ2MGViMjcwMmE0MDcwZTRhNzVh"}, - "to_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": "Address", - "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", - "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": - null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": - "US", "phone": "", "email": "", "mode": "test", "carrier_facility": - null, "residential": false, "federal_tax_id": null, "state_tax_id": null, - "verifications": {"zip4": {"success": true, "errors": [], "details": null}, - "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, - "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": - 4, "return_address": {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": - "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", - "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": - "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": - "US", "phone": "", "email": "", "mode": "test", "carrier_facility": - null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": - "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", - "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": - null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": - "US", "phone": "", "email": "", "mode": "test", "carrier_facility": - null, "residential": false, "federal_tax_id": null, "state_tax_id": null, - "verifications": {"zip4": {"success": true, "errors": [], "details": null}, - "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, - "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": - [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": - true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": - "5.93000", "charged": true, "refunded": false}, {"object": "Fee", "type": - "InsuranceFee", "amount": "1.00000", "charged": true, "refunded": false}], - "id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "object": "Shipment"}' - headers: - cache-control: - - private, no-cache, no-store - content-length: - - '10261' - content-type: - - application/json; charset=utf-8 - expires: - - '0' - pragma: - - no-cache - referrer-policy: - - strict-origin-when-cross-origin - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - x-backend: - - easypost - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-ep-request-uuid: - - 95a1228066998c8be78a1452002d5644 - x-frame-options: - - SAMEORIGIN - x-node: - - bigweb34nuq - x-permitted-cross-domain-policies: - - none - x-proxied: - - intlb3nuq 4e1e840afe - - extlb1nuq fa152d4755 - x-runtime: - - '0.261961' - x-version-label: - - easypost-202407182129-c0d97eb024-master - x-xss-protection: - - 1; mode=block - status: - code: 200 - message: OK -- request: - body: '{"type": "damage", "email_evidence_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], - "invoice_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], - "supporting_documentation_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], - "description": "Test description", "contact_email": "test@example.com", "tracking_code": - "9400100110368063699763", "amount": "100.00"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '618' - Content-Type: - - application/json - authorization: - - - user-agent: - - - method: POST - uri: https://api.easypost.com/beta/claims - response: - body: - string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/4e62e52053664b7abb701015766c4ece.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7741f824477f4798b1d66039432438e9.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1060847ab66f420db523d8e2f4f479eb.png"], - "check_delivery_address": null, "contact_email": "test@example.com", "created_at": - "2024-07-18T21:43:39", "description": "Test description", "history": [{"status": - "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:43:39"}], - "id": "clm_097d52b60bc946dea768d889adfb6ba9", "insurance_amount": "100.00", - "insurance_id": "ins_ac6d538faacb4cb398a4f9599a533e3d", "mode": "test", "object": - "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": - "100.00", "salvage_value": null, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", - "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": - "2024-07-18T21:43:39", "tracking_code": "9400100110368063699763", "type": - "damage", "updated_at": "2024-07-18T21:43:39"}' - headers: - cache-control: - - private, no-cache, no-store - content-length: - - '1111' - content-type: - - application/json; charset=utf-8 - expires: - - '0' - pragma: - - no-cache - referrer-policy: - - strict-origin-when-cross-origin - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Origin - x-backend: - - easypost - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-ep-request-uuid: - - 95a1228066998c8be78a1452002d5681 - x-frame-options: - - SAMEORIGIN - x-node: - - bigweb36nuq - x-permitted-cross-domain-policies: - - none - x-proxied: - - intlb4nuq 4e1e840afe - - extlb1nuq fa152d4755 - x-runtime: - - '0.869779' - x-version-label: - - easypost-202407182129-c0d97eb024-master - x-xss-protection: - - 1; mode=block - status: - code: 201 - message: Created -- request: - body: '{}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '2' - Content-Type: - - application/json - authorization: - - - user-agent: - - - method: POST - uri: https://api.easypost.com/beta/claims/clm_097d52b60bc946dea768d889adfb6ba9/cancel - response: - body: - string: '{"error": {"errors": ["{\"error\": {\"title\": \"Invalid attribute\", - \"message\": \"You passed an invalid value for the id attribute. Invalid parameter: - id must be an integer from api/v2/tickets/show\"}}"], "message": "{\"error\": - {\"title\": \"Invalid attribute\", \"message\": \"You passed an invalid value - for the id attribute. Invalid parameter: id must be an integer from api/v2/tickets/show\"}}"}}' - headers: - cache-control: - - private, no-cache, no-store - content-length: - - '401' - content-type: - - application/json; charset=utf-8 - expires: - - '0' - pragma: - - no-cache - referrer-policy: - - strict-origin-when-cross-origin - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Origin - x-backend: - - easypost - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-ep-request-uuid: - - 95a1228066998c8ce78a1452002d5734 - x-frame-options: - - SAMEORIGIN - x-node: - - bigweb38nuq - x-permitted-cross-domain-policies: - - none - x-proxied: - - intlb3nuq 4e1e840afe - - extlb1nuq fa152d4755 - x-runtime: - - '0.497966' - x-version-label: - - easypost-202407182129-c0d97eb024-master - x-xss-protection: - - 1; mode=block - status: - code: 500 - message: Internal Server Error -version: 1 diff --git a/tests/conftest.py b/tests/conftest.py index 6b8b8c58..6b2dbad4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,9 +10,9 @@ ) import pytest - from easypost.easypost_client import EasyPostClient + EASYPOST_TEST_API_KEY = os.getenv("EASYPOST_TEST_API_KEY") EASYPOST_PROD_API_KEY = os.getenv("EASYPOST_PROD_API_KEY") PARTNER_USER_PROD_API_KEY = os.getenv("PARTNER_USER_PROD_API_KEY", "123") diff --git a/tests/test_claim.py b/tests/test_claim.py index 83bb8f6e..940ea872 100644 --- a/tests/test_claim.py +++ b/tests/test_claim.py @@ -4,7 +4,10 @@ _TEST_FAILED_INTENTIONALLY_ERROR, NO_MORE_PAGES_ERROR, ) -from easypost.models import Claim, Shipment +from easypost.models import ( + Claim, + Shipment, +) def _prepare_insured_shipment(client, shipment_data, claim_amount) -> Shipment: @@ -15,6 +18,7 @@ def _prepare_insured_shipment(client, shipment_data, claim_amount) -> Shipment: return purchased_shipment + @pytest.mark.vcr() def test_claim_create(full_shipment, basic_claim, test_client): claim_amount = "100.00" @@ -35,7 +39,7 @@ def test_claim_create(full_shipment, basic_claim, test_client): @pytest.mark.vcr() def test_claim_retrieve(full_shipment, basic_claim, test_client): claim_amount = "100.00" - + insured_shipment = _prepare_insured_shipment(test_client, full_shipment, claim_amount) claim_data = basic_claim @@ -78,23 +82,3 @@ def test_claim_get_next_page(page_size, test_client): except Exception as e: if e.message != NO_MORE_PAGES_ERROR: raise Exception(_TEST_FAILED_INTENTIONALLY_ERROR) - - -@pytest.mark.vcr() -def test_claim_cancel(test_client, full_shipment, basic_claim): - claim_amount = "100.00" - - insured_shipment = _prepare_insured_shipment(test_client, full_shipment, claim_amount) - - claim_data = basic_claim - claim_data["tracking_code"] = insured_shipment.tracking_code - claim_data["amount"] = claim_amount - - claim = test_client.claim.create(**claim_data) - - cancelled_claim = test_client.claim.cancel(id=claim.id) - - assert isinstance(cancelled_claim, Claim) - assert str.startswith(cancelled_claim.id, "clm_") - assert cancelled_claim.status == "cancelled" - assert cancelled_claim.messages[0] == "Insurance was cancelled by the user." From f4d8c7f4281e9ab1b5d3695f7ab629a06ae7e50c Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Mon, 22 Jul 2024 10:31:43 -0600 Subject: [PATCH 4/7] Revert "- Remove cancel claim function" This reverts commit a659738e4b4687a642b7535f3cbb1c944a46faf5. --- easypost/services/base_service.py | 8 +- easypost/services/claim_service.py | 12 + tests/cassettes/test_claim_cancel.yaml | 701 +++++++++++++++++++++++++ tests/conftest.py | 2 +- tests/test_claim.py | 28 +- 5 files changed, 738 insertions(+), 13 deletions(-) create mode 100644 tests/cassettes/test_claim_cancel.yaml diff --git a/easypost/services/base_service.py b/easypost/services/base_service.py index b9499d06..4bc0235a 100644 --- a/easypost/services/base_service.py +++ b/easypost/services/base_service.py @@ -51,9 +51,7 @@ def _create_resource(self, class_name: str, beta: bool = False, **params) -> Any return convert_to_easypost_object(response=response) - def _all_resources( - self, class_name: str, filters: Optional[Dict[str, Any]] = None, beta: bool = False, **params - ) -> Any: + def _all_resources(self, class_name: str, filters: Optional[Dict[str, Any]] = None, beta: bool = False, **params) -> Any: """Retrieve a list of EasyPostObjects from the EasyPost API.""" url = self._class_url(class_name) response = Requestor(self._client).request(method=RequestMethod.GET, url=url, params=params, beta=beta) @@ -71,9 +69,7 @@ def _retrieve_resource(self, class_name: str, id: str, beta: bool = False) -> An return convert_to_easypost_object(response=response) - def _update_resource( - self, class_name: str, id: str, method: RequestMethod = RequestMethod.PATCH, beta: bool = False, **params - ) -> Any: + def _update_resource(self, class_name: str, id: str, method: RequestMethod = RequestMethod.PATCH, beta: bool = False, **params) -> Any: """Update an EasyPost object via the EasyPost API.""" url = self._instance_url(class_name, id) wrapped_params = {self._snakecase_name(class_name): params} diff --git a/easypost/services/claim_service.py b/easypost/services/claim_service.py index c73594ca..fec3a762 100644 --- a/easypost/services/claim_service.py +++ b/easypost/services/claim_service.py @@ -56,3 +56,15 @@ def get_next_page( params.update(optional_params) return self.all(**params) + + def cancel(self, id: str) -> Claim: + """Cancel a Claim.""" + url = f"/claims/{id}/cancel" + + response = Requestor(self._client).request( + method=RequestMethod.POST, + url=url, + beta=True, + ) + + return convert_to_easypost_object(response=response) diff --git a/tests/cassettes/test_claim_cancel.yaml b/tests/cassettes/test_claim_cancel.yaml new file mode 100644 index 00000000..dacf7eae --- /dev/null +++ b/tests/cassettes/test_claim_cancel.yaml @@ -0,0 +1,701 @@ +interactions: +- request: + body: '{"shipment": {"from_address": {"name": "Jack Sparrow", "street1": "388 + Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": + "94107", "country": "US", "email": "test@example.com", "phone": "5555555555"}, + "to_address": {"name": "Elizabeth Swan", "street1": "179 N Harbor Dr", "city": + "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "email": "test@example.com", + "phone": "5555555555"}, "parcel": {"length": 10, "width": 8, "height": 4, "weight": + 15.4}, "customs_info": {"eel_pfc": "NOEEI 30.37(a)", "customs_certify": true, + "customs_signer": "Steve Brule", "contents_type": "merchandise", "contents_explanation": + "", "restriction_type": "none", "non_delivery_option": "return", "customs_items": + [{"description": "Sweet shirts", "quantity": 2, "weight": 11, "value": 23.25, + "hs_tariff_number": "654321", "origin_country": "US"}]}, "options": {"label_format": + "PNG", "invoice_number": "123"}, "reference": "123"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '954' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/shipments + response: + body: + string: '{"created_at": "2024-07-18T21:43:37Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": + "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": + "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", + "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": + "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid + Access License number"}], "mode": "test", "options": {"label_format": "PNG", + "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, + "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": + null, "updated_at": "2024-07-18T21:43:38Z", "batch_id": null, "batch_status": + null, "batch_message": null, "customs_info": {"id": "cstinfo_30138f0a4d3f42a2bfa995228416b273", + "object": "CustomsInfo", "created_at": "2024-07-18T21:43:37Z", "updated_at": + "2024-07-18T21:43:37Z", "contents_explanation": "", "contents_type": "merchandise", + "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI + 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, + "restriction_type": "none", "mode": "test", "declaration": null, "customs_items": + [{"id": "cstitem_c61eda43531e4329bdaeded334654d3e", "object": "CustomsItem", + "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", + "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": + "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": + "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": + null}]}, "from_address": {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": + "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", + "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_70a4b478a5ef4ae9902401b71cefb121", + "object": "Parcel", "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", + "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": + 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_402c785ac872468996a78d123672b764", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_75a5b4ce62aa4dc68beed53abb278ace", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": + null, "selected_rate": null, "tracker": null, "to_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", + "object": "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": + "2024-07-18T21:43:37+00:00", "name": "Elizabeth Swan", "company": null, "street1": + "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", + "zip": "90277", "country": "US", "phone": "", "email": "", + "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": + null, "state_tax_id": null, "verifications": {}}, "usps_zone": 4, "return_address": + {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": "Address", "created_at": + "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", "name": + "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "buyer_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": + "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", + "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": + null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", + "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "forms": [], "fees": [], "id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", + "object": "Shipment"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '6912' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + location: + - /api/v2/shipments/shp_c29979af17bd4bc29bbf0d5a5a5a5d76 + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-canary: + - direct + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 95a1228066998c89e78a1452002d5523 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb43nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq 4e1e840afe + - extlb1nuq fa152d4755 + x-runtime: + - '0.664457' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 201 + message: Created +- request: + body: '{"rate": {"id": "rate_4ecb037f22d2433fb207e7292e5fe007"}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '57' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/shipments/shp_c29979af17bd4bc29bbf0d5a5a5a5d76/buy + response: + body: + string: '{"created_at": "2024-07-18T21:43:37Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": + "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": + "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", + "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": + "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid + Access License number"}], "mode": "test", "options": {"label_format": "PNG", + "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, + "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": + "9400100110368063699763", "updated_at": "2024-07-18T21:43:39Z", "batch_id": + null, "batch_status": null, "batch_message": null, "customs_info": {"id": + "cstinfo_30138f0a4d3f42a2bfa995228416b273", "object": "CustomsInfo", "created_at": + "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", "contents_explanation": + "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": + "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", + "restriction_comments": null, "restriction_type": "none", "mode": "test", + "declaration": null, "customs_items": [{"id": "cstitem_c61eda43531e4329bdaeded334654d3e", + "object": "CustomsItem", "created_at": "2024-07-18T21:43:37Z", "updated_at": + "2024-07-18T21:43:37Z", "description": "Sweet shirts", "hs_tariff_number": + "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": + 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, + "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": + "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": "Address", "created_at": + "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", "name": + "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_70a4b478a5ef4ae9902401b71cefb121", + "object": "Parcel", "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", + "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_63c14805ae2b41878f94fe7ae2c76b99", + "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:39Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:43:38Z", + "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e87b339edbaf7c492881a6834267297a4e.png", + "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": + null}, "rates": [{"id": "rate_402c785ac872468996a78d123672b764", "object": + "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_75a5b4ce62aa4dc68beed53abb278ace", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": + null, "selected_rate": {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", "object": + "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_224c80915ed1460eb2702a4070e4a75a", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063699763", + "status": "unknown", "status_detail": "unknown", "created_at": "2024-07-18T21:43:39Z", + "updated_at": "2024-07-18T21:43:39Z", "signed_by": null, "weight": null, "est_delivery_date": + null, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier": "USPS", + "tracking_details": [], "fees": [], "carrier_detail": null, "public_url": + "https://track.easypost.com/djE6dHJrXzIyNGM4MDkxNWVkMTQ2MGViMjcwMmE0MDcwZTRhNzVh"}, + "to_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": "Address", + "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": + 4, "return_address": {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": + "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", + "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "buyer_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": + "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": + [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": + true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": + "5.93000", "charged": true, "refunded": false}], "id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", + "object": "Shipment"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '9037' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 95a1228066998c8ae78a1452002d55a4 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb42nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb4nuq 4e1e840afe + - extlb1nuq fa152d4755 + x-runtime: + - '0.835998' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: '{"amount": "100.00"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/shipments/shp_c29979af17bd4bc29bbf0d5a5a5a5d76/insure + response: + body: + string: '{"created_at": "2024-07-18T21:43:37Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": + "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": + "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", + "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": + "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid + Access License number"}], "mode": "test", "options": {"label_format": "PNG", + "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, + "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": + "9400100110368063699763", "updated_at": "2024-07-18T21:43:39Z", "batch_id": + null, "batch_status": null, "batch_message": null, "customs_info": {"id": + "cstinfo_30138f0a4d3f42a2bfa995228416b273", "object": "CustomsInfo", "created_at": + "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", "contents_explanation": + "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": + "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", + "restriction_comments": null, "restriction_type": "none", "mode": "test", + "declaration": null, "customs_items": [{"id": "cstitem_c61eda43531e4329bdaeded334654d3e", + "object": "CustomsItem", "created_at": "2024-07-18T21:43:37Z", "updated_at": + "2024-07-18T21:43:37Z", "description": "Sweet shirts", "hs_tariff_number": + "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": + 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, + "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": + "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": "Address", "created_at": + "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", "name": + "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "insurance": "100.00", "order_id": null, "parcel": {"id": "prcl_70a4b478a5ef4ae9902401b71cefb121", + "object": "Parcel", "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", + "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_63c14805ae2b41878f94fe7ae2c76b99", + "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:39Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:43:38Z", + "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e87b339edbaf7c492881a6834267297a4e.png", + "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": + null}, "rates": [{"id": "rate_402c785ac872468996a78d123672b764", "object": + "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_75a5b4ce62aa4dc68beed53abb278ace", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", + "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": + null, "selected_rate": {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", "object": + "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_224c80915ed1460eb2702a4070e4a75a", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063699763", + "status": "pre_transit", "status_detail": "status_update", "created_at": "2024-07-18T21:43:39Z", + "updated_at": "2024-07-18T21:43:39Z", "signed_by": null, "weight": null, "est_delivery_date": + "2024-07-18T21:43:39Z", "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", + "carrier": "USPS", "tracking_details": [{"object": "TrackingDetail", "message": + "Pre-Shipment Info Sent to USPS", "description": "", "status": "pre_transit", + "status_detail": "status_update", "datetime": "2024-06-18T21:43:39Z", "source": + "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", + "city": null, "state": null, "country": null, "zip": null}}, {"object": "TrackingDetail", + "message": "Shipping Label Created", "description": "", "status": "pre_transit", + "status_detail": "status_update", "datetime": "2024-06-19T10:20:39Z", "source": + "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", + "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063"}}], "fees": + [], "carrier_detail": {"object": "CarrierDetail", "service": "First-Class + Package Service", "container_type": null, "est_delivery_date_local": null, + "est_delivery_time_local": null, "origin_location": "HOUSTON TX, 77001", "origin_tracking_location": + {"object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": + null, "zip": "77063"}, "destination_location": "CHARLESTON SC, 29401", "destination_tracking_location": + null, "guaranteed_delivery_date": null, "alternate_identifier": null, "initial_delivery_attempt": + null}, "public_url": "https://track.easypost.com/djE6dHJrXzIyNGM4MDkxNWVkMTQ2MGViMjcwMmE0MDcwZTRhNzVh"}, + "to_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": "Address", + "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": + 4, "return_address": {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": + "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", + "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "buyer_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": + "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", + "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": + null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": + "US", "phone": "", "email": "", "mode": "test", "carrier_facility": + null, "residential": false, "federal_tax_id": null, "state_tax_id": null, + "verifications": {"zip4": {"success": true, "errors": [], "details": null}, + "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, + "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": + [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": + true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": + "5.93000", "charged": true, "refunded": false}, {"object": "Fee", "type": + "InsuranceFee", "amount": "1.00000", "charged": true, "refunded": false}], + "id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "object": "Shipment"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '10261' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 95a1228066998c8be78a1452002d5644 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb34nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq 4e1e840afe + - extlb1nuq fa152d4755 + x-runtime: + - '0.261961' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: '{"type": "damage", "email_evidence_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], + "invoice_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], + "supporting_documentation_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], + "description": "Test description", "contact_email": "test@example.com", "tracking_code": + "9400100110368063699763", "amount": "100.00"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '618' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/beta/claims + response: + body: + string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/4e62e52053664b7abb701015766c4ece.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7741f824477f4798b1d66039432438e9.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1060847ab66f420db523d8e2f4f479eb.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-18T21:43:39", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:43:39"}], + "id": "clm_097d52b60bc946dea768d889adfb6ba9", "insurance_amount": "100.00", + "insurance_id": "ins_ac6d538faacb4cb398a4f9599a533e3d", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-18T21:43:39", "tracking_code": "9400100110368063699763", "type": + "damage", "updated_at": "2024-07-18T21:43:39"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '1111' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Origin + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 95a1228066998c8be78a1452002d5681 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb36nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb4nuq 4e1e840afe + - extlb1nuq fa152d4755 + x-runtime: + - '0.869779' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 201 + message: Created +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/beta/claims/clm_097d52b60bc946dea768d889adfb6ba9/cancel + response: + body: + string: '{"error": {"errors": ["{\"error\": {\"title\": \"Invalid attribute\", + \"message\": \"You passed an invalid value for the id attribute. Invalid parameter: + id must be an integer from api/v2/tickets/show\"}}"], "message": "{\"error\": + {\"title\": \"Invalid attribute\", \"message\": \"You passed an invalid value + for the id attribute. Invalid parameter: id must be an integer from api/v2/tickets/show\"}}"}}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '401' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Origin + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 95a1228066998c8ce78a1452002d5734 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb38nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq 4e1e840afe + - extlb1nuq fa152d4755 + x-runtime: + - '0.497966' + x-version-label: + - easypost-202407182129-c0d97eb024-master + x-xss-protection: + - 1; mode=block + status: + code: 500 + message: Internal Server Error +version: 1 diff --git a/tests/conftest.py b/tests/conftest.py index 6b2dbad4..6b8b8c58 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,8 +10,8 @@ ) import pytest -from easypost.easypost_client import EasyPostClient +from easypost.easypost_client import EasyPostClient EASYPOST_TEST_API_KEY = os.getenv("EASYPOST_TEST_API_KEY") EASYPOST_PROD_API_KEY = os.getenv("EASYPOST_PROD_API_KEY") diff --git a/tests/test_claim.py b/tests/test_claim.py index 940ea872..83bb8f6e 100644 --- a/tests/test_claim.py +++ b/tests/test_claim.py @@ -4,10 +4,7 @@ _TEST_FAILED_INTENTIONALLY_ERROR, NO_MORE_PAGES_ERROR, ) -from easypost.models import ( - Claim, - Shipment, -) +from easypost.models import Claim, Shipment def _prepare_insured_shipment(client, shipment_data, claim_amount) -> Shipment: @@ -18,7 +15,6 @@ def _prepare_insured_shipment(client, shipment_data, claim_amount) -> Shipment: return purchased_shipment - @pytest.mark.vcr() def test_claim_create(full_shipment, basic_claim, test_client): claim_amount = "100.00" @@ -39,7 +35,7 @@ def test_claim_create(full_shipment, basic_claim, test_client): @pytest.mark.vcr() def test_claim_retrieve(full_shipment, basic_claim, test_client): claim_amount = "100.00" - + insured_shipment = _prepare_insured_shipment(test_client, full_shipment, claim_amount) claim_data = basic_claim @@ -82,3 +78,23 @@ def test_claim_get_next_page(page_size, test_client): except Exception as e: if e.message != NO_MORE_PAGES_ERROR: raise Exception(_TEST_FAILED_INTENTIONALLY_ERROR) + + +@pytest.mark.vcr() +def test_claim_cancel(test_client, full_shipment, basic_claim): + claim_amount = "100.00" + + insured_shipment = _prepare_insured_shipment(test_client, full_shipment, claim_amount) + + claim_data = basic_claim + claim_data["tracking_code"] = insured_shipment.tracking_code + claim_data["amount"] = claim_amount + + claim = test_client.claim.create(**claim_data) + + cancelled_claim = test_client.claim.cancel(id=claim.id) + + assert isinstance(cancelled_claim, Claim) + assert str.startswith(cancelled_claim.id, "clm_") + assert cancelled_claim.status == "cancelled" + assert cancelled_claim.messages[0] == "Insurance was cancelled by the user." From cd74b17210b2b0999fcfbeff1e2f8478761399ef Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Mon, 22 Jul 2024 10:36:01 -0600 Subject: [PATCH 5/7] - Re-introduce claim cancellation --- tests/cassettes/test_claim_cancel.yaml | 410 +++++++++++++------------ tests/test_claim.py | 1 - 2 files changed, 209 insertions(+), 202 deletions(-) diff --git a/tests/cassettes/test_claim_cancel.yaml b/tests/cassettes/test_claim_cancel.yaml index dacf7eae..b45d4e8b 100644 --- a/tests/cassettes/test_claim_cancel.yaml +++ b/tests/cassettes/test_claim_cancel.yaml @@ -31,12 +31,10 @@ interactions: uri: https://api.easypost.com/v2/shipments response: body: - string: '{"created_at": "2024-07-18T21:43:37Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + string: '{"created_at": "2024-07-22T16:32:15Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: @@ -46,79 +44,81 @@ interactions: "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": - "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": + "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": - "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid + "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid Access License number"}], "mode": "test", "options": {"label_format": "PNG", "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - null, "updated_at": "2024-07-18T21:43:38Z", "batch_id": null, "batch_status": - null, "batch_message": null, "customs_info": {"id": "cstinfo_30138f0a4d3f42a2bfa995228416b273", - "object": "CustomsInfo", "created_at": "2024-07-18T21:43:37Z", "updated_at": - "2024-07-18T21:43:37Z", "contents_explanation": "", "contents_type": "merchandise", + null, "updated_at": "2024-07-22T16:32:16Z", "batch_id": null, "batch_status": + null, "batch_message": null, "customs_info": {"id": "cstinfo_7c66be469f9a490586a50521e8ffa5f0", + "object": "CustomsInfo", "created_at": "2024-07-22T16:32:15Z", "updated_at": + "2024-07-22T16:32:15Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", "declaration": null, "customs_items": - [{"id": "cstitem_c61eda43531e4329bdaeded334654d3e", "object": "CustomsItem", - "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", + [{"id": "cstitem_3a1c94d04772472cbf03a54ed810c35b", "object": "CustomsItem", + "created_at": "2024-07-22T16:32:15Z", "updated_at": "2024-07-22T16:32:15Z", "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": - null}]}, "from_address": {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": - "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", + null}]}, "from_address": {"id": "adr_f4ad69ea484711ef9584ac1f6bc53342", "object": + "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_70a4b478a5ef4ae9902401b71cefb121", - "object": "Parcel", "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_7aa3e156a8224cf893137b1236cb49f3", + "object": "Parcel", "created_at": "2024-07-22T16:32:15Z", "updated_at": "2024-07-22T16:32:15Z", "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_402c785ac872468996a78d123672b764", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_71691ccf57194711adbec63144f2a517", + "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_94298637732a4900bb148bfaf6885066", + "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_75a5b4ce62aa4dc68beed53abb278ace", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + 2, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_ce9b0ea8ae25420994911ff1b557a854", + "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", - "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": - "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + 2, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": null, "tracker": null, "to_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", - "object": "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": - "2024-07-18T21:43:37+00:00", "name": "Elizabeth Swan", "company": null, "street1": + null, "selected_rate": null, "tracker": null, "to_address": {"id": "adr_f4ab211e484711efb5173cecef1b359e", + "object": "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": + "2024-07-22T16:32:15+00:00", "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {}}, "usps_zone": 4, "return_address": - {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": "Address", "created_at": - "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", "name": + {"id": "adr_f4ad69ea484711ef9584ac1f6bc53342", "object": "Address", "created_at": + "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": - "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", + {}}, "buyer_address": {"id": "adr_f4ab211e484711efb5173cecef1b359e", "object": + "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "forms": [], "fees": [], "id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", + {}}, "forms": [], "fees": [], "id": "shp_d97b685262564a868a1590d9e2ffb135", "object": "Shipment"}' headers: cache-control: @@ -130,7 +130,7 @@ interactions: expires: - '0' location: - - /api/v2/shipments/shp_c29979af17bd4bc29bbf0d5a5a5a5d76 + - /api/v2/shipments/shp_d97b685262564a868a1590d9e2ffb135 pragma: - no-cache referrer-policy: @@ -141,34 +141,32 @@ interactions: - chunked x-backend: - easypost - x-canary: - - direct x-content-type-options: - nosniff x-download-options: - noopen x-ep-request-uuid: - - 95a1228066998c89e78a1452002d5523 + - c8716969669e898ff42d83ac00442c7b x-frame-options: - SAMEORIGIN x-node: - - bigweb43nuq + - bigweb53nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb3nuq 4e1e840afe - - extlb1nuq fa152d4755 + - intlb4nuq c0f5e722d1 + - extlb2nuq fa152d4755 x-runtime: - - '0.664457' + - '0.744165' x-version-label: - - easypost-202407182129-c0d97eb024-master + - easypost-202407192203-7acbce7c21-master x-xss-protection: - 1; mode=block status: code: 201 message: Created - request: - body: '{"rate": {"id": "rate_4ecb037f22d2433fb207e7292e5fe007"}}' + body: '{"rate": {"id": "rate_71691ccf57194711adbec63144f2a517"}}' headers: Accept: - '*/*' @@ -185,15 +183,13 @@ interactions: user-agent: - method: POST - uri: https://api.easypost.com/v2/shipments/shp_c29979af17bd4bc29bbf0d5a5a5a5d76/buy + uri: https://api.easypost.com/v2/shipments/shp_d97b685262564a868a1590d9e2ffb135/buy response: body: - string: '{"created_at": "2024-07-18T21:43:37Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + string: '{"created_at": "2024-07-22T16:32:15Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: @@ -203,82 +199,84 @@ interactions: "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": - "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": + "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": - "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid + "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid Access License number"}], "mode": "test", "options": {"label_format": "PNG", "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - "9400100110368063699763", "updated_at": "2024-07-18T21:43:39Z", "batch_id": + "9400100110368065903004", "updated_at": "2024-07-22T16:32:17Z", "batch_id": null, "batch_status": null, "batch_message": null, "customs_info": {"id": - "cstinfo_30138f0a4d3f42a2bfa995228416b273", "object": "CustomsInfo", "created_at": - "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", "contents_explanation": + "cstinfo_7c66be469f9a490586a50521e8ffa5f0", "object": "CustomsInfo", "created_at": + "2024-07-22T16:32:15Z", "updated_at": "2024-07-22T16:32:15Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", - "declaration": null, "customs_items": [{"id": "cstitem_c61eda43531e4329bdaeded334654d3e", - "object": "CustomsItem", "created_at": "2024-07-18T21:43:37Z", "updated_at": - "2024-07-18T21:43:37Z", "description": "Sweet shirts", "hs_tariff_number": + "declaration": null, "customs_items": [{"id": "cstitem_3a1c94d04772472cbf03a54ed810c35b", + "object": "CustomsItem", "created_at": "2024-07-22T16:32:15Z", "updated_at": + "2024-07-22T16:32:15Z", "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": - "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": "Address", "created_at": - "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", "name": + "adr_f4ad69ea484711ef9584ac1f6bc53342", "object": "Address", "created_at": + "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_70a4b478a5ef4ae9902401b71cefb121", - "object": "Parcel", "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_7aa3e156a8224cf893137b1236cb49f3", + "object": "Parcel", "created_at": "2024-07-22T16:32:15Z", "updated_at": "2024-07-22T16:32:15Z", "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_63c14805ae2b41878f94fe7ae2c76b99", - "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:39Z", - "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:43:38Z", + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_8d281bc71c144cd8a96d7508435bdb2d", + "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:17Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-22T16:32:16Z", "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": - "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e87b339edbaf7c492881a6834267297a4e.png", + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240722/e8fa42830dee62461da03deb15405a441b.png", "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": - null}, "rates": [{"id": "rate_402c785ac872468996a78d123672b764", "object": - "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + null}, "rates": [{"id": "rate_71691ccf57194711adbec63144f2a517", "object": + "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_94298637732a4900bb148bfaf6885066", + "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_75a5b4ce62aa4dc68beed53abb278ace", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + 2, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_ce9b0ea8ae25420994911ff1b557a854", + "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", - "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": - "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + 2, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", "object": - "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + null, "selected_rate": {"id": "rate_71691ccf57194711adbec63144f2a517", "object": + "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_224c80915ed1460eb2702a4070e4a75a", - "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063699763", - "status": "unknown", "status_detail": "unknown", "created_at": "2024-07-18T21:43:39Z", - "updated_at": "2024-07-18T21:43:39Z", "signed_by": null, "weight": null, "est_delivery_date": - null, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier": "USPS", + 3, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_3788af22e24247f5820e4fcdf4cf1965", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368065903004", + "status": "unknown", "status_detail": "unknown", "created_at": "2024-07-22T16:32:17Z", + "updated_at": "2024-07-22T16:32:17Z", "signed_by": null, "weight": null, "est_delivery_date": + null, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier": "USPS", "tracking_details": [], "fees": [], "carrier_detail": null, "public_url": - "https://track.easypost.com/djE6dHJrXzIyNGM4MDkxNWVkMTQ2MGViMjcwMmE0MDcwZTRhNzVh"}, - "to_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": "Address", - "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", + "https://track.easypost.com/djE6dHJrXzM3ODhhZjIyZTI0MjQ3ZjU4MjBlNGZjZGY0Y2YxOTY1"}, + "to_address": {"id": "adr_f4ab211e484711efb5173cecef1b359e", "object": "Address", + "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:16+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -286,14 +284,14 @@ interactions: "verifications": {"zip4": {"success": true, "errors": [], "details": null}, "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": - 4, "return_address": {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": - "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", + 4, "return_address": {"id": "adr_f4ad69ea484711ef9584ac1f6bc53342", "object": + "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": - "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", + {}}, "buyer_address": {"id": "adr_f4ab211e484711efb5173cecef1b359e", "object": + "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:16+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -303,7 +301,7 @@ interactions: "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": - "5.93000", "charged": true, "refunded": false}], "id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", + "5.93000", "charged": true, "refunded": false}], "id": "shp_d97b685262564a868a1590d9e2ffb135", "object": "Shipment"}' headers: cache-control: @@ -329,7 +327,7 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - 95a1228066998c8ae78a1452002d55a4 + - c8716969669e8990f42d83ac00442dd3 x-frame-options: - SAMEORIGIN x-node: @@ -337,12 +335,12 @@ interactions: x-permitted-cross-domain-policies: - none x-proxied: - - intlb4nuq 4e1e840afe - - extlb1nuq fa152d4755 + - intlb4nuq c0f5e722d1 + - extlb2nuq fa152d4755 x-runtime: - - '0.835998' + - '0.750954' x-version-label: - - easypost-202407182129-c0d97eb024-master + - easypost-202407192203-7acbce7c21-master x-xss-protection: - 1; mode=block status: @@ -366,15 +364,13 @@ interactions: user-agent: - method: POST - uri: https://api.easypost.com/v2/shipments/shp_c29979af17bd4bc29bbf0d5a5a5a5d76/insure + uri: https://api.easypost.com/v2/shipments/shp_d97b685262564a868a1590d9e2ffb135/insure response: body: - string: '{"created_at": "2024-07-18T21:43:37Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + string: '{"created_at": "2024-07-22T16:32:15Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: @@ -384,85 +380,87 @@ interactions: "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": - "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": + "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": - "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid + "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid Access License number"}], "mode": "test", "options": {"label_format": "PNG", "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - "9400100110368063699763", "updated_at": "2024-07-18T21:43:39Z", "batch_id": + "9400100110368065903004", "updated_at": "2024-07-22T16:32:17Z", "batch_id": null, "batch_status": null, "batch_message": null, "customs_info": {"id": - "cstinfo_30138f0a4d3f42a2bfa995228416b273", "object": "CustomsInfo", "created_at": - "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", "contents_explanation": + "cstinfo_7c66be469f9a490586a50521e8ffa5f0", "object": "CustomsInfo", "created_at": + "2024-07-22T16:32:15Z", "updated_at": "2024-07-22T16:32:15Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", - "declaration": null, "customs_items": [{"id": "cstitem_c61eda43531e4329bdaeded334654d3e", - "object": "CustomsItem", "created_at": "2024-07-18T21:43:37Z", "updated_at": - "2024-07-18T21:43:37Z", "description": "Sweet shirts", "hs_tariff_number": + "declaration": null, "customs_items": [{"id": "cstitem_3a1c94d04772472cbf03a54ed810c35b", + "object": "CustomsItem", "created_at": "2024-07-22T16:32:15Z", "updated_at": + "2024-07-22T16:32:15Z", "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": - "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": "Address", "created_at": - "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", "name": + "adr_f4ad69ea484711ef9584ac1f6bc53342", "object": "Address", "created_at": + "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": "100.00", "order_id": null, "parcel": {"id": "prcl_70a4b478a5ef4ae9902401b71cefb121", - "object": "Parcel", "created_at": "2024-07-18T21:43:37Z", "updated_at": "2024-07-18T21:43:37Z", + {}}, "insurance": "100.00", "order_id": null, "parcel": {"id": "prcl_7aa3e156a8224cf893137b1236cb49f3", + "object": "Parcel", "created_at": "2024-07-22T16:32:15Z", "updated_at": "2024-07-22T16:32:15Z", "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_63c14805ae2b41878f94fe7ae2c76b99", - "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:39Z", - "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:43:38Z", + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_8d281bc71c144cd8a96d7508435bdb2d", + "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:17Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-22T16:32:16Z", "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": - "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e87b339edbaf7c492881a6834267297a4e.png", + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240722/e8fa42830dee62461da03deb15405a441b.png", "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": - null}, "rates": [{"id": "rate_402c785ac872468996a78d123672b764", "object": - "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + null}, "rates": [{"id": "rate_71691ccf57194711adbec63144f2a517", "object": + "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_94298637732a4900bb148bfaf6885066", + "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_75a5b4ce62aa4dc68beed53abb278ace", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + 2, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_ce9b0ea8ae25420994911ff1b557a854", + "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", - "object": "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", - "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", - "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": - "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": + 2, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": {"id": "rate_4ecb037f22d2433fb207e7292e5fe007", "object": - "Rate", "created_at": "2024-07-18T21:43:38Z", "updated_at": "2024-07-18T21:43:38Z", + null, "selected_rate": {"id": "rate_71691ccf57194711adbec63144f2a517", "object": + "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_224c80915ed1460eb2702a4070e4a75a", - "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063699763", - "status": "pre_transit", "status_detail": "status_update", "created_at": "2024-07-18T21:43:39Z", - "updated_at": "2024-07-18T21:43:39Z", "signed_by": null, "weight": null, "est_delivery_date": - "2024-07-18T21:43:39Z", "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", + 3, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_3788af22e24247f5820e4fcdf4cf1965", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368065903004", + "status": "pre_transit", "status_detail": "status_update", "created_at": "2024-07-22T16:32:17Z", + "updated_at": "2024-07-22T16:32:17Z", "signed_by": null, "weight": null, "est_delivery_date": + "2024-07-22T16:32:17Z", "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier": "USPS", "tracking_details": [{"object": "TrackingDetail", "message": "Pre-Shipment Info Sent to USPS", "description": "", "status": "pre_transit", - "status_detail": "status_update", "datetime": "2024-06-18T21:43:39Z", "source": + "status_detail": "status_update", "datetime": "2024-06-22T16:32:17Z", "source": "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", "city": null, "state": null, "country": null, "zip": null}}, {"object": "TrackingDetail", "message": "Shipping Label Created", "description": "", "status": "pre_transit", - "status_detail": "status_update", "datetime": "2024-06-19T10:20:39Z", "source": + "status_detail": "status_update", "datetime": "2024-06-23T05:09:17Z", "source": "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063"}}], "fees": [], "carrier_detail": {"object": "CarrierDetail", "service": "First-Class @@ -471,9 +469,9 @@ interactions: {"object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063"}, "destination_location": "CHARLESTON SC, 29401", "destination_tracking_location": null, "guaranteed_delivery_date": null, "alternate_identifier": null, "initial_delivery_attempt": - null}, "public_url": "https://track.easypost.com/djE6dHJrXzIyNGM4MDkxNWVkMTQ2MGViMjcwMmE0MDcwZTRhNzVh"}, - "to_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": "Address", - "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", + null}, "public_url": "https://track.easypost.com/djE6dHJrXzM3ODhhZjIyZTI0MjQ3ZjU4MjBlNGZjZGY0Y2YxOTY1"}, + "to_address": {"id": "adr_f4ab211e484711efb5173cecef1b359e", "object": "Address", + "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:16+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -481,14 +479,14 @@ interactions: "verifications": {"zip4": {"success": true, "errors": [], "details": null}, "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": - 4, "return_address": {"id": "adr_ca6675b2454e11efbb70ac1f6bc53342", "object": - "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:37+00:00", + 4, "return_address": {"id": "adr_f4ad69ea484711ef9584ac1f6bc53342", "object": + "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_ca63daa1454e11ef98093cecef1b359e", "object": - "Address", "created_at": "2024-07-18T21:43:37+00:00", "updated_at": "2024-07-18T21:43:38+00:00", + {}}, "buyer_address": {"id": "adr_f4ab211e484711efb5173cecef1b359e", "object": + "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:16+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -500,7 +498,7 @@ interactions: true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": "5.93000", "charged": true, "refunded": false}, {"object": "Fee", "type": "InsuranceFee", "amount": "1.00000", "charged": true, "refunded": false}], - "id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", "object": "Shipment"}' + "id": "shp_d97b685262564a868a1590d9e2ffb135", "object": "Shipment"}' headers: cache-control: - private, no-cache, no-store @@ -525,20 +523,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - 95a1228066998c8be78a1452002d5644 + - c8716969669e8991f42d83ac00442ef9 x-frame-options: - SAMEORIGIN x-node: - - bigweb34nuq + - bigweb38nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb3nuq 4e1e840afe - - extlb1nuq fa152d4755 + - intlb3nuq c0f5e722d1 + - extlb2nuq fa152d4755 x-runtime: - - '0.261961' + - '0.310280' x-version-label: - - easypost-202407182129-c0d97eb024-master + - easypost-202407192203-7acbce7c21-master x-xss-protection: - 1; mode=block status: @@ -549,7 +547,7 @@ interactions: "invoice_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], "supporting_documentation_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], "description": "Test description", "contact_email": "test@example.com", "tracking_code": - "9400100110368063699763", "amount": "100.00"}' + "9400100110368065903004", "amount": "100.00"}' headers: Accept: - '*/*' @@ -569,19 +567,19 @@ interactions: uri: https://api.easypost.com/beta/claims response: body: - string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/4e62e52053664b7abb701015766c4ece.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7741f824477f4798b1d66039432438e9.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1060847ab66f420db523d8e2f4f479eb.png"], + string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/6a130e0b3b8843219e47f80843efcce9.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/1fa2701e863546a58eb58cf9dc5f6d49.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/b29a5ab5b35346759ed2c29416cc20f2.png"], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": - "2024-07-18T21:43:39", "description": "Test description", "history": [{"status": - "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:43:39"}], - "id": "clm_097d52b60bc946dea768d889adfb6ba9", "insurance_amount": "100.00", - "insurance_id": "ins_ac6d538faacb4cb398a4f9599a533e3d", "mode": "test", "object": + "2024-07-22T16:32:17", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-22T16:32:17"}], + "id": "clm_097e808661fb4cc4b4ac46398a8ad518", "insurance_amount": "100.00", + "insurance_id": "ins_1a8fe50291ec4863984ca525ffe4a91c", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": - "100.00", "salvage_value": null, "shipment_id": "shp_c29979af17bd4bc29bbf0d5a5a5a5d76", + "100.00", "salvage_value": null, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": - "2024-07-18T21:43:39", "tracking_code": "9400100110368063699763", "type": - "damage", "updated_at": "2024-07-18T21:43:39"}' + "2024-07-22T16:32:17", "tracking_code": "9400100110368065903004", "type": + "damage", "updated_at": "2024-07-22T16:32:17"}' headers: cache-control: - private, no-cache, no-store @@ -608,20 +606,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - 95a1228066998c8be78a1452002d5681 + - c8716969669e8991f42d83ac00442f7f x-frame-options: - SAMEORIGIN x-node: - - bigweb36nuq + - bigweb41nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb4nuq 4e1e840afe - - extlb1nuq fa152d4755 + - intlb4nuq c0f5e722d1 + - extlb2nuq fa152d4755 x-runtime: - - '0.869779' + - '0.882407' x-version-label: - - easypost-202407182129-c0d97eb024-master + - easypost-202407192203-7acbce7c21-master x-xss-protection: - 1; mode=block status: @@ -645,19 +643,29 @@ interactions: user-agent: - method: POST - uri: https://api.easypost.com/beta/claims/clm_097d52b60bc946dea768d889adfb6ba9/cancel + uri: https://api.easypost.com/beta/claims/clm_097e808661fb4cc4b4ac46398a8ad518/cancel response: body: - string: '{"error": {"errors": ["{\"error\": {\"title\": \"Invalid attribute\", - \"message\": \"You passed an invalid value for the id attribute. Invalid parameter: - id must be an integer from api/v2/tickets/show\"}}"], "message": "{\"error\": - {\"title\": \"Invalid attribute\", \"message\": \"You passed an invalid value - for the id attribute. Invalid parameter: id must be an integer from api/v2/tickets/show\"}}"}}' + string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/6a130e0b3b8843219e47f80843efcce9.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/1fa2701e863546a58eb58cf9dc5f6d49.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/b29a5ab5b35346759ed2c29416cc20f2.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-22T16:32:17", "description": "Test description", "history": [{"status": + "cancelled", "status_detail": "Claim cancellation was requested.", "timestamp": + "2024-07-22T16:32:19"}, {"status": "submitted", "status_detail": "Claim was + created.", "timestamp": "2024-07-22T16:32:17"}], "id": "clm_097e808661fb4cc4b4ac46398a8ad518", + "insurance_amount": "100.00", "insurance_id": "ins_1a8fe50291ec4863984ca525ffe4a91c", + "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": + null, "requested_amount": "100.00", "salvage_value": null, "shipment_id": + "shp_d97b685262564a868a1590d9e2ffb135", "status": "cancelled", "status_detail": + "Claim cancellation was requested.", "status_timestamp": "2024-07-22T16:32:19", + "tracking_code": "9400100110368065903004", "type": "damage", "updated_at": + "2024-07-22T16:32:18"}' headers: cache-control: - private, no-cache, no-store content-length: - - '401' + - '1235' content-type: - application/json; charset=utf-8 expires: @@ -679,23 +687,23 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - 95a1228066998c8ce78a1452002d5734 + - c8716969669e8992f42d83ac004430db x-frame-options: - SAMEORIGIN x-node: - - bigweb38nuq + - bigweb39nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb3nuq 4e1e840afe - - extlb1nuq fa152d4755 + - intlb3nuq c0f5e722d1 + - extlb2nuq fa152d4755 x-runtime: - - '0.497966' + - '0.058993' x-version-label: - - easypost-202407182129-c0d97eb024-master + - easypost-202407192203-7acbce7c21-master x-xss-protection: - 1; mode=block status: - code: 500 - message: Internal Server Error + code: 200 + message: OK version: 1 diff --git a/tests/test_claim.py b/tests/test_claim.py index 83bb8f6e..11ef9a33 100644 --- a/tests/test_claim.py +++ b/tests/test_claim.py @@ -97,4 +97,3 @@ def test_claim_cancel(test_client, full_shipment, basic_claim): assert isinstance(cancelled_claim, Claim) assert str.startswith(cancelled_claim.id, "clm_") assert cancelled_claim.status == "cancelled" - assert cancelled_claim.messages[0] == "Insurance was cancelled by the user." From 9001aa00076808d184a9f0be10a740442cfaa385 Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Mon, 22 Jul 2024 10:41:23 -0600 Subject: [PATCH 6/7] - Linting --- easypost/services/base_service.py | 8 ++++++-- tests/conftest.py | 2 +- tests/test_claim.py | 10 +++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/easypost/services/base_service.py b/easypost/services/base_service.py index 4bc0235a..b9499d06 100644 --- a/easypost/services/base_service.py +++ b/easypost/services/base_service.py @@ -51,7 +51,9 @@ def _create_resource(self, class_name: str, beta: bool = False, **params) -> Any return convert_to_easypost_object(response=response) - def _all_resources(self, class_name: str, filters: Optional[Dict[str, Any]] = None, beta: bool = False, **params) -> Any: + def _all_resources( + self, class_name: str, filters: Optional[Dict[str, Any]] = None, beta: bool = False, **params + ) -> Any: """Retrieve a list of EasyPostObjects from the EasyPost API.""" url = self._class_url(class_name) response = Requestor(self._client).request(method=RequestMethod.GET, url=url, params=params, beta=beta) @@ -69,7 +71,9 @@ def _retrieve_resource(self, class_name: str, id: str, beta: bool = False) -> An return convert_to_easypost_object(response=response) - def _update_resource(self, class_name: str, id: str, method: RequestMethod = RequestMethod.PATCH, beta: bool = False, **params) -> Any: + def _update_resource( + self, class_name: str, id: str, method: RequestMethod = RequestMethod.PATCH, beta: bool = False, **params + ) -> Any: """Update an EasyPost object via the EasyPost API.""" url = self._instance_url(class_name, id) wrapped_params = {self._snakecase_name(class_name): params} diff --git a/tests/conftest.py b/tests/conftest.py index 6b8b8c58..6b2dbad4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,9 +10,9 @@ ) import pytest - from easypost.easypost_client import EasyPostClient + EASYPOST_TEST_API_KEY = os.getenv("EASYPOST_TEST_API_KEY") EASYPOST_PROD_API_KEY = os.getenv("EASYPOST_PROD_API_KEY") PARTNER_USER_PROD_API_KEY = os.getenv("PARTNER_USER_PROD_API_KEY", "123") diff --git a/tests/test_claim.py b/tests/test_claim.py index 11ef9a33..1cc38f3b 100644 --- a/tests/test_claim.py +++ b/tests/test_claim.py @@ -4,7 +4,10 @@ _TEST_FAILED_INTENTIONALLY_ERROR, NO_MORE_PAGES_ERROR, ) -from easypost.models import Claim, Shipment +from easypost.models import ( + Claim, + Shipment, +) def _prepare_insured_shipment(client, shipment_data, claim_amount) -> Shipment: @@ -15,6 +18,7 @@ def _prepare_insured_shipment(client, shipment_data, claim_amount) -> Shipment: return purchased_shipment + @pytest.mark.vcr() def test_claim_create(full_shipment, basic_claim, test_client): claim_amount = "100.00" @@ -35,7 +39,7 @@ def test_claim_create(full_shipment, basic_claim, test_client): @pytest.mark.vcr() def test_claim_retrieve(full_shipment, basic_claim, test_client): claim_amount = "100.00" - + insured_shipment = _prepare_insured_shipment(test_client, full_shipment, claim_amount) claim_data = basic_claim @@ -91,7 +95,7 @@ def test_claim_cancel(test_client, full_shipment, basic_claim): claim_data["amount"] = claim_amount claim = test_client.claim.create(**claim_data) - + cancelled_claim = test_client.claim.cancel(id=claim.id) assert isinstance(cancelled_claim, Claim) From be5aad6a7ae4f63a23e7a04aa15067c63d7fd003 Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Tue, 23 Jul 2024 11:54:51 -0600 Subject: [PATCH 7/7] - Promote claim service endpoints from beta to v2 --- easypost/services/claim_service.py | 8 +- tests/cassettes/test_claim_all.yaml | 107 +++-- tests/cassettes/test_claim_cancel.yaml | 390 +++++++++-------- tests/cassettes/test_claim_create.yaml | 380 +++++++++-------- tests/cassettes/test_claim_get_next_page.yaml | 228 ++++++++-- tests/cassettes/test_claim_retrieve.yaml | 400 +++++++++--------- 6 files changed, 838 insertions(+), 675 deletions(-) diff --git a/easypost/services/claim_service.py b/easypost/services/claim_service.py index fec3a762..8604dd4f 100644 --- a/easypost/services/claim_service.py +++ b/easypost/services/claim_service.py @@ -22,7 +22,7 @@ def create(self, **params) -> Claim: """Create a Claim.""" url = "/claims" - response = Requestor(self._client).request(method=RequestMethod.POST, url=url, params=params, beta=True) + response = Requestor(self._client).request(method=RequestMethod.POST, url=url, params=params, beta=False) return convert_to_easypost_object(response=response) @@ -32,11 +32,11 @@ def all(self, **params) -> Dict[str, Any]: "key": "claims", } - return self._all_resources(class_name=self._model_class, filters=filters, beta=True, **params) + return self._all_resources(class_name=self._model_class, filters=filters, beta=False, **params) def retrieve(self, id: str) -> Claim: """Retrieve a Claim.""" - return self._retrieve_resource(class_name=self._model_class, id=id, beta=True) + return self._retrieve_resource(class_name=self._model_class, id=id, beta=False) def get_next_page( self, @@ -64,7 +64,7 @@ def cancel(self, id: str) -> Claim: response = Requestor(self._client).request( method=RequestMethod.POST, url=url, - beta=True, + beta=False, ) return convert_to_easypost_object(response=response) diff --git a/tests/cassettes/test_claim_all.yaml b/tests/cassettes/test_claim_all.yaml index b8aebf3a..99e291f7 100644 --- a/tests/cassettes/test_claim_all.yaml +++ b/tests/cassettes/test_claim_all.yaml @@ -13,53 +13,80 @@ interactions: user-agent: - method: GET - uri: https://api.easypost.com/beta/claims?page_size=5 + uri: https://api.easypost.com/v2/claims?page_size=5 response: body: - string: '{"claims": [{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1a9f84376e1a4afcba7fb4c60ffc9402.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7e58fa152dc7446e9dc6959d03d216fe.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1f3ba9cae53444579df05405310e8a97.png"], + string: '{"claims": [{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/7b9b0171ae7b4e258f765822e7cddb71.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/2cd9fdd33a7d40fc84ac8f87c3da1f86.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/d3aebbc42e884769ad810c92c26ad8ad.png"], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": - "2024-07-18T21:41:13", "description": "Test description", "history": [{"status": - "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:41:13"}], - "id": "clm_097dd0b1b06d4cea92d5493c26c2b0a4", "insurance_amount": "100.00", - "insurance_id": "ins_8fa0759538ba4630a1bcd7d65a72a0fe", "mode": "test", "object": + "2024-07-23T17:53:40", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-23T17:53:40"}], + "id": "clm_097e86d630e44e83b736c48c1271fed3", "insurance_amount": "100.00", + "insurance_id": "ins_33a9255ab9f443c18a1c1876bc6e25a4", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": - "100.00", "salvage_value": null, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", + "100.00", "salvage_value": null, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": - "2024-07-18T21:41:13", "tracking_code": "9400100110368063699336", "type": - "damage", "updated_at": "2024-07-18T21:41:13"}, {"approved_amount": null, - "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/74b7dae47c5349a4876837984aade087.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/295f8c97f6cb4a72a0b302296e5b08b5.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7034ce5274e948faa541e7aee1c90deb.png"], + "2024-07-23T17:53:40", "tracking_code": "9400100110368066361841", "type": + "damage", "updated_at": "2024-07-23T17:53:40"}, {"approved_amount": null, + "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/836a3784a67e429ca0d30f10f64cb0bc.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/a1316f8afc5843d7b2d1370dfb7e73d3.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/4d3502f6a6e64972913e43fc4191b4cd.png"], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": - "2024-07-18T21:36:31", "description": "Test description", "history": [{"status": - "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:36:31"}], - "id": "clm_097dd2d0c5f944f7b51924422f6341b7", "insurance_amount": "100.00", - "insurance_id": "ins_26eed360e3dc4b2095263f1af0435892", "mode": "test", "object": + "2024-07-23T17:53:36", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-23T17:53:36"}], + "id": "clm_097eb623597146bab94e9ef701364d4f", "insurance_amount": "100.00", + "insurance_id": "ins_6aa59cf8618843c09b4707e1f3f74486", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": - "100.00", "salvage_value": null, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", + "100.00", "salvage_value": null, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": - "2024-07-18T21:36:31", "tracking_code": "9400100110368063698216", "type": - "damage", "updated_at": "2024-07-18T21:36:31"}, {"approved_amount": null, - "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/a169ac0ffa1d46dcb56118f0b5c02bcc.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/d32b135079e944ceb558eb8a24151346.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/f4712df4d9bc448b85d68d1c3fdd3fb4.png"], + "2024-07-23T17:53:36", "tracking_code": "9400100110368066361827", "type": + "damage", "updated_at": "2024-07-23T17:53:36"}, {"approved_amount": null, + "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/7280de6a4ce249e6af34cfd8fc2c8613.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/9faca9b590ed4616aaa385e717969828.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/5c641ae1e5a54a53ab6ded433ebfabdc.png"], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": - "2024-07-18T21:25:33", "description": "Test description", "history": [{"status": - "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:25:33"}], - "id": "clm_097d7a0ce4274578896ea9b65a9f5d2b", "insurance_amount": "100.00", - "insurance_id": "ins_4ac7b08d2bd34ad28f017f72b04b820e", "mode": "test", "object": + "2024-07-23T17:10:33", "description": "Test description", "history": [{"status": + "cancelled", "status_detail": "Claim cancellation was requested.", "timestamp": + "2024-07-23T17:12:03"}, {"status": "submitted", "status_detail": "Claim was + created.", "timestamp": "2024-07-23T17:10:33"}], "id": "clm_097e39b748d24c32a0bd61840fc0763f", + "insurance_amount": "249.99", "insurance_id": "ins_d15880e5772c4373aec497744fa4da54", + "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": + null, "requested_amount": "100.00", "salvage_value": null, "shipment_id": + "shp_09a808dae97442f3aa7fbd994a3533d4", "status": "cancelled", "status_detail": + "Claim cancellation was requested.", "status_timestamp": "2024-07-23T17:12:03", + "tracking_code": "9470100110368066351889", "type": "damage", "updated_at": + "2024-07-23T17:12:03"}, {"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/1d0c4ff3d71c4f5d8ec5c21bcfeaf419.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/8f78018b1c6941cdafd1ca9d36579e40.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/973d2a48b6b04423b1d112dff79e85e3.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-22T20:47:51", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-22T20:47:51"}], + "id": "clm_097ed32c795141499bb0a5e17a4fe24f", "insurance_amount": "249.99", + "insurance_id": "ins_fa5c89fcf765494b921a96c4e4004476", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_5bcff1867a1f4a29a67db9a84a2082c5", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-22T20:47:51", "tracking_code": "9434600110368065978707", "type": + "damage", "updated_at": "2024-07-22T20:47:51"}, {"approved_amount": null, + "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/1d0c4ff3d71c4f5d8ec5c21bcfeaf419.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/8f78018b1c6941cdafd1ca9d36579e40.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/973d2a48b6b04423b1d112dff79e85e3.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-22T20:47:51", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-22T20:47:51"}], + "id": "clm_097ed32c795141499bb0a5e17a4fe24f", "insurance_amount": "249.99", + "insurance_id": "ins_fa5c89fcf765494b921a96c4e4004476", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": - "100.00", "salvage_value": null, "shipment_id": "shp_be019d9828b84bbc8d33e211a55b1c08", + "100.00", "salvage_value": null, "shipment_id": "shp_5bcff1867a1f4a29a67db9a84a2082c5", "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": - "2024-07-18T21:25:33", "tracking_code": "9400100110368063695628", "type": - "damage", "updated_at": "2024-07-18T21:25:33"}], "has_more": false}' + "2024-07-22T20:47:51", "tracking_code": "9434600110368065978707", "type": + "damage", "updated_at": "2024-07-22T20:47:51"}], "has_more": true}' headers: cache-control: - private, no-cache, no-store content-length: - - '3363' + - '5708' content-type: - application/json; charset=utf-8 expires: @@ -72,31 +99,27 @@ interactions: - max-age=31536000; includeSubDomains; preload transfer-encoding: - chunked - vary: - - Origin x-backend: - easypost - x-canary: - - direct x-content-type-options: - nosniff x-download-options: - noopen x-ep-request-uuid: - - bfd174a766998c03e789f5c1002f4d69 + - 4764841f669fee25f41d2db300528ce6 x-frame-options: - SAMEORIGIN x-node: - - bigweb43nuq + - bigweb35nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb4nuq 4e1e840afe - - extlb2nuq fa152d4755 + - intlb3nuq c0f5e722d1 + - extlb1nuq fa152d4755 x-runtime: - - '0.044147' + - '0.053691' x-version-label: - - easypost-202407182129-c0d97eb024-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: diff --git a/tests/cassettes/test_claim_cancel.yaml b/tests/cassettes/test_claim_cancel.yaml index b45d4e8b..9d533a23 100644 --- a/tests/cassettes/test_claim_cancel.yaml +++ b/tests/cassettes/test_claim_cancel.yaml @@ -31,10 +31,8 @@ interactions: uri: https://api.easypost.com/v2/shipments response: body: - string: '{"created_at": "2024-07-22T16:32:15Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + string: '{"created_at": "2024-07-23T17:53:42Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: @@ -44,81 +42,83 @@ interactions: "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", + "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid Access License number"}], "mode": "test", "options": {"label_format": "PNG", "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - null, "updated_at": "2024-07-22T16:32:16Z", "batch_id": null, "batch_status": - null, "batch_message": null, "customs_info": {"id": "cstinfo_7c66be469f9a490586a50521e8ffa5f0", - "object": "CustomsInfo", "created_at": "2024-07-22T16:32:15Z", "updated_at": - "2024-07-22T16:32:15Z", "contents_explanation": "", "contents_type": "merchandise", + null, "updated_at": "2024-07-23T17:53:42Z", "batch_id": null, "batch_status": + null, "batch_message": null, "customs_info": {"id": "cstinfo_e367a8bdacc349f1aa99400ee0522aa9", + "object": "CustomsInfo", "created_at": "2024-07-23T17:53:42Z", "updated_at": + "2024-07-23T17:53:42Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", "declaration": null, "customs_items": - [{"id": "cstitem_3a1c94d04772472cbf03a54ed810c35b", "object": "CustomsItem", - "created_at": "2024-07-22T16:32:15Z", "updated_at": "2024-07-22T16:32:15Z", + [{"id": "cstitem_9a7ad631dbb14255a0cd76209f3c4d76", "object": "CustomsItem", + "created_at": "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": - null}]}, "from_address": {"id": "adr_f4ad69ea484711ef9584ac1f6bc53342", "object": - "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", + null}]}, "from_address": {"id": "adr_7f98d03a491c11efa416ac1f6bc53342", "object": + "Address", "created_at": "2024-07-23T17:53:42+00:00", "updated_at": "2024-07-23T17:53:42+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_7aa3e156a8224cf893137b1236cb49f3", - "object": "Parcel", "created_at": "2024-07-22T16:32:15Z", "updated_at": "2024-07-22T16:32:15Z", + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_638b6dd2ce5548ec85d67b255accfbd2", + "object": "Parcel", "created_at": "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_71691ccf57194711adbec63144f2a517", - "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", - "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", - "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": - "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_94298637732a4900bb148bfaf6885066", - "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", + 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_f5af06c34647410c94997ff78cf3d5eb", + "object": "Rate", "created_at": "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_ce9b0ea8ae25420994911ff1b557a854", - "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", + 2, "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_6f47529b84714dc88fb651a807aa6353", + "object": "Rate", "created_at": "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": + 2, "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_bbe31567958340158fffe99976c707a1", + "object": "Rate", "created_at": "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": null, "tracker": null, "to_address": {"id": "adr_f4ab211e484711efb5173cecef1b359e", - "object": "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": - "2024-07-22T16:32:15+00:00", "name": "Elizabeth Swan", "company": null, "street1": + null, "selected_rate": null, "tracker": null, "to_address": {"id": "adr_7f960d15491c11efb81cac1f6bc539ae", + "object": "Address", "created_at": "2024-07-23T17:53:42+00:00", "updated_at": + "2024-07-23T17:53:42+00:00", "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {}}, "usps_zone": 4, "return_address": - {"id": "adr_f4ad69ea484711ef9584ac1f6bc53342", "object": "Address", "created_at": - "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", "name": + {"id": "adr_7f98d03a491c11efa416ac1f6bc53342", "object": "Address", "created_at": + "2024-07-23T17:53:42+00:00", "updated_at": "2024-07-23T17:53:42+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_f4ab211e484711efb5173cecef1b359e", "object": - "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", + {}}, "buyer_address": {"id": "adr_7f960d15491c11efb81cac1f6bc539ae", "object": + "Address", "created_at": "2024-07-23T17:53:42+00:00", "updated_at": "2024-07-23T17:53:42+00:00", "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "forms": [], "fees": [], "id": "shp_d97b685262564a868a1590d9e2ffb135", + {}}, "forms": [], "fees": [], "id": "shp_82fecc386f314823ad6b1a35365b7f4e", "object": "Shipment"}' headers: cache-control: @@ -130,7 +130,7 @@ interactions: expires: - '0' location: - - /api/v2/shipments/shp_d97b685262564a868a1590d9e2ffb135 + - /api/v2/shipments/shp_82fecc386f314823ad6b1a35365b7f4e pragma: - no-cache referrer-policy: @@ -146,27 +146,27 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - c8716969669e898ff42d83ac00442c7b + - 47648423669fee25f40ba25a00528d65 x-frame-options: - SAMEORIGIN x-node: - - bigweb53nuq + - bigweb40nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb4nuq c0f5e722d1 - - extlb2nuq fa152d4755 + - intlb3nuq c0f5e722d1 + - extlb1nuq fa152d4755 x-runtime: - - '0.744165' + - '0.738361' x-version-label: - - easypost-202407192203-7acbce7c21-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: code: 201 message: Created - request: - body: '{"rate": {"id": "rate_71691ccf57194711adbec63144f2a517"}}' + body: '{"rate": {"id": "rate_bbe31567958340158fffe99976c707a1"}}' headers: Accept: - '*/*' @@ -183,13 +183,11 @@ interactions: user-agent: - method: POST - uri: https://api.easypost.com/v2/shipments/shp_d97b685262564a868a1590d9e2ffb135/buy + uri: https://api.easypost.com/v2/shipments/shp_82fecc386f314823ad6b1a35365b7f4e/buy response: body: - string: '{"created_at": "2024-07-22T16:32:15Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + string: '{"created_at": "2024-07-23T17:53:42Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: @@ -199,84 +197,86 @@ interactions: "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", + "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid Access License number"}], "mode": "test", "options": {"label_format": "PNG", "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - "9400100110368065903004", "updated_at": "2024-07-22T16:32:17Z", "batch_id": + "9400100110368066361872", "updated_at": "2024-07-23T17:53:43Z", "batch_id": null, "batch_status": null, "batch_message": null, "customs_info": {"id": - "cstinfo_7c66be469f9a490586a50521e8ffa5f0", "object": "CustomsInfo", "created_at": - "2024-07-22T16:32:15Z", "updated_at": "2024-07-22T16:32:15Z", "contents_explanation": + "cstinfo_e367a8bdacc349f1aa99400ee0522aa9", "object": "CustomsInfo", "created_at": + "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", - "declaration": null, "customs_items": [{"id": "cstitem_3a1c94d04772472cbf03a54ed810c35b", - "object": "CustomsItem", "created_at": "2024-07-22T16:32:15Z", "updated_at": - "2024-07-22T16:32:15Z", "description": "Sweet shirts", "hs_tariff_number": + "declaration": null, "customs_items": [{"id": "cstitem_9a7ad631dbb14255a0cd76209f3c4d76", + "object": "CustomsItem", "created_at": "2024-07-23T17:53:42Z", "updated_at": + "2024-07-23T17:53:42Z", "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": - "adr_f4ad69ea484711ef9584ac1f6bc53342", "object": "Address", "created_at": - "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", "name": + "adr_7f98d03a491c11efa416ac1f6bc53342", "object": "Address", "created_at": + "2024-07-23T17:53:42+00:00", "updated_at": "2024-07-23T17:53:42+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_7aa3e156a8224cf893137b1236cb49f3", - "object": "Parcel", "created_at": "2024-07-22T16:32:15Z", "updated_at": "2024-07-22T16:32:15Z", + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_638b6dd2ce5548ec85d67b255accfbd2", + "object": "Parcel", "created_at": "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_8d281bc71c144cd8a96d7508435bdb2d", - "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:17Z", - "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-22T16:32:16Z", + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_29c24685eef84a2e8540c4da72373ca6", + "created_at": "2024-07-23T17:53:43Z", "updated_at": "2024-07-23T17:53:43Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-23T17:53:43Z", "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": - "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240722/e8fa42830dee62461da03deb15405a441b.png", + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240723/e89d129a870fc84ffeaa8325ad6c2b40f7.png", "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": - null}, "rates": [{"id": "rate_71691ccf57194711adbec63144f2a517", "object": - "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", - "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", - "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": - "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_94298637732a4900bb148bfaf6885066", - "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", + null}, "rates": [{"id": "rate_f5af06c34647410c94997ff78cf3d5eb", "object": + "Rate", "created_at": "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_ce9b0ea8ae25420994911ff1b557a854", - "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", + 2, "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_6f47529b84714dc88fb651a807aa6353", + "object": "Rate", "created_at": "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": + 2, "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_bbe31567958340158fffe99976c707a1", + "object": "Rate", "created_at": "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": {"id": "rate_71691ccf57194711adbec63144f2a517", "object": - "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", + null, "selected_rate": {"id": "rate_bbe31567958340158fffe99976c707a1", "object": + "Rate", "created_at": "2024-07-23T17:53:43Z", "updated_at": "2024-07-23T17:53:43Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_3788af22e24247f5820e4fcdf4cf1965", - "object": "Tracker", "mode": "test", "tracking_code": "9400100110368065903004", - "status": "unknown", "status_detail": "unknown", "created_at": "2024-07-22T16:32:17Z", - "updated_at": "2024-07-22T16:32:17Z", "signed_by": null, "weight": null, "est_delivery_date": - null, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier": "USPS", + 3, "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_094807d115c14008b09588e9a336d226", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368066361872", + "status": "unknown", "status_detail": "unknown", "created_at": "2024-07-23T17:53:43Z", + "updated_at": "2024-07-23T17:53:43Z", "signed_by": null, "weight": null, "est_delivery_date": + null, "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "carrier": "USPS", "tracking_details": [], "fees": [], "carrier_detail": null, "public_url": - "https://track.easypost.com/djE6dHJrXzM3ODhhZjIyZTI0MjQ3ZjU4MjBlNGZjZGY0Y2YxOTY1"}, - "to_address": {"id": "adr_f4ab211e484711efb5173cecef1b359e", "object": "Address", - "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:16+00:00", + "https://track.easypost.com/djE6dHJrXzA5NDgwN2QxMTVjMTQwMDhiMDk1ODhlOWEzMzZkMjI2"}, + "to_address": {"id": "adr_7f960d15491c11efb81cac1f6bc539ae", "object": "Address", + "created_at": "2024-07-23T17:53:42+00:00", "updated_at": "2024-07-23T17:53:43+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -284,14 +284,14 @@ interactions: "verifications": {"zip4": {"success": true, "errors": [], "details": null}, "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": - 4, "return_address": {"id": "adr_f4ad69ea484711ef9584ac1f6bc53342", "object": - "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", + 4, "return_address": {"id": "adr_7f98d03a491c11efa416ac1f6bc53342", "object": + "Address", "created_at": "2024-07-23T17:53:42+00:00", "updated_at": "2024-07-23T17:53:42+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_f4ab211e484711efb5173cecef1b359e", "object": - "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:16+00:00", + {}}, "buyer_address": {"id": "adr_7f960d15491c11efb81cac1f6bc539ae", "object": + "Address", "created_at": "2024-07-23T17:53:42+00:00", "updated_at": "2024-07-23T17:53:43+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -301,7 +301,7 @@ interactions: "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": - "5.93000", "charged": true, "refunded": false}], "id": "shp_d97b685262564a868a1590d9e2ffb135", + "5.93000", "charged": true, "refunded": false}], "id": "shp_82fecc386f314823ad6b1a35365b7f4e", "object": "Shipment"}' headers: cache-control: @@ -327,20 +327,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - c8716969669e8990f42d83ac00442dd3 + - 47648423669fee26f40ba25a00528e11 x-frame-options: - SAMEORIGIN x-node: - - bigweb42nuq + - bigweb40nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb4nuq c0f5e722d1 - - extlb2nuq fa152d4755 + - intlb3nuq c0f5e722d1 + - extlb1nuq fa152d4755 x-runtime: - - '0.750954' + - '1.069427' x-version-label: - - easypost-202407192203-7acbce7c21-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: @@ -364,13 +364,11 @@ interactions: user-agent: - method: POST - uri: https://api.easypost.com/v2/shipments/shp_d97b685262564a868a1590d9e2ffb135/insure + uri: https://api.easypost.com/v2/shipments/shp_82fecc386f314823ad6b1a35365b7f4e/insure response: body: - string: '{"created_at": "2024-07-22T16:32:15Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + string: '{"created_at": "2024-07-23T17:53:42Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: @@ -380,87 +378,89 @@ interactions: "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", + "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid Access License number"}], "mode": "test", "options": {"label_format": "PNG", "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - "9400100110368065903004", "updated_at": "2024-07-22T16:32:17Z", "batch_id": + "9400100110368066361872", "updated_at": "2024-07-23T17:53:43Z", "batch_id": null, "batch_status": null, "batch_message": null, "customs_info": {"id": - "cstinfo_7c66be469f9a490586a50521e8ffa5f0", "object": "CustomsInfo", "created_at": - "2024-07-22T16:32:15Z", "updated_at": "2024-07-22T16:32:15Z", "contents_explanation": + "cstinfo_e367a8bdacc349f1aa99400ee0522aa9", "object": "CustomsInfo", "created_at": + "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", - "declaration": null, "customs_items": [{"id": "cstitem_3a1c94d04772472cbf03a54ed810c35b", - "object": "CustomsItem", "created_at": "2024-07-22T16:32:15Z", "updated_at": - "2024-07-22T16:32:15Z", "description": "Sweet shirts", "hs_tariff_number": + "declaration": null, "customs_items": [{"id": "cstitem_9a7ad631dbb14255a0cd76209f3c4d76", + "object": "CustomsItem", "created_at": "2024-07-23T17:53:42Z", "updated_at": + "2024-07-23T17:53:42Z", "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": - "adr_f4ad69ea484711ef9584ac1f6bc53342", "object": "Address", "created_at": - "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", "name": + "adr_7f98d03a491c11efa416ac1f6bc53342", "object": "Address", "created_at": + "2024-07-23T17:53:42+00:00", "updated_at": "2024-07-23T17:53:42+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": "100.00", "order_id": null, "parcel": {"id": "prcl_7aa3e156a8224cf893137b1236cb49f3", - "object": "Parcel", "created_at": "2024-07-22T16:32:15Z", "updated_at": "2024-07-22T16:32:15Z", + {}}, "insurance": "100.00", "order_id": null, "parcel": {"id": "prcl_638b6dd2ce5548ec85d67b255accfbd2", + "object": "Parcel", "created_at": "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_8d281bc71c144cd8a96d7508435bdb2d", - "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:17Z", - "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-22T16:32:16Z", + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_29c24685eef84a2e8540c4da72373ca6", + "created_at": "2024-07-23T17:53:43Z", "updated_at": "2024-07-23T17:53:43Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-23T17:53:43Z", "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": - "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240722/e8fa42830dee62461da03deb15405a441b.png", + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240723/e89d129a870fc84ffeaa8325ad6c2b40f7.png", "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": - null}, "rates": [{"id": "rate_71691ccf57194711adbec63144f2a517", "object": - "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", - "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", - "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": - "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_94298637732a4900bb148bfaf6885066", - "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", + null}, "rates": [{"id": "rate_f5af06c34647410c94997ff78cf3d5eb", "object": + "Rate", "created_at": "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_ce9b0ea8ae25420994911ff1b557a854", - "object": "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", + 2, "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_6f47529b84714dc88fb651a807aa6353", + "object": "Rate", "created_at": "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": + 2, "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_bbe31567958340158fffe99976c707a1", + "object": "Rate", "created_at": "2024-07-23T17:53:42Z", "updated_at": "2024-07-23T17:53:42Z", + "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": {"id": "rate_71691ccf57194711adbec63144f2a517", "object": - "Rate", "created_at": "2024-07-22T16:32:16Z", "updated_at": "2024-07-22T16:32:16Z", + null, "selected_rate": {"id": "rate_bbe31567958340158fffe99976c707a1", "object": + "Rate", "created_at": "2024-07-23T17:53:43Z", "updated_at": "2024-07-23T17:53:43Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_3788af22e24247f5820e4fcdf4cf1965", - "object": "Tracker", "mode": "test", "tracking_code": "9400100110368065903004", - "status": "pre_transit", "status_detail": "status_update", "created_at": "2024-07-22T16:32:17Z", - "updated_at": "2024-07-22T16:32:17Z", "signed_by": null, "weight": null, "est_delivery_date": - "2024-07-22T16:32:17Z", "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", + 3, "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_094807d115c14008b09588e9a336d226", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368066361872", + "status": "pre_transit", "status_detail": "status_update", "created_at": "2024-07-23T17:53:43Z", + "updated_at": "2024-07-23T17:53:43Z", "signed_by": null, "weight": null, "est_delivery_date": + "2024-07-23T17:53:43Z", "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "carrier": "USPS", "tracking_details": [{"object": "TrackingDetail", "message": "Pre-Shipment Info Sent to USPS", "description": "", "status": "pre_transit", - "status_detail": "status_update", "datetime": "2024-06-22T16:32:17Z", "source": + "status_detail": "status_update", "datetime": "2024-06-23T17:53:43Z", "source": "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", "city": null, "state": null, "country": null, "zip": null}}, {"object": "TrackingDetail", "message": "Shipping Label Created", "description": "", "status": "pre_transit", - "status_detail": "status_update", "datetime": "2024-06-23T05:09:17Z", "source": + "status_detail": "status_update", "datetime": "2024-06-24T06:30:43Z", "source": "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063"}}], "fees": [], "carrier_detail": {"object": "CarrierDetail", "service": "First-Class @@ -469,9 +469,9 @@ interactions: {"object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063"}, "destination_location": "CHARLESTON SC, 29401", "destination_tracking_location": null, "guaranteed_delivery_date": null, "alternate_identifier": null, "initial_delivery_attempt": - null}, "public_url": "https://track.easypost.com/djE6dHJrXzM3ODhhZjIyZTI0MjQ3ZjU4MjBlNGZjZGY0Y2YxOTY1"}, - "to_address": {"id": "adr_f4ab211e484711efb5173cecef1b359e", "object": "Address", - "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:16+00:00", + null}, "public_url": "https://track.easypost.com/djE6dHJrXzA5NDgwN2QxMTVjMTQwMDhiMDk1ODhlOWEzMzZkMjI2"}, + "to_address": {"id": "adr_7f960d15491c11efb81cac1f6bc539ae", "object": "Address", + "created_at": "2024-07-23T17:53:42+00:00", "updated_at": "2024-07-23T17:53:43+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -479,14 +479,14 @@ interactions: "verifications": {"zip4": {"success": true, "errors": [], "details": null}, "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": - 4, "return_address": {"id": "adr_f4ad69ea484711ef9584ac1f6bc53342", "object": - "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:15+00:00", + 4, "return_address": {"id": "adr_7f98d03a491c11efa416ac1f6bc53342", "object": + "Address", "created_at": "2024-07-23T17:53:42+00:00", "updated_at": "2024-07-23T17:53:42+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_f4ab211e484711efb5173cecef1b359e", "object": - "Address", "created_at": "2024-07-22T16:32:15+00:00", "updated_at": "2024-07-22T16:32:16+00:00", + {}}, "buyer_address": {"id": "adr_7f960d15491c11efb81cac1f6bc539ae", "object": + "Address", "created_at": "2024-07-23T17:53:42+00:00", "updated_at": "2024-07-23T17:53:43+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -498,7 +498,7 @@ interactions: true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": "5.93000", "charged": true, "refunded": false}, {"object": "Fee", "type": "InsuranceFee", "amount": "1.00000", "charged": true, "refunded": false}], - "id": "shp_d97b685262564a868a1590d9e2ffb135", "object": "Shipment"}' + "id": "shp_82fecc386f314823ad6b1a35365b7f4e", "object": "Shipment"}' headers: cache-control: - private, no-cache, no-store @@ -523,20 +523,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - c8716969669e8991f42d83ac00442ef9 + - 47648423669fee27f40ba25a00528f1c x-frame-options: - SAMEORIGIN x-node: - - bigweb38nuq + - bigweb39nuq x-permitted-cross-domain-policies: - none x-proxied: - intlb3nuq c0f5e722d1 - - extlb2nuq fa152d4755 + - extlb1nuq fa152d4755 x-runtime: - - '0.310280' + - '0.267550' x-version-label: - - easypost-202407192203-7acbce7c21-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: @@ -547,7 +547,7 @@ interactions: "invoice_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], "supporting_documentation_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], "description": "Test description", "contact_email": "test@example.com", "tracking_code": - "9400100110368065903004", "amount": "100.00"}' + "9400100110368066361872", "amount": "100.00"}' headers: Accept: - '*/*' @@ -564,22 +564,22 @@ interactions: user-agent: - method: POST - uri: https://api.easypost.com/beta/claims + uri: https://api.easypost.com/v2/claims response: body: - string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/6a130e0b3b8843219e47f80843efcce9.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/1fa2701e863546a58eb58cf9dc5f6d49.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/b29a5ab5b35346759ed2c29416cc20f2.png"], + string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/533eff379afa47759cdc14f19e190fc7.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/4715d1ddc5e448ad924c029d8407b9e4.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/987f3e1a094044219e640163b1074ff7.png"], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": - "2024-07-22T16:32:17", "description": "Test description", "history": [{"status": - "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-22T16:32:17"}], - "id": "clm_097e808661fb4cc4b4ac46398a8ad518", "insurance_amount": "100.00", - "insurance_id": "ins_1a8fe50291ec4863984ca525ffe4a91c", "mode": "test", "object": + "2024-07-23T17:53:44", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-23T17:53:44"}], + "id": "clm_097eda66d06e42ec84449bbd34671a7d", "insurance_amount": "100.00", + "insurance_id": "ins_8d75d3dcf398461aaa330e48dbd4c19e", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": - "100.00", "salvage_value": null, "shipment_id": "shp_d97b685262564a868a1590d9e2ffb135", + "100.00", "salvage_value": null, "shipment_id": "shp_82fecc386f314823ad6b1a35365b7f4e", "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": - "2024-07-22T16:32:17", "tracking_code": "9400100110368065903004", "type": - "damage", "updated_at": "2024-07-22T16:32:17"}' + "2024-07-23T17:53:44", "tracking_code": "9400100110368066361872", "type": + "damage", "updated_at": "2024-07-23T17:53:44"}' headers: cache-control: - private, no-cache, no-store @@ -597,8 +597,6 @@ interactions: - max-age=31536000; includeSubDomains; preload transfer-encoding: - chunked - vary: - - Origin x-backend: - easypost x-content-type-options: @@ -606,20 +604,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - c8716969669e8991f42d83ac00442f7f + - 47648423669fee28f40ba25a00528f52 x-frame-options: - SAMEORIGIN x-node: - - bigweb41nuq + - bigweb36nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb4nuq c0f5e722d1 - - extlb2nuq fa152d4755 + - intlb3nuq c0f5e722d1 + - extlb1nuq fa152d4755 x-runtime: - - '0.882407' + - '0.823459' x-version-label: - - easypost-202407192203-7acbce7c21-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: @@ -643,24 +641,24 @@ interactions: user-agent: - method: POST - uri: https://api.easypost.com/beta/claims/clm_097e808661fb4cc4b4ac46398a8ad518/cancel + uri: https://api.easypost.com/v2/claims/clm_097eda66d06e42ec84449bbd34671a7d/cancel response: body: - string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/6a130e0b3b8843219e47f80843efcce9.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/1fa2701e863546a58eb58cf9dc5f6d49.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/b29a5ab5b35346759ed2c29416cc20f2.png"], + string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/533eff379afa47759cdc14f19e190fc7.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/4715d1ddc5e448ad924c029d8407b9e4.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/987f3e1a094044219e640163b1074ff7.png"], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": - "2024-07-22T16:32:17", "description": "Test description", "history": [{"status": + "2024-07-23T17:53:44", "description": "Test description", "history": [{"status": "cancelled", "status_detail": "Claim cancellation was requested.", "timestamp": - "2024-07-22T16:32:19"}, {"status": "submitted", "status_detail": "Claim was - created.", "timestamp": "2024-07-22T16:32:17"}], "id": "clm_097e808661fb4cc4b4ac46398a8ad518", - "insurance_amount": "100.00", "insurance_id": "ins_1a8fe50291ec4863984ca525ffe4a91c", + "2024-07-23T17:53:45"}, {"status": "submitted", "status_detail": "Claim was + created.", "timestamp": "2024-07-23T17:53:44"}], "id": "clm_097eda66d06e42ec84449bbd34671a7d", + "insurance_amount": "100.00", "insurance_id": "ins_8d75d3dcf398461aaa330e48dbd4c19e", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": "100.00", "salvage_value": null, "shipment_id": - "shp_d97b685262564a868a1590d9e2ffb135", "status": "cancelled", "status_detail": - "Claim cancellation was requested.", "status_timestamp": "2024-07-22T16:32:19", - "tracking_code": "9400100110368065903004", "type": "damage", "updated_at": - "2024-07-22T16:32:18"}' + "shp_82fecc386f314823ad6b1a35365b7f4e", "status": "cancelled", "status_detail": + "Claim cancellation was requested.", "status_timestamp": "2024-07-23T17:53:45", + "tracking_code": "9400100110368066361872", "type": "damage", "updated_at": + "2024-07-23T17:53:45"}' headers: cache-control: - private, no-cache, no-store @@ -678,8 +676,6 @@ interactions: - max-age=31536000; includeSubDomains; preload transfer-encoding: - chunked - vary: - - Origin x-backend: - easypost x-content-type-options: @@ -687,20 +683,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - c8716969669e8992f42d83ac004430db + - 47648423669fee29f40ba25a00529016 x-frame-options: - SAMEORIGIN x-node: - - bigweb39nuq + - bigweb34nuq x-permitted-cross-domain-policies: - none x-proxied: - intlb3nuq c0f5e722d1 - - extlb2nuq fa152d4755 + - extlb1nuq fa152d4755 x-runtime: - - '0.058993' + - '0.042985' x-version-label: - - easypost-202407192203-7acbce7c21-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: diff --git a/tests/cassettes/test_claim_create.yaml b/tests/cassettes/test_claim_create.yaml index c39febfa..3c18f830 100644 --- a/tests/cassettes/test_claim_create.yaml +++ b/tests/cassettes/test_claim_create.yaml @@ -31,94 +31,94 @@ interactions: uri: https://api.easypost.com/v2/shipments response: body: - string: '{"created_at": "2024-07-18T21:36:29Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + string: '{"created_at": "2024-07-23T17:53:34Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": - "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": + "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": - "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid + "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", "message": "Invalid Access License number"}], "mode": "test", "options": {"label_format": "PNG", "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - null, "updated_at": "2024-07-18T21:36:30Z", "batch_id": null, "batch_status": - null, "batch_message": null, "customs_info": {"id": "cstinfo_f480399a93b44fffa042f909a56e4872", - "object": "CustomsInfo", "created_at": "2024-07-18T21:36:29Z", "updated_at": - "2024-07-18T21:36:29Z", "contents_explanation": "", "contents_type": "merchandise", + null, "updated_at": "2024-07-23T17:53:34Z", "batch_id": null, "batch_status": + null, "batch_message": null, "customs_info": {"id": "cstinfo_cd7d8756bb1c462fb4497cc48a3e9a26", + "object": "CustomsInfo", "created_at": "2024-07-23T17:53:34Z", "updated_at": + "2024-07-23T17:53:34Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", "declaration": null, "customs_items": - [{"id": "cstitem_fe476d8dc33045c4ba37d22ded7eba44", "object": "CustomsItem", - "created_at": "2024-07-18T21:36:29Z", "updated_at": "2024-07-18T21:36:29Z", + [{"id": "cstitem_629ef3e844fd4e8f8b63a19a0e7d413f", "object": "CustomsItem", + "created_at": "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": - null}]}, "from_address": {"id": "adr_cb3e90f7454d11efb208ac1f6bc539ae", "object": - "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", + null}]}, "from_address": {"id": "adr_7ae4b187491c11efb529ac1f6bc539ae", "object": + "Address", "created_at": "2024-07-23T17:53:34+00:00", "updated_at": "2024-07-23T17:53:34+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_d670d15cb20d40d68017155552c75ec4", - "object": "Parcel", "created_at": "2024-07-18T21:36:29Z", "updated_at": "2024-07-18T21:36:29Z", + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_cc4cec1b603649ba8dab40990c48b080", + "object": "Parcel", "created_at": "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_429514358c284466b317168db6ef9278", - "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_323b536e3901476c844419020d496965", + "object": "Rate", "created_at": "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_2572bc64788d47aa8389a4e5d8a0e1b6", + "object": "Rate", "created_at": "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_372bb29bff5a486b94bf0cd4306356d4", - "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + 2, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_ec61cdb04bbf404e9724c18745a1493c", + "object": "Rate", "created_at": "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_bb5bd30541bb41fcbb611cb7d0905d19", - "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", - "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", - "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": - "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + 3, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": null, "tracker": null, "to_address": {"id": "adr_cb3c055b454d11ef8287ac1f6bc539aa", - "object": "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": - "2024-07-18T21:36:29+00:00", "name": "Elizabeth Swan", "company": null, "street1": + null, "selected_rate": null, "tracker": null, "to_address": {"id": "adr_7ae1fcad491c11efb015ac1f6bc539aa", + "object": "Address", "created_at": "2024-07-23T17:53:34+00:00", "updated_at": + "2024-07-23T17:53:34+00:00", "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {}}, "usps_zone": 4, "return_address": - {"id": "adr_cb3e90f7454d11efb208ac1f6bc539ae", "object": "Address", "created_at": - "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", "name": + {"id": "adr_7ae4b187491c11efb529ac1f6bc539ae", "object": "Address", "created_at": + "2024-07-23T17:53:34+00:00", "updated_at": "2024-07-23T17:53:34+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_cb3c055b454d11ef8287ac1f6bc539aa", "object": - "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", + {}}, "buyer_address": {"id": "adr_7ae1fcad491c11efb015ac1f6bc539aa", "object": + "Address", "created_at": "2024-07-23T17:53:34+00:00", "updated_at": "2024-07-23T17:53:34+00:00", "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "forms": [], "fees": [], "id": "shp_100e485b59294ece94b66f0a6427f032", + {}}, "forms": [], "fees": [], "id": "shp_d692021679d54c0c9da828499fb1a8de", "object": "Shipment"}' headers: cache-control: @@ -130,7 +130,7 @@ interactions: expires: - '0' location: - - /api/v2/shipments/shp_100e485b59294ece94b66f0a6427f032 + - /api/v2/shipments/shp_d692021679d54c0c9da828499fb1a8de pragma: - no-cache referrer-policy: @@ -146,27 +146,27 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - bfd174a366998adde788ee05002e68ed + - 47648425669fee1ef40c2a10005285e1 x-frame-options: - SAMEORIGIN x-node: - - bigweb38nuq + - bigweb53nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb4nuq 4e1e840afe - - extlb2nuq fa152d4755 + - intlb4nuq c0f5e722d1 + - extlb1nuq fa152d4755 x-runtime: - - '0.667029' + - '0.870562' x-version-label: - - easypost-202407182050-c8a24f13ee-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: code: 201 message: Created - request: - body: '{"rate": {"id": "rate_372bb29bff5a486b94bf0cd4306356d4"}}' + body: '{"rate": {"id": "rate_ec61cdb04bbf404e9724c18745a1493c"}}' headers: Accept: - '*/*' @@ -183,100 +183,100 @@ interactions: user-agent: - method: POST - uri: https://api.easypost.com/v2/shipments/shp_100e485b59294ece94b66f0a6427f032/buy + uri: https://api.easypost.com/v2/shipments/shp_d692021679d54c0c9da828499fb1a8de/buy response: body: - string: '{"created_at": "2024-07-18T21:36:29Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + string: '{"created_at": "2024-07-23T17:53:34Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": - "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": + "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": - "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid + "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", "message": "Invalid Access License number"}], "mode": "test", "options": {"label_format": "PNG", "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - "9400100110368063698216", "updated_at": "2024-07-18T21:36:31Z", "batch_id": + "9400100110368066361827", "updated_at": "2024-07-23T17:53:35Z", "batch_id": null, "batch_status": null, "batch_message": null, "customs_info": {"id": - "cstinfo_f480399a93b44fffa042f909a56e4872", "object": "CustomsInfo", "created_at": - "2024-07-18T21:36:29Z", "updated_at": "2024-07-18T21:36:29Z", "contents_explanation": + "cstinfo_cd7d8756bb1c462fb4497cc48a3e9a26", "object": "CustomsInfo", "created_at": + "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", - "declaration": null, "customs_items": [{"id": "cstitem_fe476d8dc33045c4ba37d22ded7eba44", - "object": "CustomsItem", "created_at": "2024-07-18T21:36:29Z", "updated_at": - "2024-07-18T21:36:29Z", "description": "Sweet shirts", "hs_tariff_number": + "declaration": null, "customs_items": [{"id": "cstitem_629ef3e844fd4e8f8b63a19a0e7d413f", + "object": "CustomsItem", "created_at": "2024-07-23T17:53:34Z", "updated_at": + "2024-07-23T17:53:34Z", "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": - "adr_cb3e90f7454d11efb208ac1f6bc539ae", "object": "Address", "created_at": - "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", "name": + "adr_7ae4b187491c11efb529ac1f6bc539ae", "object": "Address", "created_at": + "2024-07-23T17:53:34+00:00", "updated_at": "2024-07-23T17:53:34+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_d670d15cb20d40d68017155552c75ec4", - "object": "Parcel", "created_at": "2024-07-18T21:36:29Z", "updated_at": "2024-07-18T21:36:29Z", + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_cc4cec1b603649ba8dab40990c48b080", + "object": "Parcel", "created_at": "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_2507f1a9ec5f42e886bd9545d6abbcd5", - "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:31Z", - "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:36:30Z", + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_d5acf6e211c3407a88885e813c0b0977", + "created_at": "2024-07-23T17:53:35Z", "updated_at": "2024-07-23T17:53:35Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-23T17:53:35Z", "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": - "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e8510ac623543a46f7a796f70290e85400.png", + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240723/e887e526fb4a5c4354a3d78a0d7f54e942.png", "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": - null}, "rates": [{"id": "rate_429514358c284466b317168db6ef9278", "object": - "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + null}, "rates": [{"id": "rate_323b536e3901476c844419020d496965", "object": + "Rate", "created_at": "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_2572bc64788d47aa8389a4e5d8a0e1b6", + "object": "Rate", "created_at": "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_372bb29bff5a486b94bf0cd4306356d4", - "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + 2, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_ec61cdb04bbf404e9724c18745a1493c", + "object": "Rate", "created_at": "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_bb5bd30541bb41fcbb611cb7d0905d19", - "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", - "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", - "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": - "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + 3, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": {"id": "rate_372bb29bff5a486b94bf0cd4306356d4", "object": - "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + null, "selected_rate": {"id": "rate_ec61cdb04bbf404e9724c18745a1493c", "object": + "Rate", "created_at": "2024-07-23T17:53:35Z", "updated_at": "2024-07-23T17:53:35Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_5d88217097c34dcf8ee4be986cd09a28", - "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063698216", - "status": "unknown", "status_detail": "unknown", "created_at": "2024-07-18T21:36:31Z", - "updated_at": "2024-07-18T21:36:31Z", "signed_by": null, "weight": null, "est_delivery_date": - null, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier": "USPS", + 3, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_40df1d2c30a74d65b09c6fe5fb904cc0", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368066361827", + "status": "unknown", "status_detail": "unknown", "created_at": "2024-07-23T17:53:35Z", + "updated_at": "2024-07-23T17:53:35Z", "signed_by": null, "weight": null, "est_delivery_date": + null, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "carrier": "USPS", "tracking_details": [], "fees": [], "carrier_detail": null, "public_url": - "https://track.easypost.com/djE6dHJrXzVkODgyMTcwOTdjMzRkY2Y4ZWU0YmU5ODZjZDA5YTI4"}, - "to_address": {"id": "adr_cb3c055b454d11ef8287ac1f6bc539aa", "object": "Address", - "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:30+00:00", + "https://track.easypost.com/djE6dHJrXzQwZGYxZDJjMzBhNzRkNjViMDljNmZlNWZiOTA0Y2Mw"}, + "to_address": {"id": "adr_7ae1fcad491c11efb015ac1f6bc539aa", "object": "Address", + "created_at": "2024-07-23T17:53:34+00:00", "updated_at": "2024-07-23T17:53:35+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -284,14 +284,14 @@ interactions: "verifications": {"zip4": {"success": true, "errors": [], "details": null}, "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": - 4, "return_address": {"id": "adr_cb3e90f7454d11efb208ac1f6bc539ae", "object": - "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", + 4, "return_address": {"id": "adr_7ae4b187491c11efb529ac1f6bc539ae", "object": + "Address", "created_at": "2024-07-23T17:53:34+00:00", "updated_at": "2024-07-23T17:53:34+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_cb3c055b454d11ef8287ac1f6bc539aa", "object": - "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:30+00:00", + {}}, "buyer_address": {"id": "adr_7ae1fcad491c11efb015ac1f6bc539aa", "object": + "Address", "created_at": "2024-07-23T17:53:34+00:00", "updated_at": "2024-07-23T17:53:35+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -301,7 +301,7 @@ interactions: "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": - "5.93000", "charged": true, "refunded": false}], "id": "shp_100e485b59294ece94b66f0a6427f032", + "5.93000", "charged": true, "refunded": false}], "id": "shp_d692021679d54c0c9da828499fb1a8de", "object": "Shipment"}' headers: cache-control: @@ -327,20 +327,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - bfd174a366998adee788ee05002e6989 + - 47648425669fee1ff40c2a10005286cb x-frame-options: - SAMEORIGIN x-node: - - bigweb40nuq + - bigweb42nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb4nuq 4e1e840afe - - extlb2nuq fa152d4755 + - intlb3nuq c0f5e722d1 + - extlb1nuq fa152d4755 x-runtime: - - '0.893326' + - '0.873316' x-version-label: - - easypost-202407182050-c8a24f13ee-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: @@ -364,103 +364,103 @@ interactions: user-agent: - method: POST - uri: https://api.easypost.com/v2/shipments/shp_100e485b59294ece94b66f0a6427f032/insure + uri: https://api.easypost.com/v2/shipments/shp_d692021679d54c0c9da828499fb1a8de/insure response: body: - string: '{"created_at": "2024-07-18T21:36:29Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", + string: '{"created_at": "2024-07-23T17:53:34Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": - "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": + "UPS", "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", + "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": - "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid + "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", "message": "Invalid Access License number"}], "mode": "test", "options": {"label_format": "PNG", "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - "9400100110368063698216", "updated_at": "2024-07-18T21:36:31Z", "batch_id": + "9400100110368066361827", "updated_at": "2024-07-23T17:53:35Z", "batch_id": null, "batch_status": null, "batch_message": null, "customs_info": {"id": - "cstinfo_f480399a93b44fffa042f909a56e4872", "object": "CustomsInfo", "created_at": - "2024-07-18T21:36:29Z", "updated_at": "2024-07-18T21:36:29Z", "contents_explanation": + "cstinfo_cd7d8756bb1c462fb4497cc48a3e9a26", "object": "CustomsInfo", "created_at": + "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", - "declaration": null, "customs_items": [{"id": "cstitem_fe476d8dc33045c4ba37d22ded7eba44", - "object": "CustomsItem", "created_at": "2024-07-18T21:36:29Z", "updated_at": - "2024-07-18T21:36:29Z", "description": "Sweet shirts", "hs_tariff_number": + "declaration": null, "customs_items": [{"id": "cstitem_629ef3e844fd4e8f8b63a19a0e7d413f", + "object": "CustomsItem", "created_at": "2024-07-23T17:53:34Z", "updated_at": + "2024-07-23T17:53:34Z", "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": - "adr_cb3e90f7454d11efb208ac1f6bc539ae", "object": "Address", "created_at": - "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", "name": + "adr_7ae4b187491c11efb529ac1f6bc539ae", "object": "Address", "created_at": + "2024-07-23T17:53:34+00:00", "updated_at": "2024-07-23T17:53:34+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": "100.00", "order_id": null, "parcel": {"id": "prcl_d670d15cb20d40d68017155552c75ec4", - "object": "Parcel", "created_at": "2024-07-18T21:36:29Z", "updated_at": "2024-07-18T21:36:29Z", + {}}, "insurance": "100.00", "order_id": null, "parcel": {"id": "prcl_cc4cec1b603649ba8dab40990c48b080", + "object": "Parcel", "created_at": "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_2507f1a9ec5f42e886bd9545d6abbcd5", - "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:31Z", - "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:36:30Z", + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_d5acf6e211c3407a88885e813c0b0977", + "created_at": "2024-07-23T17:53:35Z", "updated_at": "2024-07-23T17:53:35Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-23T17:53:35Z", "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": - "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e8510ac623543a46f7a796f70290e85400.png", + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240723/e887e526fb4a5c4354a3d78a0d7f54e942.png", "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": - null}, "rates": [{"id": "rate_429514358c284466b317168db6ef9278", "object": - "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + null}, "rates": [{"id": "rate_323b536e3901476c844419020d496965", "object": + "Rate", "created_at": "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_2572bc64788d47aa8389a4e5d8a0e1b6", + "object": "Rate", "created_at": "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_372bb29bff5a486b94bf0cd4306356d4", - "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + 2, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_ec61cdb04bbf404e9724c18745a1493c", + "object": "Rate", "created_at": "2024-07-23T17:53:34Z", "updated_at": "2024-07-23T17:53:34Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_bb5bd30541bb41fcbb611cb7d0905d19", - "object": "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", - "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", - "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": - "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": + 3, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": {"id": "rate_372bb29bff5a486b94bf0cd4306356d4", "object": - "Rate", "created_at": "2024-07-18T21:36:30Z", "updated_at": "2024-07-18T21:36:30Z", + null, "selected_rate": {"id": "rate_ec61cdb04bbf404e9724c18745a1493c", "object": + "Rate", "created_at": "2024-07-23T17:53:35Z", "updated_at": "2024-07-23T17:53:35Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_5d88217097c34dcf8ee4be986cd09a28", - "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063698216", - "status": "pre_transit", "status_detail": "status_update", "created_at": "2024-07-18T21:36:31Z", - "updated_at": "2024-07-18T21:36:31Z", "signed_by": null, "weight": null, "est_delivery_date": - "2024-07-18T21:36:31Z", "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", + 3, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_40df1d2c30a74d65b09c6fe5fb904cc0", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368066361827", + "status": "pre_transit", "status_detail": "status_update", "created_at": "2024-07-23T17:53:35Z", + "updated_at": "2024-07-23T17:53:35Z", "signed_by": null, "weight": null, "est_delivery_date": + "2024-07-23T17:53:35Z", "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "carrier": "USPS", "tracking_details": [{"object": "TrackingDetail", "message": "Pre-Shipment Info Sent to USPS", "description": "", "status": "pre_transit", - "status_detail": "status_update", "datetime": "2024-06-18T21:36:31Z", "source": + "status_detail": "status_update", "datetime": "2024-06-23T17:53:35Z", "source": "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", "city": null, "state": null, "country": null, "zip": null}}, {"object": "TrackingDetail", "message": "Shipping Label Created", "description": "", "status": "pre_transit", - "status_detail": "status_update", "datetime": "2024-06-19T10:13:31Z", "source": + "status_detail": "status_update", "datetime": "2024-06-24T06:30:35Z", "source": "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063"}}], "fees": [], "carrier_detail": {"object": "CarrierDetail", "service": "First-Class @@ -469,9 +469,9 @@ interactions: {"object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063"}, "destination_location": "CHARLESTON SC, 29401", "destination_tracking_location": null, "guaranteed_delivery_date": null, "alternate_identifier": null, "initial_delivery_attempt": - null}, "public_url": "https://track.easypost.com/djE6dHJrXzVkODgyMTcwOTdjMzRkY2Y4ZWU0YmU5ODZjZDA5YTI4"}, - "to_address": {"id": "adr_cb3c055b454d11ef8287ac1f6bc539aa", "object": "Address", - "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:30+00:00", + null}, "public_url": "https://track.easypost.com/djE6dHJrXzQwZGYxZDJjMzBhNzRkNjViMDljNmZlNWZiOTA0Y2Mw"}, + "to_address": {"id": "adr_7ae1fcad491c11efb015ac1f6bc539aa", "object": "Address", + "created_at": "2024-07-23T17:53:34+00:00", "updated_at": "2024-07-23T17:53:35+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -479,14 +479,14 @@ interactions: "verifications": {"zip4": {"success": true, "errors": [], "details": null}, "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": - 4, "return_address": {"id": "adr_cb3e90f7454d11efb208ac1f6bc539ae", "object": - "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:29+00:00", + 4, "return_address": {"id": "adr_7ae4b187491c11efb529ac1f6bc539ae", "object": + "Address", "created_at": "2024-07-23T17:53:34+00:00", "updated_at": "2024-07-23T17:53:34+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_cb3c055b454d11ef8287ac1f6bc539aa", "object": - "Address", "created_at": "2024-07-18T21:36:29+00:00", "updated_at": "2024-07-18T21:36:30+00:00", + {}}, "buyer_address": {"id": "adr_7ae1fcad491c11efb015ac1f6bc539aa", "object": + "Address", "created_at": "2024-07-23T17:53:34+00:00", "updated_at": "2024-07-23T17:53:35+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -498,7 +498,7 @@ interactions: true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": "5.93000", "charged": true, "refunded": false}, {"object": "Fee", "type": "InsuranceFee", "amount": "1.00000", "charged": true, "refunded": false}], - "id": "shp_100e485b59294ece94b66f0a6427f032", "object": "Shipment"}' + "id": "shp_d692021679d54c0c9da828499fb1a8de", "object": "Shipment"}' headers: cache-control: - private, no-cache, no-store @@ -523,20 +523,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - bfd174a366998adfe788ee05002e6a40 + - 47648425669fee20f40c2a100052881a x-frame-options: - SAMEORIGIN x-node: - - bigweb34nuq + - bigweb53nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb3nuq 4e1e840afe - - extlb2nuq fa152d4755 + - intlb3nuq c0f5e722d1 + - extlb1nuq fa152d4755 x-runtime: - - '0.279336' + - '0.259690' x-version-label: - - easypost-202407182050-c8a24f13ee-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: @@ -547,7 +547,7 @@ interactions: "invoice_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], "supporting_documentation_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], "description": "Test description", "contact_email": "test@example.com", "tracking_code": - "9400100110368063698216", "amount": "100.00"}' + "9400100110368066361827", "amount": "100.00"}' headers: Accept: - '*/*' @@ -564,22 +564,22 @@ interactions: user-agent: - method: POST - uri: https://api.easypost.com/beta/claims + uri: https://api.easypost.com/v2/claims response: body: - string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/74b7dae47c5349a4876837984aade087.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/295f8c97f6cb4a72a0b302296e5b08b5.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7034ce5274e948faa541e7aee1c90deb.png"], + string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/836a3784a67e429ca0d30f10f64cb0bc.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/a1316f8afc5843d7b2d1370dfb7e73d3.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/4d3502f6a6e64972913e43fc4191b4cd.png"], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": - "2024-07-18T21:36:31", "description": "Test description", "history": [{"status": - "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:36:31"}], - "id": "clm_097dd2d0c5f944f7b51924422f6341b7", "insurance_amount": "100.00", - "insurance_id": "ins_26eed360e3dc4b2095263f1af0435892", "mode": "test", "object": + "2024-07-23T17:53:36", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-23T17:53:36"}], + "id": "clm_097eb623597146bab94e9ef701364d4f", "insurance_amount": "100.00", + "insurance_id": "ins_6aa59cf8618843c09b4707e1f3f74486", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": - "100.00", "salvage_value": null, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", + "100.00", "salvage_value": null, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": - "2024-07-18T21:36:31", "tracking_code": "9400100110368063698216", "type": - "damage", "updated_at": "2024-07-18T21:36:31"}' + "2024-07-23T17:53:36", "tracking_code": "9400100110368066361827", "type": + "damage", "updated_at": "2024-07-23T17:53:36"}' headers: cache-control: - private, no-cache, no-store @@ -597,8 +597,6 @@ interactions: - max-age=31536000; includeSubDomains; preload transfer-encoding: - chunked - vary: - - Origin x-backend: - easypost x-content-type-options: @@ -606,20 +604,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - bfd174a366998adfe788ee05002e6a86 + - 47648425669fee20f40c2a1000528877 x-frame-options: - SAMEORIGIN x-node: - - bigweb40nuq + - bigweb35nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb4nuq 4e1e840afe - - extlb2nuq fa152d4755 + - intlb4nuq c0f5e722d1 + - extlb1nuq fa152d4755 x-runtime: - - '0.871007' + - '0.832179' x-version-label: - - easypost-202407182050-c8a24f13ee-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: diff --git a/tests/cassettes/test_claim_get_next_page.yaml b/tests/cassettes/test_claim_get_next_page.yaml index d893b33c..e34f2dc0 100644 --- a/tests/cassettes/test_claim_get_next_page.yaml +++ b/tests/cassettes/test_claim_get_next_page.yaml @@ -13,53 +13,205 @@ interactions: user-agent: - method: GET - uri: https://api.easypost.com/beta/claims?page_size=5 + uri: https://api.easypost.com/v2/claims?page_size=5 response: body: - string: '{"claims": [{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1a9f84376e1a4afcba7fb4c60ffc9402.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7e58fa152dc7446e9dc6959d03d216fe.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1f3ba9cae53444579df05405310e8a97.png"], + string: '{"claims": [{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/7b9b0171ae7b4e258f765822e7cddb71.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/2cd9fdd33a7d40fc84ac8f87c3da1f86.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/d3aebbc42e884769ad810c92c26ad8ad.png"], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": - "2024-07-18T21:41:13", "description": "Test description", "history": [{"status": - "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:41:13"}], - "id": "clm_097dd0b1b06d4cea92d5493c26c2b0a4", "insurance_amount": "100.00", - "insurance_id": "ins_8fa0759538ba4630a1bcd7d65a72a0fe", "mode": "test", "object": + "2024-07-23T17:53:40", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-23T17:53:40"}], + "id": "clm_097e86d630e44e83b736c48c1271fed3", "insurance_amount": "100.00", + "insurance_id": "ins_33a9255ab9f443c18a1c1876bc6e25a4", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": - "100.00", "salvage_value": null, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", + "100.00", "salvage_value": null, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": - "2024-07-18T21:41:13", "tracking_code": "9400100110368063699336", "type": - "damage", "updated_at": "2024-07-18T21:41:13"}, {"approved_amount": null, - "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/74b7dae47c5349a4876837984aade087.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/295f8c97f6cb4a72a0b302296e5b08b5.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7034ce5274e948faa541e7aee1c90deb.png"], + "2024-07-23T17:53:40", "tracking_code": "9400100110368066361841", "type": + "damage", "updated_at": "2024-07-23T17:53:40"}, {"approved_amount": null, + "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/836a3784a67e429ca0d30f10f64cb0bc.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/a1316f8afc5843d7b2d1370dfb7e73d3.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/4d3502f6a6e64972913e43fc4191b4cd.png"], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": - "2024-07-18T21:36:31", "description": "Test description", "history": [{"status": - "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:36:31"}], - "id": "clm_097dd2d0c5f944f7b51924422f6341b7", "insurance_amount": "100.00", - "insurance_id": "ins_26eed360e3dc4b2095263f1af0435892", "mode": "test", "object": + "2024-07-23T17:53:36", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-23T17:53:36"}], + "id": "clm_097eb623597146bab94e9ef701364d4f", "insurance_amount": "100.00", + "insurance_id": "ins_6aa59cf8618843c09b4707e1f3f74486", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": - "100.00", "salvage_value": null, "shipment_id": "shp_100e485b59294ece94b66f0a6427f032", + "100.00", "salvage_value": null, "shipment_id": "shp_d692021679d54c0c9da828499fb1a8de", "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": - "2024-07-18T21:36:31", "tracking_code": "9400100110368063698216", "type": - "damage", "updated_at": "2024-07-18T21:36:31"}, {"approved_amount": null, - "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/a169ac0ffa1d46dcb56118f0b5c02bcc.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/d32b135079e944ceb558eb8a24151346.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/f4712df4d9bc448b85d68d1c3fdd3fb4.png"], + "2024-07-23T17:53:36", "tracking_code": "9400100110368066361827", "type": + "damage", "updated_at": "2024-07-23T17:53:36"}, {"approved_amount": null, + "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/7280de6a4ce249e6af34cfd8fc2c8613.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/9faca9b590ed4616aaa385e717969828.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/5c641ae1e5a54a53ab6ded433ebfabdc.png"], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": - "2024-07-18T21:25:33", "description": "Test description", "history": [{"status": - "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:25:33"}], - "id": "clm_097d7a0ce4274578896ea9b65a9f5d2b", "insurance_amount": "100.00", - "insurance_id": "ins_4ac7b08d2bd34ad28f017f72b04b820e", "mode": "test", "object": + "2024-07-23T17:10:33", "description": "Test description", "history": [{"status": + "cancelled", "status_detail": "Claim cancellation was requested.", "timestamp": + "2024-07-23T17:12:03"}, {"status": "submitted", "status_detail": "Claim was + created.", "timestamp": "2024-07-23T17:10:33"}], "id": "clm_097e39b748d24c32a0bd61840fc0763f", + "insurance_amount": "249.99", "insurance_id": "ins_d15880e5772c4373aec497744fa4da54", + "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": + null, "requested_amount": "100.00", "salvage_value": null, "shipment_id": + "shp_09a808dae97442f3aa7fbd994a3533d4", "status": "cancelled", "status_detail": + "Claim cancellation was requested.", "status_timestamp": "2024-07-23T17:12:03", + "tracking_code": "9470100110368066351889", "type": "damage", "updated_at": + "2024-07-23T17:12:03"}, {"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/1d0c4ff3d71c4f5d8ec5c21bcfeaf419.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/8f78018b1c6941cdafd1ca9d36579e40.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/973d2a48b6b04423b1d112dff79e85e3.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-22T20:47:51", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-22T20:47:51"}], + "id": "clm_097ed32c795141499bb0a5e17a4fe24f", "insurance_amount": "249.99", + "insurance_id": "ins_fa5c89fcf765494b921a96c4e4004476", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_5bcff1867a1f4a29a67db9a84a2082c5", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-22T20:47:51", "tracking_code": "9434600110368065978707", "type": + "damage", "updated_at": "2024-07-22T20:47:51"}, {"approved_amount": null, + "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/1d0c4ff3d71c4f5d8ec5c21bcfeaf419.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/8f78018b1c6941cdafd1ca9d36579e40.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/973d2a48b6b04423b1d112dff79e85e3.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-22T20:47:51", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-22T20:47:51"}], + "id": "clm_097ed32c795141499bb0a5e17a4fe24f", "insurance_amount": "249.99", + "insurance_id": "ins_fa5c89fcf765494b921a96c4e4004476", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": "shp_5bcff1867a1f4a29a67db9a84a2082c5", + "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": + "2024-07-22T20:47:51", "tracking_code": "9434600110368065978707", "type": + "damage", "updated_at": "2024-07-22T20:47:51"}], "has_more": true}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '5708' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 4764841f669fee25f3f51d6000528d1b + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb39nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb4nuq c0f5e722d1 + - extlb1nuq fa152d4755 + x-runtime: + - '0.053317' + x-version-label: + - easypost-202407231702-040a3c7b8f-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + authorization: + - + user-agent: + - + method: GET + uri: https://api.easypost.com/v2/claims?before_id=clm_097ed32c795141499bb0a5e17a4fe24f&page_size=5 + response: + body: + string: '{"claims": [{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/5b940a68e4a5493e8d5ae50c79ead964.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/2a238f773957479199496ee7633187b8.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/0281745ca44e4c88a632f9534c2c709d.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-22T18:44:23", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-22T18:44:23"}], + "id": "clm_097e05da0f9740569d4c7dde98b45814", "insurance_amount": "100.00", + "insurance_id": "ins_aabfdf1ee3f243c79e8b43d5f7f2aa0c", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": null, "status": "submitted", + "status_detail": "Claim was created.", "status_timestamp": "2024-07-22T18:44:23", + "tracking_code": "EZ1000000001", "type": "damage", "updated_at": "2024-07-22T18:44:23"}, + {"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/5b940a68e4a5493e8d5ae50c79ead964.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/2a238f773957479199496ee7633187b8.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/0281745ca44e4c88a632f9534c2c709d.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-22T18:44:23", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-22T18:44:23"}], + "id": "clm_097e05da0f9740569d4c7dde98b45814", "insurance_amount": "100.00", + "insurance_id": "ins_aabfdf1ee3f243c79e8b43d5f7f2aa0c", "mode": "test", "object": + "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": + "100.00", "salvage_value": null, "shipment_id": null, "status": "submitted", + "status_detail": "Claim was created.", "status_timestamp": "2024-07-22T18:44:23", + "tracking_code": "EZ1000000001", "type": "damage", "updated_at": "2024-07-22T18:44:23"}, + {"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/6a130e0b3b8843219e47f80843efcce9.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/1fa2701e863546a58eb58cf9dc5f6d49.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/b29a5ab5b35346759ed2c29416cc20f2.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-22T16:32:17", "description": "Test description", "history": [{"status": + "cancelled", "status_detail": "Claim cancellation was requested.", "timestamp": + "2024-07-22T16:32:19"}, {"status": "submitted", "status_detail": "Claim was + created.", "timestamp": "2024-07-22T16:32:17"}], "id": "clm_097e808661fb4cc4b4ac46398a8ad518", + "insurance_amount": "100.00", "insurance_id": "ins_1a8fe50291ec4863984ca525ffe4a91c", + "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": + null, "requested_amount": "100.00", "salvage_value": null, "shipment_id": + "shp_d97b685262564a868a1590d9e2ffb135", "status": "cancelled", "status_detail": + "Claim cancellation was requested.", "status_timestamp": "2024-07-22T16:32:19", + "tracking_code": "9400100110368065903004", "type": "damage", "updated_at": + "2024-07-22T16:32:18"}, {"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/6a130e0b3b8843219e47f80843efcce9.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/1fa2701e863546a58eb58cf9dc5f6d49.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240722/b29a5ab5b35346759ed2c29416cc20f2.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-22T16:32:17", "description": "Test description", "history": [{"status": + "cancelled", "status_detail": "Claim cancellation was requested.", "timestamp": + "2024-07-22T16:32:19"}, {"status": "submitted", "status_detail": "Claim was + created.", "timestamp": "2024-07-22T16:32:17"}], "id": "clm_097e808661fb4cc4b4ac46398a8ad518", + "insurance_amount": "100.00", "insurance_id": "ins_1a8fe50291ec4863984ca525ffe4a91c", + "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": + null, "requested_amount": "100.00", "salvage_value": null, "shipment_id": + "shp_d97b685262564a868a1590d9e2ffb135", "status": "cancelled", "status_detail": + "Claim cancellation was requested.", "status_timestamp": "2024-07-22T16:32:19", + "tracking_code": "9400100110368065903004", "type": "damage", "updated_at": + "2024-07-22T16:32:18"}, {"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240719/eb92a18cf4af448a8579205cb66d6f0e.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240719/7a478fb2bba54c2ebedf646f407c727e.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240719/d73c07b94055482e8ecd28e639c27f16.png"], + "check_delivery_address": null, "contact_email": "test@example.com", "created_at": + "2024-07-19T16:41:18", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-19T16:41:18"}], + "id": "clm_097d4ac66cf34e2796582f93e38d4391", "insurance_amount": "202.00", + "insurance_id": "ins_71819f699e1945d7b8c4391ec2369105", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": - "100.00", "salvage_value": null, "shipment_id": "shp_be019d9828b84bbc8d33e211a55b1c08", + "100.00", "salvage_value": null, "shipment_id": "shp_047b530addde44df8e783d49daa640dc", "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": - "2024-07-18T21:25:33", "tracking_code": "9400100110368063695628", "type": - "damage", "updated_at": "2024-07-18T21:25:33"}], "has_more": false}' + "2024-07-19T16:41:18", "tracking_code": "9405500110368064043766", "type": + "damage", "updated_at": "2024-07-19T16:41:18"}], "has_more": true}' headers: cache-control: - private, no-cache, no-store content-length: - - '3363' + - '5744' content-type: - application/json; charset=utf-8 expires: @@ -72,8 +224,6 @@ interactions: - max-age=31536000; includeSubDomains; preload transfer-encoding: - chunked - vary: - - Origin x-backend: - easypost x-content-type-options: @@ -81,20 +231,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - 95a1227e66998c80e78a13ac002d4ec5 + - 4764841f669fee25f3f51d6000528d34 x-frame-options: - SAMEORIGIN x-node: - - bigweb42nuq + - bigweb41nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb3nuq 4e1e840afe + - intlb3nuq c0f5e722d1 - extlb1nuq fa152d4755 x-runtime: - - '0.045254' + - '0.057857' x-version-label: - - easypost-202407182129-c0d97eb024-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: diff --git a/tests/cassettes/test_claim_retrieve.yaml b/tests/cassettes/test_claim_retrieve.yaml index 81034a2d..6899c5a7 100644 --- a/tests/cassettes/test_claim_retrieve.yaml +++ b/tests/cassettes/test_claim_retrieve.yaml @@ -31,94 +31,94 @@ interactions: uri: https://api.easypost.com/v2/shipments response: body: - string: '{"created_at": "2024-07-18T21:41:11Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + string: '{"created_at": "2024-07-23T17:53:37Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": - "UPS", "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": + "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", + "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": - "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid + "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", "message": "Invalid Access License number"}], "mode": "test", "options": {"label_format": "PNG", "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - null, "updated_at": "2024-07-18T21:41:12Z", "batch_id": null, "batch_status": - null, "batch_message": null, "customs_info": {"id": "cstinfo_8297beb2446c477590c41122f7c7f4ea", - "object": "CustomsInfo", "created_at": "2024-07-18T21:41:11Z", "updated_at": - "2024-07-18T21:41:11Z", "contents_explanation": "", "contents_type": "merchandise", + null, "updated_at": "2024-07-23T17:53:38Z", "batch_id": null, "batch_status": + null, "batch_message": null, "customs_info": {"id": "cstinfo_cb84e72ba6024be28ce53aaa6ebf4b90", + "object": "CustomsInfo", "created_at": "2024-07-23T17:53:37Z", "updated_at": + "2024-07-23T17:53:37Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", "declaration": null, "customs_items": - [{"id": "cstitem_ca3909bcd87d40e9b4a787ca3303b941", "object": "CustomsItem", - "created_at": "2024-07-18T21:41:11Z", "updated_at": "2024-07-18T21:41:11Z", + [{"id": "cstitem_7aac30723e7140e59ca169984646fd6e", "object": "CustomsItem", + "created_at": "2024-07-23T17:53:37Z", "updated_at": "2024-07-23T17:53:37Z", "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": - null}]}, "from_address": {"id": "adr_736c77a0454e11efa92dac1f6bc539ae", "object": - "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", + null}]}, "from_address": {"id": "adr_7d0d0fd8491c11efa2a9ac1f6bc53342", "object": + "Address", "created_at": "2024-07-23T17:53:37+00:00", "updated_at": "2024-07-23T17:53:37+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_466e858c98e349ed9520217051f5b919", - "object": "Parcel", "created_at": "2024-07-18T21:41:11Z", "updated_at": "2024-07-18T21:41:11Z", + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_b3606916731c48cbb7a1601d5c2452bf", + "object": "Parcel", "created_at": "2024-07-23T17:53:37Z", "updated_at": "2024-07-23T17:53:37Z", "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_f533a05151d74d28aa722fa8cc8f5784", - "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_49ba5166623649699e55e33c464e058f", + "object": "Rate", "created_at": "2024-07-23T17:53:38Z", "updated_at": "2024-07-23T17:53:38Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_037cb76299c84c54904f046ff477d8de", + "object": "Rate", "created_at": "2024-07-23T17:53:38Z", "updated_at": "2024-07-23T17:53:38Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_783c8ac03a8c4039913ad013e8079343", - "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + 2, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_058244a3b26240f19927dbe382843161", + "object": "Rate", "created_at": "2024-07-23T17:53:38Z", "updated_at": "2024-07-23T17:53:38Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_8e11c1a6dbe94d42ac017d6d775eda22", - "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", - "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", - "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": - "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + 3, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": null, "tracker": null, "to_address": {"id": "adr_736a4afb454e11efbb843cecef1b359e", - "object": "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": - "2024-07-18T21:41:11+00:00", "name": "Elizabeth Swan", "company": null, "street1": + null, "selected_rate": null, "tracker": null, "to_address": {"id": "adr_7d0ab012491c11ef98423cecef1b359e", + "object": "Address", "created_at": "2024-07-23T17:53:37+00:00", "updated_at": + "2024-07-23T17:53:37+00:00", "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {}}, "usps_zone": 4, "return_address": - {"id": "adr_736c77a0454e11efa92dac1f6bc539ae", "object": "Address", "created_at": - "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", "name": + {"id": "adr_7d0d0fd8491c11efa2a9ac1f6bc53342", "object": "Address", "created_at": + "2024-07-23T17:53:37+00:00", "updated_at": "2024-07-23T17:53:37+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_736a4afb454e11efbb843cecef1b359e", "object": - "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", + {}}, "buyer_address": {"id": "adr_7d0ab012491c11ef98423cecef1b359e", "object": + "Address", "created_at": "2024-07-23T17:53:37+00:00", "updated_at": "2024-07-23T17:53:37+00:00", "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "forms": [], "fees": [], "id": "shp_f9dd8b8ad442489f9b7334d957892609", + {}}, "forms": [], "fees": [], "id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "object": "Shipment"}' headers: cache-control: @@ -130,7 +130,7 @@ interactions: expires: - '0' location: - - /api/v2/shipments/shp_f9dd8b8ad442489f9b7334d957892609 + - /api/v2/shipments/shp_8ae4d3d1cf78409fbabd93c5b13c5f98 pragma: - no-cache referrer-policy: @@ -146,27 +146,27 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - bfd174a766998bf7e789f1e7002f4386 + - 6558653e669fee21f42f358e00532b0d x-frame-options: - SAMEORIGIN x-node: - - bigweb38nuq + - bigweb36nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb3nuq 4e1e840afe + - intlb3nuq c0f5e722d1 - extlb2nuq fa152d4755 x-runtime: - - '0.656932' + - '0.844359' x-version-label: - - easypost-202407182129-c0d97eb024-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: code: 201 message: Created - request: - body: '{"rate": {"id": "rate_783c8ac03a8c4039913ad013e8079343"}}' + body: '{"rate": {"id": "rate_058244a3b26240f19927dbe382843161"}}' headers: Accept: - '*/*' @@ -183,100 +183,100 @@ interactions: user-agent: - method: POST - uri: https://api.easypost.com/v2/shipments/shp_f9dd8b8ad442489f9b7334d957892609/buy + uri: https://api.easypost.com/v2/shipments/shp_8ae4d3d1cf78409fbabd93c5b13c5f98/buy response: body: - string: '{"created_at": "2024-07-18T21:41:11Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + string: '{"created_at": "2024-07-23T17:53:37Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": - "UPS", "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": + "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", + "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": - "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid + "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", "message": "Invalid Access License number"}], "mode": "test", "options": {"label_format": "PNG", "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - "9400100110368063699336", "updated_at": "2024-07-18T21:41:13Z", "batch_id": + "9400100110368066361841", "updated_at": "2024-07-23T17:53:39Z", "batch_id": null, "batch_status": null, "batch_message": null, "customs_info": {"id": - "cstinfo_8297beb2446c477590c41122f7c7f4ea", "object": "CustomsInfo", "created_at": - "2024-07-18T21:41:11Z", "updated_at": "2024-07-18T21:41:11Z", "contents_explanation": + "cstinfo_cb84e72ba6024be28ce53aaa6ebf4b90", "object": "CustomsInfo", "created_at": + "2024-07-23T17:53:37Z", "updated_at": "2024-07-23T17:53:37Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", - "declaration": null, "customs_items": [{"id": "cstitem_ca3909bcd87d40e9b4a787ca3303b941", - "object": "CustomsItem", "created_at": "2024-07-18T21:41:11Z", "updated_at": - "2024-07-18T21:41:11Z", "description": "Sweet shirts", "hs_tariff_number": + "declaration": null, "customs_items": [{"id": "cstitem_7aac30723e7140e59ca169984646fd6e", + "object": "CustomsItem", "created_at": "2024-07-23T17:53:37Z", "updated_at": + "2024-07-23T17:53:37Z", "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": - "adr_736c77a0454e11efa92dac1f6bc539ae", "object": "Address", "created_at": - "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", "name": + "adr_7d0d0fd8491c11efa2a9ac1f6bc53342", "object": "Address", "created_at": + "2024-07-23T17:53:37+00:00", "updated_at": "2024-07-23T17:53:37+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_466e858c98e349ed9520217051f5b919", - "object": "Parcel", "created_at": "2024-07-18T21:41:11Z", "updated_at": "2024-07-18T21:41:11Z", + {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_b3606916731c48cbb7a1601d5c2452bf", + "object": "Parcel", "created_at": "2024-07-23T17:53:37Z", "updated_at": "2024-07-23T17:53:37Z", "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_7ee03b63be8e4d41904bfe931b6465e9", - "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:13Z", - "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:41:12Z", + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_1f1920b4945f4bd0a4bd4238b33b7a28", + "created_at": "2024-07-23T17:53:39Z", "updated_at": "2024-07-23T17:53:39Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-23T17:53:39Z", "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": - "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e80e915880a6b54ffd8c17adfbd7c4a4a4.png", + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240723/e891a90c2cd34d4f99b06c274eb20fa007.png", "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": - null}, "rates": [{"id": "rate_f533a05151d74d28aa722fa8cc8f5784", "object": - "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + null}, "rates": [{"id": "rate_49ba5166623649699e55e33c464e058f", "object": + "Rate", "created_at": "2024-07-23T17:53:38Z", "updated_at": "2024-07-23T17:53:38Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_037cb76299c84c54904f046ff477d8de", + "object": "Rate", "created_at": "2024-07-23T17:53:38Z", "updated_at": "2024-07-23T17:53:38Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_783c8ac03a8c4039913ad013e8079343", - "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + 2, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_058244a3b26240f19927dbe382843161", + "object": "Rate", "created_at": "2024-07-23T17:53:38Z", "updated_at": "2024-07-23T17:53:38Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_8e11c1a6dbe94d42ac017d6d775eda22", - "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", - "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", - "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": - "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + 3, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": {"id": "rate_783c8ac03a8c4039913ad013e8079343", "object": - "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + null, "selected_rate": {"id": "rate_058244a3b26240f19927dbe382843161", "object": + "Rate", "created_at": "2024-07-23T17:53:39Z", "updated_at": "2024-07-23T17:53:39Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_8596380b4a794d909375fe43b76dfa0d", - "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063699336", - "status": "unknown", "status_detail": "unknown", "created_at": "2024-07-18T21:41:13Z", - "updated_at": "2024-07-18T21:41:13Z", "signed_by": null, "weight": null, "est_delivery_date": - null, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier": "USPS", + 3, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_50a3f6c393cf407cb7e82a16e753f932", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368066361841", + "status": "unknown", "status_detail": "unknown", "created_at": "2024-07-23T17:53:39Z", + "updated_at": "2024-07-23T17:53:39Z", "signed_by": null, "weight": null, "est_delivery_date": + null, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "carrier": "USPS", "tracking_details": [], "fees": [], "carrier_detail": null, "public_url": - "https://track.easypost.com/djE6dHJrXzg1OTYzODBiNGE3OTRkOTA5Mzc1ZmU0M2I3NmRmYTBk"}, - "to_address": {"id": "adr_736a4afb454e11efbb843cecef1b359e", "object": "Address", - "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:12+00:00", + "https://track.easypost.com/djE6dHJrXzUwYTNmNmMzOTNjZjQwN2NiN2U4MmExNmU3NTNmOTMy"}, + "to_address": {"id": "adr_7d0ab012491c11ef98423cecef1b359e", "object": "Address", + "created_at": "2024-07-23T17:53:37+00:00", "updated_at": "2024-07-23T17:53:38+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -284,14 +284,14 @@ interactions: "verifications": {"zip4": {"success": true, "errors": [], "details": null}, "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": - 4, "return_address": {"id": "adr_736c77a0454e11efa92dac1f6bc539ae", "object": - "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", + 4, "return_address": {"id": "adr_7d0d0fd8491c11efa2a9ac1f6bc53342", "object": + "Address", "created_at": "2024-07-23T17:53:37+00:00", "updated_at": "2024-07-23T17:53:37+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_736a4afb454e11efbb843cecef1b359e", "object": - "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:12+00:00", + {}}, "buyer_address": {"id": "adr_7d0ab012491c11ef98423cecef1b359e", "object": + "Address", "created_at": "2024-07-23T17:53:37+00:00", "updated_at": "2024-07-23T17:53:38+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -301,7 +301,7 @@ interactions: "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "forms": [], "fees": [{"object": "Fee", "type": "LabelFee", "amount": "0.00000", "charged": true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": - "5.93000", "charged": true, "refunded": false}], "id": "shp_f9dd8b8ad442489f9b7334d957892609", + "5.93000", "charged": true, "refunded": false}], "id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "object": "Shipment"}' headers: cache-control: @@ -327,20 +327,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - bfd174a766998bf8e789f1e7002f4415 + - 6558653e669fee22f42f358e00532c25 x-frame-options: - SAMEORIGIN x-node: - - bigweb33nuq + - bigweb41nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb3nuq 4e1e840afe + - intlb3nuq c0f5e722d1 - extlb2nuq fa152d4755 x-runtime: - - '0.833023' + - '1.035889' x-version-label: - - easypost-202407182129-c0d97eb024-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: @@ -364,103 +364,103 @@ interactions: user-agent: - method: POST - uri: https://api.easypost.com/v2/shipments/shp_f9dd8b8ad442489f9b7334d957892609/insure + uri: https://api.easypost.com/v2/shipments/shp_8ae4d3d1cf78409fbabd93c5b13c5f98/insure response: body: - string: '{"created_at": "2024-07-18T21:41:11Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", - "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", + string: '{"created_at": "2024-07-23T17:53:37Z", "is_return": false, "messages": + [{"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_a5e4cb81d1b4481d812f4511ba8dfbb1", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", + field required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", "type": "rate_error", "message": "shipment.customs_info.customs_items.0.code: - field required"}, {"carrier": "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", + field required"}, {"carrier": "UPS", "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": - "UPS", "carrier_account_id": "ca_725c14e27c1544a6af0c90d4208f70d3", "type": + "UPS", "carrier_account_id": "ca_bee3d0b00e4844f0bafe77518fecef83", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", - "carrier_account_id": "ca_4f4f19e3b533485296d62721584e096d", "type": "rate_error", + "carrier_account_id": "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid Access License number"}, {"carrier": "UPS", "carrier_account_id": - "ca_2b156a7d1fdb444c96fd53ecc409a6fa", "type": "rate_error", "message": "Invalid + "ca_725c14e27c1544a6af0c90d4208f70d3", "type": "rate_error", "message": "Invalid Access License number"}], "mode": "test", "options": {"label_format": "PNG", "invoice_number": "123", "currency": "USD", "payment": {"type": "SENDER"}, "date_advance": 0}, "reference": "123", "status": "unknown", "tracking_code": - "9400100110368063699336", "updated_at": "2024-07-18T21:41:13Z", "batch_id": + "9400100110368066361841", "updated_at": "2024-07-23T17:53:39Z", "batch_id": null, "batch_status": null, "batch_message": null, "customs_info": {"id": - "cstinfo_8297beb2446c477590c41122f7c7f4ea", "object": "CustomsInfo", "created_at": - "2024-07-18T21:41:11Z", "updated_at": "2024-07-18T21:41:11Z", "contents_explanation": + "cstinfo_cb84e72ba6024be28ce53aaa6ebf4b90", "object": "CustomsInfo", "created_at": + "2024-07-23T17:53:37Z", "updated_at": "2024-07-23T17:53:37Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", - "declaration": null, "customs_items": [{"id": "cstitem_ca3909bcd87d40e9b4a787ca3303b941", - "object": "CustomsItem", "created_at": "2024-07-18T21:41:11Z", "updated_at": - "2024-07-18T21:41:11Z", "description": "Sweet shirts", "hs_tariff_number": + "declaration": null, "customs_items": [{"id": "cstitem_7aac30723e7140e59ca169984646fd6e", + "object": "CustomsItem", "created_at": "2024-07-23T17:53:37Z", "updated_at": + "2024-07-23T17:53:37Z", "description": "Sweet shirts", "hs_tariff_number": "654321", "origin_country": "US", "quantity": 2, "value": "23.25", "weight": 11.0, "code": null, "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": null}]}, "from_address": {"id": - "adr_736c77a0454e11efa92dac1f6bc539ae", "object": "Address", "created_at": - "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", "name": + "adr_7d0d0fd8491c11efa2a9ac1f6bc53342", "object": "Address", "created_at": + "2024-07-23T17:53:37+00:00", "updated_at": "2024-07-23T17:53:37+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": "100.00", "order_id": null, "parcel": {"id": "prcl_466e858c98e349ed9520217051f5b919", - "object": "Parcel", "created_at": "2024-07-18T21:41:11Z", "updated_at": "2024-07-18T21:41:11Z", + {}}, "insurance": "100.00", "order_id": null, "parcel": {"id": "prcl_b3606916731c48cbb7a1601d5c2452bf", + "object": "Parcel", "created_at": "2024-07-23T17:53:37Z", "updated_at": "2024-07-23T17:53:37Z", "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_7ee03b63be8e4d41904bfe931b6465e9", - "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:13Z", - "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-18T21:41:12Z", + 15.4, "mode": "test"}, "postage_label": {"object": "PostageLabel", "id": "pl_1f1920b4945f4bd0a4bd4238b33b7a28", + "created_at": "2024-07-23T17:53:39Z", "updated_at": "2024-07-23T17:53:39Z", + "date_advance": 0, "integrated_form": "none", "label_date": "2024-07-23T17:53:39Z", "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": - "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240718/e80e915880a6b54ffd8c17adfbd7c4a4a4.png", + "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240723/e891a90c2cd34d4f99b06c274eb20fa007.png", "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": - null}, "rates": [{"id": "rate_f533a05151d74d28aa722fa8cc8f5784", "object": - "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + null}, "rates": [{"id": "rate_49ba5166623649699e55e33c464e058f", "object": + "Rate", "created_at": "2024-07-23T17:53:38Z", "updated_at": "2024-07-23T17:53:38Z", + "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_037cb76299c84c54904f046ff477d8de", + "object": "Rate", "created_at": "2024-07-23T17:53:38Z", "updated_at": "2024-07-23T17:53:38Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "6.90", "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_783c8ac03a8c4039913ad013e8079343", - "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + 2, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_058244a3b26240f19927dbe382843161", + "object": "Rate", "created_at": "2024-07-23T17:53:38Z", "updated_at": "2024-07-23T17:53:38Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_8e11c1a6dbe94d42ac017d6d775eda22", - "object": "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", - "mode": "test", "service": "Express", "carrier": "USPS", "rate": "33.10", - "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": - "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": - 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 2, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": + 3, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}], "refund_status": null, "scan_form": - null, "selected_rate": {"id": "rate_783c8ac03a8c4039913ad013e8079343", "object": - "Rate", "created_at": "2024-07-18T21:41:12Z", "updated_at": "2024-07-18T21:41:12Z", + null, "selected_rate": {"id": "rate_058244a3b26240f19927dbe382843161", "object": + "Rate", "created_at": "2024-07-23T17:53:39Z", "updated_at": "2024-07-23T17:53:39Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_8596380b4a794d909375fe43b76dfa0d", - "object": "Tracker", "mode": "test", "tracking_code": "9400100110368063699336", - "status": "pre_transit", "status_detail": "status_update", "created_at": "2024-07-18T21:41:13Z", - "updated_at": "2024-07-18T21:41:13Z", "signed_by": null, "weight": null, "est_delivery_date": - "2024-07-18T21:41:13Z", "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", + 3, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "carrier_account_id": + "ca_b25657e9896e4d63ac8151ac346ac41e"}, "tracker": {"id": "trk_50a3f6c393cf407cb7e82a16e753f932", + "object": "Tracker", "mode": "test", "tracking_code": "9400100110368066361841", + "status": "pre_transit", "status_detail": "status_update", "created_at": "2024-07-23T17:53:39Z", + "updated_at": "2024-07-23T17:53:39Z", "signed_by": null, "weight": null, "est_delivery_date": + "2024-07-23T17:53:39Z", "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "carrier": "USPS", "tracking_details": [{"object": "TrackingDetail", "message": "Pre-Shipment Info Sent to USPS", "description": "", "status": "pre_transit", - "status_detail": "status_update", "datetime": "2024-06-18T21:41:13Z", "source": + "status_detail": "status_update", "datetime": "2024-06-23T17:53:39Z", "source": "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", "city": null, "state": null, "country": null, "zip": null}}, {"object": "TrackingDetail", "message": "Shipping Label Created", "description": "", "status": "pre_transit", - "status_detail": "status_update", "datetime": "2024-06-19T10:18:13Z", "source": + "status_detail": "status_update", "datetime": "2024-06-24T06:30:39Z", "source": "USPS", "carrier_code": "", "tracking_location": {"object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063"}}], "fees": [], "carrier_detail": {"object": "CarrierDetail", "service": "First-Class @@ -469,9 +469,9 @@ interactions: {"object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063"}, "destination_location": "CHARLESTON SC, 29401", "destination_tracking_location": null, "guaranteed_delivery_date": null, "alternate_identifier": null, "initial_delivery_attempt": - null}, "public_url": "https://track.easypost.com/djE6dHJrXzg1OTYzODBiNGE3OTRkOTA5Mzc1ZmU0M2I3NmRmYTBk"}, - "to_address": {"id": "adr_736a4afb454e11efbb843cecef1b359e", "object": "Address", - "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:12+00:00", + null}, "public_url": "https://track.easypost.com/djE6dHJrXzUwYTNmNmMzOTNjZjQwN2NiN2U4MmExNmU3NTNmOTMy"}, + "to_address": {"id": "adr_7d0ab012491c11ef98423cecef1b359e", "object": "Address", + "created_at": "2024-07-23T17:53:37+00:00", "updated_at": "2024-07-23T17:53:38+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -479,14 +479,14 @@ interactions: "verifications": {"zip4": {"success": true, "errors": [], "details": null}, "delivery": {"success": true, "errors": [], "details": {"latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles"}}}}, "usps_zone": - 4, "return_address": {"id": "adr_736c77a0454e11efa92dac1f6bc539ae", "object": - "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:11+00:00", + 4, "return_address": {"id": "adr_7d0d0fd8491c11efa2a9ac1f6bc53342", "object": + "Address", "created_at": "2024-07-23T17:53:37+00:00", "updated_at": "2024-07-23T17:53:37+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "buyer_address": {"id": "adr_736a4afb454e11efbb843cecef1b359e", "object": - "Address", "created_at": "2024-07-18T21:41:11+00:00", "updated_at": "2024-07-18T21:41:12+00:00", + {}}, "buyer_address": {"id": "adr_7d0ab012491c11ef98423cecef1b359e", "object": + "Address", "created_at": "2024-07-23T17:53:37+00:00", "updated_at": "2024-07-23T17:53:38+00:00", "name": "ELIZABETH SWAN", "company": null, "street1": "179 N HARBOR DR", "street2": null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "", "email": "", "mode": "test", "carrier_facility": @@ -498,7 +498,7 @@ interactions: true, "refunded": false}, {"object": "Fee", "type": "PostageFee", "amount": "5.93000", "charged": true, "refunded": false}, {"object": "Fee", "type": "InsuranceFee", "amount": "1.00000", "charged": true, "refunded": false}], - "id": "shp_f9dd8b8ad442489f9b7334d957892609", "object": "Shipment"}' + "id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "object": "Shipment"}' headers: cache-control: - private, no-cache, no-store @@ -523,20 +523,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - bfd174a766998bf9e789f1e7002f44e0 + - 6558653e669fee23f42f358e00532d68 x-frame-options: - SAMEORIGIN x-node: - - bigweb42nuq + - bigweb39nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb3nuq 4e1e840afe + - intlb4nuq c0f5e722d1 - extlb2nuq fa152d4755 x-runtime: - - '0.278456' + - '0.274140' x-version-label: - - easypost-202407182129-c0d97eb024-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: @@ -547,7 +547,7 @@ interactions: "invoice_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], "supporting_documentation_attachments": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAeUlEQVR42mP8//8/AwAI/AL+4Q7AIAAAAABJRU5ErkJggg=="], "description": "Test description", "contact_email": "test@example.com", "tracking_code": - "9400100110368063699336", "amount": "100.00"}' + "9400100110368066361841", "amount": "100.00"}' headers: Accept: - '*/*' @@ -564,22 +564,22 @@ interactions: user-agent: - method: POST - uri: https://api.easypost.com/beta/claims + uri: https://api.easypost.com/v2/claims response: body: - string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1a9f84376e1a4afcba7fb4c60ffc9402.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7e58fa152dc7446e9dc6959d03d216fe.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1f3ba9cae53444579df05405310e8a97.png"], + string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/7b9b0171ae7b4e258f765822e7cddb71.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/2cd9fdd33a7d40fc84ac8f87c3da1f86.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/d3aebbc42e884769ad810c92c26ad8ad.png"], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": - "2024-07-18T21:41:13", "description": "Test description", "history": [{"status": - "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:41:13"}], - "id": "clm_097dd0b1b06d4cea92d5493c26c2b0a4", "insurance_amount": "100.00", - "insurance_id": "ins_8fa0759538ba4630a1bcd7d65a72a0fe", "mode": "test", "object": + "2024-07-23T17:53:40", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-23T17:53:40"}], + "id": "clm_097e86d630e44e83b736c48c1271fed3", "insurance_amount": "100.00", + "insurance_id": "ins_33a9255ab9f443c18a1c1876bc6e25a4", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": - "100.00", "salvage_value": null, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", + "100.00", "salvage_value": null, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": - "2024-07-18T21:41:13", "tracking_code": "9400100110368063699336", "type": - "damage", "updated_at": "2024-07-18T21:41:13"}' + "2024-07-23T17:53:40", "tracking_code": "9400100110368066361841", "type": + "damage", "updated_at": "2024-07-23T17:53:40"}' headers: cache-control: - private, no-cache, no-store @@ -597,8 +597,6 @@ interactions: - max-age=31536000; includeSubDomains; preload transfer-encoding: - chunked - vary: - - Origin x-backend: - easypost x-content-type-options: @@ -606,20 +604,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - bfd174a766998bf9e789f1e7002f4533 + - 6558653e669fee24f42f358e00532dbd x-frame-options: - SAMEORIGIN x-node: - - bigweb40nuq + - bigweb41nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb3nuq 4e1e840afe + - intlb4nuq c0f5e722d1 - extlb2nuq fa152d4755 x-runtime: - - '0.861430' + - '0.844779' x-version-label: - - easypost-202407182129-c0d97eb024-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: @@ -639,22 +637,22 @@ interactions: user-agent: - method: GET - uri: https://api.easypost.com/beta/claims/clm_097dd0b1b06d4cea92d5493c26c2b0a4 + uri: https://api.easypost.com/v2/claims/clm_097e86d630e44e83b736c48c1271fed3 response: body: - string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1a9f84376e1a4afcba7fb4c60ffc9402.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/7e58fa152dc7446e9dc6959d03d216fe.png", - "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240718/1f3ba9cae53444579df05405310e8a97.png"], + string: '{"approved_amount": null, "attachments": ["https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/7b9b0171ae7b4e258f765822e7cddb71.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/2cd9fdd33a7d40fc84ac8f87c3da1f86.png", + "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20240723/d3aebbc42e884769ad810c92c26ad8ad.png"], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": - "2024-07-18T21:41:13", "description": "Test description", "history": [{"status": - "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-18T21:41:13"}], - "id": "clm_097dd0b1b06d4cea92d5493c26c2b0a4", "insurance_amount": "100.00", - "insurance_id": "ins_8fa0759538ba4630a1bcd7d65a72a0fe", "mode": "test", "object": + "2024-07-23T17:53:40", "description": "Test description", "history": [{"status": + "submitted", "status_detail": "Claim was created.", "timestamp": "2024-07-23T17:53:40"}], + "id": "clm_097e86d630e44e83b736c48c1271fed3", "insurance_amount": "100.00", + "insurance_id": "ins_33a9255ab9f443c18a1c1876bc6e25a4", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": - "100.00", "salvage_value": null, "shipment_id": "shp_f9dd8b8ad442489f9b7334d957892609", + "100.00", "salvage_value": null, "shipment_id": "shp_8ae4d3d1cf78409fbabd93c5b13c5f98", "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": - "2024-07-18T21:41:13", "tracking_code": "9400100110368063699336", "type": - "damage", "updated_at": "2024-07-18T21:41:13"}' + "2024-07-23T17:53:40", "tracking_code": "9400100110368066361841", "type": + "damage", "updated_at": "2024-07-23T17:53:40"}' headers: cache-control: - private, no-cache, no-store @@ -672,8 +670,6 @@ interactions: - max-age=31536000; includeSubDomains; preload transfer-encoding: - chunked - vary: - - Origin x-backend: - easypost x-content-type-options: @@ -681,20 +677,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - bfd174a766998bfae789f1e7002f4605 + - 6558653e669fee24f42f358e00532ec8 x-frame-options: - SAMEORIGIN x-node: - - bigweb41nuq + - bigweb34nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb3nuq 4e1e840afe + - intlb3nuq c0f5e722d1 - extlb2nuq fa152d4755 x-runtime: - - '0.035800' + - '0.035588' x-version-label: - - easypost-202407182129-c0d97eb024-master + - easypost-202407231702-040a3c7b8f-master x-xss-protection: - 1; mode=block status: