This repository has been archived by the owner on Mar 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 119
/
Automation.cs
375 lines (337 loc) · 8.58 KB
/
Automation.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
using MailChimp.Campaigns;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace MailChimp.Automations
{
[DataContract]
public class Automation
{
/// <summary>
/// Campaign Id (used for all other campaign functions)
/// </summary>
[DataMember(Name="id")]
public string Id
{
get;
set;
}
/// <summary>
/// The Campaign id used in our web app, allows you to create a link directly to it
/// </summary>
[DataMember(Name = "web_id")]
public int WebId
{
get;
set;
}
/// <summary>
/// The List used for this campaign
/// </summary>
[DataMember(Name = "list_id")]
public string ListId
{
get;
set;
}
/// <summary>
/// The Folder this campaign is in
/// </summary>
[DataMember(Name = "folder_id")]
public int FolderId
{
get;
set;
}
/// <summary>
/// The Template this campaign uses
/// </summary>
[DataMember(Name = "template_id")]
public int TemplateId
{
get;
set;
}
/// <summary>
/// How the campaign's content is put together - one of 'template', 'html', 'url'
/// </summary>
[DataMember(Name = "content_type")]
public string ContentType
{
get;
set;
}
/// <summary>
/// Title of the campaign
/// </summary>
[DataMember(Name = "title")]
public string Title
{
get;
set;
}
/// <summary>
/// The type of campaign this is (regular,plaintext,absplit,rss,inspection,auto)
/// </summary>
[DataMember(Name = "type")]
public string Type
{
get;
set;
}
/// <summary>
/// Creation time for the campaign
/// </summary>
[DataMember(Name = "create_time")]
public string CreateTime
{
get;
set;
}
/// <summary>
/// Send time for the campaign - also the scheduled time for scheduled campaigns.
/// </summary>
[DataMember(Name = "send_time")]
public string SendTime
{
get;
set;
}
/// <summary>
/// Number of emails email was sent to
/// </summary>
[DataMember(Name = "emails_sent")]
public int EmailsSent
{
get;
set;
}
/// <summary>
/// Status of the given campaign (save,paused,schedule,sending,sent)
/// </summary>
[DataMember(Name = "status")]
public string Status
{
get;
set;
}
/// <summary>
/// From name of the given campaign
/// </summary>
[DataMember(Name = "from_name")]
public string FromName
{
get;
set;
}
/// <summary>
/// Reply-to email of the given campaign
/// </summary>
[DataMember(Name = "from_email")]
public string FromEmail
{
get;
set;
}
/// <summary>
/// Subject of the given campaign
/// </summary>
[DataMember(Name = "subject")]
public string Subject
{
get;
set;
}
/// <summary>
/// Custom "To:" email string using merge variables
/// </summary>
[DataMember(Name = "to_name")]
public string ToName
{
get;
set;
}
/// <summary>
/// Archive link for the given campaign
/// </summary>
[DataMember(Name = "archive_url")]
public string ArchiveUrl
{
get;
set;
}
/// <summary>
/// Whether or not the campaign content's css was auto-inlined
/// </summary>
[DataMember(Name = "inline_css")]
public bool InlineCSS
{
get;
set;
}
/// <summary>
/// Either "google" if enabled or "N" if disabled
/// </summary>
[DataMember(Name = "analytics")]
public string Analytics
{
get;
set;
}
/// <summary>
/// The name/tag the campaign's links were tagged with if analytics were enabled.
/// </summary>
[DataMember(Name = "analytics_tag")]
public string AnalyticsTag
{
get;
set;
}
/// <summary>
/// Whether or not the campaign was authenticated
/// </summary>
[DataMember(Name = "authenticate")]
public bool Authenticate
{
get;
set;
}
/// <summary>
/// Whether or not ecomm360 tracking was appended to links
/// </summary>
[DataMember(Name = "ecomm360")]
public bool Ecomm360
{
get;
set;
}
/// <summary>
/// Whether or not the campaign was auto tweeted after sending
/// </summary>
[DataMember(Name = "auto_tweet")]
public bool AutoTweet
{
get;
set;
}
/// <summary>
/// A comma delimited list of Facebook Profile/Page Ids the
/// campaign was posted to after sending. If not used, blank.
/// </summary>
[DataMember(Name = "auto_fb_post")]
public string AutoFacebookPost
{
get;
set;
}
/// <summary>
/// Whether or not the auto_footer was manually turned on
/// </summary>
[DataMember(Name = "auto_footer")]
public bool AutoFooter
{
get;
set;
}
/// <summary>
/// Whether or not the campaign used Timewarp
/// </summary>
[DataMember(Name = "timewarp")]
public bool Timewarp
{
get;
set;
}
/// <summary>
/// The time, in GMT, that the Timewarp campaign is being sent.
/// For A/B Split campaigns, this is blank and is instead in
/// their schedule_a and schedule_b in the type_opts array
/// </summary>
[DataMember(Name = "timewarp_schedule")]
public string TimewarpSchedule
{
get;
set;
}
/// <summary>
/// the unique id of the parent campaign
/// (currently only valid for rss children)
/// </summary>
[DataMember(Name = "parent_id")]
public string ParentId
{
get;
set;
}
[DataMember(Name = "is_child")]
public bool IsChild
{
get;
set;
}
[DataMember(Name = "tests_sent")]
public string TestsSent
{
get;
set;
}
[DataMember(Name = "tests_remain")]
public int TestsRemain
{
get;
set;
}
[DataMember(Name = "tracking")]
public AutomationTracking Tracking
{
get;
set;
}
/// <summary>
/// a string marked-up with HTML explaining the segment
/// used for the campaign in plain English
/// </summary>
[DataMember(Name = "segment_text")]
public string SegmentText
{
get;
set;
}
[DataMember(Name = "segment_opts")]
public CampaignSegmentOptions SegmentOpts
{
get;
set;
}
[DataMember(Name = "saved_segment")]
public AutomationSavedSegment SavedSegment
{
get;
set;
}
/// <summary>
/// total number of comments left on this campaign
/// </summary>
[DataMember(Name = "comments_total")]
public int CommentsTotal
{
get;
set;
}
/// <summary>
/// total number of unread comments for this campaign
/// based on the login the apikey belongs to
/// </summary>
[DataMember(Name = "comments_unread")]
public int CommentsUnread
{
get;
set;
}
[DataMember(Name = "social_card")]
public AutomationSocialCard SocialCard
{
get;
set;
}
}
}