Skip to content

kvcvc/isic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

isic

Version Downloads

ISIC Discount Manager client implementation

  • verify ISIC/ITIC/ALIVE cards
  • report discount usage

Installation

Using npm:

npm install @kvcvc/isic

Usage

const DiscountManagerClient = require('@kvcvc/isic');

const client = new DiscountManagerClient(
  'DM_USERNAME',
  'DM_PASSWORD',
  'DM_INSTANCE_URL'
);

client
  .verifyCard('S420001019431J', 'Janička Testová')
  .then((res) => {
    /* {
      id: 3215481, 
      createdOn: '2022-01-01T08:00:00+00:00',
      cardNumber: 'S420001019431J',
      cardholderName: 'Janička Testová',
      mode: 'CARDHOLDER',
      result: 'FAILED',
      reason: 'CARD_EXPIRED',
      cardType: 'ISIC'
    } */
  })
  .catch((err) => {
    // DiscountManagerClientException: Invalid credentials specified
  });

Documentation

For complete documentation about the available operations, please see the auto-generated JSDocs documentation.

License

MIT