UNPKG

@hipay/hipay-enterprise-sdk-nodejs

Version:

The HiPay Enterprise SDK for NodeJS is a library for developers who want to integrate HiPay Enterprise payment methods to any NodeJS platform.

38 lines (31 loc) 1.22 kB
'use strict'; const AbstractPaymentMethod = require('./AbstractPaymentMethod'); const InvalidArgumentException = require('../../../Error/InvalidArgumentException'); class IllicadoPaymentMethod extends AbstractPaymentMethod { /** * Creates an Illicado Payment Method Object * * @param {Object} values * @param {String} values.prepaid_card_number Illicado card number * @param {String} values.prepaid_card_security_code Illicado card security code */ constructor(values) { super(); if (Object.hasOwn(values, 'prepaid_card_number')) { this.prepaid_card_number = values.prepaid_card_number; } else { throw new InvalidArgumentException('Card Number must be present'); } if (Object.hasOwn(values, 'prepaid_card_security_code')) { this.prepaid_card_security_code = values.prepaid_card_security_code; } else { throw new InvalidArgumentException('Card Security Code must be present'); } } initValues() { super.initValues(); this.prepaid_card_number = null; this.prepaid_card_security_code = null; } } module.exports = IllicadoPaymentMethod;