-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] Re-record JSON responses for docs (#120)
- Re-record JSON responses for docs - Add JSON response generation tool - Fix GET requests using query parameters
- Loading branch information
Showing
169 changed files
with
7,645 additions
and
3,835 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,14 +18,13 @@ public static async Task Main() | |
|
||
Parameters.Address.Create parameters = new() | ||
{ | ||
Street1 = "417 Montgomery Street", | ||
Street2 = "FL 5", | ||
City = "San Francisco", | ||
State = "CA", | ||
Zip = "94104", | ||
Street1 = "000 unknown street", | ||
City = "Not A City", | ||
State = "ZZ", | ||
Zip = "00001", | ||
Country = "US", | ||
Company = "EasyPost", | ||
Phone = "415-123-4567", | ||
Email = "[email protected]", | ||
Phone = "5555555555", | ||
}; | ||
|
||
Address address = await client.Address.CreateAndVerify(parameters); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,14 +18,13 @@ public static async Task Main() | |
|
||
Parameters.Address.Create parameters = new() | ||
{ | ||
Street1 = "UNDELIVERABLE ST", | ||
Street2 = "FLOOR 5", | ||
City = "SAN FRANCISCO", | ||
State = "CA", | ||
Zip = "94104", | ||
Street1 = "000 unknown street", | ||
City = "Not A City", | ||
State = "ZZ", | ||
Zip = "00001", | ||
Country = "US", | ||
Company = "EasyPost", | ||
Phone = "415-123-4567", | ||
Email = "[email protected]", | ||
Phone = "5555555555", | ||
}; | ||
|
||
Address address = await client.Address.Create(parameters); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,14 +18,13 @@ public static async Task Main() | |
|
||
Parameters.Address.Create parameters = new() | ||
{ | ||
Street1 = "417 MONTGOMERY ST", | ||
Street2 = "FLOOR 5", | ||
City = "SAN FRANCISCO", | ||
State = "CA", | ||
Zip = "94104", | ||
Street1 = "000 unknown street", | ||
City = "Not A City", | ||
State = "ZZ", | ||
Zip = "00001", | ||
Country = "US", | ||
Company = "EasyPost", | ||
Phone = "415-123-4567", | ||
Email = "[email protected]", | ||
Phone = "5555555555", | ||
Verify = true | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,14 +18,13 @@ public static async Task Main() | |
|
||
Parameters.Address.Create parameters = new() | ||
{ | ||
Street1 = "417 MONTGOMERY ST", | ||
Street2 = "FLOOR 5", | ||
City = "SAN FRANCISCO", | ||
State = "CA", | ||
Zip = "94104", | ||
Street1 = "000 unknown street", | ||
City = "Not A City", | ||
State = "ZZ", | ||
Zip = "00001", | ||
Country = "US", | ||
Company = "EasyPost", | ||
Phone = "415-123-4567", | ||
Email = "[email protected]", | ||
Phone = "5555555555", | ||
VerifyStrict = true | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,12 @@ curl -X POST https://api.easypost.com/v2/addresses/create_and_verify \ | |
-H 'Content-Type: application/json' \ | ||
-d '{ | ||
"address": { | ||
"street1": "417 Montgomery Street", | ||
"street2": "FL 5", | ||
"city": "San Francisco", | ||
"state": "CA", | ||
"zip": "94104", | ||
"street1": "000 unknown street", | ||
"city": "Not A City", | ||
"state": "ZZ", | ||
"zip": "00001", | ||
"country": "US", | ||
"company": "EasyPost", | ||
"phone": "415-123-4567" | ||
"email": "[email protected]", | ||
"phone": "5555555555" | ||
} | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,12 @@ curl -X POST https://api.easypost.com/v2/addresses \ | |
-H 'Content-Type: application/json' \ | ||
-d '{ | ||
"address": { | ||
"street1": "UNDELIVERABLE ST", | ||
"city": "SAN FRANCISCO", | ||
"state": "CA", | ||
"zip": "94104", | ||
"street1": "000 unknown street", | ||
"city": "Not A City", | ||
"state": "ZZ", | ||
"zip": "00001", | ||
"country": "US", | ||
"company": "EasyPost", | ||
"phone": "415-123-4567" | ||
"email": "[email protected]", | ||
"phone": "5555555555" | ||
} | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,13 @@ curl -X POST https://api.easypost.com/v2/addresses \ | |
-H 'Content-Type: application/json' \ | ||
-d '{ | ||
"address": { | ||
"street1": "417 MONTGOMERY ST", | ||
"street2": "FLOOR 5", | ||
"city": "SAN FRANCISCO", | ||
"state": "CA", | ||
"zip": "94104", | ||
"street1": "000 unknown street", | ||
"city": "Not A City", | ||
"state": "ZZ", | ||
"zip": "00001", | ||
"country": "US", | ||
"company": "EasyPost", | ||
"phone": "415-123-4567" | ||
"email": "[email protected]", | ||
"phone": "5555555555" | ||
}, | ||
"verify": true | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,13 @@ curl -X POST https://api.easypost.com/v2/addresses \ | |
-H 'Content-Type: application/json' \ | ||
-d '{ | ||
"address": { | ||
"street1": "417 MONTGOMERY ST", | ||
"street2": "FLOOR 5", | ||
"city": "SAN FRANCISCO", | ||
"state": "CA", | ||
"zip": "94104", | ||
"street1": "000 unknown street", | ||
"city": "Not A City", | ||
"state": "ZZ", | ||
"zip": "00001", | ||
"country": "US", | ||
"company": "EasyPost", | ||
"phone": "415-123-4567" | ||
"email": "[email protected]", | ||
"phone": "5555555555" | ||
}, | ||
"verify_strict": true | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,14 +13,13 @@ func main() { | |
|
||
address, _ := client.CreateAndVerifyAddress( | ||
&easypost.Address{ | ||
Street1: "417 Montgomery Street", | ||
Street2: "FL 5", | ||
City: "San Francisco", | ||
State: "CA", | ||
Zip: "94104", | ||
Street1: "000 unknown street", | ||
City: "Not A City", | ||
State: "ZZ", | ||
Zip: "00001", | ||
Country: "US", | ||
Company: "EasyPost", | ||
Phone: "415-123-4567", | ||
Email: "[email protected]", | ||
Phone: "5555555555", | ||
}, | ||
&easypost.CreateAddressOptions{}, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,13 +13,13 @@ func main() { | |
|
||
address, _ := client.CreateAddress( | ||
&easypost.Address{ | ||
Street1: "UNDELIVERABLE ST", | ||
City: "SAN FRANCISCO", | ||
State: "CA", | ||
Zip: "94104", | ||
Street1: "000 unknown street", | ||
City: "Not A City", | ||
State: "ZZ", | ||
Zip: "00001", | ||
Country: "US", | ||
Company: "EasyPost", | ||
Phone: "415-123-4567", | ||
Email: "[email protected]", | ||
Phone: "5555555555", | ||
}, | ||
&easypost.CreateAddressOptions{}, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,14 +13,13 @@ func main() { | |
|
||
address, _ := client.CreateAddress( | ||
&easypost.Address{ | ||
Street1: "417 Montgomery Street", | ||
Street2: "FLOOR 5", | ||
City: "SAN FRANCISCO", | ||
State: "CA", | ||
Zip: "94104", | ||
Street1: "000 unknown street", | ||
City: "Not A City", | ||
State: "ZZ", | ||
Zip: "00001", | ||
Country: "US", | ||
Company: "EasyPost", | ||
Phone: "415-123-4567", | ||
Email: "[email protected]", | ||
Phone: "5555555555", | ||
}, | ||
&easypost.CreateAddressOptions{ | ||
Verify: []string{"true"}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,14 +13,13 @@ func main() { | |
|
||
address, _ := client.CreateAddress( | ||
&easypost.Address{ | ||
Street1: "417 MONTGOMERY ST", | ||
Street2: "FLOOR 5", | ||
City: "SAN FRANCISCO", | ||
State: "CA", | ||
Zip: "94104", | ||
Street1: "000 unknown street", | ||
City: "Not A City", | ||
State: "ZZ", | ||
Zip: "00001", | ||
Country: "US", | ||
Company: "EasyPost", | ||
Phone: "415-123-4567", | ||
Email: "[email protected]", | ||
Phone: "5555555555", | ||
}, | ||
&easypost.CreateAddressOptions{ | ||
VerifyStrict: []string{"true"}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,14 +12,13 @@ public static void main(String[] args) throws EasyPostException { | |
|
||
HashMap<String, Object> params = new HashMap<String, Object>(); | ||
|
||
params.put("street1", "417 Montgomery Street"); | ||
params.put("street2", "FL 5"); | ||
params.put("city", "San Francisco"); | ||
params.put("state", "CA"); | ||
params.put("zip", "94104"); | ||
params.put("street1", "000 unknown street"); | ||
params.put("city", "Not A City"); | ||
params.put("state", "ZZ"); | ||
params.put("zip", "00001"); | ||
params.put("country", "US"); | ||
params.put("company", "EasyPost"); | ||
params.put("phone", "415-123-4567"); | ||
params.put("email", "[email protected]"); | ||
params.put("phone", "5555555555"); | ||
|
||
Address address = client.address.createAndVerify(params); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,13 @@ public static void main(String[] args) throws EasyPostException { | |
|
||
HashMap<String, Object> params = new HashMap<String, Object>(); | ||
|
||
params.put("street1", "UNDELIVERABLE ST"); | ||
params.put("city", "SAN FRANCISCO"); | ||
params.put("state", "CA"); | ||
params.put("zip", "94104"); | ||
params.put("street1", "000 unknown street"); | ||
params.put("city", "Not A City"); | ||
params.put("state", "ZZ"); | ||
params.put("zip", "00001"); | ||
params.put("country", "US"); | ||
params.put("company", "EasyPost"); | ||
params.put("phone", "415-123-4567"); | ||
params.put("email", "[email protected]"); | ||
params.put("phone", "5555555555"); | ||
|
||
Address address = client.address.create(params); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,14 +12,13 @@ public static void main(String[] args) throws EasyPostException { | |
|
||
HashMap<String, Object> params = new HashMap<String, Object>(); | ||
|
||
params.put("street1", "417 Montgomery Street"); | ||
params.put("street2", "5"); | ||
params.put("city", "SF"); | ||
params.put("state", "CA"); | ||
params.put("zip", "94104"); | ||
params.put("street1", "000 unknown street"); | ||
params.put("city", "Not A City"); | ||
params.put("state", "ZZ"); | ||
params.put("zip", "00001"); | ||
params.put("country", "US"); | ||
params.put("company", "EasyPost"); | ||
params.put("phone", "415-123-4567"); | ||
params.put("email", "[email protected]"); | ||
params.put("phone", "5555555555"); | ||
params.put("verify", true); | ||
|
||
Address address = client.address.create(params); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,13 @@ public static void main(String[] args) throws EasyPostException { | |
|
||
HashMap<String, Object> params = new HashMap<String, Object>(); | ||
|
||
params.put("street1", "417 Montgomery Street"); | ||
params.put("city", "SF"); | ||
params.put("state", "CA"); | ||
params.put("zip", "94104"); | ||
params.put("street1", "000 unknown street"); | ||
params.put("city", "Not A City"); | ||
params.put("state", "ZZ"); | ||
params.put("zip", "00001"); | ||
params.put("country", "US"); | ||
params.put("company", "EasyPost"); | ||
params.put("phone", "415-123-4567"); | ||
params.put("email", "[email protected]"); | ||
params.put("phone", "5555555555"); | ||
params.put("verify_strict", true); | ||
|
||
Address address = client.address.create(params); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,13 @@ const client = new EasyPostClient(process.env.EASYPOST_API_KEY); | |
|
||
(async () => { | ||
const address = await client.Address.createAndVerify({ | ||
street1: '417 montgomery street', | ||
street2: 'FL 5', | ||
city: 'San Francisco', | ||
state: 'CA', | ||
zip: '94104', | ||
street1: '000 unknown street', | ||
city: 'Not A City', | ||
state: 'ZZ', | ||
zip: '00001', | ||
country: 'US', | ||
company: 'EasyPost', | ||
phone: '415-123-4567', | ||
email: '[email protected]', | ||
phone: '5555555555', | ||
}); | ||
|
||
console.log(address); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,13 @@ const client = new EasyPostClient(process.env.EASYPOST_API_KEY); | |
|
||
(async () => { | ||
const address = await client.Address.create({ | ||
street1: 'UNDELIVERABLE ST', | ||
city: 'SAN FRANCISCO', | ||
state: 'CA', | ||
zip: '94104', | ||
street1: '000 unknown street', | ||
city: 'Not A City', | ||
state: 'ZZ', | ||
zip: '00001', | ||
country: 'US', | ||
company: 'EasyPost', | ||
phone: '415-123-4567', | ||
email: '[email protected]', | ||
phone: '5555555555', | ||
}); | ||
|
||
console.log(address); | ||
|
Oops, something went wrong.