Socket
Book a DemoInstallSign in
Socket

@tradecafe/package-tracking-sdk

Package Overview
Dependencies
Maintainers
9
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@tradecafe/package-tracking-sdk

This contains the SDK to be used against the Template Service.

2.0.12
unpublished
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
9
Weekly downloads
 
Created
Source

Packge Tracking SDK

This contains the SDK to be used against the Template Service.

Installation

npm install @tradecafe/package-tracking-sdk --save

Usage

Initializing client

const sdk = require('@tradecafe/package-tracking-sdk');

let client = sdk({
	baseURL: 'http://service.base.url/'
});

Executing calls

client.create({
    carrier: 'fedex',
    code: {
        trackingNumber: '1234'
    },
    deal_id: 'deal-id',
    tags: ['tag4', 'tag5']
}, function(err, result) {
    if(err) {
        done(err);
    } else {
        done();
    }
});

API

create

Creates the specified package and returns it's id and the resulting object

let item = {
  account: 'account-id',
  carrier: 'fedex',
  code: {
      trackingNumber: '1234'
  },
  deal_id: 'deal-id',
  tags: ['tag4', 'tag5']
};
client.create(item, (err, package_id, object) => {
	
});
Delete

Deletes a single specified package

client.del(account, id, (err) => {
	
});
Get

Retrieves a single package

client.get(account, id, (err, object) => {
	
});
List

Retrieves a list of packages that belong to your account. Optionally you can provide a deal_id which will be applied as a filter.

client.search({account: 'account-id', deal_id: 'deal-id'}, (err, object) => {
	
});

Track

Modifies the track parameter of the object

track is a boolean

client.track(account, id, track, (err, object) => {
	
}, party);

Further development

If you are going to develop this further, please assure proper test coverage.

Tests can currently run using npm test or mocha application home.

FAQs

Package last updated on 08 Sep 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.