11
22package com .sparkpost .model ;
33
4- import com .sparkpost .model .responses .TemplateItemResponse ;
5- import com .sparkpost .model .responses .TemplateItemResponse .TemplateOptionsData ;
6- import com .sparkpost .model .responses .TemplateRetrieveResponse ;
74import com .yepher .jsondoc .annotations .Description ;
85
96import lombok .Data ;
@@ -20,32 +17,6 @@ public TemplateAttributes() {
2017
2118 }
2219
23- public TemplateAttributes (TemplateRetrieveResponse response ) {
24- TemplateItemResponse template = response .getResults ();
25- if (template == null ) {
26- return ;
27- }
28-
29- setName (template .getName ());
30- setId (template .getId ());
31- setPublished (template .getPublished ());
32- setDescription (template .getDescription ());
33-
34- TemplateContentAttributes content = new TemplateContentAttributes ();
35- TemplateContentAttributes otherContent = template .getContent ();
36- content .setSubject (otherContent .getSubject ());
37- content .setEmailRFC822 (template .getContent ().getEmailRFC822 ());
38- content .setText (otherContent .getText ());
39- content .setHtml (otherContent .getHtml ());
40- template .setContent (content );
41-
42- OptionsAttributes options = new OptionsAttributes ();
43- TemplateOptionsData otherOptions = template .getOptions ();
44- options .setClickTracking (otherOptions .getClickTracking ());
45- options .setOpenTracking (otherOptions .getOpenTracking ());
46- //options.setInlineCss(otherOptions.getInlineCss());
47- }
48-
4920 /**
5021 * Short, unique, alphanumeric ID used to reference the template
5122 * After a template has been created, this property cannot be changed. Maximum length - 64 bytes
0 commit comments