pepipost
Version:
Official nodejs library for sending email using web API v5
58 lines (51 loc) • 1.81 kB
JavaScript
/**
* PepipostLib
*
* This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
*/
'use strict';
const BaseModel = require('./BaseModel');
/**
* Creates an instance of Settings
*/
class Settings extends BaseModel {
/**
* @constructor
* @param {Object} obj The object passed to constructor
*/
constructor(obj) {
super(obj);
if (obj === undefined || obj === null) return;
this.footer = this.constructor.getValue(obj.footer);
this.clickTrack = this.constructor.getValue(obj.clickTrack || obj.click_track);
this.openTrack = this.constructor.getValue(obj.openTrack || obj.open_track);
this.unsubscribeTrack =
this.constructor.getValue(obj.unsubscribeTrack
|| obj.unsubscribe_track);
this.hepf = this.constructor.getValue(obj.hepf);
}
/**
* Function containing information about the fields of this model
* @return {array} Array of objects containing information about the fields
*/
static mappingInfo() {
return super.mappingInfo().concat([
{ name: 'footer', realName: 'footer' },
{ name: 'clickTrack', realName: 'click_track' },
{ name: 'openTrack', realName: 'open_track' },
{ name: 'unsubscribeTrack', realName: 'unsubscribe_track' },
{ name: 'hepf', realName: 'hepf' },
]);
}
/**
* Function containing information about discriminator values
* mapped with their corresponding model class names
*
* @return {object} Object containing Key-Value pairs mapping discriminator
* values with their corresponding model classes
*/
static discriminatorMap() {
return {};
}
}
module.exports = Settings;