Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Re-record JSON responses for docs #120

Merged
merged 8 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ venv
/.dummy
/.eslintignore
*.sw*
/official/tools/build_doc_json_responses/responses/
/official/tools/build_doc_json_responses/tests/cassettes/
3 changes: 1 addition & 2 deletions official/docs/curl/current/endshipper/list.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
curl -X GET https://api.easypost.com/v2/end_shippers?page_size=5 \
-u "$EASYPOST_API_KEY": \
-H 'Content-Type: application/json'
-u "$EASYPOST_API_KEY":
3 changes: 1 addition & 2 deletions official/docs/curl/current/endshipper/retrieve.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
curl -X GET https://api.easypost.com/v2/end_shippers/es_... \
-u "$EASYPOST_API_KEY": \
-H 'Content-Type: application/json'
-u "$EASYPOST_API_KEY":
8 changes: 2 additions & 6 deletions official/docs/curl/current/shipments/label.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
curl -X GET https://api.easypost.com/v2/shipments/shp_.../label \
-u "$EASYPOST_API_KEY": \
-H 'Content-Type: application/json' \
-d '{
"file_format": "ZPL"
}'
curl -X GET https://api.easypost.com/v2/shipments/shp_.../label?file_format=ZPL \
-u "$EASYPOST_API_KEY":
Original file line number Diff line number Diff line change
@@ -1,53 +1,14 @@
{
"address": {
"id": "adr_5e891acf4e3f11edb1a1ac1f6bc7bdc6",
"object": "Address",
"created_at": "2022-10-17T17:15:59+00:00",
"updated_at": "2022-10-17T17:15:59+00:00",
"name": null,
"company": "EASYPOST",
"street1": "417 MONTGOMERY ST FL 5",
"street2": "",
"city": "SAN FRANCISCO",
"state": "CA",
"zip": "94104-1129",
"country": "US",
"phone": "4151234567",
"email": null,
"mode": "test",
"carrier_facility": null,
"residential": false,
"federal_tax_id": null,
"state_tax_id": null,
"verifications": {
"zip4": {
"success": true,
"errors": [
nwithan8 marked this conversation as resolved.
Show resolved Hide resolved
{
"code": "E.SECONDARY_INFORMATION.INVALID",
"field": "street2",
"message": "Invalid secondary information(Apt/Suite#)",
"suggestion": null
}
],
"details": null
},
"delivery": {
"success": true,
"errors": [
{
"code": "E.SECONDARY_INFORMATION.INVALID",
"field": "street2",
"message": "Invalid secondary information(Apt/Suite#)",
"suggestion": null
}
],
"details": {
"latitude": 37.79342,
"longitude": -122.40288,
"time_zone": "America/Los_Angeles"
}
"error": {
"code": "ADDRESS.VERIFY.FAILURE",
"message": "Unable to verify address.",
"errors": [
{
"code": "E.ADDRESS.NOT_FOUND",
"field": "address",
"message": "Address not found",
"suggestion": null
}
}
]
}
}
6 changes: 3 additions & 3 deletions official/docs/responses/addresses/addresses-create.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "adr_5dacbea44e3f11ed90f5ac1f6bc72124",
"id": "adr_3a2086e3bafa11eeb8d4ac1f6bc539ae",
"object": "Address",
"created_at": "2022-10-17T17:15:57+00:00",
"updated_at": "2022-10-17T17:15:57+00:00",
"created_at": "2024-01-24T20:50:37+00:00",
"updated_at": "2024-01-24T20:50:37+00:00",
"name": null,
"company": "EasyPost",
"street1": "417 MONTGOMERY ST",
Expand Down
6 changes: 3 additions & 3 deletions official/docs/responses/addresses/addresses-list.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"addresses": [
{
"id": "adr_6039af864e3f11edae1dac1f6b0a0d1e",
"id": "adr_3b7de31bbafa11eeb947ac1f6bc539ae",
"object": "Address",
"created_at": "2022-10-17T17:16:02+00:00",
"updated_at": "2022-10-17T17:16:02+00:00",
"created_at": "2024-01-24T20:50:39+00:00",
"updated_at": "2024-01-24T20:50:39+00:00",
"name": null,
"company": "EasyPost",
"street1": "417 MONTGOMERY ST",
Expand Down
6 changes: 3 additions & 3 deletions official/docs/responses/addresses/addresses-retrieve.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "adr_6039af864e3f11edae1dac1f6b0a0d1e",
"id": "adr_3b7de31bbafa11eeb947ac1f6bc539ae",
"object": "Address",
"created_at": "2022-10-17T17:16:02+00:00",
"updated_at": "2022-10-17T17:16:02+00:00",
"created_at": "2024-01-24T20:50:39+00:00",
"updated_at": "2024-01-24T20:50:39+00:00",
"name": null,
"company": "EasyPost",
"street1": "417 MONTGOMERY ST",
Expand Down
67 changes: 11 additions & 56 deletions official/docs/responses/addresses/addresses-verify-failure.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,14 @@
{
"id": "adr_20a96bfd554911ed9551ac1f6bc72124",
"object": "Address",
"created_at": "2022-10-26T16:13:28+00:00",
"updated_at": "2022-10-26T16:13:28+00:00",
"name": null,
"company": "EasyPost",
"street1": "UNDELIVERABLE ST",
"street2": null,
"city": "SAN FRANCISCO",
"state": "CA",
"zip": "94104",
"country": "US",
"phone": "4151234567",
"email": null,
"mode": "test",
"carrier_facility": null,
"residential": null,
"federal_tax_id": null,
"state_tax_id": null,
"verifications": {
"zip4": {
"success": false,
"errors": [
{
"code": "E.ADDRESS.NOT_FOUND",
"field": "address",
"message": "Address not found",
"suggestion": null
},
{
"code": "E.HOUSE_NUMBER.MISSING",
"field": "street1",
"message": "House number is missing",
"suggestion": null
}
],
"details": null
},
"delivery": {
"success": false,
"errors": [
{
"code": "E.ADDRESS.NOT_FOUND",
"field": "address",
"message": "Address not found",
"suggestion": null
},
{
"code": "E.HOUSE_NUMBER.MISSING",
"field": "street1",
"message": "House number is missing",
"suggestion": null
}
],
"details": {}
}
"error": {
"code": "ADDRESS.VERIFY.FAILURE",
"message": "Unable to verify address.",
"errors": [
{
"code": "E.ADDRESS.NOT_FOUND",
"field": "address",
"message": "Address not found",
"suggestion": null
}
]
}
}
46 changes: 21 additions & 25 deletions official/docs/responses/addresses/addresses-verify-param.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,47 @@
{
"id": "adr_5eed63904e3f11eda352ac1f6bc7b362",
"id": "adr_3a98ffc7bafa11eeb8fcac1f6bc539ae",
"object": "Address",
"created_at": "2022-10-17T17:16:00+00:00",
"updated_at": "2022-10-17T17:16:00+00:00",
"created_at": "2024-01-24T20:50:38+00:00",
"updated_at": "2024-01-24T20:50:38+00:00",
"name": null,
"company": "EASYPOST",
"street1": "417 MONTGOMERY ST FL 5",
"street2": "",
"city": "SAN FRANCISCO",
"state": "CA",
"zip": "94104-1129",
"company": "EasyPost",
"street1": "000 unknown street",
"street2": null,
"city": "Not A City",
"state": "ZZ",
"zip": "00001",
"country": "US",
"phone": "4151234567",
"email": null,
"phone": "5555555555",
"email": "[email protected]",
"mode": "test",
"carrier_facility": null,
"residential": false,
"residential": null,
"federal_tax_id": null,
"state_tax_id": null,
"verifications": {
"zip4": {
"success": true,
"success": false,
"errors": [
{
"code": "E.SECONDARY_INFORMATION.INVALID",
"field": "street2",
"message": "Invalid secondary information(Apt/Suite#)",
"code": "E.ADDRESS.NOT_FOUND",
"field": "address",
"message": "Address not found",
"suggestion": null
}
],
"details": null
},
"delivery": {
"success": true,
"success": false,
"errors": [
{
"code": "E.SECONDARY_INFORMATION.INVALID",
"field": "street2",
"message": "Invalid secondary information(Apt/Suite#)",
"code": "E.ADDRESS.NOT_FOUND",
"field": "address",
"message": "Address not found",
"suggestion": null
}
],
"details": {
"latitude": 37.79342,
"longitude": -122.40288,
"time_zone": "America/Los_Angeles"
}
"details": {}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,51 +1,14 @@
{
"id": "adr_5f4e008e4e3f11eda36cac1f6bc7b362",
"object": "Address",
"created_at": "2022-10-17T17:16:00+00:00",
"updated_at": "2022-10-17T17:16:00+00:00",
"name": null,
"company": "EASYPOST",
"street1": "417 MONTGOMERY ST FL 5",
"street2": "",
"city": "SAN FRANCISCO",
"state": "CA",
"zip": "94104-1129",
"country": "US",
"phone": "4151234567",
"email": null,
"mode": "test",
"carrier_facility": null,
"residential": false,
"federal_tax_id": null,
"state_tax_id": null,
"verifications": {
"zip4": {
"success": true,
"errors": [
{
"code": "E.SECONDARY_INFORMATION.INVALID",
"field": "street2",
"message": "Invalid secondary information(Apt/Suite#)",
"suggestion": null
}
],
"details": null
},
"delivery": {
"success": true,
"errors": [
{
"code": "E.SECONDARY_INFORMATION.INVALID",
"field": "street2",
"message": "Invalid secondary information(Apt/Suite#)",
"suggestion": null
}
],
"details": {
"latitude": 37.79342,
"longitude": -122.40288,
"time_zone": "America/Los_Angeles"
"error": {
"code": "ADDRESS.VERIFY.FAILURE",
"message": "Unable to verify address.",
"errors": [
{
"code": "E.ADDRESS.NOT_FOUND",
"field": "address",
"message": "Address not found",
"suggestion": null
}
}
]
}
}
24 changes: 5 additions & 19 deletions official/docs/responses/addresses/addresses-verify.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"address": {
"id": "adr_5fdd21764e3f11edadebac1f6b0a0d1e",
"id": "adr_3b15ed39bafa11ee83ed3cecef1b359e",
"object": "Address",
"created_at": "2022-10-17T17:16:01+00:00",
"updated_at": "2022-10-17T17:16:01+00:00",
"created_at": "2024-01-24T20:50:39+00:00",
"updated_at": "2024-01-24T20:50:39+00:00",
"name": null,
"company": "EASYPOST",
"street1": "417 MONTGOMERY ST FL 5",
Expand All @@ -22,26 +22,12 @@
"verifications": {
"zip4": {
"success": true,
"errors": [
nwithan8 marked this conversation as resolved.
Show resolved Hide resolved
{
"code": "E.SECONDARY_INFORMATION.INVALID",
"field": "street2",
"message": "Invalid secondary information(Apt/Suite#)",
"suggestion": null
}
],
"errors": [],
"details": null
},
"delivery": {
"success": true,
"errors": [
{
"code": "E.SECONDARY_INFORMATION.INVALID",
"field": "street2",
"message": "Invalid secondary information(Apt/Suite#)",
"suggestion": null
}
],
"errors": [],
"details": {
"latitude": 37.79342,
"longitude": -122.40288,
Expand Down
Loading
Loading