pepipost
Version:
Official nodejs library for sending email using web API v5
60 lines (53 loc) • 2.01 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 UpdateRecurringCredisOfSubaccount
*/
class UpdateRecurringCredisOfSubaccount extends BaseModel {
/**
* @constructor
* @param {Object} obj The object passed to constructor
*/
constructor(obj) {
super(obj);
if (obj === undefined || obj === null) return;
this.username = this.constructor.getValue(obj.username);
this.recurringCredit =
this.constructor.getValue(obj.recurringCredit
|| obj.recurring_credit);
this.timeperiod = this.constructor.getValue(obj.timeperiod);
this.startDate = this.constructor.getValue(obj.startDate || obj.start_date);
this.endDate = this.constructor.getValue(obj.endDate || obj.end_date);
this.status = this.constructor.getValue(obj.status);
}
/**
* 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: 'username', realName: 'username' },
{ name: 'recurringCredit', realName: 'recurring_credit' },
{ name: 'timeperiod', realName: 'timeperiod' },
{ name: 'startDate', realName: 'start_date' },
{ name: 'endDate', realName: 'end_date' },
{ name: 'status', realName: 'status' },
]);
}
/**
* 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 = UpdateRecurringCredisOfSubaccount;