From c1389f53706cf0b0da01b84e839fa60f7d509cd8 Mon Sep 17 00:00:00 2001 From: snipperbytes Date: Wed, 2 Sep 2020 18:10:58 +0530 Subject: [PATCH] adding models dependencies --- .../AddemailordomaintoSuppressionlist.js | 49 +++++++++++++++ lib/Models/Content.js | 4 +- lib/Models/Createsubaccount.js | 55 +++++++++++++++++ lib/Models/Deletedomain.js | 47 +++++++++++++++ lib/Models/Deletesubacoount.js | 47 +++++++++++++++ lib/Models/Enableordisablesubacoount.js | 49 +++++++++++++++ .../RemoveemailordomaintoSuppressionlist.js | 49 +++++++++++++++ lib/Models/UpdateCredisofsubaccount.js | 51 ++++++++++++++++ .../UpdaterecurringCredisofsubaccount.js | 59 +++++++++++++++++++ lib/Models/Updatesubaccount.js | 57 ++++++++++++++++++ 10 files changed, 465 insertions(+), 2 deletions(-) create mode 100644 lib/Models/AddemailordomaintoSuppressionlist.js create mode 100644 lib/Models/Createsubaccount.js create mode 100644 lib/Models/Deletedomain.js create mode 100644 lib/Models/Deletesubacoount.js create mode 100644 lib/Models/Enableordisablesubacoount.js create mode 100644 lib/Models/RemoveemailordomaintoSuppressionlist.js create mode 100644 lib/Models/UpdateCredisofsubaccount.js create mode 100644 lib/Models/UpdaterecurringCredisofsubaccount.js create mode 100644 lib/Models/Updatesubaccount.js diff --git a/lib/Models/AddemailordomaintoSuppressionlist.js b/lib/Models/AddemailordomaintoSuppressionlist.js new file mode 100644 index 0000000..2aa4b37 --- /dev/null +++ b/lib/Models/AddemailordomaintoSuppressionlist.js @@ -0,0 +1,49 @@ +/** + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ + +'use strict'; + +const BaseModel = require('./BaseModel'); + +/** + * Creates an instance of AddemailordomaintoSuppressionlist + */ +class AddemailordomaintoSuppressionlist extends BaseModel { + /** + * @constructor + * @param {Object} obj The object passed to constructor + */ + constructor(obj) { + super(obj); + if (obj === undefined || obj === null) return; + this.domain = this.constructor.getValue(obj.domain); + this.email = this.constructor.getValue(obj.email); + } + + /** + * 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: 'domain', realName: 'domain' }, + { name: 'email', realName: 'email' }, + ]); + } + + /** + * 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 = AddemailordomaintoSuppressionlist; diff --git a/lib/Models/Content.js b/lib/Models/Content.js index 01dfaf2..cdc1db9 100644 --- a/lib/Models/Content.js +++ b/lib/Models/Content.js @@ -7,7 +7,7 @@ 'use strict'; const BaseModel = require('./BaseModel'); -const utf8 = require('utf8'); + /** * Creates an instance of Content */ @@ -20,7 +20,7 @@ class Content extends BaseModel { super(obj); if (obj === undefined || obj === null) return; this.type = this.constructor.getValue(obj.type); - this.value = utf8.encode(this.constructor.getValue(obj.value)); + this.value = this.constructor.getValue(obj.value); } /** diff --git a/lib/Models/Createsubaccount.js b/lib/Models/Createsubaccount.js new file mode 100644 index 0000000..ec81c80 --- /dev/null +++ b/lib/Models/Createsubaccount.js @@ -0,0 +1,55 @@ +/** + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ + +'use strict'; + +const BaseModel = require('./BaseModel'); + +/** + * Creates an instance of Createsubaccount + */ +class Createsubaccount 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.email = this.constructor.getValue(obj.email); + this.setpassword = this.constructor.getValue(obj.setpassword); + this.password = this.constructor.getValue(obj.password); + this.creditType = this.constructor.getValue(obj.creditType || obj.credit_type); + } + + /** + * 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: 'email', realName: 'email' }, + { name: 'setpassword', realName: 'setpassword' }, + { name: 'password', realName: 'password' }, + { name: 'creditType', realName: 'credit_type' }, + ]); + } + + /** + * 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 = Createsubaccount; diff --git a/lib/Models/Deletedomain.js b/lib/Models/Deletedomain.js new file mode 100644 index 0000000..9082fc0 --- /dev/null +++ b/lib/Models/Deletedomain.js @@ -0,0 +1,47 @@ +/** + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ + +'use strict'; + +const BaseModel = require('./BaseModel'); + +/** + * Creates an instance of Deletedomain + */ +class Deletedomain extends BaseModel { + /** + * @constructor + * @param {Object} obj The object passed to constructor + */ + constructor(obj) { + super(obj); + if (obj === undefined || obj === null) return; + this.domain = this.constructor.getValue(obj.domain); + } + + /** + * 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: 'domain', realName: 'domain' }, + ]); + } + + /** + * 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 = Deletedomain; diff --git a/lib/Models/Deletesubacoount.js b/lib/Models/Deletesubacoount.js new file mode 100644 index 0000000..ec85343 --- /dev/null +++ b/lib/Models/Deletesubacoount.js @@ -0,0 +1,47 @@ +/** + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ + +'use strict'; + +const BaseModel = require('./BaseModel'); + +/** + * Creates an instance of Deletesubacoount + */ +class Deletesubacoount 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); + } + + /** + * 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' }, + ]); + } + + /** + * 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 = Deletesubacoount; diff --git a/lib/Models/Enableordisablesubacoount.js b/lib/Models/Enableordisablesubacoount.js new file mode 100644 index 0000000..d96e0cf --- /dev/null +++ b/lib/Models/Enableordisablesubacoount.js @@ -0,0 +1,49 @@ +/** + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ + +'use strict'; + +const BaseModel = require('./BaseModel'); + +/** + * Creates an instance of Enableordisablesubacoount + */ +class Enableordisablesubacoount 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.disabled = this.constructor.getValue(obj.disabled); + } + + /** + * 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: 'disabled', realName: 'disabled' }, + ]); + } + + /** + * 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 = Enableordisablesubacoount; diff --git a/lib/Models/RemoveemailordomaintoSuppressionlist.js b/lib/Models/RemoveemailordomaintoSuppressionlist.js new file mode 100644 index 0000000..dd3ecab --- /dev/null +++ b/lib/Models/RemoveemailordomaintoSuppressionlist.js @@ -0,0 +1,49 @@ +/** + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ + +'use strict'; + +const BaseModel = require('./BaseModel'); + +/** + * Creates an instance of RemoveemailordomaintoSuppressionlist + */ +class RemoveemailordomaintoSuppressionlist extends BaseModel { + /** + * @constructor + * @param {Object} obj The object passed to constructor + */ + constructor(obj) { + super(obj); + if (obj === undefined || obj === null) return; + this.domain = this.constructor.getValue(obj.domain); + this.email = this.constructor.getValue(obj.email); + } + + /** + * 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: 'domain', realName: 'domain' }, + { name: 'email', realName: 'email' }, + ]); + } + + /** + * 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 = RemoveemailordomaintoSuppressionlist; diff --git a/lib/Models/UpdateCredisofsubaccount.js b/lib/Models/UpdateCredisofsubaccount.js new file mode 100644 index 0000000..fba0dd9 --- /dev/null +++ b/lib/Models/UpdateCredisofsubaccount.js @@ -0,0 +1,51 @@ +/** + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ + +'use strict'; + +const BaseModel = require('./BaseModel'); + +/** + * Creates an instance of UpdateCredisofsubaccount + */ +class UpdateCredisofsubaccount 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.action = this.constructor.getValue(obj.action); + this.amount = this.constructor.getValue(obj.amount); + } + + /** + * 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: 'action', realName: 'action' }, + { name: 'amount', realName: 'amount' }, + ]); + } + + /** + * 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 = UpdateCredisofsubaccount; diff --git a/lib/Models/UpdaterecurringCredisofsubaccount.js b/lib/Models/UpdaterecurringCredisofsubaccount.js new file mode 100644 index 0000000..67787f4 --- /dev/null +++ b/lib/Models/UpdaterecurringCredisofsubaccount.js @@ -0,0 +1,59 @@ +/** + * 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; diff --git a/lib/Models/Updatesubaccount.js b/lib/Models/Updatesubaccount.js new file mode 100644 index 0000000..43a1f0d --- /dev/null +++ b/lib/Models/Updatesubaccount.js @@ -0,0 +1,57 @@ +/** + * PepipostLib + * + * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). + */ + +'use strict'; + +const BaseModel = require('./BaseModel'); + +/** + * Creates an instance of Updatesubaccount + */ +class Updatesubaccount 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.newEmail = this.constructor.getValue(obj.newEmail || obj.new_email); + this.newPassword = this.constructor.getValue(obj.newPassword || obj.new_password); + this.confirmPassword = + this.constructor.getValue(obj.confirmPassword + || obj.confirm_password); + this.creditType = this.constructor.getValue(obj.creditType || obj.credit_type); + } + + /** + * 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: 'newEmail', realName: 'new_email' }, + { name: 'newPassword', realName: 'new_password' }, + { name: 'confirmPassword', realName: 'confirm_password' }, + { name: 'creditType', realName: 'credit_type' }, + ]); + } + + /** + * 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 = Updatesubaccount;