Skip to content

kvcvc/isic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

58dda51 · Jan 21, 2022

History

9 Commits
Mar 1, 2021
Feb 28, 2021
Feb 28, 2021
Feb 28, 2021
Feb 28, 2021
Jan 21, 2022
Feb 28, 2021
Jan 21, 2022

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