1.2.0 • Published 6 years ago

bmv-node-sdk v1.2.0

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

Coupons Node SDK

Welcome to Coupons Node SDK, this package serves as a wrapper to use Coupons Evaluation API

Installation

$ npm install bms-node-sdk -s

What you'll need

  • Server URL
  • Coupon's API Key

Usage example

const Evaluator = require("bmv-node-sdk")
const handler = new Evaluator(server_url,api_key)

var res = await handler.sendCoupon("Promotion Code", "Coupon Code", {total:50})
console,log(res)

var res = await handler.sendDiscount("Promotion Code", "Transaction id", {total:50, param1 : value1)
console,log(res)

You can use any param that your promotion has as the third argument of both functions , but it has to include obligatory field total for it to work. Coupon Code and Transaction ID are not required to be sent in third argument and are set automatically by the helper depending on the value passed as the second argument.

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago