@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 (16 loc) • 775 B
JavaScript
;
const AbstractMapper = require('../../Mapper/AbstractMapper');
const Customer = require('../Customer');
class CustomerMapper extends AbstractMapper {
mapResponseToModel() {
const values = {
id: typeof this.source.id !== 'undefined' ? this.source.id : null,
firstname: typeof this.source.firstname !== 'undefined' ? this.source.firstname : null,
email: typeof this.source.email !== 'undefined' ? this.source.email : null,
phone: typeof this.source.phone !== 'undefined' ? this.source.phone : null,
language: typeof this.source.language !== 'undefined' ? this.source.language : null,
};
this._modelObject = new Customer(values);
}
}
module.exports = CustomerMapper;