npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-veracore

v0.2.2

Published

Simplify nodeJS integration with Veracore

Downloads

4

Readme

node-veracore

A small node module that helps integrate your application with veracore/promail. There are still several SOAP methods on veracore/promail that are not implemented in this module. Feel free to fork and make pull requests, or add issues as you please.

Install

npm install node-veracore

Usage

After having installed it, simply require it, set it up with your own clientId and clientSecret, and start calling methods!

var veracore = require('node-veracore')('username','password');

veracore.callMethods();

Functions and responses

| Functions | Returns to callback | Explanation | | ---------------- | ---------------- | ---------------- | | getOffers (searchString, callback) | callback(err, results) | Gets all offers that have an ID or Description matching the search string. Use % as a wildcard character. | | getProduct (id, ownerId, callback) | callback(err, result) | Gets product by id and ownerId. | | getOrder (id, callback) | callback(err, result) | Gets an order by id. | | addOrder (orderRequest, callback) | callback(err, result) | Adds an order using the orderRequest object (see details on the orderRequest object below), and returns the order id. | | getShippingActivity (startDate, endDate, callback) | callback(err, result) | Gets all shipping activity between the start date and end date as ISO string. | | getShippingCharge (startDate, endDate, callback) | callback(err, result) | Gets all shipping charges between the start date and end date as ISO string (includes tracking #). | | connect (callback) | callback(client) | Connects to the SOAP client. This is mostly an internal method, but you can use it if you ever need to reconnect for some reason. |

orderRequest object

| Property | Description | | --------------| ------------------------------------| | shipTo object| The information about the user that you want to ship to. Notice that properties are capitalized, this is a requirement from veracore. | | items object| An object where the key is the offerId and the value is quantity. | | comments string| Comments to attached to the order. | | shipping object| The FreightCode and [FreightCodeDescription] for shipping. | | order object | An object that will be used to override any properties in the order. Use this to tweak an order to your heart's content. |

Examples

Getting Offers

veracore.getOffers('ZB-%', function(err, results){
  if(err) throw err;

  results.forEach(function(result){
    console.log(result);
  })
});

Add an Order

var orderRequest = {
  shipTo: {
    FullName: "Justin Maier",
    Address1: "123 MadeUp St",
    City: "Redmond",
    State: "Washington",
    PostalCode: "12345",
    Country: "USA",
    Phone: "425-555-1234",
    Email: "[email protected]"
  },
  items: {
  	'ZB0020':1
  },
  comments: "DO NOT PROCESS!",
  shipping: {
    FreightCode: "P01",
    FreightCodeDescription: "USPS First Class Mail"
  }
}

veracore.addOrder(orderRequest, function(err, result){
  if(err) throw err;
  
  console.log(JSON.stringify(result, null, 4));
})