![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
ups-shipping-api
Advanced tools
An easy to use and well tested interface for interacting with UPS api.
This is an unofficial node.js package that makes interacting with the UPS api easy. Uses the UPS json endpoints.
const UPS = require('ups-shipping-api');
const ups = new UPS({
access_key : "an_access_key",
username : "a_user_name",
password : "a_password"
})
var promise_rates = ups.retreive_rates(shipment);
You can create a access_key, username, and password at the UPS Api website.
var test_shipment = {
shipper : {
address : {
country_code : "US",
postal_code : 42512,
},
},
ship_to : {
address : {
country_code : "US",
postal_code : 42512,
},
},
package : {
weight : 21, // the weight of the package
dimensions : {
length : 2,
width : 2,
height : 2,
}
}
}
var rates = await ups.retreive_rates(test_shipment);
var promise_rates = ups.retreive_rates(shipment);
The api uses several objects (e.g., shipment
, package
, etc) throughout. Their definitions with required and optional properties are below.
{
// mandatory
access_key: STRING,
username: STRING,
password: STRING,
// optional
live : BOOLEAN, // defaults to false; runs requests in UPS sandbox mode
unit_system : STRING, // select from ["imperial", "metric"]; defaults to "imperial";
}
{
shipper : ENDPOINT, // the person the shipment is from
ship_to : ENDPOINT, // the person the shipment is for
package: PACKAGE // the package you are sending
}
{
// mandatory
address : ADDRESS,
// optional
name : STRING, // UPS uses up to 36 char
shipper_number : STRING, // required for negotiated rates
}
{
// mandatory
weight: STRING/FLOAT,
dimensions: {
length: STRING/FLOAT,
width: STRING/FLOAT,
height: STRING/FLOAT,
}
}
{
// mandatory
country_code : STRING, // select from ["US", ...(TODO)]
postal_code : STRING/INT,
// optional
lines : [ // a list of address lines
STRING, ...
],
city : STRING,
state : STRING,
province : STRING,
}
{
// mandatory
weight : STRING/FLOAT, // the weight of the package
dimensions : {
length : STRING/FLOAT,
width : STRING/FLOAT,
height : STRING/FLOAT,
}
}
FAQs
An easy to use and well tested interface for interacting with UPS api.
The npm package ups-shipping-api receives a total of 17 weekly downloads. As such, ups-shipping-api popularity was classified as not popular.
We found that ups-shipping-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.