Node.js api gateway to the Amazon Giftcard On Demand Web service
Install
npm install agcod
Configuration
Create a development.json
, sandbox.json
and production.json
in the config directory that looks like example.json
.
Usage
const Client = require('agcod')
const client = new Client()
client.createGiftCard('NA', 123, 'USD', (error, result) => {
console.log('client.createGiftCard response', error, result)
})
Tests
During tests requests are intercepted by nock and responds with a desired response code and contents.
Nota Bene
- This client needs to operate under TLS 1.2 or after June 30th, 2018 API requests will cease to work
Other clients
For reference purposes, here's a list of resources that talk about agcod clients.