@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.
22 lines (17 loc) • 841 B
JavaScript
;
const AbstractMapper = require('../../Mapper/AbstractMapper');
const Card = require('../Card');
class CardMapper extends AbstractMapper {
mapResponseToModel() {
const values = {
pan: typeof this.source.pan !== 'undefined' ? this.source.pan : null,
lastDigits: typeof this.source.lastDigits !== 'undefined' ? this.source.lastDigits : null,
scheme: typeof this.source.scheme !== 'undefined' ? this.source.scheme : null,
category: typeof this.source.category !== 'undefined' ? this.source.category : null,
type: typeof this.source.type !== 'undefined' ? this.source.type : null,
bin: typeof this.source.bin !== 'undefined' ? this.source.bin : null
};
this._modelObject = new Card(values);
}
}
module.exports = CardMapper;