MCPcopy Index your code
hub / github.com/sendgrid/sendgrid-nodejs / constructor

Method constructor

packages/helpers/classes/mail.js:23–48  ·  view source on GitHub ↗

* Constructor

(data)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

fromDataMethod · 0.95

Tested by

no test coverage detected