-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makes some changes for github workflows
- Loading branch information
1 parent
77d76c5
commit 1fd30ca
Showing
6 changed files
with
68 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Node Compatibility | ||
|
||
This library supports very old versions of node when importing and using the library. However, we do not support developing this library with very old versions of node. | ||
|
||
Thats where this folder comes in. We will run the full test suite on a modern version of Node, but will check that the library still "works" with older versions of Node using this folder. You can run this file with your API key and if it succeeds, then your version of node is compatible. Otherwise, it is not. |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
const EasyPostClient = require('../..'); | ||
|
||
const test = async () => { | ||
const apiKey = 'EZTK0e95f038c18f432fbc50f84855dc20c61QV0fkCenM1PlD8dAvgo0A'; | ||
const client = new EasyPostClient(apiKey); | ||
|
||
const shipment = await client.Shipment.create({ | ||
from_address: { | ||
street1: '417 MONTGOMERY ST', | ||
street2: 'FLOOR 5', | ||
city: 'SAN FRANCISCO', | ||
state: 'CA', | ||
zip: '94104', | ||
country: 'US', | ||
company: 'EasyPost', | ||
phone: '415-123-4567', | ||
}, | ||
to_address: { | ||
name: 'Dr. Steve Brule', | ||
street1: '179 N Harbor Dr', | ||
city: 'Redondo Beach', | ||
state: 'CA', | ||
zip: '90277', | ||
country: 'US', | ||
phone: '4155559999', | ||
}, | ||
parcel: { | ||
length: 8, | ||
width: 5, | ||
height: 5, | ||
weight: 5, | ||
}, | ||
}); | ||
|
||
const boughtShipment = await client.Shipment.buy(shipment.id, shipment.lowestRate()); | ||
|
||
if (!boughtShipment) { | ||
process.exit(1); | ||
} | ||
}; | ||
|
||
test(); |
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