Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ __pycache__
/easycop.yml
/easypost_java_style.xml
/layout_rules.xml
/official/tools/build_doc_json_responses/responses/
/official/tools/build_doc_json_responses/tests/cassettes/
/tools/build_doc_json_responses/responses/
/tools/build_doc_json_responses/tests/cassettes/
/phpcs.xml
/pyproject.toml
/style_suppressions.xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ const EasyPostClient = require('@easypost/api');

const client = new EasyPostClient('EASYPOST_API_KEY');

const params = {
from_zip: '10001',
to_zip: '10002',
planned_ship_date: '2024-07-18',
carriers: ['UPS'],
};

(async () => {
const results = await client.SmartRate.estimateDeliveryDate(params);
const results = await client.SmartRate.estimateDeliveryDate({
from_zip: '10001',
to_zip: '10002',
planned_ship_date: '2024-07-18',
carriers: ['UPS'],
});

console.log(results);
})();
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ const EasyPostClient = require('@easypost/api');

const client = new EasyPostClient('EASYPOST_API_KEY');

const params = {
from_zip: '10001',
to_zip: '10002',
desired_delivery_date: '2024-07-18',
carriers: ['UPS'],
};

(async () => {
const results = await client.SmartRate.recommendShipDate(params);
const results = await client.SmartRate.recommendShipDate({
from_zip: '10001',
to_zip: '10002',
desired_delivery_date: '2024-07-18',
carriers: ['UPS'],
});

console.log(results);
})();
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ const EasyPostClient = require('@easypost/api');

const client = new EasyPostClient('EASYPOST_API_KEY');

const params = {
from_zip: '10001',
to_zip: '10002',
planned_ship_date: '2024-07-18',
carriers: ['UPS'],
};

(async () => {
const results = await client.SmartRate.estimateDeliveryDate(params);
const results = await client.SmartRate.estimateDeliveryDate({
from_zip: '10001',
to_zip: '10002',
planned_ship_date: '2024-07-18',
carriers: ['UPS'],
});

console.log(results);
})();
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ const EasyPostClient = require('@easypost/api');

const client = new EasyPostClient('EASYPOST_API_KEY');

const params = {
from_zip: '10001',
to_zip: '10002',
desired_delivery_date: '2024-07-18',
carriers: ['UPS'],
};

(async () => {
const results = await client.SmartRate.recommendShipDate(params);
const results = await client.SmartRate.recommendShipDate({
from_zip: '10001',
to_zip: '10002',
desired_delivery_date: '2024-07-18',
carriers: ['UPS'],
});

console.log(results);
})();
6 changes: 2 additions & 4 deletions official/docs/php/current/endshipper/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$client = new \EasyPost\EasyPostClient('EASYPOST_API_KEY');

$params = [
$endshipper = $client->endShipper->create([
'name' => 'FOO BAR',
'company' => 'BAZ',
'street1' => '164 TOWNSEND STREET UNIT 1',
Expand All @@ -13,8 +13,6 @@
'country' => 'US',
'phone' => '555-555-5555',
'email' => 'FOO@EXAMPLE.COM'
];

$endshipper = $client->endShipper->create($params);
]);

echo $endshipper;
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

$client = new \EasyPost\EasyPostClient('EASYPOST_API_KEY');

$params = [
$results = $client->smartRate->estimateDeliveryDate([
'from_zip' => '10001',
'to_zip' => '10002',
'planned_ship_date' => '2024-07-18',
'carriers' => ['UPS'],
];

$results = $client->smartRate->estimateDeliveryDate($params);
]);

echo $results;
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

$client = new \EasyPost\EasyPostClient('EASYPOST_API_KEY');

$params = [
$results = $client->smartRate->recommendShipDate([
'from_zip' => '10001',
'to_zip' => '10002',
'desired_delivery_date' => '2024-07-18',
'carriers' => ['UPS'],
];

$results = $client->smartRate->recommendShipDate($params);
]);

echo $results;
6 changes: 2 additions & 4 deletions official/docs/php/v5/endshipper/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

\EasyPost\EasyPost::setApiKey('EASYPOST_API_KEY');

$params = [
$endshipper = \EasyPost\EndShipper::create([
'name' => 'FOO BAR',
'company' => 'BAZ',
'street1' => '164 TOWNSEND STREET UNIT 1',
Expand All @@ -13,8 +13,6 @@
'country' => 'US',
'phone' => '555-555-5555',
'email' => 'FOO@EXAMPLE.COM'
];

$endshipper = \EasyPost\EndShipper::create($params);
]);

echo $endshipper;
6 changes: 2 additions & 4 deletions official/docs/php/v6/endshipper/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$client = new \EasyPost\EasyPostClient('EASYPOST_API_KEY');

$params = [
$endshipper = $client->endShipper->create([
'name' => 'FOO BAR',
'company' => 'BAZ',
'street1' => '164 TOWNSEND STREET UNIT 1',
Expand All @@ -13,8 +13,6 @@
'country' => 'US',
'phone' => '555-555-5555',
'email' => 'FOO@EXAMPLE.COM'
];

$endshipper = $client->endShipper->create($params);
]);

echo $endshipper;
6 changes: 2 additions & 4 deletions official/docs/php/v7/endshipper/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$client = new \EasyPost\EasyPostClient('EASYPOST_API_KEY');

$params = [
$endshipper = $client->endShipper->create([
'name' => 'FOO BAR',
'company' => 'BAZ',
'street1' => '164 TOWNSEND STREET UNIT 1',
Expand All @@ -13,8 +13,6 @@
'country' => 'US',
'phone' => '555-555-5555',
'email' => 'FOO@EXAMPLE.COM'
];

$endshipper = $client->endShipper->create($params);
]);

