* Constructor
(data)
| 21 | * Constructor |
| 22 | */ |
| 23 | constructor(data) { |
| 24 | |
| 25 | //Initialize array and object properties |
| 26 | this.isDynamic = false; |
| 27 | this.hideWarnings = false; |
| 28 | this.personalizations = []; |
| 29 | this.attachments = []; |
| 30 | this.content = []; |
| 31 | this.categories = []; |
| 32 | this.headers = {}; |
| 33 | this.sections = {}; |
| 34 | this.customArgs = {}; |
| 35 | this.trackingSettings = {}; |
| 36 | this.mailSettings = {}; |
| 37 | this.asm = {}; |
| 38 | |
| 39 | //Helper properties |
| 40 | this.substitutions = null; |
| 41 | this.substitutionWrappers = null; |
| 42 | this.dynamicTemplateData = null; |
| 43 | |
| 44 | //Process data if given |
| 45 | if (data) { |
| 46 | this.fromData(data); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | /** |
| 51 | * Build from data |