echo $endshipper;
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

$client = new \EasyPost\EasyPostClient('EASYPOST_API_KEY');

$params = [
$results = $client->smartRate->estimateDeliveryDate([
'from_zip' => '10001',
'to_zip' => '10002',
'planned_ship_date' => '2024-07-18',
'carriers' => ['UPS'],
];

$results = $client->smartRate->estimateDeliveryDate($params);
]);

echo $results;
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

$client = new \EasyPost\EasyPostClient('EASYPOST_API_KEY');

$params = [
$results = $client->smartRate->recommendShipDate([
'from_zip' => '10001',
'to_zip' => '10002',
'desired_delivery_date' => '2024-07-18',
'carriers' => ['UPS'],
];

$results = $client->smartRate->recommendShipDate($params);
]);

echo $results;
2 changes: 1 addition & 1 deletion official/docs/python/current/claims/cancel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

client = easypost.EasyPostClient("EASYPOST_API_KEY")

claim = client.claim.refund("clm_...")
claim = client.claim.cancel("clm_...")

print(claim)
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

client = easypost.EasyPostClient("EASYPOST_API_KEY")

params = {
"from_zip": "10001",
"to_zip": "10002",
"planned_ship_date": "2024-07-18",
"carriers": ["usps"],
}

results = client.smartrate.estimate_delivery_date(**params)
results = client.smartrate.estimate_delivery_date(
from_zip="10001",
to_zip="10002",
planned_ship_date="2024-07-18",
carriers=["usps"],
)

print(results)
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

client = easypost.EasyPostClient("EASYPOST_API_KEY")

params = {
"from_zip": "10001",
"to_zip": "10002",
"desired_delivery_date": "2024-07-18",
"carriers": ["usps"],
}

results = client.smartrate.recommend_ship_date(**params)
results = client.smartrate.recommend_ship_date(
from_zip="10001",
to_zip="10002",
desired_delivery_date="2024-07-18",
carriers=["usps"],
)

print(results)
2 changes: 1 addition & 1 deletion official/docs/python/v9/claims/cancel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

client = easypost.EasyPostClient("EASYPOST_API_KEY")

claim = client.claim.refund("clm_...")
claim = client.claim.cancel("clm_...")

print(claim)
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

client = easypost.EasyPostClient("EASYPOST_API_KEY")

params = {
"from_zip": "10001",
"to_zip": "10002",
"planned_ship_date": "2024-07-18",
"carriers": ["usps"],
}

results = client.smartrate.estimate_delivery_date(**params)
results = client.smartrate.estimate_delivery_date(
from_zip="10001",
to_zip="10002",
planned_ship_date="2024-07-18",
carriers=["usps"],
)

print(results)
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

client = easypost.EasyPostClient("EASYPOST_API_KEY")

params = {
"from_zip": "10001",
"to_zip": "10002",
"desired_delivery_date": "2024-07-18",
"carriers": ["usps"],
}

results = client.smartrate.recommend_ship_date(**params)
results = client.smartrate.recommend_ship_date(
from_zip="10001",
to_zip="10002",
desired_delivery_date="2024-07-18",
carriers=["usps"],
)

print(results)
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_3a2086e3bafa11eeb8d4ac1f6bc539ae",
"id": "adr_7c2f357c2d1511f087fbac1f6bc539ae",
"object": "Address",
"created_at": "2024-01-24T20:50:37+00:00",
"updated_at": "2024-01-24T20:50:37+00:00",
"created_at": "2025-05-09T20:37:54+00:00",
"updated_at": "2025-05-09T20:37:54+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_3b7de31bbafa11eeb947ac1f6bc539ae",
"id": "adr_827a131c2d1511f086743cecef1b359e",
"object": "Address",
"created_at": "2024-01-24T20:50:39+00:00",
"updated_at": "2024-01-24T20:50:39+00:00",
"created_at": "2025-05-09T20:38:05+00:00",
"updated_at": "2025-05-09T20:38:05+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_3b7de31bbafa11eeb947ac1f6bc539ae",
"id": "adr_827a131c2d1511f086743cecef1b359e",
"object": "Address",
"created_at": "2024-01-24T20:50:39+00:00",
"updated_at": "2024-01-24T20:50:39+00:00",
"created_at": "2025-05-09T20:38:05+00:00",
"updated_at": "2025-05-09T20:38:05+00:00",
"name": null,
"company": "EasyPost",
"street1": "417 MONTGOMERY ST",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "adr_3a98ffc7bafa11eeb8fcac1f6bc539ae",
"id": "adr_7c64776f2d1511f082fc3cecef1b359e",
"object": "Address",
"created_at": "2024-01-24T20:50:38+00:00",
"updated_at": "2024-01-24T20:50:38+00:00",
"created_at": "2025-05-09T20:37:55+00:00",
"updated_at": "2025-05-09T20:37:55+00:00",
"name": null,
"company": "EasyPost",
"street1": "000 unknown street",
Expand Down
6 changes: 3 additions & 3 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_3b15ed39bafa11ee83ed3cecef1b359e",
"id": "adr_7cac5ead2d1511f08839ac1f6bc539ae",
"object": "Address",
"created_at": "2024-01-24T20:50:39+00:00",
"updated_at": "2024-01-24T20:50:39+00:00",
"created_at": "2025-05-09T20:37:55+00:00",
"updated_at": "2025-05-09T20:37:55+00:00",
"name": null,
"company": "EASYPOST",
"street1": "417 MONTGOMERY ST FL 5",
Expand Down
Loading
Loading