blib/lib/ElasticEmail.pm

filter: Statementstmt 11.2% 81 / 721 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 12.0% 26 / 216 Podpod n/a totaltotal 11.3% 107 / 945 CC 6 SCAR 10.8
CC
6
Cov
11%
Request
42.0
AddSubAccount
2.0
AddSubAccountCredits
2.0
CRAP 3.0
↑ Summary ElasticEmail-WebApiClient/t/00-load.t »
1 package ElasticEmail;
2
3 1 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6
7 package Api;
8 1 ▶use LWP::UserAgent;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use File::Basename;
Subroutine BEGIN: called CC=1 SCAR=0.0
10
11 1 our $mainApi= new Api("00000000-0000-0000-0000-000000000000", 'example@email.com', 'https://api.elasticemail.com/v2/');
12
13 sub new
14 1 ▶{
Subroutine new: called CC=1 SCAR=0.0
15 1 my $class = shift;
16 1 my $self = {
17 apikey => shift,
18 username => shift,
19 url => shift,
20 };
21 1 bless $self, $class;
22 1 return $self;
23 }
24
25 sub Request
26 0 ▶{
Subroutine Request: not called CC=6 SCAR=37.4
27 0 my ($self, $urlLocal, $requestType, $one_ref, $two_ref) = @_;
28
29 0 ▶ my @allTheData = $one_ref ? @{$one_ref} : ();
Branch: 1 branch
BranchTrueFalseTotal
$one_ref ? : 0 0 0
30 0 ▶ my @postFilesPaths = $two_ref ? @{$two_ref} : ();
Branch: 1 branch
BranchTrueFalseTotal
$two_ref ? : 0 0 0
31
32 0 my $ua = LWP::UserAgent->new;
33
34 0 my $response;
35 0 ▶ if ($requestType eq "GET"){
Branch: 2 branches
BranchTrueFalseTotal
if ($requestType eq 'GET') { } 0 0 0
elsif ($requestType eq 'POST') { } 0 0 0
36 0 my $fullURL = $self->{url}."/".$urlLocal."?apikey=".$self->{apikey};
37 0 $response = $ua->get($fullURL);
38 }
39 elsif($requestType eq "POST"){
40 0 my $fullURL = $self->{ url}."/".$urlLocal;
41 0 my $num = 0;
42 0 my $file;
43 0 foreach $file(@postFilesPaths){
44 0 my $localFileName = fileparse($file);
45 0 my $fieldName = 'file'.$num;
46
47 0 push(@{$allTheData[0]}, ($fieldName, [$file, $localFileName]));
48 0 $num++;
49 }
50 0 $response = $ua->post($fullURL, Content_Type => 'multipart/form-data', Content => @allTheData);
51 }
52 0 my $content = $response->decoded_content();
53 0 return $content;
54 }
55
56
57
58 #
59 # Methods for managing your account and subaccounts.
60 #
61 package Api::Account;
62
63 # Create new subaccount and provide most important data about it.
64 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
65 # string email - Proper email address.
66 # string password - Current password.
67 # string confirmPassword - Repeat new password.
68 # bool requiresEmailCredits - True, if account needs credits to send emails. Otherwise, false (default False)
69 # bool enableLitmusTest - True, if account is able to send template tests to Litmus. Otherwise, false (default False)
70 # bool requiresLitmusCredits - True, if account needs credits to send emails. Otherwise, false (default False)
71 # int maxContacts - Maximum number of contacts the account can have (default 0)
72 # bool enablePrivateIPRequest - True, if account can request for private IP on its own. Otherwise, false (default True)
73 # bool sendActivation - True, if you want to send activation email to this account. Otherwise, false (default False)
74 # string returnUrl - URL to navigate to after account creation (default None)
75 # ApiTypes::SendingPermission? sendingPermission - Sending permission setting for account (default None)
76 # bool? enableContactFeatures - True, if you want to use Advanced Tools. Otherwise, false (default None)
77 # string poolName - Private IP required. Name of the custom IP Pool which Sub Account should use to send its emails. Leave empty for the default one or if no Private IPs have been bought (default None)
78 # int emailSizeLimit - Maximum size of email including attachments in MB's (default 10)
79 # Returns string
80 sub AddSubAccount
81 0 ▶ {
Subroutine AddSubAccount: not called CC=1 SCAR=6.9
82 0 shift;
83 my @params = [apikey => $Api::mainApi->{apikey},
84 0 email => shift,
85 password => shift,
86 confirmPassword => shift,
87 requiresEmailCredits => shift,
88 enableLitmusTest => shift,
89 requiresLitmusCredits => shift,
90 maxContacts => shift,
91 enablePrivateIPRequest => shift,
92 sendActivation => shift,
93 returnUrl => shift,
94 sendingPermission => shift,
95 enableContactFeatures => shift,
96 poolName => shift,
97 emailSizeLimit => shift];
98 0 return $Api::mainApi->Request('account/addsubaccount', "GET", \@params);
99 }
100
101 # Add email, template or litmus credits to a sub-account
102 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
103 # int credits - Amount of credits to add
104 # string notes - Specific notes about the transaction
105 # ApiTypes::CreditType creditType - Type of credits to add (Email or Litmus) (default ApiTypes.CreditType.Email)
106 # string subAccountEmail - Email address of sub-account (default None)
107 # string publicAccountID - Public key of sub-account to add credits to. Use subAccountEmail or publicAccountID not both. (default None)
108 sub AddSubAccountCredits
109 0 ▶ {
Subroutine AddSubAccountCredits: not called CC=1 SCAR=6.9
110 0 shift;
111 my @params = [apikey => $Api::mainApi->{apikey},
112 0 credits => shift,
113 notes => shift,
114 creditType => shift,
115 subAccountEmail => shift,
116 publicAccountID => shift];
117 0 return $Api::mainApi->Request('account/addsubaccountcredits', "GET", \@params);
118 }
119
120 # Change your email address. Remember, that your email address is used as login!
121 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
122 # string sourceUrl - URL from which request was sent.
123 # string newEmail - New email address.
124 # string confirmEmail - New email address.
125 sub ChangeEmail
126 0 ▶ {
Subroutine ChangeEmail: not called CC=1 SCAR=6.9
127 0 shift;
128 my @params = [apikey => $Api::mainApi->{apikey},
129 0 sourceUrl => shift,
130 newEmail => shift,
131 confirmEmail => shift];
132 0 return $Api::mainApi->Request('account/changeemail', "GET", \@params);
133 }
134
135 # Create new password for your account. Password needs to be at least 6 characters long.
136 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
137 # string currentPassword - Current password.
138 # string newPassword - New password for account.
139 # string confirmPassword - Repeat new password.
140 sub ChangePassword
141 0 ▶ {
Subroutine ChangePassword: not called CC=1 SCAR=6.9
142 0 shift;
143 my @params = [apikey => $Api::mainApi->{apikey},
144 0 currentPassword => shift,
145 newPassword => shift,
146 confirmPassword => shift];
147 0 return $Api::mainApi->Request('account/changepassword', "GET", \@params);
148 }
149
150 # Deletes specified Subaccount
151 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
152 # bool notify - True, if you want to send an email notification. Otherwise, false (default True)
153 # string subAccountEmail - Email address of sub-account (default None)
154 # string publicAccountID - Public key of sub-account to delete. Use subAccountEmail or publicAccountID not both. (default None)
155 sub DeleteSubAccount
156 0 ▶ {
Subroutine DeleteSubAccount: not called CC=1 SCAR=6.9
157 0 shift;
158 my @params = [apikey => $Api::mainApi->{apikey},
159 0 notify => shift,
160 subAccountEmail => shift,
161 publicAccountID => shift];
162 0 return $Api::mainApi->Request('account/deletesubaccount', "GET", \@params);
163 }
164
165 # Returns API Key for the given Sub Account.
166 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
167 # string subAccountEmail - Email address of sub-account (default None)
168 # string publicAccountID - Public key of sub-account to retrieve sub-account API Key. Use subAccountEmail or publicAccountID not both. (default None)
169 # Returns string
170 sub GetSubAccountApiKey
171 0 ▶ {
Subroutine GetSubAccountApiKey: not called CC=1 SCAR=6.9
172 0 shift;
173 my @params = [apikey => $Api::mainApi->{apikey},
174 0 subAccountEmail => shift,
175 publicAccountID => shift];
176 0 return $Api::mainApi->Request('account/getsubaccountapikey', "GET", \@params);
177 }
178
179 # Lists all of your subaccounts
180 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
181 # Returns List<ApiTypes::SubAccount>
182 sub GetSubAccountList
183 0 ▶ {
Subroutine GetSubAccountList: not called CC=1 SCAR=6.9
184 0 shift;
185 0 my @params = [apikey => $Api::mainApi->{apikey}];
186 0 return $Api::mainApi->Request('account/getsubaccountlist', "GET", \@params);
187 }
188
189 # Loads your account. Returns detailed information about your account.
190 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
191 # Returns ApiTypes::Account
192 sub Load
193 0 ▶ {
Subroutine Load: not called CC=1 SCAR=6.9
194 0 shift;
195 0 my @params = [apikey => $Api::mainApi->{apikey}];
196 0 return $Api::mainApi->Request('account/load', "GET", \@params);
197 }
198
199 # Load advanced options of your account
200 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
201 # Returns ApiTypes::AdvancedOptions
202 sub LoadAdvancedOptions
203 0 ▶ {
Subroutine LoadAdvancedOptions: not called CC=1 SCAR=6.9
204 0 shift;
205 0 my @params = [apikey => $Api::mainApi->{apikey}];
206 0 return $Api::mainApi->Request('account/loadadvancedoptions', "GET", \@params);
207 }
208
209 # Lists email credits history
210 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
211 # Returns List<ApiTypes::EmailCredits>
212 sub LoadEmailCreditsHistory
213 0 ▶ {
Subroutine LoadEmailCreditsHistory: not called CC=1 SCAR=6.9
214 0 shift;
215 0 my @params = [apikey => $Api::mainApi->{apikey}];
216 0 return $Api::mainApi->Request('account/loademailcreditshistory', "GET", \@params);
217 }
218
219 # Lists litmus credits history
220 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
221 # Returns List<ApiTypes::LitmusCredits>
222 sub LoadLitmusCreditsHistory
223 0 ▶ {
Subroutine LoadLitmusCreditsHistory: not called CC=1 SCAR=6.9
224 0 shift;
225 0 my @params = [apikey => $Api::mainApi->{apikey}];
226 0 return $Api::mainApi->Request('account/loadlitmuscreditshistory', "GET", \@params);
227 }
228
229 # Shows queue of newest notifications - very useful when you want to check what happened with mails that were not received.
230 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
231 # Returns List<ApiTypes::NotificationQueue>
232 sub LoadNotificationQueue
233 0 ▶ {
Subroutine LoadNotificationQueue: not called CC=1 SCAR=6.9
234 0 shift;
235 0 my @params = [apikey => $Api::mainApi->{apikey}];
236 0 return $Api::mainApi->Request('account/loadnotificationqueue', "GET", \@params);
237 }
238
239 # Lists all payments
240 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
241 # int limit - Maximum of loaded items.
242 # int offset - How many items should be loaded ahead.
243 # DateTime fromDate - Starting date for search in YYYY-MM-DDThh:mm:ss format.
244 # DateTime toDate - Ending date for search in YYYY-MM-DDThh:mm:ss format.
245 # Returns List<ApiTypes::Payment>
246 sub LoadPaymentHistory
247 0 ▶ {
Subroutine LoadPaymentHistory: not called CC=1 SCAR=6.9
248 0 shift;
249 my @params = [apikey => $Api::mainApi->{apikey},
250 0 limit => shift,
251 offset => shift,
252 fromDate => shift,
253 toDate => shift];
254 0 return $Api::mainApi->Request('account/loadpaymenthistory', "GET", \@params);
255 }
256
257 # Lists all referral payout history
258 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
259 # Returns List<ApiTypes::Payment>
260 sub LoadPayoutHistory
261 0 ▶ {
Subroutine LoadPayoutHistory: not called CC=1 SCAR=6.9
262 0 shift;
263 0 my @params = [apikey => $Api::mainApi->{apikey}];
264 0 return $Api::mainApi->Request('account/loadpayouthistory', "GET", \@params);
265 }
266
267 # Shows information about your referral details
268 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
269 # Returns ApiTypes::Referral
270 sub LoadReferralDetails
271 0 ▶ {
Subroutine LoadReferralDetails: not called CC=1 SCAR=6.9
272 0 shift;
273 0 my @params = [apikey => $Api::mainApi->{apikey}];
274 0 return $Api::mainApi->Request('account/loadreferraldetails', "GET", \@params);
275 }
276
277 # Shows latest changes in your sending reputation
278 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
279 # int limit - Maximum of loaded items. (default 20)
280 # int offset - How many items should be loaded ahead. (default 0)
281 # Returns List<ApiTypes::ReputationHistory>
282 sub LoadReputationHistory
283 0 ▶ {
Subroutine LoadReputationHistory: not called CC=1 SCAR=6.9
284 0 shift;
285 my @params = [apikey => $Api::mainApi->{apikey},
286 0 limit => shift,
287 offset => shift];
288 0 return $Api::mainApi->Request('account/loadreputationhistory', "GET", \@params);
289 }
290
291 # Shows detailed information about your actual reputation score
292 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
293 # Returns ApiTypes::ReputationDetail
294 sub LoadReputationImpact
295 0 ▶ {
Subroutine LoadReputationImpact: not called CC=1 SCAR=6.9
296 0 shift;
297 0 my @params = [apikey => $Api::mainApi->{apikey}];
298 0 return $Api::mainApi->Request('account/loadreputationimpact', "GET", \@params);
299 }
300
301 # Returns detailed spam check.
302 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
303 # int limit - Maximum of loaded items. (default 20)
304 # int offset - How many items should be loaded ahead. (default 0)
305 # Returns List<ApiTypes::SpamCheck>
306 sub LoadSpamCheck
307 0 ▶ {
Subroutine LoadSpamCheck: not called CC=1 SCAR=6.9
308 0 shift;
309 my @params = [apikey => $Api::mainApi->{apikey},
310 0 limit => shift,
311 offset => shift];
312 0 return $Api::mainApi->Request('account/loadspamcheck', "GET", \@params);
313 }
314
315 # Lists email credits history for sub-account
316 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
317 # string subAccountEmail - Email address of sub-account (default None)
318 # string publicAccountID - Public key of sub-account to list history for. Use subAccountEmail or publicAccountID not both. (default None)
319 # Returns List<ApiTypes::EmailCredits>
320 sub LoadSubAccountsEmailCreditsHistory
321 0 ▶ {
Subroutine LoadSubAccountsEmailCreditsHistory: not called CC=1 SCAR=6.9
322 0 shift;
323 my @params = [apikey => $Api::mainApi->{apikey},
324 0 subAccountEmail => shift,
325 publicAccountID => shift];
326 0 return $Api::mainApi->Request('account/loadsubaccountsemailcreditshistory', "GET", \@params);
327 }
328
329 # Loads settings of subaccount
330 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
331 # string subAccountEmail - Email address of sub-account (default None)
332 # string publicAccountID - Public key of sub-account to load settings for. Use subAccountEmail or publicAccountID not both. (default None)
333 # Returns ApiTypes::SubAccountSettings
334 sub LoadSubAccountSettings
335 0 ▶ {
Subroutine LoadSubAccountSettings: not called CC=1 SCAR=6.9
336 0 shift;
337 my @params = [apikey => $Api::mainApi->{apikey},
338 0 subAccountEmail => shift,
339 publicAccountID => shift];
340 0 return $Api::mainApi->Request('account/loadsubaccountsettings', "GET", \@params);
341 }
342
343 # Lists litmus credits history for sub-account
344 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
345 # string subAccountEmail - Email address of sub-account (default None)
346 # string publicAccountID - Public key of sub-account to list history for. Use subAccountEmail or publicAccountID not both. (default None)
347 # Returns List<ApiTypes::LitmusCredits>
348 sub LoadSubAccountsLitmusCreditsHistory
349 0 ▶ {
Subroutine LoadSubAccountsLitmusCreditsHistory: not called CC=1 SCAR=6.9
350 0 shift;
351 my @params = [apikey => $Api::mainApi->{apikey},
352 0 subAccountEmail => shift,
353 publicAccountID => shift];
354 0 return $Api::mainApi->Request('account/loadsubaccountslitmuscreditshistory', "GET", \@params);
355 }
356
357 # Shows usage of your account in given time.
358 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
359 # DateTime from - Starting date for search in YYYY-MM-DDThh:mm:ss format.
360 # DateTime to - Ending date for search in YYYY-MM-DDThh:mm:ss format.
361 # Returns List<ApiTypes::Usage>
362 sub LoadUsage
363 0 ▶ {
Subroutine LoadUsage: not called CC=1 SCAR=6.9
364 0 shift;
365 my @params = [apikey => $Api::mainApi->{apikey},
366 0 from => shift,
367 to => shift];
368 0 return $Api::mainApi->Request('account/loadusage', "GET", \@params);
369 }
370
371 # Manages your apikeys.
372 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
373 # string apiKey - APIKey you would like to manage.
374 # ApiTypes::APIKeyAction action - Specific action you would like to perform on the APIKey
375 # Returns List<string>
376 sub ManageApiKeys
377 0 ▶ {
Subroutine ManageApiKeys: not called CC=1 SCAR=6.9
378 0 shift;
379 my @params = [apikey => $Api::mainApi->{apikey},
380 0 apiKey => shift,
381 action => shift];
382 0 return $Api::mainApi->Request('account/manageapikeys', "GET", \@params);
383 }
384
385 # Shows summary for your account.
386 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
387 # Returns ApiTypes::AccountOverview
388 sub Overview
389 0 ▶ {
Subroutine Overview: not called CC=1 SCAR=6.9
390 0 shift;
391 0 my @params = [apikey => $Api::mainApi->{apikey}];
392 0 return $Api::mainApi->Request('account/overview', "GET", \@params);
393 }
394
395 # Shows you account's profile basic overview
396 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
397 # Returns ApiTypes::Profile
398 sub ProfileOverview
399 0 ▶ {
Subroutine ProfileOverview: not called CC=1 SCAR=6.9
400 0 shift;
401 0 my @params = [apikey => $Api::mainApi->{apikey}];
402 0 return $Api::mainApi->Request('account/profileoverview', "GET", \@params);
403 }
404
405 # Remove email, template or litmus credits from a sub-account
406 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
407 # ApiTypes::CreditType creditType - Type of credits to add (Email or Litmus)
408 # string notes - Specific notes about the transaction
409 # string subAccountEmail - Email address of sub-account (default None)
410 # string publicAccountID - Public key of sub-account to remove credits from. Use subAccountEmail or publicAccountID not both. (default None)
411 # int? credits - Amount of credits to remove (default None)
412 # bool removeAll - Remove all credits of this type from sub-account (overrides credits if provided) (default False)
413 sub RemoveSubAccountCredits
414 0 ▶ {
Subroutine RemoveSubAccountCredits: not called CC=1 SCAR=6.9
415 0 shift;
416 my @params = [apikey => $Api::mainApi->{apikey},
417 0 creditType => shift,
418 notes => shift,
419 subAccountEmail => shift,
420 publicAccountID => shift,
421 credits => shift,
422 removeAll => shift];
423 0 return $Api::mainApi->Request('account/removesubaccountcredits', "GET", \@params);
424 }
425
426 # Request a private IP for your Account
427 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
428 # int count - Number of items.
429 # string notes - Free form field of notes
430 sub RequestPrivateIP
431 0 ▶ {
Subroutine RequestPrivateIP: not called CC=1 SCAR=6.9
432 0 shift;
433 my @params = [apikey => $Api::mainApi->{apikey},
434 0 count => shift,
435 notes => shift];
436 0 return $Api::mainApi->Request('account/requestprivateip', "GET", \@params);
437 }
438
439 # Update sending and tracking options of your account.
440 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
441 # bool? enableClickTracking - True, if you want to track clicks. Otherwise, false (default None)
442 # bool? enableLinkClickTracking - True, if you want to track by link tracking. Otherwise, false (default None)
443 # bool? manageSubscriptions - True, if you want to display your labels on your unsubscribe form. Otherwise, false (default None)
444 # bool? manageSubscribedOnly - True, if you want to only display labels that the contact is subscribed to on your unsubscribe form. Otherwise, false (default None)
445 # bool? transactionalOnUnsubscribe - True, if you want to display an option for the contact to opt into transactional email only on your unsubscribe form. Otherwise, false (default None)
446 # bool? skipListUnsubscribe - True, if you do not want to use list-unsubscribe headers. Otherwise, false (default None)
447 # bool? autoTextFromHtml - True, if text BODY of message should be created automatically. Otherwise, false (default None)
448 # bool? allowCustomHeaders - True, if you want to apply custom headers to your emails. Otherwise, false (default None)
449 # string bccEmail - Email address to send a copy of all email to. (default None)
450 # string contentTransferEncoding - Type of content encoding (default None)
451 # bool? emailNotificationForError - True, if you want bounce notifications returned. Otherwise, false (default None)
452 # string emailNotificationEmail - Specific email address to send bounce email notifications to. (default None)
453 # string webNotificationUrl - URL address to receive web notifications to parse and process. (default None)
454 # bool? webNotificationForSent - True, if you want to send web notifications for sent email. Otherwise, false (default None)
455 # bool? webNotificationForOpened - True, if you want to send web notifications for opened email. Otherwise, false (default None)
456 # bool? webNotificationForClicked - True, if you want to send web notifications for clicked email. Otherwise, false (default None)
457 # bool? webNotificationForUnsubscribed - True, if you want to send web notifications for unsubscribed email. Otherwise, false (default None)
458 # bool? webNotificationForAbuseReport - True, if you want to send web notifications for complaint email. Otherwise, false (default None)
459 # bool? webNotificationForError - True, if you want to send web notifications for bounced email. Otherwise, false (default None)
460 # string hubCallBackUrl - URL used for tracking action of inbound emails (default "")
461 # string inboundDomain - Domain you use as your inbound domain (default None)
462 # bool? inboundContactsOnly - True, if you want inbound email to only process contacts from your account. Otherwise, false (default None)
463 # bool? lowCreditNotification - True, if you want to receive low credit email notifications. Otherwise, false (default None)
464 # bool? enableUITooltips - True, if account has tooltips active. Otherwise, false (default None)
465 # bool? enableContactFeatures - True, if you want to use Advanced Tools. Otherwise, false (default None)
466 # string notificationsEmails - Email addresses to send a copy of all notifications from our system. Separated by semicolon (default None)
467 # string unsubscribeNotificationsEmails - Emails, separated by semicolon, to which the notification about contact unsubscribing should be sent to (default None)
468 # string logoUrl - URL to your logo image. (default None)
469 # bool? enableTemplateScripting - True, if you want to use template scripting in your emails {{}}. Otherwise, false (default True)
470 # int? staleContactScore - (0 means this functionality is NOT enabled) Score, depending on the number of times you have sent to a recipient, at which the given recipient should be moved to the Stale status (default None)
471 # int? staleContactInactiveDays - (0 means this functionality is NOT enabled) Number of days of inactivity for a contact after which the given recipient should be moved to the Stale status (default None)
472 # Returns ApiTypes::AdvancedOptions
473 sub UpdateAdvancedOptions
474 0 ▶ {
Subroutine UpdateAdvancedOptions: not called CC=1 SCAR=6.9
475 0 shift;
476 my @params = [apikey => $Api::mainApi->{apikey},
477 0 enableClickTracking => shift,
478 enableLinkClickTracking => shift,
479 manageSubscriptions => shift,
480 manageSubscribedOnly => shift,
481 transactionalOnUnsubscribe => shift,
482 skipListUnsubscribe => shift,
483 autoTextFromHtml => shift,
484 allowCustomHeaders => shift,
485 bccEmail => shift,
486 contentTransferEncoding => shift,
487 emailNotificationForError => shift,
488 emailNotificationEmail => shift,
489 webNotificationUrl => shift,
490 webNotificationForSent => shift,
491 webNotificationForOpened => shift,
492 webNotificationForClicked => shift,
493 webNotificationForUnsubscribed => shift,
494 webNotificationForAbuseReport => shift,
495 webNotificationForError => shift,
496 hubCallBackUrl => shift,
497 inboundDomain => shift,
498 inboundContactsOnly => shift,
499 lowCreditNotification => shift,
500 enableUITooltips => shift,
501 enableContactFeatures => shift,
502 notificationsEmails => shift,
503 unsubscribeNotificationsEmails => shift,
504 logoUrl => shift,
505 enableTemplateScripting => shift,
506 staleContactScore => shift,
507 staleContactInactiveDays => shift];
508 0 return $Api::mainApi->Request('account/updateadvancedoptions', "GET", \@params);
509 }
510
511 # Update settings of your private branding. These settings are needed, if you want to use Elastic Email under your brand.
512 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
513 # bool enablePrivateBranding - True: Turn on or off ability to send mails under your brand. Otherwise, false (default False)
514 # string logoUrl - URL to your logo image. (default None)
515 # string supportLink - Address to your support. (default None)
516 # string privateBrandingUrl - Subdomain for your rebranded service (default None)
517 # string smtpAddress - Address of SMTP server. (default None)
518 # string smtpAlternative - Address of alternative SMTP server. (default None)
519 # string paymentUrl - URL for making payments. (default None)
520 sub UpdateCustomBranding
521 0 ▶ {
Subroutine UpdateCustomBranding: not called CC=1 SCAR=6.9
522 0 shift;
523 my @params = [apikey => $Api::mainApi->{apikey},
524 0 enablePrivateBranding => shift,
525 logoUrl => shift,
526 supportLink => shift,
527 privateBrandingUrl => shift,
528 smtpAddress => shift,
529 smtpAlternative => shift,
530 paymentUrl => shift];
531 0 return $Api::mainApi->Request('account/updatecustombranding', "GET", \@params);
532 }
533
534 # Update http notification URL.
535 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
536 # string url - URL of notification.
537 # string settings - Http notification settings serialized to JSON (default None)
538 sub UpdateHttpNotification
539 0 ▶ {
Subroutine UpdateHttpNotification: not called CC=1 SCAR=6.9
540 0 shift;
541 my @params = [apikey => $Api::mainApi->{apikey},
542 0 url => shift,
543 settings => shift];
544 0 return $Api::mainApi->Request('account/updatehttpnotification', "GET", \@params);
545 }
546
547 # Update your profile.
548 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
549 # string firstName - First name.
550 # string lastName - Last name.
551 # string address1 - First line of address.
552 # string city - City.
553 # string state - State or province.
554 # string zip - Zip/postal code.
555 # int countryID - Numeric ID of country. A file with the list of countries is available <a href="http://api.elasticemail.com/public/countries"><b>here</b></a>
556 # string deliveryReason - Why your clients are receiving your emails. (default None)
557 # bool marketingConsent - True if you want to receive newsletters from Elastic Email. Otherwise, false. (default False)
558 # string address2 - Second line of address. (default None)
559 # string company - Company name. (default None)
560 # string website - HTTP address of your website. (default None)
561 # string logoUrl - URL to your logo image. (default None)
562 # string taxCode - Code used for tax purposes. (default None)
563 # string phone - Phone number (default None)
564 sub UpdateProfile
565 0 ▶ {
Subroutine UpdateProfile: not called CC=1 SCAR=6.9
566 0 shift;
567 my @params = [apikey => $Api::mainApi->{apikey},
568 0 firstName => shift,
569 lastName => shift,
570 address1 => shift,
571 city => shift,
572 state => shift,
573 zip => shift,
574 countryID => shift,
575 deliveryReason => shift,
576 marketingConsent => shift,
577 address2 => shift,
578 company => shift,
579 website => shift,
580 logoUrl => shift,
581 taxCode => shift,
582 phone => shift];
583 0 return $Api::mainApi->Request('account/updateprofile', "GET", \@params);
584 }
585
586 # Updates settings of specified subaccount
587 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
588 # bool requiresEmailCredits - True, if account needs credits to send emails. Otherwise, false (default False)
589 # int monthlyRefillCredits - Amount of credits added to account automatically (default 0)
590 # bool requiresLitmusCredits - True, if account needs credits to send emails. Otherwise, false (default False)
591 # bool enableLitmusTest - True, if account is able to send template tests to Litmus. Otherwise, false (default False)
592 # int dailySendLimit - Amount of emails account can send daily (default 50)
593 # int emailSizeLimit - Maximum size of email including attachments in MB's (default 10)
594 # bool enablePrivateIPRequest - True, if account can request for private IP on its own. Otherwise, false (default False)
595 # int maxContacts - Maximum number of contacts the account can have (default 0)
596 # string subAccountEmail - Email address of sub-account (default None)
597 # string publicAccountID - Public key of sub-account to update. Use subAccountEmail or publicAccountID not both. (default None)
598 # ApiTypes::SendingPermission? sendingPermission - Sending permission setting for account (default None)
599 # bool? enableContactFeatures - True, if you want to use Advanced Tools. Otherwise, false (default None)
600 # string poolName - Name of your custom IP Pool to be used in the sending process (default None)
601 sub UpdateSubAccountSettings
602 0 ▶ {
Subroutine UpdateSubAccountSettings: not called CC=1 SCAR=6.9
603 0 shift;
604 my @params = [apikey => $Api::mainApi->{apikey},
605 0 requiresEmailCredits => shift,
606 monthlyRefillCredits => shift,
607 requiresLitmusCredits => shift,
608 enableLitmusTest => shift,
609 dailySendLimit => shift,
610 emailSizeLimit => shift,
611 enablePrivateIPRequest => shift,
612 maxContacts => shift,
613 subAccountEmail => shift,
614 publicAccountID => shift,
615 sendingPermission => shift,
616 enableContactFeatures => shift,
617 poolName => shift];
618 0 return $Api::mainApi->Request('account/updatesubaccountsettings', "GET", \@params);
619 }
620
621
622 #
623 # Managing attachments uploaded to your account.
624 #
625 package Api::Attachment;
626
627 # Permanently deletes attachment file from your account
628 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
629 # long attachmentID - ID number of your attachment.
630 sub Delete
631 0 ▶ {
Subroutine Delete: not called CC=1 SCAR=6.9
632 0 shift;
633 my @params = [apikey => $Api::mainApi->{apikey},
634 0 attachmentID => shift];
635 0 return $Api::mainApi->Request('attachment/delete', "GET", \@params);
636 }
637
638 # Gets address of chosen Attachment
639 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
640 # string fileName - Name of your file.
641 # long attachmentID - ID number of your attachment.
642 # Returns File
643 sub Get
644 0 ▶ {
Subroutine Get: not called CC=1 SCAR=6.9
645 0 shift;
646 my @params = [apikey => $Api::mainApi->{apikey},
647 0 fileName => shift,
648 attachmentID => shift];
649 0 return $Api::mainApi->Request('attachment/get', "GET", \@params);
650 }
651
652 # Lists your available Attachments in the given email
653 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
654 # string msgID - ID number of selected message.
655 # Returns List<ApiTypes::Attachment>
656 sub List
657 0 ▶ {
Subroutine List: not called CC=1 SCAR=6.9
658 0 shift;
659 my @params = [apikey => $Api::mainApi->{apikey},
660 0 msgID => shift];
661 0 return $Api::mainApi->Request('attachment/list', "GET", \@params);
662 }
663
664 # Lists all your available attachments
665 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
666 # Returns List<ApiTypes::Attachment>
667 sub ListAll
668 0 ▶ {
Subroutine ListAll: not called CC=1 SCAR=6.9
669 0 shift;
670 0 my @params = [apikey => $Api::mainApi->{apikey}];
671 0 return $Api::mainApi->Request('attachment/listall', "GET", \@params);
672 }
673
674 # Permanently removes attachment file from your account
675 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
676 # string fileName - Name of your file.
677 sub Remove
678 0 ▶ {
Subroutine Remove: not called CC=1 SCAR=6.9
679 0 shift;
680 my @params = [apikey => $Api::mainApi->{apikey},
681 0 fileName => shift];
682 0 return $Api::mainApi->Request('attachment/remove', "GET", \@params);
683 }
684
685 # Uploads selected file to the server using http form upload format (MIME multipart/form-data) or PUT method. The attachments expire after 30 days.
686 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
687 # File attachmentFile - Content of your attachment.
688 # Returns ApiTypes::Attachment
689 sub Upload
690 0 ▶ {
Subroutine Upload: not called CC=1 SCAR=6.9
691 0 shift;
692 0 my @params = [apikey => $Api::mainApi->{apikey}];
693 0 return $Api::mainApi->Request('attachment/upload', "POST", \@params, \@_);
694 }
695
696
697 #
698 # Sending and monitoring progress of your Campaigns
699 #
700 package Api::Campaign;
701
702 # Adds a campaign to the queue for processing based on the configuration
703 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
704 # ApiTypes::Campaign campaign - Json representation of a campaign
705 # Returns int
706 sub Add
707 0 ▶ {
Subroutine Add: not called CC=1 SCAR=6.9
708 0 shift;
709 my @params = [apikey => $Api::mainApi->{apikey},
710 0 campaign => shift];
711 0 return $Api::mainApi->Request('campaign/add', "GET", \@params);
712 }
713
714 # Copy selected campaign
715 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
716 # int channelID - ID number of selected Channel.
717 sub Copy
718 0 ▶ {
Subroutine Copy: not called CC=1 SCAR=6.9
719 0 shift;
720 my @params = [apikey => $Api::mainApi->{apikey},
721 0 channelID => shift];
722 0 return $Api::mainApi->Request('campaign/copy', "GET", \@params);
723 }
724
725 # Delete selected campaign
726 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
727 # int channelID - ID number of selected Channel.
728 sub Delete
729 0 ▶ {
Subroutine Delete: not called CC=1 SCAR=6.9
730 0 shift;
731 my @params = [apikey => $Api::mainApi->{apikey},
732 0 channelID => shift];
733 0 return $Api::mainApi->Request('campaign/delete', "GET", \@params);
734 }
735
736 # Export selected campaigns to chosen file format.
737 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
738 # IEnumerable<int> channelIDs - List of campaign IDs used for processing (default None)
739 # ApiTypes::ExportFileFormats fileFormat - (default ApiTypes.ExportFileFormats.Csv)
740 # ApiTypes::CompressionFormat compressionFormat - FileResponse compression format. None or Zip. (default ApiTypes.CompressionFormat.EENone)
741 # string fileName - Name of your file. (default None)
742 # Returns ApiTypes::ExportLink
743 sub Export
744 0 ▶ {
Subroutine Export: not called CC=1 SCAR=6.9
745 0 shift;
746 my @params = [apikey => $Api::mainApi->{apikey},
747 0 channelIDs => shift,
748 fileFormat => shift,
749 compressionFormat => shift,
750 fileName => shift];
751 0 return $Api::mainApi->Request('campaign/export', "GET", \@params);
752 }
753
754 # List all of your campaigns
755 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
756 # string search - Text fragment used for searching. (default None)
757 # int offset - How many items should be loaded ahead. (default 0)
758 # int limit - Maximum of loaded items. (default 0)
759 # Returns List<ApiTypes::CampaignChannel>
760 sub List
761 0 ▶ {
Subroutine List: not called CC=1 SCAR=6.9
762 0 shift;
763 my @params = [apikey => $Api::mainApi->{apikey},
764 0 search => shift,
765 offset => shift,
766 limit => shift];
767 0 return $Api::mainApi->Request('campaign/list', "GET", \@params);
768 }
769
770 # Updates a previously added campaign. Only Active and Paused campaigns can be updated.
771 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
772 # ApiTypes::Campaign campaign - Json representation of a campaign
773 # Returns int
774 sub Update
775 0 ▶ {
Subroutine Update: not called CC=1 SCAR=6.9
776 0 shift;
777 my @params = [apikey => $Api::mainApi->{apikey},
778 0 campaign => shift];
779 0 return $Api::mainApi->Request('campaign/update', "GET", \@params);
780 }
781
782
783 #
784 # SMTP and HTTP API channels for grouping email delivery.
785 #
786 package Api::Channel;
787
788 # Manually add a channel to your account to group email
789 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
790 # string name - Descriptive name of the channel
791 # Returns string
792 sub Add
793 0 ▶ {
Subroutine Add: not called CC=1 SCAR=6.9
794 0 shift;
795 my @params = [apikey => $Api::mainApi->{apikey},
796 0 name => shift];
797 0 return $Api::mainApi->Request('channel/add', "GET", \@params);
798 }
799
800 # Delete the channel.
801 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
802 # string name - The name of the channel to delete.
803 sub Delete
804 0 ▶ {
Subroutine Delete: not called CC=1 SCAR=6.9
805 0 shift;
806 my @params = [apikey => $Api::mainApi->{apikey},
807 0 name => shift];
808 0 return $Api::mainApi->Request('channel/delete', "GET", \@params);
809 }
810
811 # Export channels in CSV file format.
812 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
813 # IEnumerable<string> channelNames - List of channel names used for processing
814 # ApiTypes::CompressionFormat compressionFormat - FileResponse compression format. None or Zip. (default ApiTypes.CompressionFormat.EENone)
815 # string fileName - Name of your file. (default None)
816 # Returns File
817 sub ExportCsv
818 0 ▶ {
Subroutine ExportCsv: not called CC=1 SCAR=6.9
819 0 shift;
820 my @params = [apikey => $Api::mainApi->{apikey},
821 0 channelNames => shift,
822 compressionFormat => shift,
823 fileName => shift];
824 0 return $Api::mainApi->Request('channel/exportcsv', "GET", \@params);
825 }
826
827 # Export channels in JSON file format.
828 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
829 # IEnumerable<string> channelNames - List of channel names used for processing
830 # ApiTypes::CompressionFormat compressionFormat - FileResponse compression format. None or Zip. (default ApiTypes.CompressionFormat.EENone)
831 # string fileName - Name of your file. (default None)
832 # Returns File
833 sub ExportJson
834 0 ▶ {
Subroutine ExportJson: not called CC=1 SCAR=6.9
835 0 shift;
836 my @params = [apikey => $Api::mainApi->{apikey},
837 0 channelNames => shift,
838 compressionFormat => shift,
839 fileName => shift];
840 0 return $Api::mainApi->Request('channel/exportjson', "GET", \@params);
841 }
842
843 # Export channels in XML file format.
844 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
845 # IEnumerable<string> channelNames - List of channel names used for processing
846 # ApiTypes::CompressionFormat compressionFormat - FileResponse compression format. None or Zip. (default ApiTypes.CompressionFormat.EENone)
847 # string fileName - Name of your file. (default None)
848 # Returns File
849 sub ExportXml
850 0 ▶ {
Subroutine ExportXml: not called CC=1 SCAR=6.9
851 0 shift;
852 my @params = [apikey => $Api::mainApi->{apikey},
853 0 channelNames => shift,
854 compressionFormat => shift,
855 fileName => shift];
856 0 return $Api::mainApi->Request('channel/exportxml', "GET", \@params);
857 }
858
859 # List all of your channels
860 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
861 # Returns List<ApiTypes::Channel>
862 sub List
863 0 ▶ {
Subroutine List: not called CC=1 SCAR=6.9
864 0 shift;
865 0 my @params = [apikey => $Api::mainApi->{apikey}];
866 0 return $Api::mainApi->Request('channel/list', "GET", \@params);
867 }
868
869 # Rename an existing channel.
870 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
871 # string name - The name of the channel to update.
872 # string newName - The new name for the channel.
873 # Returns string
874 sub Update
875 0 ▶ {
Subroutine Update: not called CC=1 SCAR=6.9
876 0 shift;
877 my @params = [apikey => $Api::mainApi->{apikey},
878 0 name => shift,
879 newName => shift];
880 0 return $Api::mainApi->Request('channel/update', "GET", \@params);
881 }
882
883
884 #
885 # Methods used to manage your Contacts.
886 #
887 package Api::Contact;
888
889 # Activate contacts that are currently blocked.
890 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
891 # bool activateAllBlocked - Activate all your blocked contacts. Passing True will override email list and activate all your blocked contacts. (default False)
892 # IEnumerable<string> emails - Comma delimited list of contact emails (default None)
893 sub ActivateBlocked
894 0 ▶ {
Subroutine ActivateBlocked: not called CC=1 SCAR=6.9
895 0 shift;
896 my @params = [apikey => $Api::mainApi->{apikey},
897 0 activateAllBlocked => shift,
898 emails => shift];
899 0 return $Api::mainApi->Request('contact/activateblocked', "GET", \@params);
900 }
901
902 # Add a new contact and optionally to one of your lists. Note that your API KEY is not required for this call.
903 # string publicAccountID - Public key for limited access to your account such as contact/add so you can use it safely on public websites.
904 # string email - Proper email address.
905 # string[] publicListID - ID code of list (default None)
906 # string[] listName - Name of your list. (default None)
907 # string title - Title (default None)
908 # string firstName - First name. (default None)
909 # string lastName - Last name. (default None)
910 # string phone - Phone number (default None)
911 # string mobileNumber - Mobile phone number (default None)
912 # string notes - Free form field of notes (default None)
913 # string gender - Your gender (default None)
914 # DateTime? birthDate - Date of birth in YYYY-MM-DD format (default None)
915 # string city - City. (default None)
916 # string state - State or province. (default None)
917 # string postalCode - Zip/postal code. (default None)
918 # string country - Name of country. (default None)
919 # string organizationName - Name of organization (default None)
920 # string website - HTTP address of your website. (default None)
921 # int? annualRevenue - Annual revenue of contact (default None)
922 # string industry - Industry contact works in (default None)
923 # int? numberOfEmployees - Number of employees (default None)
924 # ApiTypes::ContactSource source - Specifies the way of uploading the contact (default ApiTypes.ContactSource.ContactApi)
925 # string returnUrl - URL to navigate to after account creation (default None)
926 # string sourceUrl - URL from which request was sent. (default None)
927 # string activationReturnUrl - The url to return the contact to after activation. (default None)
928 # string activationTemplate - (default None)
929 # bool sendActivation - True, if you want to send activation email to this account. Otherwise, false (default True)
930 # DateTime? consentDate - Date of consent to send this contact(s) your email. If not provided current date is used for consent. (default None)
931 # string consentIP - IP address of consent to send this contact(s) your email. If not provided your current public IP address is used for consent. (default None)
932 # Dictionary<string, string> field - Custom contact field like firstname, lastname, city etc. Request parameters prefixed by field_ like field_firstname, field_lastname (default None)
933 # string notifyEmail - Emails, separated by semicolon, to which the notification about contact subscribing should be sent to (default None)
934 # Returns string
935 sub Add
936 0 ▶ {
Subroutine Add: not called CC=1 SCAR=6.9
937 0 shift;
938 0 my @params = [publicAccountID => shift,
939 email => shift,
940 publicListID => shift,
941 listName => shift,
942 title => shift,
943 firstName => shift,
944 lastName => shift,
945 phone => shift,
946 mobileNumber => shift,
947 notes => shift,
948 gender => shift,
949 birthDate => shift,
950 city => shift,
951 state => shift,
952 postalCode => shift,
953 country => shift,
954 organizationName => shift,
955 website => shift,
956 annualRevenue => shift,
957 industry => shift,
958 numberOfEmployees => shift,
959 source => shift,
960 returnUrl => shift,
961 sourceUrl => shift,
962 activationReturnUrl => shift,
963 activationTemplate => shift,
964 sendActivation => shift,
965 consentDate => shift,
966 consentIP => shift,
967 field => shift,
968 notifyEmail => shift];
969 0 return $Api::mainApi->Request('contact/add', "GET", \@params);
970 }
971
972 # Manually add or update a contacts status to Abuse, Bounced or Unsubscribed status (blocked).
973 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
974 # string email - Proper email address.
975 # ApiTypes::ContactStatus status - Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed.
976 sub AddBlocked
977 0 ▶ {
Subroutine AddBlocked: not called CC=1 SCAR=6.9
978 0 shift;
979 my @params = [apikey => $Api::mainApi->{apikey},
980 0 email => shift,
981 status => shift];
982 0 return $Api::mainApi->Request('contact/addblocked', "GET", \@params);
983 }
984
985 # Change any property on the contact record.
986 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
987 # string email - Proper email address.
988 # string name - Name of the contact property you want to change.
989 # string value - Value you would like to change the contact property to.
990 sub ChangeProperty
991 0 ▶ {
Subroutine ChangeProperty: not called CC=1 SCAR=6.9
992 0 shift;
993 my @params = [apikey => $Api::mainApi->{apikey},
994 0 email => shift,
995 name => shift,
996 value => shift];
997 0 return $Api::mainApi->Request('contact/changeproperty', "GET", \@params);
998 }
999
1000 # Changes status of selected Contacts. You may provide RULE for selection or specify list of Contact IDs.
1001 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1002 # ApiTypes::ContactStatus status - Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed.
1003 # string rule - Query used for filtering. (default None)
1004 # IEnumerable<string> emails - Comma delimited list of contact emails (default None)
1005 # bool allContacts - True: Include every Contact in your Account. Otherwise, false (default False)
1006 sub ChangeStatus
1007 0 ▶ {
Subroutine ChangeStatus: not called CC=1 SCAR=6.9
1008 0 shift;
1009 my @params = [apikey => $Api::mainApi->{apikey},
1010 0 status => shift,
1011 rule => shift,
1012 emails => shift,
1013 allContacts => shift];
1014 0 return $Api::mainApi->Request('contact/changestatus', "GET", \@params);
1015 }
1016
1017 # Returns number of Contacts, RULE specifies contact Status.
1018 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1019 # string rule - Query used for filtering. (default None)
1020 # bool allContacts - True: Include every Contact in your Account. Otherwise, false (default False)
1021 # Returns ApiTypes::ContactStatusCounts
1022 sub CountByStatus
1023 0 ▶ {
Subroutine CountByStatus: not called CC=1 SCAR=6.9
1024 0 shift;
1025 my @params = [apikey => $Api::mainApi->{apikey},
1026 0 rule => shift,
1027 allContacts => shift];
1028 0 return $Api::mainApi->Request('contact/countbystatus', "GET", \@params);
1029 }
1030
1031 # Permanantly deletes the contacts provided. You can provide either a qualified rule or a list of emails (comma separated string).
1032 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1033 # string rule - Query used for filtering. (default None)
1034 # IEnumerable<string> emails - Comma delimited list of contact emails (default None)
1035 # bool allContacts - True: Include every Contact in your Account. Otherwise, false (default False)
1036 sub Delete
1037 0 ▶ {
Subroutine Delete: not called CC=1 SCAR=6.9
1038 0 shift;
1039 my @params = [apikey => $Api::mainApi->{apikey},
1040 0 rule => shift,
1041 emails => shift,
1042 allContacts => shift];
1043 0 return $Api::mainApi->Request('contact/delete', "GET", \@params);
1044 }
1045
1046 # Export selected Contacts to JSON.
1047 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1048 # ApiTypes::ExportFileFormats fileFormat - (default ApiTypes.ExportFileFormats.Csv)
1049 # string rule - Query used for filtering. (default None)
1050 # IEnumerable<string> emails - Comma delimited list of contact emails (default None)
1051 # bool allContacts - True: Include every Contact in your Account. Otherwise, false (default False)
1052 # ApiTypes::CompressionFormat compressionFormat - FileResponse compression format. None or Zip. (default ApiTypes.CompressionFormat.EENone)
1053 # string fileName - Name of your file. (default None)
1054 # Returns ApiTypes::ExportLink
1055 sub Export
1056 0 ▶ {
Subroutine Export: not called CC=1 SCAR=6.9
1057 0 shift;
1058 my @params = [apikey => $Api::mainApi->{apikey},
1059 0 fileFormat => shift,
1060 rule => shift,
1061 emails => shift,
1062 allContacts => shift,
1063 compressionFormat => shift,
1064 fileName => shift];
1065 0 return $Api::mainApi->Request('contact/export', "GET", \@params);
1066 }
1067
1068 # Finds all Lists and Segments this email belongs to.
1069 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1070 # string email - Proper email address.
1071 # Returns ApiTypes::ContactCollection
1072 sub FindContact
1073 0 ▶ {
Subroutine FindContact: not called CC=1 SCAR=6.9
1074 0 shift;
1075 my @params = [apikey => $Api::mainApi->{apikey},
1076 0 email => shift];
1077 0 return $Api::mainApi->Request('contact/findcontact', "GET", \@params);
1078 }
1079
1080 # List of Contacts for provided List
1081 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1082 # string listName - Name of your list.
1083 # int limit - Maximum of loaded items. (default 20)
1084 # int offset - How many items should be loaded ahead. (default 0)
1085 # Returns List<ApiTypes::Contact>
1086 sub GetContactsByList
1087 0 ▶ {
Subroutine GetContactsByList: not called CC=1 SCAR=6.9
1088 0 shift;
1089 my @params = [apikey => $Api::mainApi->{apikey},
1090 0 listName => shift,
1091 limit => shift,
1092 offset => shift];
1093 0 return $Api::mainApi->Request('contact/getcontactsbylist', "GET", \@params);
1094 }
1095
1096 # List of Contacts for provided Segment
1097 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1098 # string segmentName - Name of your segment.
1099 # int limit - Maximum of loaded items. (default 20)
1100 # int offset - How many items should be loaded ahead. (default 0)
1101 # Returns List<ApiTypes::Contact>
1102 sub GetContactsBySegment
1103 0 ▶ {
Subroutine GetContactsBySegment: not called CC=1 SCAR=6.9
1104 0 shift;
1105 my @params = [apikey => $Api::mainApi->{apikey},
1106 0 segmentName => shift,
1107 limit => shift,
1108 offset => shift];
1109 0 return $Api::mainApi->Request('contact/getcontactsbysegment', "GET", \@params);
1110 }
1111
1112 # List of all contacts. If you have not specified RULE, all Contacts will be listed.
1113 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1114 # string rule - Query used for filtering. (default None)
1115 # bool allContacts - True: Include every Contact in your Account. Otherwise, false (default False)
1116 # int limit - Maximum of loaded items. (default 20)
1117 # int offset - How many items should be loaded ahead. (default 0)
1118 # Returns List<ApiTypes::Contact>
1119 sub List
1120 0 ▶ {
Subroutine List: not called CC=1 SCAR=6.9
1121 0 shift;
1122 my @params = [apikey => $Api::mainApi->{apikey},
1123 0 rule => shift,
1124 allContacts => shift,
1125 limit => shift,
1126 offset => shift];
1127 0 return $Api::mainApi->Request('contact/list', "GET", \@params);
1128 }
1129
1130 # Load blocked contacts
1131 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1132 # IEnumerable<ApiTypes::ContactStatus> statuses - List of comma separated message statuses: 0 or all, 1 for ReadyToSend, 2 for InProgress, 4 for Bounced, 5 for Sent, 6 for Opened, 7 for Clicked, 8 for Unsubscribed, 9 for Abuse Report
1133 # string search - List of blocked statuses: Abuse, Bounced or Unsubscribed (default None)
1134 # int limit - Maximum of loaded items. (default 0)
1135 # int offset - How many items should be loaded ahead. (default 0)
1136 # Returns List<ApiTypes::BlockedContact>
1137 sub LoadBlocked
1138 0 ▶ {
Subroutine LoadBlocked: not called CC=1 SCAR=6.9
1139 0 shift;
1140 my @params = [apikey => $Api::mainApi->{apikey},
1141 0 statuses => shift,
1142 search => shift,
1143 limit => shift,
1144 offset => shift];
1145 0 return $Api::mainApi->Request('contact/loadblocked', "GET", \@params);
1146 }
1147
1148 # Load detailed contact information
1149 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1150 # string email - Proper email address.
1151 # Returns ApiTypes::Contact
1152 sub LoadContact
1153 0 ▶ {
Subroutine LoadContact: not called CC=1 SCAR=6.9
1154 0 shift;
1155 my @params = [apikey => $Api::mainApi->{apikey},
1156 0 email => shift];
1157 0 return $Api::mainApi->Request('contact/loadcontact', "GET", \@params);
1158 }
1159
1160 # Shows detailed history of chosen Contact.
1161 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1162 # string email - Proper email address.
1163 # int limit - Maximum of loaded items. (default 0)
1164 # int offset - How many items should be loaded ahead. (default 0)
1165 # Returns List<ApiTypes::ContactHistory>
1166 sub LoadHistory
1167 0 ▶ {
Subroutine LoadHistory: not called CC=1 SCAR=6.9
1168 0 shift;
1169 my @params = [apikey => $Api::mainApi->{apikey},
1170 0 email => shift,
1171 limit => shift,
1172 offset => shift];
1173 0 return $Api::mainApi->Request('contact/loadhistory', "GET", \@params);
1174 }
1175
1176 # Add new Contact to one of your Lists.
1177 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1178 # IEnumerable<string> emails - Comma delimited list of contact emails
1179 # string firstName - First name. (default None)
1180 # string lastName - Last name. (default None)
1181 # string title - Title (default None)
1182 # string organization - Name of organization (default None)
1183 # string industry - Industry contact works in (default None)
1184 # string city - City. (default None)
1185 # string country - Name of country. (default None)
1186 # string state - State or province. (default None)
1187 # string zip - Zip/postal code. (default None)
1188 # string publicListID - ID code of list (default None)
1189 # string listName - Name of your list. (default None)
1190 # ApiTypes::ContactStatus status - Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed. (default ApiTypes.ContactStatus.Active)
1191 # string notes - Free form field of notes (default None)
1192 # DateTime? consentDate - Date of consent to send this contact(s) your email. If not provided current date is used for consent. (default None)
1193 # string consentIP - IP address of consent to send this contact(s) your email. If not provided your current public IP address is used for consent. (default None)
1194 # string notifyEmail - Emails, separated by semicolon, to which the notification about contact subscribing should be sent to (default None)
1195 sub QuickAdd
1196 0 ▶ {
Subroutine QuickAdd: not called CC=1 SCAR=6.9
1197 0 shift;
1198 my @params = [apikey => $Api::mainApi->{apikey},
1199 0 emails => shift,
1200 firstName => shift,
1201 lastName => shift,
1202 title => shift,
1203 organization => shift,
1204 industry => shift,
1205 city => shift,
1206 country => shift,
1207 state => shift,
1208 zip => shift,
1209 publicListID => shift,
1210 listName => shift,
1211 status => shift,
1212 notes => shift,
1213 consentDate => shift,
1214 consentIP => shift,
1215 notifyEmail => shift];
1216 0 return $Api::mainApi->Request('contact/quickadd', "GET", \@params);
1217 }
1218
1219 # Update selected contact. Omitted contact's fields will be reset by default (see the clearRestOfFields parameter)
1220 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1221 # string email - Proper email address.
1222 # string firstName - First name. (default None)
1223 # string lastName - Last name. (default None)
1224 # string organizationName - Name of organization (default None)
1225 # string title - Title (default None)
1226 # string city - City. (default None)
1227 # string state - State or province. (default None)
1228 # string country - Name of country. (default None)
1229 # string zip - Zip/postal code. (default None)
1230 # string birthDate - Date of birth in YYYY-MM-DD format (default None)
1231 # string gender - Your gender (default None)
1232 # string phone - Phone number (default None)
1233 # bool? activate - True, if Contact should be activated. Otherwise, false (default None)
1234 # string industry - Industry contact works in (default None)
1235 # int numberOfEmployees - Number of employees (default 0)
1236 # string annualRevenue - Annual revenue of contact (default None)
1237 # int purchaseCount - Number of purchases contact has made (default 0)
1238 # string firstPurchase - Date of first purchase in YYYY-MM-DD format (default None)
1239 # string lastPurchase - Date of last purchase in YYYY-MM-DD format (default None)
1240 # string notes - Free form field of notes (default None)
1241 # string websiteUrl - Website of contact (default None)
1242 # string mobileNumber - Mobile phone number (default None)
1243 # string faxNumber - Fax number (default None)
1244 # string linkedInBio - Biography for Linked-In (default None)
1245 # int linkedInConnections - Number of Linked-In connections (default 0)
1246 # string twitterBio - Biography for Twitter (default None)
1247 # string twitterUsername - User name for Twitter (default None)
1248 # string twitterProfilePhoto - URL for Twitter photo (default None)
1249 # int twitterFollowerCount - Number of Twitter followers (default 0)
1250 # int pageViews - Number of page views (default 0)
1251 # int visits - Number of website visits (default 0)
1252 # bool clearRestOfFields - States if the fields that were omitted in this request are to be reset or should they be left with their current value (default True)
1253 # Dictionary<string, string> field - Custom contact field like firstname, lastname, city etc. Request parameters prefixed by field_ like field_firstname, field_lastname (default None)
1254 # Returns ApiTypes::Contact
1255 sub Update
1256 0 ▶ {
Subroutine Update: not called CC=1 SCAR=6.9
1257 0 shift;
1258 my @params = [apikey => $Api::mainApi->{apikey},
1259 0 email => shift,
1260 firstName => shift,
1261 lastName => shift,
1262 organizationName => shift,
1263 title => shift,
1264 city => shift,
1265 state => shift,
1266 country => shift,
1267 zip => shift,
1268 birthDate => shift,
1269 gender => shift,
1270 phone => shift,
1271 activate => shift,
1272 industry => shift,
1273 numberOfEmployees => shift,
1274 annualRevenue => shift,
1275 purchaseCount => shift,
1276 firstPurchase => shift,
1277 lastPurchase => shift,
1278 notes => shift,
1279 websiteUrl => shift,
1280 mobileNumber => shift,
1281 faxNumber => shift,
1282 linkedInBio => shift,
1283 linkedInConnections => shift,
1284 twitterBio => shift,
1285 twitterUsername => shift,
1286 twitterProfilePhoto => shift,
1287 twitterFollowerCount => shift,
1288 pageViews => shift,
1289 visits => shift,
1290 clearRestOfFields => shift,
1291 field => shift];
1292 0 return $Api::mainApi->Request('contact/update', "GET", \@params);
1293 }
1294
1295 # Upload contacts in CSV file.
1296 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1297 # File contactFile - Name of CSV file with Contacts.
1298 # bool allowUnsubscribe - True: Allow unsubscribing from this (optional) newly created list. Otherwise, false (default False)
1299 # int? listID - ID number of selected list. (default None)
1300 # string listName - Name of your list to upload contacts to, or how the new, automatically created list should be named (default None)
1301 # ApiTypes::ContactStatus status - Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed. (default ApiTypes.ContactStatus.Active)
1302 # DateTime? consentDate - Date of consent to send this contact(s) your email. If not provided current date is used for consent. (default None)
1303 # string consentIP - IP address of consent to send this contact(s) your email. If not provided your current public IP address is used for consent. (default None)
1304 # Returns int
1305 sub Upload
1306 0 ▶ {
Subroutine Upload: not called CC=1 SCAR=6.9
1307 0 shift;
1308 my @params = [apikey => $Api::mainApi->{apikey},
1309 0 allowUnsubscribe => shift,
1310 listID => shift,
1311 listName => shift,
1312 status => shift,
1313 consentDate => shift,
1314 consentIP => shift];
1315 0 return $Api::mainApi->Request('contact/upload', "POST", \@params, \@_);
1316 }
1317
1318
1319 #
1320 # Managing sender domains. Creating new entries and validating domain records.
1321 #
1322 package Api::Domain;
1323
1324 # Add new domain to account
1325 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1326 # string domain - Name of selected domain.
1327 # ApiTypes::TrackingType trackingType - (default ApiTypes.TrackingType.Http)
1328 sub Add
1329 0 ▶ {
Subroutine Add: not called CC=1 SCAR=6.9
1330 0 shift;
1331 my @params = [apikey => $Api::mainApi->{apikey},
1332 0 domain => shift,
1333 trackingType => shift];
1334 0 return $Api::mainApi->Request('domain/add', "GET", \@params);
1335 }
1336
1337 # Deletes configured domain from account
1338 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1339 # string domain - Name of selected domain.
1340 sub Delete
1341 0 ▶ {
Subroutine Delete: not called CC=1 SCAR=6.9
1342 0 shift;
1343 my @params = [apikey => $Api::mainApi->{apikey},
1344 0 domain => shift];
1345 0 return $Api::mainApi->Request('domain/delete', "GET", \@params);
1346 }
1347
1348 # Lists all domains configured for this account.
1349 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1350 # Returns List<ApiTypes::DomainDetail>
1351 sub List
1352 0 ▶ {
Subroutine List: not called CC=1 SCAR=6.9
1353 0 shift;
1354 0 my @params = [apikey => $Api::mainApi->{apikey}];
1355 0 return $Api::mainApi->Request('domain/list', "GET", \@params);
1356 }
1357
1358 # Verification of email addres set for domain.
1359 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1360 # string domain - Default email sender, example: mail@yourdomain.com
1361 sub SetDefault
1362 0 ▶ {
Subroutine SetDefault: not called CC=1 SCAR=6.9
1363 0 shift;
1364 my @params = [apikey => $Api::mainApi->{apikey},
1365 0 domain => shift];
1366 0 return $Api::mainApi->Request('domain/setdefault', "GET", \@params);
1367 }
1368
1369 # Verification of DKIM record for domain
1370 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1371 # string domain - Name of selected domain.
1372 sub VerifyDkim
1373 0 ▶ {
Subroutine VerifyDkim: not called CC=1 SCAR=6.9
1374 0 shift;
1375 my @params = [apikey => $Api::mainApi->{apikey},
1376 0 domain => shift];
1377 0 return $Api::mainApi->Request('domain/verifydkim', "GET", \@params);
1378 }
1379
1380 # Verification of MX record for domain
1381 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1382 # string domain - Name of selected domain.
1383 sub VerifyMX
1384 0 ▶ {
Subroutine VerifyMX: not called CC=1 SCAR=6.9
1385 0 shift;
1386 my @params = [apikey => $Api::mainApi->{apikey},
1387 0 domain => shift];
1388 0 return $Api::mainApi->Request('domain/verifymx', "GET", \@params);
1389 }
1390
1391 # Verification of SPF record for domain
1392 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1393 # string domain - Name of selected domain.
1394 sub VerifySpf
1395 0 ▶ {
Subroutine VerifySpf: not called CC=1 SCAR=6.9
1396 0 shift;
1397 my @params = [apikey => $Api::mainApi->{apikey},
1398 0 domain => shift];
1399 0 return $Api::mainApi->Request('domain/verifyspf', "GET", \@params);
1400 }
1401
1402 # Verification of tracking CNAME record for domain
1403 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1404 # string domain - Name of selected domain.
1405 # ApiTypes::TrackingType trackingType - (default ApiTypes.TrackingType.Http)
1406 sub VerifyTracking
1407 0 ▶ {
Subroutine VerifyTracking: not called CC=1 SCAR=6.9
1408 0 shift;
1409 my @params = [apikey => $Api::mainApi->{apikey},
1410 0 domain => shift,
1411 trackingType => shift];
1412 0 return $Api::mainApi->Request('domain/verifytracking', "GET", \@params);
1413 }
1414
1415
1416 #
1417 #
1418 #
1419 package Api::Eksport;
1420
1421 # Check the current status of the export.
1422 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1423 # Guid publicExportID -
1424 # Returns ApiTypes::ExportStatus
1425 sub CheckStatus
1426 0 ▶ {
Subroutine CheckStatus: not called CC=1 SCAR=6.9
1427 0 shift;
1428 my @params = [apikey => $Api::mainApi->{apikey},
1429 0 publicExportID => shift];
1430 0 return $Api::mainApi->Request('eksport/checkstatus', "GET", \@params);
1431 }
1432
1433 # Summary of export type counts.
1434 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1435 # Returns ApiTypes::ExportTypeCounts
1436 sub CountByType
1437 0 ▶ {
Subroutine CountByType: not called CC=1 SCAR=6.9
1438 0 shift;
1439 0 my @params = [apikey => $Api::mainApi->{apikey}];
1440 0 return $Api::mainApi->Request('eksport/countbytype', "GET", \@params);
1441 }
1442
1443 # Delete the specified export.
1444 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1445 # Guid publicExportID -
1446 sub Delete
1447 0 ▶ {
Subroutine Delete: not called CC=1 SCAR=6.9
1448 0 shift;
1449 my @params = [apikey => $Api::mainApi->{apikey},
1450 0 publicExportID => shift];
1451 0 return $Api::mainApi->Request('eksport/delete', "GET", \@params);
1452 }
1453
1454 # Returns a list of all exported data.
1455 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1456 # int limit - Maximum of loaded items. (default 0)
1457 # int offset - How many items should be loaded ahead. (default 0)
1458 # Returns List<ApiTypes::Export>
1459 sub List
1460 0 ▶ {
Subroutine List: not called CC=1 SCAR=6.9
1461 0 shift;
1462 my @params = [apikey => $Api::mainApi->{apikey},
1463 0 limit => shift,
1464 offset => shift];
1465 0 return $Api::mainApi->Request('eksport/list', "GET", \@params);
1466 }
1467
1468
1469 #
1470 #
1471 #
1472 package Api::Email;
1473
1474 # Get email batch status
1475 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1476 # string transactionID - Transaction identifier
1477 # bool showFailed - Include Bounced email addresses. (default False)
1478 # bool showDelivered - Include Sent email addresses. (default False)
1479 # bool showPending - Include Ready to send email addresses. (default False)
1480 # bool showOpened - Include Opened email addresses. (default False)
1481 # bool showClicked - Include Clicked email addresses. (default False)
1482 # bool showAbuse - Include Reported as abuse email addresses. (default False)
1483 # bool showUnsubscribed - Include Unsubscribed email addresses. (default False)
1484 # bool showErrors - Include error messages for bounced emails. (default False)
1485 # bool showMessageIDs - Include all MessageIDs for this transaction (default False)
1486 # Returns ApiTypes::EmailJobStatus
1487 sub GetStatus
1488 0 ▶ {
Subroutine GetStatus: not called CC=1 SCAR=6.9
1489 0 shift;
1490 my @params = [apikey => $Api::mainApi->{apikey},
1491 0 transactionID => shift,
1492 showFailed => shift,
1493 showDelivered => shift,
1494 showPending => shift,
1495 showOpened => shift,
1496 showClicked => shift,
1497 showAbuse => shift,
1498 showUnsubscribed => shift,
1499 showErrors => shift,
1500 showMessageIDs => shift];
1501 0 return $Api::mainApi->Request('email/getstatus', "GET", \@params);
1502 }
1503
1504 # Submit emails. The HTTP POST request is suggested. The default, maximum (accepted by us) size of an email is 10 MB in total, with or without attachments included. For suggested implementations please refer to https://elasticemail.com/support/http-api/
1505 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1506 # string subject - Email subject (default None)
1507 # string from - From email address (default None)
1508 # string fromName - Display name for from email address (default None)
1509 # string sender - Email address of the sender (default None)
1510 # string senderName - Display name sender (default None)
1511 # string msgFrom - Optional parameter. Sets FROM MIME header. (default None)
1512 # string msgFromName - Optional parameter. Sets FROM name of MIME header. (default None)
1513 # string replyTo - Email address to reply to (default None)
1514 # string replyToName - Display name of the reply to address (default None)
1515 # IEnumerable<string> to - List of email recipients (each email is treated separately, like a BCC). Separated by comma or semicolon. We suggest using the "msgTo" parameter if backward compatibility with API version 1 is not a must. (default None)
1516 # string[] msgTo - Optional parameter. Will be ignored if the 'to' parameter is also provided. List of email recipients (visible to all other recipients of the message as TO MIME header). Separated by comma or semicolon. (default None)
1517 # string[] msgCC - Optional parameter. Will be ignored if the 'to' parameter is also provided. List of email recipients (visible to all other recipients of the message as CC MIME header). Separated by comma or semicolon. (default None)
1518 # string[] msgBcc - Optional parameter. Will be ignored if the 'to' parameter is also provided. List of email recipients (each email is treated seperately). Separated by comma or semicolon. (default None)
1519 # IEnumerable<string> lists - The name of a contact list you would like to send to. Separate multiple contact lists by commas or semicolons. (default None)
1520 # IEnumerable<string> segments - The name of a segment you would like to send to. Separate multiple segments by comma or semicolon. Insert "0" for all Active contacts. (default None)
1521 # string mergeSourceFilename - File name one of attachments which is a CSV list of Recipients. (default None)
1522 # string channel - An ID field (max 191 chars) that can be used for reporting [will default to HTTP API or SMTP API] (default None)
1523 # string bodyHtml - Html email body (default None)
1524 # string bodyText - Text email body (default None)
1525 # string charset - Text value of charset encoding for example: iso-8859-1, windows-1251, utf-8, us-ascii, windows-1250 and more… (default None)
1526 # string charsetBodyHtml - Sets charset for body html MIME part (overrides default value from charset parameter) (default None)
1527 # string charsetBodyText - Sets charset for body text MIME part (overrides default value from charset parameter) (default None)
1528 # ApiTypes::EncodingType encodingType - 0 for None, 1 for Raw7Bit, 2 for Raw8Bit, 3 for QuotedPrintable, 4 for Base64 (Default), 5 for Uue note that you can also provide the text version such as "Raw7Bit" for value 1. NOTE: Base64 or QuotedPrintable is recommended if you are validating your domain(s) with DKIM. (default ApiTypes.EncodingType.EENone)
1529 # string template - The name of an email template you have created in your account. (default None)
1530 # IEnumerableFile attachmentFiles - Attachment files. These files should be provided with the POST multipart file upload, not directly in the request's URL. Should also include merge CSV file (default None)
1531 # Dictionary<string, string> headers - Optional Custom Headers. Request parameters prefixed by headers_ like headers_customheader1, headers_customheader2. Note: a space is required after the colon before the custom header value. headers_xmailer=xmailer: header-value1 (default None)
1532 # string postBack - Optional header returned in notifications. (default None)
1533 # Dictionary<string, string> merge - Request parameters prefixed by merge_ like merge_firstname, merge_lastname. If sending to a template you can send merge_ fields to merge data with the template. Template fields are entered with {firstname}, {lastname} etc. (default None)
1534 # string timeOffSetMinutes - Number of minutes in the future this email should be sent (default None)
1535 # string poolName - Name of your custom IP Pool to be used in the sending process (default None)
1536 # bool isTransactional - True, if email is transactional (non-bulk, non-marketing, non-commercial). Otherwise, false (default False)
1537 # Returns ApiTypes::EmailSend
1538 sub Send
1539 0 ▶ {
Subroutine Send: not called CC=1 SCAR=6.9
1540 0 shift;
1541 my @params = [apikey => $Api::mainApi->{apikey},
1542 0 subject => shift,
1543 from => shift,
1544 fromName => shift,
1545 sender => shift,
1546 senderName => shift,
1547 msgFrom => shift,
1548 msgFromName => shift,
1549 replyTo => shift,
1550 replyToName => shift,
1551 to => shift,
1552 msgTo => shift,
1553 msgCC => shift,
1554 msgBcc => shift,
1555 lists => shift,
1556 segments => shift,
1557 mergeSourceFilename => shift,
1558 channel => shift,
1559 bodyHtml => shift,
1560 bodyText => shift,
1561 charset => shift,
1562 charsetBodyHtml => shift,
1563 charsetBodyText => shift,
1564 encodingType => shift,
1565 template => shift,
1566 headers => shift,
1567 postBack => shift,
1568 merge => shift,
1569 timeOffSetMinutes => shift,
1570 poolName => shift,
1571 isTransactional => shift];
1572 0 return $Api::mainApi->Request('email/send', "POST", \@params, \@_);
1573 }
1574
1575 # Detailed status of a unique email sent through your account. Returns a 'Email has expired and the status is unknown.' error, if the email has not been fully processed yet.
1576 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1577 # string messageID - Unique identifier for this email.
1578 # Returns ApiTypes::EmailStatus
1579 sub Status
1580 0 ▶ {
Subroutine Status: not called CC=1 SCAR=6.9
1581 0 shift;
1582 my @params = [apikey => $Api::mainApi->{apikey},
1583 0 messageID => shift];
1584 0 return $Api::mainApi->Request('email/status', "GET", \@params);
1585 }
1586
1587 # View email
1588 # string messageID - Message identifier
1589 # Returns ApiTypes::EmailView
1590 sub View
1591 0 ▶ {
Subroutine View: not called CC=1 SCAR=6.9
1592 0 shift;
1593 0 my @params = [messageID => shift];
1594 0 return $Api::mainApi->Request('email/view', "GET", \@params);
1595 }
1596
1597
1598 #
1599 # API methods for managing your Lists
1600 #
1601 package Api::List;
1602
1603 # Create new list, based on filtering rule or list of IDs
1604 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1605 # string listName - Name of your list.
1606 # bool createEmptyList - True to create an empty list, otherwise false. Ignores rule and emails parameters if provided. (default False)
1607 # bool allowUnsubscribe - True: Allow unsubscribing from this list. Otherwise, false (default False)
1608 # string rule - Query used for filtering. (default None)
1609 # IEnumerable<string> emails - Comma delimited list of contact emails (default None)
1610 # bool allContacts - True: Include every Contact in your Account. Otherwise, false (default False)
1611 # Returns int
1612 sub Add
1613 0 ▶ {
Subroutine Add: not called CC=1 SCAR=6.9
1614 0 shift;
1615 my @params = [apikey => $Api::mainApi->{apikey},
1616 0 listName => shift,
1617 createEmptyList => shift,
1618 allowUnsubscribe => shift,
1619 rule => shift,
1620 emails => shift,
1621 allContacts => shift];
1622 0 return $Api::mainApi->Request('list/add', "GET", \@params);
1623 }
1624
1625 # Add Contacts to chosen list
1626 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1627 # string listName - Name of your list.
1628 # string rule - Query used for filtering. (default None)
1629 # IEnumerable<string> emails - Comma delimited list of contact emails (default None)
1630 # bool allContacts - True: Include every Contact in your Account. Otherwise, false (default False)
1631 sub AddContacts
1632 0 ▶ {
Subroutine AddContacts: not called CC=1 SCAR=6.9
1633 0 shift;
1634 my @params = [apikey => $Api::mainApi->{apikey},
1635 0 listName => shift,
1636 rule => shift,
1637 emails => shift,
1638 allContacts => shift];
1639 0 return $Api::mainApi->Request('list/addcontacts', "GET", \@params);
1640 }
1641
1642 # Copy your existing List with the option to provide new settings to it. Some fields, when left empty, default to the source list's settings
1643 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1644 # string sourceListName - The name of the list you want to copy
1645 # string newlistName - Name of your list if you want to change it. (default None)
1646 # bool? createEmptyList - True to create an empty list, otherwise false. Ignores rule and emails parameters if provided. (default None)
1647 # bool? allowUnsubscribe - True: Allow unsubscribing from this list. Otherwise, false (default None)
1648 # string rule - Query used for filtering. (default None)
1649 # Returns int
1650 sub Copy
1651 0 ▶ {
Subroutine Copy: not called CC=1 SCAR=6.9
1652 0 shift;
1653 my @params = [apikey => $Api::mainApi->{apikey},
1654 0 sourceListName => shift,
1655 newlistName => shift,
1656 createEmptyList => shift,
1657 allowUnsubscribe => shift,
1658 rule => shift];
1659 0 return $Api::mainApi->Request('list/copy', "GET", \@params);
1660 }
1661
1662 # Create a new list from the recipients of the given campaign, using the given statuses of Messages
1663 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1664 # int campaignID - ID of the campaign which recipients you want to copy
1665 # string listName - Name of your list.
1666 # IEnumerable<ApiTypes::LogJobStatus> statuses - Statuses of a campaign's emails you want to include in the new list (but NOT the contacts' statuses) (default None)
1667 # Returns int
1668 sub CreateFromCampaign
1669 0 ▶ {
Subroutine CreateFromCampaign: not called CC=1 SCAR=6.9
1670 0 shift;
1671 my @params = [apikey => $Api::mainApi->{apikey},
1672 0 campaignID => shift,
1673 listName => shift,
1674 statuses => shift];
1675 0 return $Api::mainApi->Request('list/createfromcampaign', "GET", \@params);
1676 }
1677
1678 # Create a series of nth selection lists from an existing list or segment
1679 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1680 # string listName - Name of your list.
1681 # int numberOfLists - The number of evenly distributed lists to create.
1682 # bool excludeBlocked - True if you want to exclude contacts that are currently in a blocked status of either unsubscribe, complaint or bounce. Otherwise, false. (default True)
1683 # bool allowUnsubscribe - True: Allow unsubscribing from this list. Otherwise, false (default False)
1684 # string rule - Query used for filtering. (default None)
1685 # bool allContacts - True: Include every Contact in your Account. Otherwise, false (default False)
1686 sub CreateNthSelectionLists
1687 0 ▶ {
Subroutine CreateNthSelectionLists: not called CC=1 SCAR=6.9
1688 0 shift;
1689 my @params = [apikey => $Api::mainApi->{apikey},
1690 0 listName => shift,
1691 numberOfLists => shift,
1692 excludeBlocked => shift,
1693 allowUnsubscribe => shift,
1694 rule => shift,
1695 allContacts => shift];
1696 0 return $Api::mainApi->Request('list/createnthselectionlists', "GET", \@params);
1697 }
1698
1699 # Create a new list with randomized contacts from an existing list or segment
1700 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1701 # string listName - Name of your list.
1702 # int count - Number of items.
1703 # bool excludeBlocked - True if you want to exclude contacts that are currently in a blocked status of either unsubscribe, complaint or bounce. Otherwise, false. (default True)
1704 # bool allowUnsubscribe - True: Allow unsubscribing from this list. Otherwise, false (default False)
1705 # string rule - Query used for filtering. (default None)
1706 # bool allContacts - True: Include every Contact in your Account. Otherwise, false (default False)
1707 # Returns int
1708 sub CreateRandomList
1709 0 ▶ {
Subroutine CreateRandomList: not called CC=1 SCAR=6.9
1710 0 shift;
1711 my @params = [apikey => $Api::mainApi->{apikey},
1712 0 listName => shift,
1713 count => shift,
1714 excludeBlocked => shift,
1715 allowUnsubscribe => shift,
1716 rule => shift,
1717 allContacts => shift];
1718 0 return $Api::mainApi->Request('list/createrandomlist', "GET", \@params);
1719 }
1720
1721 # Deletes List and removes all the Contacts from it (does not delete Contacts).
1722 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1723 # string listName - Name of your list.
1724 sub Delete
1725 0 ▶ {
Subroutine Delete: not called CC=1 SCAR=6.9
1726 0 shift;
1727 my @params = [apikey => $Api::mainApi->{apikey},
1728 0 listName => shift];
1729 0 return $Api::mainApi->Request('list/delete', "GET", \@params);
1730 }
1731
1732 # Exports all the contacts from the provided list
1733 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1734 # string listName - Name of your list.
1735 # ApiTypes::ExportFileFormats fileFormat - (default ApiTypes.ExportFileFormats.Csv)
1736 # ApiTypes::CompressionFormat compressionFormat - FileResponse compression format. None or Zip. (default ApiTypes.CompressionFormat.EENone)
1737 # string fileName - Name of your file. (default None)
1738 # Returns ApiTypes::ExportLink
1739 sub Export
1740 0 ▶ {
Subroutine Export: not called CC=1 SCAR=6.9
1741 0 shift;
1742 my @params = [apikey => $Api::mainApi->{apikey},
1743 0 listName => shift,
1744 fileFormat => shift,
1745 compressionFormat => shift,
1746 fileName => shift];
1747 0 return $Api::mainApi->Request('list/export', "GET", \@params);
1748 }
1749
1750 # Shows all your existing lists
1751 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1752 # DateTime? from - Starting date for search in YYYY-MM-DDThh:mm:ss format. (default None)
1753 # DateTime? to - Ending date for search in YYYY-MM-DDThh:mm:ss format. (default None)
1754 # Returns List<ApiTypes::List>
1755 sub list
1756 0 ▶ {
Subroutine list: not called CC=1 SCAR=6.9
1757 0 shift;
1758 my @params = [apikey => $Api::mainApi->{apikey},
1759 0 from => shift,
1760 to => shift];
1761 0 return $Api::mainApi->Request('list/list', "GET", \@params);
1762 }
1763
1764 # Returns detailed information about specific list.
1765 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1766 # string listName - Name of your list.
1767 # Returns ApiTypes::List
1768 sub Load
1769 0 ▶ {
Subroutine Load: not called CC=1 SCAR=6.9
1770 0 shift;
1771 my @params = [apikey => $Api::mainApi->{apikey},
1772 0 listName => shift];
1773 0 return $Api::mainApi->Request('list/load', "GET", \@params);
1774 }
1775
1776 # Move selected contacts from one List to another
1777 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1778 # string oldListName - The name of the list from which the contacts will be copied from
1779 # string newListName - The name of the list to copy the contacts to
1780 # IEnumerable<string> emails - Comma delimited list of contact emails (default None)
1781 # bool? moveAll - TRUE - moves all contacts; FALSE - moves contacts provided in the 'emails' parameter. This is ignored if the 'statuses' parameter has been provided (default None)
1782 # IEnumerable<ApiTypes::ContactStatus> statuses - List of contact statuses which are eligible to move. This ignores the 'moveAll' parameter (default None)
1783 sub MoveContacts
1784 0 ▶ {
Subroutine MoveContacts: not called CC=1 SCAR=6.9
1785 0 shift;
1786 my @params = [apikey => $Api::mainApi->{apikey},
1787 0 oldListName => shift,
1788 newListName => shift,
1789 emails => shift,
1790 moveAll => shift,
1791 statuses => shift];
1792 0 return $Api::mainApi->Request('list/movecontacts', "GET", \@params);
1793 }
1794
1795 # Remove selected Contacts from your list
1796 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1797 # string listName - Name of your list.
1798 # string rule - Query used for filtering. (default None)
1799 # IEnumerable<string> emails - Comma delimited list of contact emails (default None)
1800 sub RemoveContacts
1801 0 ▶ {
Subroutine RemoveContacts: not called CC=1 SCAR=6.9
1802 0 shift;
1803 my @params = [apikey => $Api::mainApi->{apikey},
1804 0 listName => shift,
1805 rule => shift,
1806 emails => shift];
1807 0 return $Api::mainApi->Request('list/removecontacts', "GET", \@params);
1808 }
1809
1810 # Update existing list
1811 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1812 # string listName - Name of your list.
1813 # string newListName - Name of your list if you want to change it. (default None)
1814 # bool allowUnsubscribe - True: Allow unsubscribing from this list. Otherwise, false (default False)
1815 sub Update
1816 0 ▶ {
Subroutine Update: not called CC=1 SCAR=6.9
1817 0 shift;
1818 my @params = [apikey => $Api::mainApi->{apikey},
1819 0 listName => shift,
1820 newListName => shift,
1821 allowUnsubscribe => shift];
1822 0 return $Api::mainApi->Request('list/update', "GET", \@params);
1823 }
1824
1825
1826 #
1827 # Methods to check logs of your campaigns
1828 #
1829 package Api::Log;
1830
1831 # Cancels emails that are waiting to be sent.
1832 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1833 # string channelName - Name of selected channel. (default None)
1834 # string transactionID - ID number of transaction (default None)
1835 sub CancelInProgress
1836 0 ▶ {
Subroutine CancelInProgress: not called CC=1 SCAR=6.9
1837 0 shift;
1838 my @params = [apikey => $Api::mainApi->{apikey},
1839 0 channelName => shift,
1840 transactionID => shift];
1841 0 return $Api::mainApi->Request('log/cancelinprogress', "GET", \@params);
1842 }
1843
1844 # Export email log information to the specified file format.
1845 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1846 # IEnumerable<ApiTypes::LogJobStatus> statuses - List of comma separated message statuses: 0 or all, 1 for ReadyToSend, 2 for InProgress, 4 for Bounced, 5 for Sent, 6 for Opened, 7 for Clicked, 8 for Unsubscribed, 9 for Abuse Report
1847 # ApiTypes::ExportFileFormats fileFormat - (default ApiTypes.ExportFileFormats.Csv)
1848 # DateTime? from - Start date. (default None)
1849 # DateTime? to - End date. (default None)
1850 # int channelID - ID number of selected Channel. (default 0)
1851 # int limit - Maximum of loaded items. (default 0)
1852 # int offset - How many items should be loaded ahead. (default 0)
1853 # bool includeEmail - True: Search includes emails. Otherwise, false. (default True)
1854 # bool includeSms - True: Search includes SMS. Otherwise, false. (default True)
1855 # IEnumerable<ApiTypes::MessageCategory> messageCategory - ID of message category (default None)
1856 # ApiTypes::CompressionFormat compressionFormat - FileResponse compression format. None or Zip. (default ApiTypes.CompressionFormat.EENone)
1857 # string fileName - Name of your file. (default None)
1858 # string email - Proper email address. (default None)
1859 # Returns ApiTypes::ExportLink
1860 sub Export
1861 0 ▶ {
Subroutine Export: not called CC=1 SCAR=6.9
1862 0 shift;
1863 my @params = [apikey => $Api::mainApi->{apikey},
1864 0 statuses => shift,
1865 fileFormat => shift,
1866 from => shift,
1867 to => shift,
1868 channelID => shift,
1869 limit => shift,
1870 offset => shift,
1871 includeEmail => shift,
1872 includeSms => shift,
1873 messageCategory => shift,
1874 compressionFormat => shift,
1875 fileName => shift,
1876 email => shift];
1877 0 return $Api::mainApi->Request('log/export', "GET", \@params);
1878 }
1879
1880 # Export detailed link tracking information to the specified file format.
1881 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1882 # int channelID - ID number of selected Channel.
1883 # DateTime? from - Start date.
1884 # DateTime? to - End Date.
1885 # ApiTypes::ExportFileFormats fileFormat - (default ApiTypes.ExportFileFormats.Csv)
1886 # int limit - Maximum of loaded items. (default 0)
1887 # int offset - How many items should be loaded ahead. (default 0)
1888 # ApiTypes::CompressionFormat compressionFormat - FileResponse compression format. None or Zip. (default ApiTypes.CompressionFormat.EENone)
1889 # string fileName - Name of your file. (default None)
1890 # Returns ApiTypes::ExportLink
1891 sub ExportLinkTracking
1892 0 ▶ {
Subroutine ExportLinkTracking: not called CC=1 SCAR=6.9
1893 0 shift;
1894 my @params = [apikey => $Api::mainApi->{apikey},
1895 0 channelID => shift,
1896 from => shift,
1897 to => shift,
1898 fileFormat => shift,
1899 limit => shift,
1900 offset => shift,
1901 compressionFormat => shift,
1902 fileName => shift];
1903 0 return $Api::mainApi->Request('log/exportlinktracking', "GET", \@params);
1904 }
1905
1906 # Track link clicks
1907 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1908 # DateTime? from - Starting date for search in YYYY-MM-DDThh:mm:ss format. (default None)
1909 # DateTime? to - Ending date for search in YYYY-MM-DDThh:mm:ss format. (default None)
1910 # int limit - Maximum of loaded items. (default 0)
1911 # int offset - How many items should be loaded ahead. (default 0)
1912 # string channelName - Name of selected channel. (default None)
1913 # Returns ApiTypes::LinkTrackingDetails
1914 sub LinkTracking
1915 0 ▶ {
Subroutine LinkTracking: not called CC=1 SCAR=6.9
1916 0 shift;
1917 my @params = [apikey => $Api::mainApi->{apikey},
1918 0 from => shift,
1919 to => shift,
1920 limit => shift,
1921 offset => shift,
1922 channelName => shift];
1923 0 return $Api::mainApi->Request('log/linktracking', "GET", \@params);
1924 }
1925
1926 # Returns logs filtered by specified parameters.
1927 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1928 # IEnumerable<ApiTypes::LogJobStatus> statuses - List of comma separated message statuses: 0 or all, 1 for ReadyToSend, 2 for InProgress, 4 for Bounced, 5 for Sent, 6 for Opened, 7 for Clicked, 8 for Unsubscribed, 9 for Abuse Report
1929 # DateTime? from - Starting date for search in YYYY-MM-DDThh:mm:ss format. (default None)
1930 # DateTime? to - Ending date for search in YYYY-MM-DDThh:mm:ss format. (default None)
1931 # string channelName - Name of selected channel. (default None)
1932 # int limit - Maximum of loaded items. (default 0)
1933 # int offset - How many items should be loaded ahead. (default 0)
1934 # bool includeEmail - True: Search includes emails. Otherwise, false. (default True)
1935 # bool includeSms - True: Search includes SMS. Otherwise, false. (default True)
1936 # IEnumerable<ApiTypes::MessageCategory> messageCategory - ID of message category (default None)
1937 # string email - Proper email address. (default None)
1938 # bool useStatusChangeDate - True, if 'from' and 'to' parameters should resolve to the Status Change date. To resolve to the creation date - false (default False)
1939 # Returns ApiTypes::Log
1940 sub Load
1941 0 ▶ {
Subroutine Load: not called CC=1 SCAR=6.9
1942 0 shift;
1943 my @params = [apikey => $Api::mainApi->{apikey},
1944 0 statuses => shift,
1945 from => shift,
1946 to => shift,
1947 channelName => shift,
1948 limit => shift,
1949 offset => shift,
1950 includeEmail => shift,
1951 includeSms => shift,
1952 messageCategory => shift,
1953 email => shift,
1954 useStatusChangeDate => shift];
1955 0 return $Api::mainApi->Request('log/load', "GET", \@params);
1956 }
1957
1958 # Retry sending of temporarily not delivered message.
1959 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1960 # string msgID - ID number of selected message.
1961 sub RetryNow
1962 0 ▶ {
Subroutine RetryNow: not called CC=1 SCAR=6.9
1963 0 shift;
1964 my @params = [apikey => $Api::mainApi->{apikey},
1965 0 msgID => shift];
1966 0 return $Api::mainApi->Request('log/retrynow', "GET", \@params);
1967 }
1968
1969 # Loads summary information about activity in chosen date range.
1970 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1971 # DateTime from - Starting date for search in YYYY-MM-DDThh:mm:ss format.
1972 # DateTime to - Ending date for search in YYYY-MM-DDThh:mm:ss format.
1973 # string channelName - Name of selected channel. (default None)
1974 # string interval - 'Hourly' for detailed information, 'summary' for daily overview (default "summary")
1975 # string transactionID - ID number of transaction (default None)
1976 # Returns ApiTypes::LogSummary
1977 sub Summary
1978 0 ▶ {
Subroutine Summary: not called CC=1 SCAR=6.9
1979 0 shift;
1980 my @params = [apikey => $Api::mainApi->{apikey},
1981 0 from => shift,
1982 to => shift,
1983 channelName => shift,
1984 interval => shift,
1985 transactionID => shift];
1986 0 return $Api::mainApi->Request('log/summary', "GET", \@params);
1987 }
1988
1989
1990 #
1991 # Manages your segments - dynamically created lists of contacts
1992 #
1993 package Api::Segment;
1994
1995 # Create new segment, based on specified RULE.
1996 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
1997 # string segmentName - Name of your segment.
1998 # string rule - Query used for filtering.
1999 # Returns ApiTypes::Segment
2000 sub Add
2001 0 ▶ {
Subroutine Add: not called CC=1 SCAR=6.9
2002 0 shift;
2003 my @params = [apikey => $Api::mainApi->{apikey},
2004 0 segmentName => shift,
2005 rule => shift];
2006 0 return $Api::mainApi->Request('segment/add', "GET", \@params);
2007 }
2008
2009 # Copy your existing Segment with the optional new rule and custom name
2010 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2011 # string sourceSegmentName - The name of the segment you want to copy
2012 # string newSegmentName - New name of your segment if you want to change it. (default None)
2013 # string rule - Query used for filtering. (default None)
2014 # Returns ApiTypes::Segment
2015 sub Copy
2016 0 ▶ {
Subroutine Copy: not called CC=1 SCAR=6.9
2017 0 shift;
2018 my @params = [apikey => $Api::mainApi->{apikey},
2019 0 sourceSegmentName => shift,
2020 newSegmentName => shift,
2021 rule => shift];
2022 0 return $Api::mainApi->Request('segment/copy', "GET", \@params);
2023 }
2024
2025 # Delete existing segment.
2026 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2027 # string segmentName - Name of your segment.
2028 sub Delete
2029 0 ▶ {
Subroutine Delete: not called CC=1 SCAR=6.9
2030 0 shift;
2031 my @params = [apikey => $Api::mainApi->{apikey},
2032 0 segmentName => shift];
2033 0 return $Api::mainApi->Request('segment/delete', "GET", \@params);
2034 }
2035
2036 # Exports all the contacts from the provided segment
2037 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2038 # string segmentName - Name of your segment.
2039 # ApiTypes::ExportFileFormats fileFormat - (default ApiTypes.ExportFileFormats.Csv)
2040 # ApiTypes::CompressionFormat compressionFormat - FileResponse compression format. None or Zip. (default ApiTypes.CompressionFormat.EENone)
2041 # string fileName - Name of your file. (default None)
2042 # Returns ApiTypes::ExportLink
2043 sub Export
2044 0 ▶ {
Subroutine Export: not called CC=1 SCAR=6.9
2045 0 shift;
2046 my @params = [apikey => $Api::mainApi->{apikey},
2047 0 segmentName => shift,
2048 fileFormat => shift,
2049 compressionFormat => shift,
2050 fileName => shift];
2051 0 return $Api::mainApi->Request('segment/export', "GET", \@params);
2052 }
2053
2054 # Lists all your available Segments
2055 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2056 # bool includeHistory - True: Include history of last 30 days. Otherwise, false. (default False)
2057 # DateTime? from - From what date should the segment history be shown (default None)
2058 # DateTime? to - To what date should the segment history be shown (default None)
2059 # Returns List<ApiTypes::Segment>
2060 sub List
2061 0 ▶ {
Subroutine List: not called CC=1 SCAR=6.9
2062 0 shift;
2063 my @params = [apikey => $Api::mainApi->{apikey},
2064 0 includeHistory => shift,
2065 from => shift,
2066 to => shift];
2067 0 return $Api::mainApi->Request('segment/list', "GET", \@params);
2068 }
2069
2070 # Lists your available Segments using the provided names
2071 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2072 # IEnumerable<string> segmentNames - Names of segments you want to load. Will load all contacts if left empty or the 'All Contacts' name has been provided
2073 # bool includeHistory - True: Include history of last 30 days. Otherwise, false. (default False)
2074 # DateTime? from - From what date should the segment history be shown (default None)
2075 # DateTime? to - To what date should the segment history be shown (default None)
2076 # Returns List<ApiTypes::Segment>
2077 sub LoadByName
2078 0 ▶ {
Subroutine LoadByName: not called CC=1 SCAR=6.9
2079 0 shift;
2080 my @params = [apikey => $Api::mainApi->{apikey},
2081 0 segmentNames => shift,
2082 includeHistory => shift,
2083 from => shift,
2084 to => shift];
2085 0 return $Api::mainApi->Request('segment/loadbyname', "GET", \@params);
2086 }
2087
2088 # Rename or change RULE for your segment
2089 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2090 # string segmentName - Name of your segment.
2091 # string newSegmentName - New name of your segment if you want to change it. (default None)
2092 # string rule - Query used for filtering. (default None)
2093 # Returns ApiTypes::Segment
2094 sub Update
2095 0 ▶ {
Subroutine Update: not called CC=1 SCAR=6.9
2096 0 shift;
2097 my @params = [apikey => $Api::mainApi->{apikey},
2098 0 segmentName => shift,
2099 newSegmentName => shift,
2100 rule => shift];
2101 0 return $Api::mainApi->Request('segment/update', "GET", \@params);
2102 }
2103
2104
2105 #
2106 # Managing texting to your clients.
2107 #
2108 package Api::SMS;
2109
2110 # Send a short SMS Message (maximum of 1600 characters) to any mobile phone.
2111 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2112 # string to - Mobile number you want to message. Can be any valid mobile number in E.164 format. To provide the country code you need to provide "+" before the number. If your URL is not encoded then you need to replace the "+" with "%2B" instead.
2113 # string body - Body of your message. The maximum body length is 160 characters. If the message body is greater than 160 characters it is split into multiple messages and you are charged per message for the number of message required to send your length
2114 sub Send
2115 0 ▶ {
Subroutine Send: not called CC=1 SCAR=6.9
2116 0 shift;
2117 my @params = [apikey => $Api::mainApi->{apikey},
2118 0 to => shift,
2119 body => shift];
2120 0 return $Api::mainApi->Request('sms/send', "GET", \@params);
2121 }
2122
2123
2124 #
2125 # Methods to organize and get results of your surveys
2126 #
2127 package Api::Survey;
2128
2129 # Adds a new survey
2130 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2131 # ApiTypes::Survey survey - Json representation of a survey
2132 # Returns ApiTypes::Survey
2133 sub Add
2134 0 ▶ {
Subroutine Add: not called CC=1 SCAR=6.9
2135 0 shift;
2136 my @params = [apikey => $Api::mainApi->{apikey},
2137 0 survey => shift];
2138 0 return $Api::mainApi->Request('survey/add', "GET", \@params);
2139 }
2140
2141 # Deletes the survey
2142 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2143 # Guid publicSurveyID - Survey identifier
2144 sub Delete
2145 0 ▶ {
Subroutine Delete: not called CC=1 SCAR=6.9
2146 0 shift;
2147 my @params = [apikey => $Api::mainApi->{apikey},
2148 0 publicSurveyID => shift];
2149 0 return $Api::mainApi->Request('survey/delete', "GET", \@params);
2150 }
2151
2152 # Export given survey's data to provided format
2153 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2154 # Guid publicSurveyID - Survey identifier
2155 # string fileName - Name of your file.
2156 # ApiTypes::ExportFileFormats fileFormat - (default ApiTypes.ExportFileFormats.Csv)
2157 # ApiTypes::CompressionFormat compressionFormat - FileResponse compression format. None or Zip. (default ApiTypes.CompressionFormat.EENone)
2158 # Returns ApiTypes::ExportLink
2159 sub Export
2160 0 ▶ {
Subroutine Export: not called CC=1 SCAR=6.9
2161 0 shift;
2162 my @params = [apikey => $Api::mainApi->{apikey},
2163 0 publicSurveyID => shift,
2164 fileName => shift,
2165 fileFormat => shift,
2166 compressionFormat => shift];
2167 0 return $Api::mainApi->Request('survey/export', "GET", \@params);
2168 }
2169
2170 # Shows all your existing surveys
2171 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2172 # Returns List<ApiTypes::Survey>
2173 sub List
2174 0 ▶ {
Subroutine List: not called CC=1 SCAR=6.9
2175 0 shift;
2176 0 my @params = [apikey => $Api::mainApi->{apikey}];
2177 0 return $Api::mainApi->Request('survey/list', "GET", \@params);
2178 }
2179
2180 # Get list of personal answers for the specific survey
2181 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2182 # Guid publicSurveyID - Survey identifier
2183 # Returns List<ApiTypes::SurveyResultInfo>
2184 sub LoadResponseList
2185 0 ▶ {
Subroutine LoadResponseList: not called CC=1 SCAR=6.9
2186 0 shift;
2187 my @params = [apikey => $Api::mainApi->{apikey},
2188 0 publicSurveyID => shift];
2189 0 return $Api::mainApi->Request('survey/loadresponselist', "GET", \@params);
2190 }
2191
2192 # Get general results of the specific survey
2193 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2194 # Guid publicSurveyID - Survey identifier
2195 # Returns ApiTypes::SurveyResultsSummaryInfo
2196 sub LoadResults
2197 0 ▶ {
Subroutine LoadResults: not called CC=1 SCAR=6.9
2198 0 shift;
2199 my @params = [apikey => $Api::mainApi->{apikey},
2200 0 publicSurveyID => shift];
2201 0 return $Api::mainApi->Request('survey/loadresults', "GET", \@params);
2202 }
2203
2204 # Update the survey information
2205 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2206 # ApiTypes::Survey survey - Json representation of a survey
2207 # Returns ApiTypes::Survey
2208 sub Update
2209 0 ▶ {
Subroutine Update: not called CC=1 SCAR=6.9
2210 0 shift;
2211 my @params = [apikey => $Api::mainApi->{apikey},
2212 0 survey => shift];
2213 0 return $Api::mainApi->Request('survey/update', "GET", \@params);
2214 }
2215
2216
2217 #
2218 # Managing and editing templates of your emails
2219 #
2220 package Api::Template;
2221
2222 # Create new Template. Needs to be sent using POST method
2223 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2224 # ApiTypes::TemplateType templateType - 0 for API connections
2225 # string templateName - Name of template.
2226 # string subject - Default subject of email.
2227 # string fromEmail - Default From: email address.
2228 # string fromName - Default From: name.
2229 # ApiTypes::TemplateScope templateScope - Enum: 0 - private, 1 - public, 2 - mockup (default ApiTypes.TemplateScope.Private)
2230 # string bodyHtml - HTML code of email (needs escaping). (default None)
2231 # string bodyText - Text body of email. (default None)
2232 # string css - CSS style (default None)
2233 # int originalTemplateID - ID number of original template. (default 0)
2234 # Returns int
2235 sub Add
2236 0 ▶ {
Subroutine Add: not called CC=1 SCAR=6.9
2237 0 shift;
2238 my @params = [apikey => $Api::mainApi->{apikey},
2239 0 templateType => shift,
2240 templateName => shift,
2241 subject => shift,
2242 fromEmail => shift,
2243 fromName => shift,
2244 templateScope => shift,
2245 bodyHtml => shift,
2246 bodyText => shift,
2247 css => shift,
2248 originalTemplateID => shift];
2249 0 return $Api::mainApi->Request('template/add', "GET", \@params);
2250 }
2251
2252 # Check if template is used by campaign.
2253 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2254 # int templateID - ID number of template.
2255 # Returns bool
2256 sub CheckUsage
2257 0 ▶ {
Subroutine CheckUsage: not called CC=1 SCAR=6.9
2258 0 shift;
2259 my @params = [apikey => $Api::mainApi->{apikey},
2260 0 templateID => shift];
2261 0 return $Api::mainApi->Request('template/checkusage', "GET", \@params);
2262 }
2263
2264 # Copy Selected Template
2265 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2266 # int templateID - ID number of template.
2267 # string templateName - Name of template.
2268 # string subject - Default subject of email.
2269 # string fromEmail - Default From: email address.
2270 # string fromName - Default From: name.
2271 # Returns ApiTypes::Template
2272 sub Copy
2273 0 ▶ {
Subroutine Copy: not called CC=1 SCAR=6.9
2274 0 shift;
2275 my @params = [apikey => $Api::mainApi->{apikey},
2276 0 templateID => shift,
2277 templateName => shift,
2278 subject => shift,
2279 fromEmail => shift,
2280 fromName => shift];
2281 0 return $Api::mainApi->Request('template/copy', "GET", \@params);
2282 }
2283
2284 # Delete template with the specified ID
2285 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2286 # int templateID - ID number of template.
2287 sub Delete
2288 0 ▶ {
Subroutine Delete: not called CC=1 SCAR=6.9
2289 0 shift;
2290 my @params = [apikey => $Api::mainApi->{apikey},
2291 0 templateID => shift];
2292 0 return $Api::mainApi->Request('template/delete', "GET", \@params);
2293 }
2294
2295 # Search for references to images and replaces them with base64 code.
2296 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2297 # int templateID - ID number of template.
2298 # Returns string
2299 sub GetEmbeddedHtml
2300 0 ▶ {
Subroutine GetEmbeddedHtml: not called CC=1 SCAR=6.9
2301 0 shift;
2302 my @params = [apikey => $Api::mainApi->{apikey},
2303 0 templateID => shift];
2304 0 return $Api::mainApi->Request('template/getembeddedhtml', "GET", \@params);
2305 }
2306
2307 # Lists your templates
2308 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2309 # int limit - Maximum of loaded items. (default 500)
2310 # int offset - How many items should be loaded ahead. (default 0)
2311 # Returns ApiTypes::TemplateList
2312 sub GetList
2313 0 ▶ {
Subroutine GetList: not called CC=1 SCAR=6.9
2314 0 shift;
2315 my @params = [apikey => $Api::mainApi->{apikey},
2316 0 limit => shift,
2317 offset => shift];
2318 0 return $Api::mainApi->Request('template/getlist', "GET", \@params);
2319 }
2320
2321 # Load template with content
2322 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2323 # int templateID - ID number of template.
2324 # bool ispublic - (default False)
2325 # Returns ApiTypes::Template
2326 sub LoadTemplate
2327 0 ▶ {
Subroutine LoadTemplate: not called CC=1 SCAR=6.9
2328 0 shift;
2329 my @params = [apikey => $Api::mainApi->{apikey},
2330 0 templateID => shift,
2331 ispublic => shift];
2332 0 return $Api::mainApi->Request('template/loadtemplate', "GET", \@params);
2333 }
2334
2335 # Removes previously generated screenshot of template
2336 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2337 # int templateID - ID number of template.
2338 sub RemoveScreenshot
2339 0 ▶ {
Subroutine RemoveScreenshot: not called CC=1 SCAR=6.9
2340 0 shift;
2341 my @params = [apikey => $Api::mainApi->{apikey},
2342 0 templateID => shift];
2343 0 return $Api::mainApi->Request('template/removescreenshot', "GET", \@params);
2344 }
2345
2346 # Saves screenshot of chosen Template
2347 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2348 # string base64Image - Image, base64 coded.
2349 # int templateID - ID number of template.
2350 # Returns string
2351 sub SaveScreenshot
2352 0 ▶ {
Subroutine SaveScreenshot: not called CC=1 SCAR=6.9
2353 0 shift;
2354 my @params = [apikey => $Api::mainApi->{apikey},
2355 0 base64Image => shift,
2356 templateID => shift];
2357 0 return $Api::mainApi->Request('template/savescreenshot', "GET", \@params);
2358 }
2359
2360 # Update existing template, overwriting existing data. Needs to be sent using POST method.
2361 # string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
2362 # int templateID - ID number of template.
2363 # ApiTypes::TemplateScope templateScope - Enum: 0 - private, 1 - public, 2 - mockup (default ApiTypes.TemplateScope.Private)
2364 # string templateName - Name of template. (default None)
2365 # string subject - Default subject of email. (default None)
2366 # string fromEmail - Default From: email address. (default None)
2367 # string fromName - Default From: name. (default None)
2368 # string bodyHtml - HTML code of email (needs escaping). (default None)
2369 # string bodyText - Text body of email. (default None)
2370 # string css - CSS style (default None)
2371 # bool removeScreenshot - (default True)
2372 sub Update
2373 0 ▶ {
Subroutine Update: not called CC=1 SCAR=6.9
2374 0 shift;
2375 my @params = [apikey => $Api::mainApi->{apikey},
2376 0 templateID => shift,
2377 templateScope => shift,
2378 templateName => shift,
2379 subject => shift,
2380 fromEmail => shift,
2381 fromName => shift,
2382 bodyHtml => shift,
2383 bodyText => shift,
2384 css => shift,
2385 removeScreenshot => shift];
2386 0 return $Api::mainApi->Request('template/update', "GET", \@params);
2387 }
2388
2389
2390
2391 package ApiTypes;
2392 #
2393 # Detailed information about your account
2394 #
2395 package ApiTypes::Account;
2396 sub new
2397 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
2398 0 my $class = shift;
2399 0 my $self = {
2400 #
2401 # Code used for tax purposes.
2402 #
2403 TaxCode => shift,
2404
2405 #
2406 # Public key for limited access to your account such as contact/add so you can use it safely on public websites.
2407 #
2408 PublicAccountID => shift,
2409
2410 #
2411 # ApiKey that gives you access to our SMTP and HTTP API's.
2412 #
2413 ApiKey => shift,
2414
2415 #
2416 # Second ApiKey that gives you access to our SMTP and HTTP API's. Used mainly for changing ApiKeys without disrupting services.
2417 #
2418 ApiKey2 => shift,
2419
2420 #
2421 # True, if account is a subaccount. Otherwise, false
2422 #
2423 IsSub => shift,
2424
2425 #
2426 # The number of subaccounts this account has.
2427 #
2428 SubAccountsCount => shift,
2429
2430 #
2431 # Number of status: 1 - Active
2432 #
2433 StatusNumber => shift,
2434
2435 #
2436 # Account status: Active
2437 #
2438 StatusFormatted => shift,
2439
2440 #
2441 # URL form for payments.
2442 #
2443 PaymentFormUrl => shift,
2444
2445 #
2446 # URL to your logo image.
2447 #
2448 LogoUrl => shift,
2449
2450 #
2451 # HTTP address of your website.
2452 #
2453 Website => shift,
2454
2455 #
2456 # True: Turn on or off ability to send mails under your brand. Otherwise, false
2457 #
2458 EnablePrivateBranding => shift,
2459
2460 #
2461 # Address to your support.
2462 #
2463 SupportLink => shift,
2464
2465 #
2466 # Subdomain for your rebranded service
2467 #
2468 PrivateBrandingUrl => shift,
2469
2470 #
2471 # First name.
2472 #
2473 FirstName => shift,
2474
2475 #
2476 # Last name.
2477 #
2478 LastName => shift,
2479
2480 #
2481 # Company name.
2482 #
2483 Company => shift,
2484
2485 #
2486 # First line of address.
2487 #
2488 Address1 => shift,
2489
2490 #
2491 # Second line of address.
2492 #
2493 Address2 => shift,
2494
2495 #
2496 # City.
2497 #
2498 City => shift,
2499
2500 #
2501 # State or province.
2502 #
2503 State => shift,
2504
2505 #
2506 # Zip/postal code.
2507 #
2508 Zip => shift,
2509
2510 #
2511 # Numeric ID of country. A file with the list of countries is available <a href="http://api.elasticemail.com/public/countries"><b>here</b></a>
2512 #
2513 CountryID => shift,
2514
2515 #
2516 # Phone number
2517 #
2518 Phone => shift,
2519
2520 #
2521 # Proper email address.
2522 #
2523 Email => shift,
2524
2525 #
2526 # URL for affiliating.
2527 #
2528 AffiliateLink => shift,
2529
2530 #
2531 # Numeric reputation
2532 #
2533 Reputation => shift,
2534
2535 #
2536 # Amount of emails sent from this account
2537 #
2538 TotalEmailsSent => shift,
2539
2540 #
2541 # Amount of emails sent from this account
2542 #
2543 MonthlyEmailsSent => shift,
2544
2545 #
2546 # Amount of emails sent from this account
2547 #
2548 Credit => shift,
2549
2550 #
2551 # Amount of email credits
2552 #
2553 EmailCredits => shift,
2554
2555 #
2556 # Amount of emails sent from this account
2557 #
2558 PricePerEmail => shift,
2559
2560 #
2561 # Why your clients are receiving your emails.
2562 #
2563 DeliveryReason => shift,
2564
2565 #
2566 # URL for making payments.
2567 #
2568 AccountPaymentUrl => shift,
2569
2570 #
2571 # Address of SMTP server.
2572 #
2573 Smtp => shift,
2574
2575 #
2576 # Address of alternative SMTP server.
2577 #
2578 SmtpAlternative => shift,
2579
2580 #
2581 # Status of automatic payments configuration.
2582 #
2583 AutoCreditStatus => shift,
2584
2585 #
2586 # When AutoCreditStatus is Enabled, the credit level that triggers the credit to be recharged.
2587 #
2588 AutoCreditLevel => shift,
2589
2590 #
2591 # When AutoCreditStatus is Enabled, the amount of credit to be recharged.
2592 #
2593 AutoCreditAmount => shift,
2594
2595 #
2596 # Amount of emails account can send daily
2597 #
2598 DailySendLimit => shift,
2599
2600 #
2601 # Creation date.
2602 #
2603 DateCreated => shift,
2604
2605 #
2606 # True, if you have enabled link tracking. Otherwise, false
2607 #
2608 LinkTracking => shift,
2609
2610 #
2611 # Type of content encoding
2612 #
2613 ContentTransferEncoding => shift,
2614
2615 #
2616 # Amount of Litmus credits
2617 #
2618 LitmusCredits => shift,
2619
2620 #
2621 # Enable advanced tools on your Account.
2622 #
2623 EnableContactFeatures => shift,
2624
2625 #
2626 #
2627 #
2628 NeedsSMSVerification => shift,
2629
2630 };
2631 0 bless $self, $class;
2632 0 return $self;
2633 }
2634
2635 #
2636 # Basic overview of your account
2637 #
2638 package ApiTypes::AccountOverview;
2639 sub new
2640 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
2641 0 my $class = shift;
2642 0 my $self = {
2643 #
2644 # Amount of emails sent from this account
2645 #
2646 TotalEmailsSent => shift,
2647
2648 #
2649 # Amount of emails sent from this account
2650 #
2651 Credit => shift,
2652
2653 #
2654 # Cost of 1000 emails
2655 #
2656 CostPerThousand => shift,
2657
2658 #
2659 # Number of messages in progress
2660 #
2661 InProgressCount => shift,
2662
2663 #
2664 # Number of contacts currently with blocked status of Unsubscribed, Complaint, Bounced or InActive
2665 #
2666 BlockedContactsCount => shift,
2667
2668 #
2669 # Numeric reputation
2670 #
2671 Reputation => shift,
2672
2673 #
2674 # Number of contacts
2675 #
2676 ContactCount => shift,
2677
2678 #
2679 # Number of created campaigns
2680 #
2681 CampaignCount => shift,
2682
2683 #
2684 # Number of available templates
2685 #
2686 TemplateCount => shift,
2687
2688 #
2689 # Number of created subaccounts
2690 #
2691 SubAccountCount => shift,
2692
2693 #
2694 # Number of active referrals
2695 #
2696 ReferralCount => shift,
2697
2698 };
2699 0 bless $self, $class;
2700 0 return $self;
2701 }
2702
2703 #
2704 # Lists advanced sending options of your account.
2705 #
2706 package ApiTypes::AdvancedOptions;
2707 sub new
2708 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
2709 0 my $class = shift;
2710 0 my $self = {
2711 #
2712 # True, if you want to track clicks. Otherwise, false
2713 #
2714 EnableClickTracking => shift,
2715
2716 #
2717 # True, if you want to track by link tracking. Otherwise, false
2718 #
2719 EnableLinkClickTracking => shift,
2720
2721 #
2722 # True, if you want to use template scripting in your emails {{}}. Otherwise, false
2723 #
2724 EnableTemplateScripting => shift,
2725
2726 #
2727 # True, if text BODY of message should be created automatically. Otherwise, false
2728 #
2729 AutoTextFormat => shift,
2730
2731 #
2732 # True, if you want bounce notifications returned. Otherwise, false
2733 #
2734 EmailNotificationForError => shift,
2735
2736 #
2737 # True, if you want to send web notifications for sent email. Otherwise, false
2738 #
2739 WebNotificationForSent => shift,
2740
2741 #
2742 # True, if you want to send web notifications for opened email. Otherwise, false
2743 #
2744 WebNotificationForOpened => shift,
2745
2746 #
2747 # True, if you want to send web notifications for clicked email. Otherwise, false
2748 #
2749 WebNotificationForClicked => shift,
2750
2751 #
2752 # True, if you want to send web notifications for unsubscribed email. Otherwise, false
2753 #
2754 WebnotificationForUnsubscribed => shift,
2755
2756 #
2757 # True, if you want to send web notifications for complaint email. Otherwise, false
2758 #
2759 WebNotificationForAbuse => shift,
2760
2761 #
2762 # True, if you want to send web notifications for bounced email. Otherwise, false
2763 #
2764 WebNotificationForError => shift,
2765
2766 #
2767 # True, if you want to receive low credit email notifications. Otherwise, false
2768 #
2769 LowCreditNotification => shift,
2770
2771 #
2772 # True, if you want inbound email to only process contacts from your account. Otherwise, false
2773 #
2774 InboundContactsOnly => shift,
2775
2776 #
2777 # True, if this account is a sub-account. Otherwise, false
2778 #
2779 IsSubAccount => shift,
2780
2781 #
2782 # True, if this account resells Elastic Email. Otherwise, false.
2783 #
2784 IsOwnedByReseller => shift,
2785
2786 #
2787 # True, if you want to enable list-unsubscribe header. Otherwise, false
2788 #
2789 EnableUnsubscribeHeader => shift,
2790
2791 #
2792 # True, if you want to display your labels on your unsubscribe form. Otherwise, false
2793 #
2794 ManageSubscriptions => shift,
2795
2796 #
2797 # True, if you want to only display labels that the contact is subscribed to on your unsubscribe form. Otherwise, false
2798 #
2799 ManageSubscribedOnly => shift,
2800
2801 #
2802 # True, if you want to display an option for the contact to opt into transactional email only on your unsubscribe form. Otherwise, false
2803 #
2804 TransactionalOnUnsubscribe => shift,
2805
2806 #
2807 #
2808 #
2809 PreviewMessageID => shift,
2810
2811 #
2812 # True, if you want to apply custom headers to your emails. Otherwise, false
2813 #
2814 AllowCustomHeaders => shift,
2815
2816 #
2817 # Email address to send a copy of all email to.
2818 #
2819 BccEmail => shift,
2820
2821 #
2822 # Type of content encoding
2823 #
2824 ContentTransferEncoding => shift,
2825
2826 #
2827 # True, if you want to receive bounce email notifications. Otherwise, false
2828 #
2829 EmailNotification => shift,
2830
2831 #
2832 # Email addresses to send a copy of all notifications from our system. Separated by semicolon
2833 #
2834 NotificationsEmails => shift,
2835
2836 #
2837 # Emails, separated by semicolon, to which the notification about contact unsubscribing should be sent to
2838 #
2839 UnsubscribeNotificationEmails => shift,
2840
2841 #
2842 # URL address to receive web notifications to parse and process.
2843 #
2844 WebNotificationUrl => shift,
2845
2846 #
2847 # URL used for tracking action of inbound emails
2848 #
2849 HubCallbackUrl => shift,
2850
2851 #
2852 # Domain you use as your inbound domain
2853 #
2854 InboundDomain => shift,
2855
2856 #
2857 # True, if account has tooltips active. Otherwise, false
2858 #
2859 EnableUITooltips => shift,
2860
2861 #
2862 # True, if you want to use Advanced Tools. Otherwise, false
2863 #
2864 EnableContactFeatures => shift,
2865
2866 #
2867 # URL to your logo image.
2868 #
2869 LogoUrl => shift,
2870
2871 #
2872 # (0 means this functionality is NOT enabled) Score, depending on the number of times you have sent to a recipient, at which the given recipient should be moved to the Stale status
2873 #
2874 StaleContactScore => shift,
2875
2876 #
2877 # (0 means this functionality is NOT enabled) Number of days of inactivity for a contact after which the given recipient should be moved to the Stale status
2878 #
2879 StaleContactInactiveDays => shift,
2880
2881 };
2882 0 bless $self, $class;
2883 0 return $self;
2884 }
2885
2886 #
2887 #
2888 #
2889 package ApiTypes::APIKeyAction;
2890 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
2891 #
2892 # Add an additional APIKey to your Account.
2893 #
2894 1 ADD => '1',
2895
2896 #
2897 # Change this APIKey to a new one.
2898 #
2899 CHANGE => '2',
2900
2901 #
2902 # Delete this APIKey
2903 #
2904 DELETE => '3',
2905
2906 1 };
2907
2908 #
2909 # Attachment data
2910 #
2911 package ApiTypes::Attachment;
2912 sub new
2913 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
2914 0 my $class = shift;
2915 0 my $self = {
2916 #
2917 # Name of your file.
2918 #
2919 FileName => shift,
2920
2921 #
2922 # ID number of your attachment
2923 #
2924 ID => shift,
2925
2926 #
2927 # Size of your attachment.
2928 #
2929 Size => shift,
2930
2931 };
2932 0 bless $self, $class;
2933 0 return $self;
2934 }
2935
2936 #
2937 # Blocked Contact - Contact returning Hard Bounces
2938 #
2939 package ApiTypes::BlockedContact;
2940 sub new
2941 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
2942 0 my $class = shift;
2943 0 my $self = {
2944 #
2945 # Proper email address.
2946 #
2947 Email => shift,
2948
2949 #
2950 # Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed.
2951 #
2952 Status => shift,
2953
2954 #
2955 # RFC error message
2956 #
2957 FriendlyErrorMessage => shift,
2958
2959 #
2960 # Last change date
2961 #
2962 DateUpdated => shift,
2963
2964 };
2965 0 bless $self, $class;
2966 0 return $self;
2967 }
2968
2969 #
2970 # Summary of bounced categories, based on specified date range.
2971 #
2972 package ApiTypes::BouncedCategorySummary;
2973 sub new
2974 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
2975 0 my $class = shift;
2976 0 my $self = {
2977 #
2978 # Number of messages marked as SPAM
2979 #
2980 Spam => shift,
2981
2982 #
2983 # Number of blacklisted messages
2984 #
2985 BlackListed => shift,
2986
2987 #
2988 # Number of messages flagged with 'No Mailbox'
2989 #
2990 NoMailbox => shift,
2991
2992 #
2993 # Number of messages flagged with 'Grey Listed'
2994 #
2995 GreyListed => shift,
2996
2997 #
2998 # Number of messages flagged with 'Throttled'
2999 #
3000 Throttled => shift,
3001
3002 #
3003 # Number of messages flagged with 'Timeout'
3004 #
3005 Timeout => shift,
3006
3007 #
3008 # Number of messages flagged with 'Connection Problem'
3009 #
3010 ConnectionProblem => shift,
3011
3012 #
3013 # Number of messages flagged with 'SPF Problem'
3014 #
3015 SpfProblem => shift,
3016
3017 #
3018 # Number of messages flagged with 'Account Problem'
3019 #
3020 AccountProblem => shift,
3021
3022 #
3023 # Number of messages flagged with 'DNS Problem'
3024 #
3025 DnsProblem => shift,
3026
3027 #
3028 # Number of messages flagged with 'WhiteListing Problem'
3029 #
3030 WhitelistingProblem => shift,
3031
3032 #
3033 # Number of messages flagged with 'Code Error'
3034 #
3035 CodeError => shift,
3036
3037 #
3038 # Number of messages flagged with 'Not Delivered'
3039 #
3040 NotDelivered => shift,
3041
3042 #
3043 # Number of manually cancelled messages
3044 #
3045 ManualCancel => shift,
3046
3047 #
3048 # Number of messages flagged with 'Connection terminated'
3049 #
3050 ConnectionTerminated => shift,
3051
3052 };
3053 0 bless $self, $class;
3054 0 return $self;
3055 }
3056
3057 #
3058 # Campaign
3059 #
3060 package ApiTypes::Campaign;
3061 sub new
3062 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
3063 0 my $class = shift;
3064 0 my $self = {
3065 #
3066 # ID number of selected Channel.
3067 #
3068 ChannelID => shift,
3069
3070 #
3071 # Campaign's name
3072 #
3073 Name => shift,
3074
3075 #
3076 # Name of campaign's status
3077 #
3078 Status => shift,
3079
3080 #
3081 # List of Segment and List IDs, comma separated
3082 #
3083 Targets => shift,
3084
3085 #
3086 # Number of event, triggering mail sending
3087 #
3088 TriggerType => shift,
3089
3090 #
3091 # Date of triggered send
3092 #
3093 TriggerDate => shift,
3094
3095 #
3096 # How far into the future should the campaign be sent, in minutes
3097 #
3098 TriggerDelay => shift,
3099
3100 #
3101 # When your next automatic mail will be sent, in days
3102 #
3103 TriggerFrequency => shift,
3104
3105 #
3106 # Date of send
3107 #
3108 TriggerCount => shift,
3109
3110 #
3111 # ID number of transaction
3112 #
3113 TriggerChannelID => shift,
3114
3115 #
3116 # Data for filtering event campaigns such as specific link addresses.
3117 #
3118 TriggerData => shift,
3119
3120 #
3121 # What should be checked for choosing the winner: opens or clicks
3122 #
3123 SplitOptimization => shift,
3124
3125 #
3126 # Number of minutes between sends during optimization period
3127 #
3128 SplitOptimizationMinutes => shift,
3129
3130 #
3131 #
3132 #
3133 TimingOption => shift,
3134
3135 #
3136 #
3137 #
3138 CampaignTemplates => shift,
3139
3140 };
3141 0 bless $self, $class;
3142 0 return $self;
3143 }
3144
3145 #
3146 # Channel
3147 #
3148 package ApiTypes::CampaignChannel;
3149 sub new
3150 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
3151 0 my $class = shift;
3152 0 my $self = {
3153 #
3154 # ID number of selected Channel.
3155 #
3156 ChannelID => shift,
3157
3158 #
3159 # Filename
3160 #
3161 Name => shift,
3162
3163 #
3164 # True, if you are sending a campaign. Otherwise, false.
3165 #
3166 IsCampaign => shift,
3167
3168 #
3169 # Name of your custom IP Pool to be used in the sending process
3170 #
3171 PoolName => shift,
3172
3173 #
3174 # Date of creation in YYYY-MM-DDThh:ii:ss format
3175 #
3176 DateAdded => shift,
3177
3178 #
3179 # Name of campaign's status
3180 #
3181 Status => shift,
3182
3183 #
3184 # Date of last activity on account
3185 #
3186 LastActivity => shift,
3187
3188 #
3189 # Datetime of last action done on campaign.
3190 #
3191 LastProcessed => shift,
3192
3193 #
3194 # Id number of parent channel
3195 #
3196 ParentChannelID => shift,
3197
3198 #
3199 # List of Segment and List IDs, comma separated
3200 #
3201 Targets => shift,
3202
3203 #
3204 # Number of event, triggering mail sending
3205 #
3206 TriggerType => shift,
3207
3208 #
3209 # Date of triggered send
3210 #
3211 TriggerDate => shift,
3212
3213 #
3214 # How far into the future should the campaign be sent, in minutes
3215 #
3216 TriggerDelay => shift,
3217
3218 #
3219 # When your next automatic mail will be sent, in days
3220 #
3221 TriggerFrequency => shift,
3222
3223 #
3224 # Date of send
3225 #
3226 TriggerCount => shift,
3227
3228 #
3229 # ID number of transaction
3230 #
3231 TriggerChannelID => shift,
3232
3233 #
3234 # Data for filtering event campaigns such as specific link addresses.
3235 #
3236 TriggerData => shift,
3237
3238 #
3239 # What should be checked for choosing the winner: opens or clicks
3240 #
3241 SplitOptimization => shift,
3242
3243 #
3244 # Number of minutes between sends during optimization period
3245 #
3246 SplitOptimizationMinutes => shift,
3247
3248 #
3249 #
3250 #
3251 TimingOption => shift,
3252
3253 #
3254 # ID number of template.
3255 #
3256 TemplateID => shift,
3257
3258 #
3259 # Default subject of email.
3260 #
3261 TemplateSubject => shift,
3262
3263 #
3264 # Default From: email address.
3265 #
3266 TemplateFromEmail => shift,
3267
3268 #
3269 # Default From: name.
3270 #
3271 TemplateFromName => shift,
3272
3273 #
3274 # Default Reply: email address.
3275 #
3276 TemplateReplyEmail => shift,
3277
3278 #
3279 # Default Reply: name.
3280 #
3281 TemplateReplyName => shift,
3282
3283 #
3284 # Total emails clicked
3285 #
3286 ClickedCount => shift,
3287
3288 #
3289 # Total emails opened.
3290 #
3291 OpenedCount => shift,
3292
3293 #
3294 # Overall number of recipients
3295 #
3296 RecipientCount => shift,
3297
3298 #
3299 # Total emails sent.
3300 #
3301 SentCount => shift,
3302
3303 #
3304 # Total emails sent.
3305 #
3306 FailedCount => shift,
3307
3308 #
3309 # Total emails clicked
3310 #
3311 UnsubscribedCount => shift,
3312
3313 #
3314 # Abuses - mails sent to user without their consent
3315 #
3316 FailedAbuse => shift,
3317
3318 #
3319 # List of CampaignTemplate for sending A-X split testing.
3320 #
3321 TemplateChannels => shift,
3322
3323 };
3324 0 bless $self, $class;
3325 0 return $self;
3326 }
3327
3328 #
3329 #
3330 #
3331 package ApiTypes::CampaignStatus;
3332 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
3333 #
3334 # Campaign is logically deleted and not returned by API or interface calls.
3335 #
3336 1 DELETED => '-1',
3337
3338 #
3339 # Campaign is curently active and available.
3340 #
3341 ACTIVE => '0',
3342
3343 #
3344 # Campaign is currently being processed for delivery.
3345 #
3346 PROCESSING => '1',
3347
3348 #
3349 # Campaign is currently sending.
3350 #
3351 SENDING => '2',
3352
3353 #
3354 # Campaign has completed sending.
3355 #
3356 COMPLETED => '3',
3357
3358 #
3359 # Campaign is currently paused and not sending.
3360 #
3361 PAUSED => '4',
3362
3363 #
3364 # Campaign has been cancelled during delivery.
3365 #
3366 CANCELLED => '5',
3367
3368 #
3369 # Campaign is save as draft and not processing.
3370 #
3371 DRAFT => '6',
3372
3373 1 };
3374
3375 #
3376 #
3377 #
3378 package ApiTypes::CampaignTemplate;
3379 sub new
3380 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
3381 0 my $class = shift;
3382 0 my $self = {
3383 #
3384 # ID number of selected Channel.
3385 #
3386 ChannelID => shift,
3387
3388 #
3389 # Name of campaign's status
3390 #
3391 Status => shift,
3392
3393 #
3394 # Name of your custom IP Pool to be used in the sending process
3395 #
3396 PoolName => shift,
3397
3398 #
3399 # ID number of template.
3400 #
3401 TemplateID => shift,
3402
3403 #
3404 # Default subject of email.
3405 #
3406 TemplateSubject => shift,
3407
3408 #
3409 # Default From: email address.
3410 #
3411 TemplateFromEmail => shift,
3412
3413 #
3414 # Default From: name.
3415 #
3416 TemplateFromName => shift,
3417
3418 #
3419 # Default Reply: email address.
3420 #
3421 TemplateReplyEmail => shift,
3422
3423 #
3424 # Default Reply: name.
3425 #
3426 TemplateReplyName => shift,
3427
3428 };
3429 0 bless $self, $class;
3430 0 return $self;
3431 }
3432
3433 #
3434 #
3435 #
3436 package ApiTypes::CampaignTriggerType;
3437 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
3438 #
3439 #
3440 #
3441 1 SENDNOW => '1',
3442
3443 #
3444 #
3445 #
3446 FUTURESCHEDULED => '2',
3447
3448 #
3449 #
3450 #
3451 ONADD => '3',
3452
3453 #
3454 #
3455 #
3456 ONOPEN => '4',
3457
3458 #
3459 #
3460 #
3461 ONCLICK => '5',
3462
3463 1 };
3464
3465 #
3466 # SMTP and HTTP API channel for grouping email delivery
3467 #
3468 package ApiTypes::Channel;
3469 sub new
3470 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
3471 0 my $class = shift;
3472 0 my $self = {
3473 #
3474 # Descriptive name of the channel.
3475 #
3476 Name => shift,
3477
3478 #
3479 # The date the channel was added to your account.
3480 #
3481 DateAdded => shift,
3482
3483 #
3484 # The date the channel was last sent through.
3485 #
3486 LastActivity => shift,
3487
3488 #
3489 # The number of email jobs this channel has been used with.
3490 #
3491 JobCount => shift,
3492
3493 #
3494 # The number of emails that have been clicked within this channel.
3495 #
3496 ClickedCount => shift,
3497
3498 #
3499 # The number of emails that have been opened within this channel.
3500 #
3501 OpenedCount => shift,
3502
3503 #
3504 # The number of emails attempted to be sent within this channel.
3505 #
3506 RecipientCount => shift,
3507
3508 #
3509 # The number of emails that have been sent within this channel.
3510 #
3511 SentCount => shift,
3512
3513 #
3514 # The number of emails that have been bounced within this channel.
3515 #
3516 FailedCount => shift,
3517
3518 #
3519 # The number of emails that have been unsubscribed within this channel.
3520 #
3521 UnsubscribedCount => shift,
3522
3523 #
3524 # The number of emails that have been marked as abuse or complaint within this channel.
3525 #
3526 FailedAbuse => shift,
3527
3528 #
3529 # The total cost for emails/attachments within this channel.
3530 #
3531 Cost => shift,
3532
3533 };
3534 0 bless $self, $class;
3535 0 return $self;
3536 }
3537
3538 #
3539 # FileResponse compression format
3540 #
3541 package ApiTypes::CompressionFormat;
3542 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
3543 #
3544 # No compression
3545 #
3546 1 EENONE => '0',
3547
3548 #
3549 # Zip compression
3550 #
3551 ZIP => '1',
3552
3553 1 };
3554
3555 #
3556 # Contact
3557 #
3558 package ApiTypes::Contact;
3559 sub new
3560 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
3561 0 my $class = shift;
3562 0 my $self = {
3563 #
3564 #
3565 #
3566 ContactScore => shift,
3567
3568 #
3569 # Date of creation in YYYY-MM-DDThh:ii:ss format
3570 #
3571 DateAdded => shift,
3572
3573 #
3574 # Proper email address.
3575 #
3576 Email => shift,
3577
3578 #
3579 # First name.
3580 #
3581 FirstName => shift,
3582
3583 #
3584 # Last name.
3585 #
3586 LastName => shift,
3587
3588 #
3589 # Title
3590 #
3591 Title => shift,
3592
3593 #
3594 # Name of organization
3595 #
3596 OrganizationName => shift,
3597
3598 #
3599 # City.
3600 #
3601 City => shift,
3602
3603 #
3604 # Name of country.
3605 #
3606 Country => shift,
3607
3608 #
3609 # State or province.
3610 #
3611 State => shift,
3612
3613 #
3614 # Zip/postal code.
3615 #
3616 Zip => shift,
3617
3618 #
3619 # Phone number
3620 #
3621 Phone => shift,
3622
3623 #
3624 # Date of birth in YYYY-MM-DD format
3625 #
3626 BirthDate => shift,
3627
3628 #
3629 # Your gender
3630 #
3631 Gender => shift,
3632
3633 #
3634 # Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed.
3635 #
3636 Status => shift,
3637
3638 #
3639 # RFC Error code
3640 #
3641 BouncedErrorCode => shift,
3642
3643 #
3644 # RFC error message
3645 #
3646 BouncedErrorMessage => shift,
3647
3648 #
3649 # Total emails sent.
3650 #
3651 TotalSent => shift,
3652
3653 #
3654 # Total emails sent.
3655 #
3656 TotalFailed => shift,
3657
3658 #
3659 # Total emails opened.
3660 #
3661 TotalOpened => shift,
3662
3663 #
3664 # Total emails clicked
3665 #
3666 TotalClicked => shift,
3667
3668 #
3669 # Date of first failed message
3670 #
3671 FirstFailedDate => shift,
3672
3673 #
3674 # Number of fails in sending to this Contact
3675 #
3676 LastFailedCount => shift,
3677
3678 #
3679 # Last change date
3680 #
3681 DateUpdated => shift,
3682
3683 #
3684 # Source of URL of payment
3685 #
3686 Source => shift,
3687
3688 #
3689 # RFC Error code
3690 #
3691 ErrorCode => shift,
3692
3693 #
3694 # RFC error message
3695 #
3696 FriendlyErrorMessage => shift,
3697
3698 #
3699 # IP address
3700 #
3701 CreatedFromIP => shift,
3702
3703 #
3704 # Yearly revenue for the contact
3705 #
3706 Revenue => shift,
3707
3708 #
3709 # Number of purchases contact has made
3710 #
3711 PurchaseCount => shift,
3712
3713 #
3714 # Mobile phone number
3715 #
3716 MobileNumber => shift,
3717
3718 #
3719 # Fax number
3720 #
3721 FaxNumber => shift,
3722
3723 #
3724 # Biography for Linked-In
3725 #
3726 LinkedInBio => shift,
3727
3728 #
3729 # Number of Linked-In connections
3730 #
3731 LinkedInConnections => shift,
3732
3733 #
3734 # Biography for Twitter
3735 #
3736 TwitterBio => shift,
3737
3738 #
3739 # User name for Twitter
3740 #
3741 TwitterUsername => shift,
3742
3743 #
3744 # URL for Twitter photo
3745 #
3746 TwitterProfilePhoto => shift,
3747
3748 #
3749 # Number of Twitter followers
3750 #
3751 TwitterFollowerCount => shift,
3752
3753 #
3754 # Unsubscribed date in YYYY-MM-DD format
3755 #
3756 UnsubscribedDate => shift,
3757
3758 #
3759 # Industry contact works in
3760 #
3761 Industry => shift,
3762
3763 #
3764 # Number of employees
3765 #
3766 NumberOfEmployees => shift,
3767
3768 #
3769 # Annual revenue of contact
3770 #
3771 AnnualRevenue => shift,
3772
3773 #
3774 # Date of first purchase in YYYY-MM-DD format
3775 #
3776 FirstPurchase => shift,
3777
3778 #
3779 # Date of last purchase in YYYY-MM-DD format
3780 #
3781 LastPurchase => shift,
3782
3783 #
3784 # Free form field of notes
3785 #
3786 Notes => shift,
3787
3788 #
3789 # Website of contact
3790 #
3791 WebsiteUrl => shift,
3792
3793 #
3794 # Number of page views
3795 #
3796 PageViews => shift,
3797
3798 #
3799 # Number of website visits
3800 #
3801 Visits => shift,
3802
3803 #
3804 # Number of messages sent last month
3805 #
3806 LastMonthSent => shift,
3807
3808 #
3809 # Date this contact last opened an email
3810 #
3811 LastOpened => shift,
3812
3813 #
3814 #
3815 #
3816 LastClicked => shift,
3817
3818 #
3819 # Your gravatar hash for image
3820 #
3821 GravatarHash => shift,
3822
3823 };
3824 0 bless $self, $class;
3825 0 return $self;
3826 }
3827
3828 #
3829 # Collection of lists and segments
3830 #
3831 package ApiTypes::ContactCollection;
3832 sub new
3833 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
3834 0 my $class = shift;
3835 0 my $self = {
3836 #
3837 # Lists which contain the requested contact
3838 #
3839 Lists => shift,
3840
3841 #
3842 # Segments which contain the requested contact
3843 #
3844 Segments => shift,
3845
3846 };
3847 0 bless $self, $class;
3848 0 return $self;
3849 }
3850
3851 #
3852 # List's or segment's short info
3853 #
3854 package ApiTypes::ContactContainer;
3855 sub new
3856 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
3857 0 my $class = shift;
3858 0 my $self = {
3859 #
3860 # ID of the list/segment
3861 #
3862 ID => shift,
3863
3864 #
3865 # Name of the list/segment
3866 #
3867 Name => shift,
3868
3869 };
3870 0 bless $self, $class;
3871 0 return $self;
3872 }
3873
3874 #
3875 # History of chosen Contact
3876 #
3877 package ApiTypes::ContactHistory;
3878 sub new
3879 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
3880 0 my $class = shift;
3881 0 my $self = {
3882 #
3883 # ID of history of selected Contact.
3884 #
3885 ContactHistoryID => shift,
3886
3887 #
3888 # Type of event occured on this Contact.
3889 #
3890 EventType => shift,
3891
3892 #
3893 # Numeric code of event occured on this Contact.
3894 #
3895 EventTypeValue => shift,
3896
3897 #
3898 # Formatted date of event.
3899 #
3900 EventDate => shift,
3901
3902 #
3903 # Name of selected channel.
3904 #
3905 ChannelName => shift,
3906
3907 #
3908 # Name of template.
3909 #
3910 TemplateName => shift,
3911
3912 };
3913 0 bless $self, $class;
3914 0 return $self;
3915 }
3916
3917 #
3918 #
3919 #
3920 package ApiTypes::ContactSource;
3921 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
3922 #
3923 # Source of the contact is from sending an email via our SMTP or HTTP API's
3924 #
3925 1 DELIVERYAPI => '0',
3926
3927 #
3928 # Contact was manually entered from the interface.
3929 #
3930 MANUALINPUT => '1',
3931
3932 #
3933 # Contact was uploaded via a file such as CSV.
3934 #
3935 FILEUPLOAD => '2',
3936
3937 #
3938 # Contact was added from a public web form.
3939 #
3940 WEBFORM => '3',
3941
3942 #
3943 # Contact was added from the contact api.
3944 #
3945 CONTACTAPI => '4',
3946
3947 1 };
3948
3949 #
3950 #
3951 #
3952 package ApiTypes::ContactStatus;
3953 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
3954 #
3955 # Only transactional email can be sent to contacts with this status.
3956 #
3957 1 TRANSACTIONAL => '-2',
3958
3959 #
3960 # Contact has had an open or click in the last 6 months.
3961 #
3962 ENGAGED => '-1',
3963
3964 #
3965 # Contact is eligible to be sent to.
3966 #
3967 ACTIVE => '0',
3968
3969 #
3970 # Contact has had a hard bounce and is no longer eligible to be sent to.
3971 #
3972 BOUNCED => '1',
3973
3974 #
3975 # Contact has unsubscribed and is no longer eligible to be sent to.
3976 #
3977 UNSUBSCRIBED => '2',
3978
3979 #
3980 # Contact has complained and is no longer eligible to be sent to.
3981 #
3982 ABUSE => '3',
3983
3984 #
3985 # Contact has not been activated or has been de-activated and is not eligible to be sent to.
3986 #
3987 INACTIVE => '4',
3988
3989 #
3990 # Contact has not been opening emails for a long period of time and is not eligible to be sent to.
3991 #
3992 STALE => '5',
3993
3994 1 };
3995
3996 #
3997 # Number of Contacts, grouped by Status;
3998 #
3999 package ApiTypes::ContactStatusCounts;
4000 sub new
4001 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4002 0 my $class = shift;
4003 0 my $self = {
4004 #
4005 # Number of engaged contacts
4006 #
4007 Engaged => shift,
4008
4009 #
4010 # Number of active contacts
4011 #
4012 Active => shift,
4013
4014 #
4015 # Number of complaint messages
4016 #
4017 Complaint => shift,
4018
4019 #
4020 # Number of unsubscribed messages
4021 #
4022 Unsubscribed => shift,
4023
4024 #
4025 # Number of bounced messages
4026 #
4027 Bounced => shift,
4028
4029 #
4030 # Number of inactive contacts
4031 #
4032 Inactive => shift,
4033
4034 #
4035 # Number of transactional contacts
4036 #
4037 Transactional => shift,
4038
4039 #
4040 #
4041 #
4042 Stale => shift,
4043
4044 };
4045 0 bless $self, $class;
4046 0 return $self;
4047 }
4048
4049 #
4050 # Type of credits
4051 #
4052 package ApiTypes::CreditType;
4053 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
4054 #
4055 # Used to send emails. One credit = one email.
4056 #
4057 1 EMAIL => '9',
4058
4059 #
4060 # Used to run a litmus test on a template. 1 credit = 1 test.
4061 #
4062 LITMUS => '17',
4063
4064 1 };
4065
4066 #
4067 # Daily summary of log status, based on specified date range.
4068 #
4069 package ApiTypes::DailyLogStatusSummary;
4070 sub new
4071 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4072 0 my $class = shift;
4073 0 my $self = {
4074 #
4075 # Date in YYYY-MM-DDThh:ii:ss format
4076 #
4077 Date => shift,
4078
4079 #
4080 # Proper email address.
4081 #
4082 Email => shift,
4083
4084 #
4085 # Number of SMS
4086 #
4087 Sms => shift,
4088
4089 #
4090 # Number of delivered messages
4091 #
4092 Delivered => shift,
4093
4094 #
4095 # Number of opened messages
4096 #
4097 Opened => shift,
4098
4099 #
4100 # Number of clicked messages
4101 #
4102 Clicked => shift,
4103
4104 #
4105 # Number of unsubscribed messages
4106 #
4107 Unsubscribed => shift,
4108
4109 #
4110 # Number of complaint messages
4111 #
4112 Complaint => shift,
4113
4114 #
4115 # Number of bounced messages
4116 #
4117 Bounced => shift,
4118
4119 #
4120 # Number of inbound messages
4121 #
4122 Inbound => shift,
4123
4124 #
4125 # Number of manually cancelled messages
4126 #
4127 ManualCancel => shift,
4128
4129 #
4130 # Number of messages flagged with 'Not Delivered'
4131 #
4132 NotDelivered => shift,
4133
4134 };
4135 0 bless $self, $class;
4136 0 return $self;
4137 }
4138
4139 #
4140 # Domain data, with information about domain records.
4141 #
4142 package ApiTypes::DomainDetail;
4143 sub new
4144 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4145 0 my $class = shift;
4146 0 my $self = {
4147 #
4148 # Name of selected domain.
4149 #
4150 Domain => shift,
4151
4152 #
4153 # True, if domain is used as default. Otherwise, false,
4154 #
4155 DefaultDomain => shift,
4156
4157 #
4158 # True, if SPF record is verified
4159 #
4160 Spf => shift,
4161
4162 #
4163 # True, if DKIM record is verified
4164 #
4165 Dkim => shift,
4166
4167 #
4168 # True, if MX record is verified
4169 #
4170 MX => shift,
4171
4172 #
4173 #
4174 #
4175 DMARC => shift,
4176
4177 #
4178 # True, if tracking CNAME record is verified
4179 #
4180 IsRewriteDomainValid => shift,
4181
4182 #
4183 # True, if verification is available
4184 #
4185 Verify => shift,
4186
4187 #
4188 #
4189 #
4190 Type => shift,
4191
4192 };
4193 0 bless $self, $class;
4194 0 return $self;
4195 }
4196
4197 #
4198 # Detailed information about email credits
4199 #
4200 package ApiTypes::EmailCredits;
4201 sub new
4202 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4203 0 my $class = shift;
4204 0 my $self = {
4205 #
4206 # Date in YYYY-MM-DDThh:ii:ss format
4207 #
4208 Date => shift,
4209
4210 #
4211 # Amount of money in transaction
4212 #
4213 Amount => shift,
4214
4215 #
4216 # Source of URL of payment
4217 #
4218 Source => shift,
4219
4220 #
4221 # Free form field of notes
4222 #
4223 Notes => shift,
4224
4225 };
4226 0 bless $self, $class;
4227 0 return $self;
4228 }
4229
4230 #
4231 #
4232 #
4233 package ApiTypes::EmailJobFailedStatus;
4234 sub new
4235 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4236 0 my $class = shift;
4237 0 my $self = {
4238 #
4239 #
4240 #
4241 Address => shift,
4242
4243 #
4244 #
4245 #
4246 Error => shift,
4247
4248 #
4249 # RFC Error code
4250 #
4251 ErrorCode => shift,
4252
4253 #
4254 #
4255 #
4256 Category => shift,
4257
4258 };
4259 0 bless $self, $class;
4260 0 return $self;
4261 }
4262
4263 #
4264 #
4265 #
4266 package ApiTypes::EmailJobStatus;
4267 sub new
4268 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4269 0 my $class = shift;
4270 0 my $self = {
4271 #
4272 # ID number of your attachment
4273 #
4274 ID => shift,
4275
4276 #
4277 # Name of status: submitted, complete, in_progress
4278 #
4279 Status => shift,
4280
4281 #
4282 #
4283 #
4284 RecipientsCount => shift,
4285
4286 #
4287 #
4288 #
4289 Failed => shift,
4290
4291 #
4292 # Total emails sent.
4293 #
4294 FailedCount => shift,
4295
4296 #
4297 # Number of delivered messages
4298 #
4299 Delivered => shift,
4300
4301 #
4302 #
4303 #
4304 DeliveredCount => shift,
4305
4306 #
4307 #
4308 #
4309 Pending => shift,
4310
4311 #
4312 #
4313 #
4314 PendingCount => shift,
4315
4316 #
4317 # Number of opened messages
4318 #
4319 Opened => shift,
4320
4321 #
4322 # Total emails opened.
4323 #
4324 OpenedCount => shift,
4325
4326 #
4327 # Number of clicked messages
4328 #
4329 Clicked => shift,
4330
4331 #
4332 # Total emails clicked
4333 #
4334 ClickedCount => shift,
4335
4336 #
4337 # Number of unsubscribed messages
4338 #
4339 Unsubscribed => shift,
4340
4341 #
4342 # Total emails clicked
4343 #
4344 UnsubscribedCount => shift,
4345
4346 #
4347 #
4348 #
4349 AbuseReports => shift,
4350
4351 #
4352 #
4353 #
4354 AbuseReportsCount => shift,
4355
4356 #
4357 # List of all MessageIDs for this job.
4358 #
4359 MessageIDs => shift,
4360
4361 };
4362 0 bless $self, $class;
4363 0 return $self;
4364 }
4365
4366 #
4367 #
4368 #
4369 package ApiTypes::EmailSend;
4370 sub new
4371 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4372 0 my $class = shift;
4373 0 my $self = {
4374 #
4375 # ID number of transaction
4376 #
4377 TransactionID => shift,
4378
4379 #
4380 # Unique identifier for this email.
4381 #
4382 MessageID => shift,
4383
4384 };
4385 0 bless $self, $class;
4386 0 return $self;
4387 }
4388
4389 #
4390 # Status information of the specified email
4391 #
4392 package ApiTypes::EmailStatus;
4393 sub new
4394 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4395 0 my $class = shift;
4396 0 my $self = {
4397 #
4398 # Email address this email was sent from.
4399 #
4400 From => shift,
4401
4402 #
4403 # Email address this email was sent to.
4404 #
4405 To => shift,
4406
4407 #
4408 # Date the email was submitted.
4409 #
4410 Date => shift,
4411
4412 #
4413 # Value of email's status
4414 #
4415 Status => shift,
4416
4417 #
4418 # Name of email's status
4419 #
4420 StatusName => shift,
4421
4422 #
4423 # Date of last status change.
4424 #
4425 StatusChangeDate => shift,
4426
4427 #
4428 # Detailed error or bounced message.
4429 #
4430 ErrorMessage => shift,
4431
4432 #
4433 # ID number of transaction
4434 #
4435 TransactionID => shift,
4436
4437 };
4438 0 bless $self, $class;
4439 0 return $self;
4440 }
4441
4442 #
4443 # Email details formatted in json
4444 #
4445 package ApiTypes::EmailView;
4446 sub new
4447 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4448 0 my $class = shift;
4449 0 my $self = {
4450 #
4451 # Body (text) of your message.
4452 #
4453 Body => shift,
4454
4455 #
4456 # Default subject of email.
4457 #
4458 Subject => shift,
4459
4460 #
4461 # Starting date for search in YYYY-MM-DDThh:mm:ss format.
4462 #
4463 From => shift,
4464
4465 };
4466 0 bless $self, $class;
4467 0 return $self;
4468 }
4469
4470 #
4471 # Encoding type for the email headers
4472 #
4473 package ApiTypes::EncodingType;
4474 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
4475 #
4476 # Encoding of the email is provided by the sender and not altered.
4477 #
4478 1 USERPROVIDED => '-1',
4479
4480 #
4481 # No endcoding is set for the email.
4482 #
4483 EENONE => '0',
4484
4485 #
4486 # Encoding of the email is in Raw7bit format.
4487 #
4488 RAW7BIT => '1',
4489
4490 #
4491 # Encoding of the email is in Raw8bit format.
4492 #
4493 RAW8BIT => '2',
4494
4495 #
4496 # Encoding of the email is in QuotedPrintable format.
4497 #
4498 QUOTEDPRINTABLE => '3',
4499
4500 #
4501 # Encoding of the email is in Base64 format.
4502 #
4503 BASE64 => '4',
4504
4505 #
4506 # Encoding of the email is in Uue format.
4507 #
4508 UUE => '5',
4509
4510 1 };
4511
4512 #
4513 # Record of exported data from the system.
4514 #
4515 package ApiTypes::Export;
4516 sub new
4517 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4518 0 my $class = shift;
4519 0 my $self = {
4520 #
4521 #
4522 #
4523 PublicExportID => shift,
4524
4525 #
4526 # Date the export was created
4527 #
4528 DateAdded => shift,
4529
4530 #
4531 # Type of export
4532 #
4533 Type => shift,
4534
4535 #
4536 # Current status of export
4537 #
4538 Status => shift,
4539
4540 #
4541 # Long description of the export
4542 #
4543 Info => shift,
4544
4545 #
4546 # Name of the file
4547 #
4548 Filename => shift,
4549
4550 #
4551 # Link to download the export
4552 #
4553 Link => shift,
4554
4555 };
4556 0 bless $self, $class;
4557 0 return $self;
4558 }
4559
4560 #
4561 # Type of export
4562 #
4563 package ApiTypes::ExportFileFormats;
4564 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
4565 #
4566 # Export in comma separated values format.
4567 #
4568 1 CSV => '1',
4569
4570 #
4571 # Export in xml format
4572 #
4573 XML => '2',
4574
4575 #
4576 # Export in json format
4577 #
4578 JSON => '3',
4579
4580 1 };
4581
4582 #
4583 #
4584 #
4585 package ApiTypes::ExportLink;
4586 sub new
4587 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4588 0 my $class = shift;
4589 0 my $self = {
4590 #
4591 # Direct URL to the exported file
4592 #
4593 Link => shift,
4594
4595 };
4596 0 bless $self, $class;
4597 0 return $self;
4598 }
4599
4600 #
4601 # Current status of export
4602 #
4603 package ApiTypes::ExportStatus;
4604 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
4605 #
4606 # Export had an error and can not be downloaded.
4607 #
4608 1 ERROR => '-1',
4609
4610 #
4611 # Export is currently loading and can not be downloaded.
4612 #
4613 LOADING => '0',
4614
4615 #
4616 # Export is currently available for downloading.
4617 #
4618 READY => '1',
4619
4620 #
4621 # Export is no longer available for downloading.
4622 #
4623 EXPIRED => '2',
4624
4625 1 };
4626
4627 #
4628 # Number of Exports, grouped by export type
4629 #
4630 package ApiTypes::ExportTypeCounts;
4631 sub new
4632 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4633 0 my $class = shift;
4634 0 my $self = {
4635 #
4636 #
4637 #
4638 Log => shift,
4639
4640 #
4641 #
4642 #
4643 Contact => shift,
4644
4645 #
4646 # Json representation of a campaign
4647 #
4648 Campaign => shift,
4649
4650 #
4651 # True, if you have enabled link tracking. Otherwise, false
4652 #
4653 LinkTracking => shift,
4654
4655 #
4656 # Json representation of a survey
4657 #
4658 Survey => shift,
4659
4660 };
4661 0 bless $self, $class;
4662 0 return $self;
4663 }
4664
4665 #
4666 # Object containig tracking data.
4667 #
4668 package ApiTypes::LinkTrackingDetails;
4669 sub new
4670 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4671 0 my $class = shift;
4672 0 my $self = {
4673 #
4674 # Number of items.
4675 #
4676 Count => shift,
4677
4678 #
4679 # True, if there are more detailed data available. Otherwise, false
4680 #
4681 MoreAvailable => shift,
4682
4683 #
4684 #
4685 #
4686 TrackedLink => shift,
4687
4688 };
4689 0 bless $self, $class;
4690 0 return $self;
4691 }
4692
4693 #
4694 # List of Contacts, with detailed data about its contents.
4695 #
4696 package ApiTypes::List;
4697 sub new
4698 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4699 0 my $class = shift;
4700 0 my $self = {
4701 #
4702 # ID number of selected list.
4703 #
4704 ListID => shift,
4705
4706 #
4707 # Name of your list.
4708 #
4709 ListName => shift,
4710
4711 #
4712 # Number of items.
4713 #
4714 Count => shift,
4715
4716 #
4717 # ID code of list
4718 #
4719 PublicListID => shift,
4720
4721 #
4722 # Date of creation in YYYY-MM-DDThh:ii:ss format
4723 #
4724 DateAdded => shift,
4725
4726 #
4727 # True: Allow unsubscribing from this list. Otherwise, false
4728 #
4729 AllowUnsubscribe => shift,
4730
4731 #
4732 # Query used for filtering.
4733 #
4734 Rule => shift,
4735
4736 };
4737 0 bless $self, $class;
4738 0 return $self;
4739 }
4740
4741 #
4742 # Detailed information about litmus credits
4743 #
4744 package ApiTypes::LitmusCredits;
4745 sub new
4746 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4747 0 my $class = shift;
4748 0 my $self = {
4749 #
4750 # Date in YYYY-MM-DDThh:ii:ss format
4751 #
4752 Date => shift,
4753
4754 #
4755 # Amount of money in transaction
4756 #
4757 Amount => shift,
4758
4759 };
4760 0 bless $self, $class;
4761 0 return $self;
4762 }
4763
4764 #
4765 # Logs for selected date range
4766 #
4767 package ApiTypes::Log;
4768 sub new
4769 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4770 0 my $class = shift;
4771 0 my $self = {
4772 #
4773 # Starting date for search in YYYY-MM-DDThh:mm:ss format.
4774 #
4775 From => shift,
4776
4777 #
4778 # Ending date for search in YYYY-MM-DDThh:mm:ss format.
4779 #
4780 To => shift,
4781
4782 #
4783 # Number of recipients
4784 #
4785 Recipients => shift,
4786
4787 };
4788 0 bless $self, $class;
4789 0 return $self;
4790 }
4791
4792 #
4793 #
4794 #
4795 package ApiTypes::LogJobStatus;
4796 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
4797 #
4798 # Email has been submitted successfully and is queued for sending.
4799 #
4800 1 READYTOSEND => '1',
4801
4802 #
4803 # Email has soft bounced and is scheduled to retry.
4804 #
4805 WAITINGTORETRY => '2',
4806
4807 #
4808 # Email is currently sending.
4809 #
4810 SENDING => '3',
4811
4812 #
4813 # Email has errored or bounced for some reason.
4814 #
4815 ERROR => '4',
4816
4817 #
4818 # Email has been successfully delivered.
4819 #
4820 SENT => '5',
4821
4822 #
4823 # Email has been opened by the recipient.
4824 #
4825 OPENED => '6',
4826
4827 #
4828 # Email has had at least one link clicked by the recipient.
4829 #
4830 CLICKED => '7',
4831
4832 #
4833 # Email has been unsubscribed by the recipient.
4834 #
4835 UNSUBSCRIBED => '8',
4836
4837 #
4838 # Email has been complained about or marked as spam by the recipient.
4839 #
4840 ABUSEREPORT => '9',
4841
4842 1 };
4843
4844 #
4845 # Summary of log status, based on specified date range.
4846 #
4847 package ApiTypes::LogStatusSummary;
4848 sub new
4849 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4850 0 my $class = shift;
4851 0 my $self = {
4852 #
4853 # Starting date for search in YYYY-MM-DDThh:mm:ss format.
4854 #
4855 From => shift,
4856
4857 #
4858 # Ending date for search in YYYY-MM-DDThh:mm:ss format.
4859 #
4860 To => shift,
4861
4862 #
4863 # Overall duration
4864 #
4865 Duration => shift,
4866
4867 #
4868 # Number of recipients
4869 #
4870 Recipients => shift,
4871
4872 #
4873 # Number of emails
4874 #
4875 EmailTotal => shift,
4876
4877 #
4878 # Number of SMS
4879 #
4880 SmsTotal => shift,
4881
4882 #
4883 # Number of delivered messages
4884 #
4885 Delivered => shift,
4886
4887 #
4888 # Number of bounced messages
4889 #
4890 Bounced => shift,
4891
4892 #
4893 # Number of messages in progress
4894 #
4895 InProgress => shift,
4896
4897 #
4898 # Number of opened messages
4899 #
4900 Opened => shift,
4901
4902 #
4903 # Number of clicked messages
4904 #
4905 Clicked => shift,
4906
4907 #
4908 # Number of unsubscribed messages
4909 #
4910 Unsubscribed => shift,
4911
4912 #
4913 # Number of complaint messages
4914 #
4915 Complaints => shift,
4916
4917 #
4918 # Number of inbound messages
4919 #
4920 Inbound => shift,
4921
4922 #
4923 # Number of manually cancelled messages
4924 #
4925 ManualCancel => shift,
4926
4927 #
4928 # Number of messages flagged with 'Not Delivered'
4929 #
4930 NotDelivered => shift,
4931
4932 #
4933 # ID number of template used
4934 #
4935 TemplateChannel => shift,
4936
4937 };
4938 0 bless $self, $class;
4939 0 return $self;
4940 }
4941
4942 #
4943 # Overall log summary information.
4944 #
4945 package ApiTypes::LogSummary;
4946 sub new
4947 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
4948 0 my $class = shift;
4949 0 my $self = {
4950 #
4951 # Summary of log status, based on specified date range.
4952 #
4953 LogStatusSummary => shift,
4954
4955 #
4956 # Summary of bounced categories, based on specified date range.
4957 #
4958 BouncedCategorySummary => shift,
4959
4960 #
4961 # Daily summary of log status, based on specified date range.
4962 #
4963 DailyLogStatusSummary => shift,
4964
4965 };
4966 0 bless $self, $class;
4967 0 return $self;
4968 }
4969
4970 #
4971 #
4972 #
4973 package ApiTypes::MessageCategory;
4974 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
4975 #
4976 #
4977 #
4978 1 UNKNOWN => '0',
4979
4980 #
4981 #
4982 #
4983 IGNORE => '1',
4984
4985 #
4986 # Number of messages marked as SPAM
4987 #
4988 SPAM => '2',
4989
4990 #
4991 # Number of blacklisted messages
4992 #
4993 BLACKLISTED => '3',
4994
4995 #
4996 # Number of messages flagged with 'No Mailbox'
4997 #
4998 NOMAILBOX => '4',
4999
5000 #
5001 # Number of messages flagged with 'Grey Listed'
5002 #
5003 GREYLISTED => '5',
5004
5005 #
5006 # Number of messages flagged with 'Throttled'
5007 #
5008 THROTTLED => '6',
5009
5010 #
5011 # Number of messages flagged with 'Timeout'
5012 #
5013 TIMEOUT => '7',
5014
5015 #
5016 # Number of messages flagged with 'Connection Problem'
5017 #
5018 CONNECTIONPROBLEM => '8',
5019
5020 #
5021 # Number of messages flagged with 'SPF Problem'
5022 #
5023 SPFPROBLEM => '9',
5024
5025 #
5026 # Number of messages flagged with 'Account Problem'
5027 #
5028 ACCOUNTPROBLEM => '10',
5029
5030 #
5031 # Number of messages flagged with 'DNS Problem'
5032 #
5033 DNSPROBLEM => '11',
5034
5035 #
5036 #
5037 #
5038 NOTDELIVEREDCANCELLED => '12',
5039
5040 #
5041 # Number of messages flagged with 'Code Error'
5042 #
5043 CODEERROR => '13',
5044
5045 #
5046 # Number of manually cancelled messages
5047 #
5048 MANUALCANCEL => '14',
5049
5050 #
5051 # Number of messages flagged with 'Connection terminated'
5052 #
5053 CONNECTIONTERMINATED => '15',
5054
5055 #
5056 # Number of messages flagged with 'Not Delivered'
5057 #
5058 NOTDELIVERED => '16',
5059
5060 1 };
5061
5062 #
5063 # Queue of notifications
5064 #
5065 package ApiTypes::NotificationQueue;
5066 sub new
5067 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5068 0 my $class = shift;
5069 0 my $self = {
5070 #
5071 # Creation date.
5072 #
5073 DateCreated => shift,
5074
5075 #
5076 # Date of last status change.
5077 #
5078 StatusChangeDate => shift,
5079
5080 #
5081 # Actual status.
5082 #
5083 NewStatus => shift,
5084
5085 #
5086 #
5087 #
5088 Reference => shift,
5089
5090 #
5091 # Error message.
5092 #
5093 ErrorMessage => shift,
5094
5095 #
5096 # Number of previous delivery attempts
5097 #
5098 RetryCount => shift,
5099
5100 };
5101 0 bless $self, $class;
5102 0 return $self;
5103 }
5104
5105 #
5106 # Detailed information about existing money transfers.
5107 #
5108 package ApiTypes::Payment;
5109 sub new
5110 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5111 0 my $class = shift;
5112 0 my $self = {
5113 #
5114 # Date in YYYY-MM-DDThh:ii:ss format
5115 #
5116 Date => shift,
5117
5118 #
5119 # Amount of money in transaction
5120 #
5121 Amount => shift,
5122
5123 #
5124 # Source of URL of payment
5125 #
5126 Source => shift,
5127
5128 };
5129 0 bless $self, $class;
5130 0 return $self;
5131 }
5132
5133 #
5134 # Basic information about your profile
5135 #
5136 package ApiTypes::Profile;
5137 sub new
5138 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5139 0 my $class = shift;
5140 0 my $self = {
5141 #
5142 # First name.
5143 #
5144 FirstName => shift,
5145
5146 #
5147 # Last name.
5148 #
5149 LastName => shift,
5150
5151 #
5152 # Company name.
5153 #
5154 Company => shift,
5155
5156 #
5157 # First line of address.
5158 #
5159 Address1 => shift,
5160
5161 #
5162 # Second line of address.
5163 #
5164 Address2 => shift,
5165
5166 #
5167 # City.
5168 #
5169 City => shift,
5170
5171 #
5172 # State or province.
5173 #
5174 State => shift,
5175
5176 #
5177 # Zip/postal code.
5178 #
5179 Zip => shift,
5180
5181 #
5182 # Numeric ID of country. A file with the list of countries is available <a href="http://api.elasticemail.com/public/countries"><b>here</b></a>
5183 #
5184 CountryID => shift,
5185
5186 #
5187 # Phone number
5188 #
5189 Phone => shift,
5190
5191 #
5192 # Proper email address.
5193 #
5194 Email => shift,
5195
5196 #
5197 # Code used for tax purposes.
5198 #
5199 TaxCode => shift,
5200
5201 };
5202 0 bless $self, $class;
5203 0 return $self;
5204 }
5205
5206 #
5207 #
5208 #
5209 package ApiTypes::QuestionType;
5210 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
5211 #
5212 #
5213 #
5214 1 RADIOBUTTONS => '1',
5215
5216 #
5217 #
5218 #
5219 DROPDOWNMENU => '2',
5220
5221 #
5222 #
5223 #
5224 CHECKBOXES => '3',
5225
5226 #
5227 #
5228 #
5229 LONGANSWER => '4',
5230
5231 #
5232 #
5233 #
5234 TEXTBOX => '5',
5235
5236 #
5237 # Date in YYYY-MM-DDThh:ii:ss format
5238 #
5239 DATE => '6',
5240
5241 1 };
5242
5243 #
5244 # Detailed information about message recipient
5245 #
5246 package ApiTypes::Recipient;
5247 sub new
5248 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5249 0 my $class = shift;
5250 0 my $self = {
5251 #
5252 # True, if message is SMS. Otherwise, false
5253 #
5254 IsSms => shift,
5255
5256 #
5257 # ID number of selected message.
5258 #
5259 MsgID => shift,
5260
5261 #
5262 # Ending date for search in YYYY-MM-DDThh:mm:ss format.
5263 #
5264 To => shift,
5265
5266 #
5267 # Name of recipient's status: Submitted, ReadyToSend, WaitingToRetry, Sending, Bounced, Sent, Opened, Clicked, Unsubscribed, AbuseReport
5268 #
5269 Status => shift,
5270
5271 #
5272 # Name of selected Channel.
5273 #
5274 Channel => shift,
5275
5276 #
5277 # Date in YYYY-MM-DDThh:ii:ss format
5278 #
5279 Date => shift,
5280
5281 #
5282 # Content of message, HTML encoded
5283 #
5284 Message => shift,
5285
5286 #
5287 # True, if message category should be shown. Otherwise, false
5288 #
5289 ShowCategory => shift,
5290
5291 #
5292 # Name of message category
5293 #
5294 MessageCategory => shift,
5295
5296 #
5297 # ID of message category
5298 #
5299 MessageCategoryID => shift,
5300
5301 #
5302 # Date of last status change.
5303 #
5304 StatusChangeDate => shift,
5305
5306 #
5307 # Date of next try
5308 #
5309 NextTryOn => shift,
5310
5311 #
5312 # Default subject of email.
5313 #
5314 Subject => shift,
5315
5316 #
5317 # Default From: email address.
5318 #
5319 FromEmail => shift,
5320
5321 #
5322 # ID of certain mail job
5323 #
5324 JobID => shift,
5325
5326 #
5327 # True, if message is a SMS and status is not yet confirmed. Otherwise, false
5328 #
5329 SmsUpdateRequired => shift,
5330
5331 #
5332 # Content of message
5333 #
5334 TextMessage => shift,
5335
5336 #
5337 # Comma separated ID numbers of messages.
5338 #
5339 MessageSid => shift,
5340
5341 };
5342 0 bless $self, $class;
5343 0 return $self;
5344 }
5345
5346 #
5347 # Referral details for this account.
5348 #
5349 package ApiTypes::Referral;
5350 sub new
5351 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5352 0 my $class = shift;
5353 0 my $self = {
5354 #
5355 # Current amount of dolars you have from referring.
5356 #
5357 CurrentReferralCredit => shift,
5358
5359 #
5360 # Number of active referrals.
5361 #
5362 CurrentReferralCount => shift,
5363
5364 };
5365 0 bless $self, $class;
5366 0 return $self;
5367 }
5368
5369 #
5370 # Detailed sending reputation of your account.
5371 #
5372 package ApiTypes::ReputationDetail;
5373 sub new
5374 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5375 0 my $class = shift;
5376 0 my $self = {
5377 #
5378 # Overall reputation impact, based on the most important factors.
5379 #
5380 Impact => shift,
5381
5382 #
5383 # Percent of Complaining users - those, who do not want to receive email from you.
5384 #
5385 AbusePercent => shift,
5386
5387 #
5388 # Percent of Unknown users - users that couldn't be found
5389 #
5390 UnknownUsersPercent => shift,
5391
5392 #
5393 #
5394 #
5395 OpenedPercent => shift,
5396
5397 #
5398 #
5399 #
5400 ClickedPercent => shift,
5401
5402 #
5403 # Penalty from messages marked as spam.
5404 #
5405 AverageSpamScore => shift,
5406
5407 #
5408 # Percent of Bounced users
5409 #
5410 FailedSpamPercent => shift,
5411
5412 #
5413 # Points from quantity of your emails.
5414 #
5415 RepEmailsSent => shift,
5416
5417 #
5418 # Average reputation.
5419 #
5420 AverageReputation => shift,
5421
5422 #
5423 # Actual price level.
5424 #
5425 PriceLevelReputation => shift,
5426
5427 #
5428 # Reputation needed to change pricing.
5429 #
5430 NextPriceLevelReputation => shift,
5431
5432 #
5433 # Amount of emails sent from this account
5434 #
5435 PriceLevel => shift,
5436
5437 #
5438 # True, if tracking domain is correctly configured. Otherwise, false.
5439 #
5440 TrackingDomainValid => shift,
5441
5442 #
5443 # True, if sending domain is correctly configured. Otherwise, false.
5444 #
5445 SenderDomainValid => shift,
5446
5447 };
5448 0 bless $self, $class;
5449 0 return $self;
5450 }
5451
5452 #
5453 # Reputation history of your account.
5454 #
5455 package ApiTypes::ReputationHistory;
5456 sub new
5457 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5458 0 my $class = shift;
5459 0 my $self = {
5460 #
5461 # Creation date.
5462 #
5463 DateCreated => shift,
5464
5465 #
5466 # Percent of Complaining users - those, who do not want to receive email from you.
5467 #
5468 AbusePercent => shift,
5469
5470 #
5471 # Percent of Unknown users - users that couldn't be found
5472 #
5473 UnknownUsersPercent => shift,
5474
5475 #
5476 #
5477 #
5478 OpenedPercent => shift,
5479
5480 #
5481 #
5482 #
5483 ClickedPercent => shift,
5484
5485 #
5486 # Penalty from messages marked as spam.
5487 #
5488 AverageSpamScore => shift,
5489
5490 #
5491 # Points from proper setup of your account
5492 #
5493 SetupScore => shift,
5494
5495 #
5496 # Points from quantity of your emails.
5497 #
5498 RepEmailsSent => shift,
5499
5500 #
5501 # Numeric reputation
5502 #
5503 Reputation => shift,
5504
5505 };
5506 0 bless $self, $class;
5507 0 return $self;
5508 }
5509
5510 #
5511 # Overall reputation impact, based on the most important factors.
5512 #
5513 package ApiTypes::ReputationImpact;
5514 sub new
5515 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5516 0 my $class = shift;
5517 0 my $self = {
5518 #
5519 # Abuses - mails sent to user without their consent
5520 #
5521 Abuse => shift,
5522
5523 #
5524 # Users, that could not be reached.
5525 #
5526 UnknownUsers => shift,
5527
5528 #
5529 # Number of opened messages
5530 #
5531 Opened => shift,
5532
5533 #
5534 # Number of clicked messages
5535 #
5536 Clicked => shift,
5537
5538 #
5539 # Penalty from messages marked as spam.
5540 #
5541 AverageSpamScore => shift,
5542
5543 #
5544 # Content analysis.
5545 #
5546 ServerFilter => shift,
5547
5548 #
5549 # Tracking domain.
5550 #
5551 TrackingDomain => shift,
5552
5553 #
5554 # Sending domain.
5555 #
5556 SenderDomain => shift,
5557
5558 };
5559 0 bless $self, $class;
5560 0 return $self;
5561 }
5562
5563 #
5564 # Information about Contact Segment, selected by RULE.
5565 #
5566 package ApiTypes::Segment;
5567 sub new
5568 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5569 0 my $class = shift;
5570 0 my $self = {
5571 #
5572 # ID number of your segment.
5573 #
5574 SegmentID => shift,
5575
5576 #
5577 # Filename
5578 #
5579 Name => shift,
5580
5581 #
5582 # Query used for filtering.
5583 #
5584 Rule => shift,
5585
5586 #
5587 # Number of items from last check.
5588 #
5589 LastCount => shift,
5590
5591 #
5592 # History of segment information.
5593 #
5594 History => shift,
5595
5596 };
5597 0 bless $self, $class;
5598 0 return $self;
5599 }
5600
5601 #
5602 # Segment History
5603 #
5604 package ApiTypes::SegmentHistory;
5605 sub new
5606 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5607 0 my $class = shift;
5608 0 my $self = {
5609 #
5610 # ID number of history.
5611 #
5612 SegmentHistoryID => shift,
5613
5614 #
5615 # ID number of your segment.
5616 #
5617 SegmentID => shift,
5618
5619 #
5620 # Date in YYYY-MM-DD format
5621 #
5622 Day => shift,
5623
5624 #
5625 # Number of items.
5626 #
5627 Count => shift,
5628
5629 #
5630 #
5631 #
5632 EngagedCount => shift,
5633
5634 #
5635 #
5636 #
5637 ActiveCount => shift,
5638
5639 #
5640 #
5641 #
5642 BouncedCount => shift,
5643
5644 #
5645 # Total emails clicked
5646 #
5647 UnsubscribedCount => shift,
5648
5649 #
5650 #
5651 #
5652 AbuseCount => shift,
5653
5654 #
5655 #
5656 #
5657 InactiveCount => shift,
5658
5659 };
5660 0 bless $self, $class;
5661 0 return $self;
5662 }
5663
5664 #
5665 #
5666 #
5667 package ApiTypes::SendingPermission;
5668 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
5669 #
5670 # Sending not allowed.
5671 #
5672 1 EENONE => '0',
5673
5674 #
5675 # Allow sending via SMTP only.
5676 #
5677 SMTP => '1',
5678
5679 #
5680 # Allow sending via HTTP API only.
5681 #
5682 HTTPAPI => '2',
5683
5684 #
5685 # Allow sending via SMTP and HTTP API.
5686 #
5687 SMTPANDHTTPAPI => '3',
5688
5689 #
5690 # Allow sending via the website interface only.
5691 #
5692 INTERFACE => '4',
5693
5694 #
5695 # Allow sending via SMTP and the website interface.
5696 #
5697 SMTPANDINTERFACE => '5',
5698
5699 #
5700 # Allow sendnig via HTTP API and the website interface.
5701 #
5702 HTTPAPIANDINTERFACE => '6',
5703
5704 #
5705 # Sending allowed via SMTP, HTTP API and the website interface.
5706 #
5707 ALL => '255',
5708
5709 1 };
5710
5711 #
5712 # Spam check of specified message.
5713 #
5714 package ApiTypes::SpamCheck;
5715 sub new
5716 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5717 0 my $class = shift;
5718 0 my $self = {
5719 #
5720 # Total spam score from
5721 #
5722 TotalScore => shift,
5723
5724 #
5725 # Date in YYYY-MM-DDThh:ii:ss format
5726 #
5727 Date => shift,
5728
5729 #
5730 # Default subject of email.
5731 #
5732 Subject => shift,
5733
5734 #
5735 # Default From: email address.
5736 #
5737 FromEmail => shift,
5738
5739 #
5740 # ID number of selected message.
5741 #
5742 MsgID => shift,
5743
5744 #
5745 # Name of selected channel.
5746 #
5747 ChannelName => shift,
5748
5749 #
5750 #
5751 #
5752 Rules => shift,
5753
5754 };
5755 0 bless $self, $class;
5756 0 return $self;
5757 }
5758
5759 #
5760 # Single spam score
5761 #
5762 package ApiTypes::SpamRule;
5763 sub new
5764 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5765 0 my $class = shift;
5766 0 my $self = {
5767 #
5768 # Spam score
5769 #
5770 Score => shift,
5771
5772 #
5773 # Name of rule
5774 #
5775 Key => shift,
5776
5777 #
5778 # Description of rule.
5779 #
5780 Description => shift,
5781
5782 };
5783 0 bless $self, $class;
5784 0 return $self;
5785 }
5786
5787 #
5788 #
5789 #
5790 package ApiTypes::SplitOptimization;
5791 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
5792 #
5793 # Number of opened messages
5794 #
5795 1 OPENED => '0',
5796
5797 #
5798 # Number of clicked messages
5799 #
5800 CLICKED => '1',
5801
5802 1 };
5803
5804 #
5805 # Subaccount. Contains detailed data of your Subaccount.
5806 #
5807 package ApiTypes::SubAccount;
5808 sub new
5809 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5810 0 my $class = shift;
5811 0 my $self = {
5812 #
5813 # Public key for limited access to your account such as contact/add so you can use it safely on public websites.
5814 #
5815 PublicAccountID => shift,
5816
5817 #
5818 # ApiKey that gives you access to our SMTP and HTTP API's.
5819 #
5820 ApiKey => shift,
5821
5822 #
5823 # Proper email address.
5824 #
5825 Email => shift,
5826
5827 #
5828 # ID number of mailer
5829 #
5830 MailerID => shift,
5831
5832 #
5833 # Name of your custom IP Pool to be used in the sending process
5834 #
5835 PoolName => shift,
5836
5837 #
5838 # Date of last activity on account
5839 #
5840 LastActivity => shift,
5841
5842 #
5843 # Amount of email credits
5844 #
5845 EmailCredits => shift,
5846
5847 #
5848 # True, if account needs credits to send emails. Otherwise, false
5849 #
5850 RequiresEmailCredits => shift,
5851
5852 #
5853 # Amount of credits added to account automatically
5854 #
5855 MonthlyRefillCredits => shift,
5856
5857 #
5858 # True, if account needs credits to buy templates. Otherwise, false
5859 #
5860 RequiresTemplateCredits => shift,
5861
5862 #
5863 # Amount of Litmus credits
5864 #
5865 LitmusCredits => shift,
5866
5867 #
5868 # True, if account is able to send template tests to Litmus. Otherwise, false
5869 #
5870 EnableLitmusTest => shift,
5871
5872 #
5873 # True, if account needs credits to send emails. Otherwise, false
5874 #
5875 RequiresLitmusCredits => shift,
5876
5877 #
5878 # True, if account can buy templates on its own. Otherwise, false
5879 #
5880 EnablePremiumTemplates => shift,
5881
5882 #
5883 # True, if account can request for private IP on its own. Otherwise, false
5884 #
5885 EnablePrivateIPRequest => shift,
5886
5887 #
5888 # Amount of emails sent from this account
5889 #
5890 TotalEmailsSent => shift,
5891
5892 #
5893 # Percent of Unknown users - users that couldn't be found
5894 #
5895 UnknownUsersPercent => shift,
5896
5897 #
5898 # Percent of Complaining users - those, who do not want to receive email from you.
5899 #
5900 AbusePercent => shift,
5901
5902 #
5903 # Percent of Bounced users
5904 #
5905 FailedSpamPercent => shift,
5906
5907 #
5908 # Numeric reputation
5909 #
5910 Reputation => shift,
5911
5912 #
5913 # Amount of emails account can send daily
5914 #
5915 DailySendLimit => shift,
5916
5917 #
5918 # Name of account's status: Deleted, Disabled, UnderReview, NoPaymentsAllowed, NeverSignedIn, Active, SystemPaused
5919 #
5920 Status => shift,
5921
5922 };
5923 0 bless $self, $class;
5924 0 return $self;
5925 }
5926
5927 #
5928 # Detailed account settings.
5929 #
5930 package ApiTypes::SubAccountSettings;
5931 sub new
5932 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
5933 0 my $class = shift;
5934 0 my $self = {
5935 #
5936 # Proper email address.
5937 #
5938 Email => shift,
5939
5940 #
5941 # True, if account needs credits to send emails. Otherwise, false
5942 #
5943 RequiresEmailCredits => shift,
5944
5945 #
5946 # True, if account needs credits to buy templates. Otherwise, false
5947 #
5948 RequiresTemplateCredits => shift,
5949
5950 #
5951 # Amount of credits added to account automatically
5952 #
5953 MonthlyRefillCredits => shift,
5954
5955 #
5956 # Amount of Litmus credits
5957 #
5958 LitmusCredits => shift,
5959
5960 #
5961 # True, if account is able to send template tests to Litmus. Otherwise, false
5962 #
5963 EnableLitmusTest => shift,
5964
5965 #
5966 # True, if account needs credits to send emails. Otherwise, false
5967 #
5968 RequiresLitmusCredits => shift,
5969
5970 #
5971 # Maximum size of email including attachments in MB's
5972 #
5973 EmailSizeLimit => shift,
5974
5975 #
5976 # Amount of emails account can send daily
5977 #
5978 DailySendLimit => shift,
5979
5980 #
5981 # Maximum number of contacts the account can have
5982 #
5983 MaxContacts => shift,
5984
5985 #
5986 # True, if account can request for private IP on its own. Otherwise, false
5987 #
5988 EnablePrivateIPRequest => shift,
5989
5990 #
5991 # True, if you want to use Advanced Tools. Otherwise, false
5992 #
5993 EnableContactFeatures => shift,
5994
5995 #
5996 # Sending permission setting for account
5997 #
5998 SendingPermission => shift,
5999
6000 #
6001 # Name of your custom IP Pool to be used in the sending process
6002 #
6003 PoolName => shift,
6004
6005 #
6006 # Public key for limited access to your account such as contact/add so you can use it safely on public websites.
6007 #
6008 PublicAccountID => shift,
6009
6010 };
6011 0 bless $self, $class;
6012 0 return $self;
6013 }
6014
6015 #
6016 # A survey object
6017 #
6018 package ApiTypes::Survey;
6019 sub new
6020 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
6021 0 my $class = shift;
6022 0 my $self = {
6023 #
6024 # Survey identifier
6025 #
6026 PublicSurveyID => shift,
6027
6028 #
6029 # Creation date.
6030 #
6031 DateCreated => shift,
6032
6033 #
6034 # Last change date
6035 #
6036 DateUpdated => shift,
6037
6038 #
6039 # Filename
6040 #
6041 Name => shift,
6042
6043 #
6044 # Activate, delete, or pause your survey
6045 #
6046 Status => shift,
6047
6048 #
6049 # Number of results count
6050 #
6051 ResultCount => shift,
6052
6053 #
6054 # Survey's steps info
6055 #
6056 SurveyStep => shift,
6057
6058 #
6059 # URL of the survey
6060 #
6061 SurveyLink => shift,
6062
6063 };
6064 0 bless $self, $class;
6065 0 return $self;
6066 }
6067
6068 #
6069 # Object with the single answer's data
6070 #
6071 package ApiTypes::SurveyResultAnswerInfo;
6072 sub new
6073 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
6074 0 my $class = shift;
6075 0 my $self = {
6076 #
6077 # Answer's content
6078 #
6079 content => shift,
6080
6081 #
6082 # Identifier of the step
6083 #
6084 surveystepid => shift,
6085
6086 #
6087 # Identifier of the answer of the step
6088 #
6089 surveystepanswerid => shift,
6090
6091 };
6092 0 bless $self, $class;
6093 0 return $self;
6094 }
6095
6096 #
6097 # Single answer's data with user's specific info
6098 #
6099 package ApiTypes::SurveyResultInfo;
6100 sub new
6101 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
6102 0 my $class = shift;
6103 0 my $self = {
6104 #
6105 # Identifier of the result
6106 #
6107 SurveyResultID => shift,
6108
6109 #
6110 # IP address
6111 #
6112 CreatedFromIP => shift,
6113
6114 #
6115 # Completion date
6116 #
6117 DateCompleted => shift,
6118
6119 #
6120 # Start date
6121 #
6122 DateStart => shift,
6123
6124 #
6125 # Answers for the survey
6126 #
6127 SurveyResultAnswers => shift,
6128
6129 };
6130 0 bless $self, $class;
6131 0 return $self;
6132 }
6133
6134 #
6135 # Summary with all the answers
6136 #
6137 package ApiTypes::SurveyResultsSummary;
6138 sub new
6139 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
6140 0 my $class = shift;
6141 0 my $self = {
6142 #
6143 # Answers' statistics
6144 #
6145 Answers => shift,
6146
6147 #
6148 # Open answers for the question
6149 #
6150 OpenAnswers => shift,
6151
6152 };
6153 0 bless $self, $class;
6154 0 return $self;
6155 }
6156
6157 #
6158 # Data on the survey's result
6159 #
6160 package ApiTypes::SurveyResultsSummaryInfo;
6161 sub new
6162 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
6163 0 my $class = shift;
6164 0 my $self = {
6165 #
6166 # Number of items.
6167 #
6168 Count => shift,
6169
6170 #
6171 # Summary statistics
6172 #
6173 Summary => shift,
6174
6175 };
6176 0 bless $self, $class;
6177 0 return $self;
6178 }
6179
6180 #
6181 #
6182 #
6183 package ApiTypes::SurveyStatus;
6184 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
6185 #
6186 # The survey is deleted
6187 #
6188 1 DELETED => '-1',
6189
6190 #
6191 # The survey is not receiving result for now
6192 #
6193 PAUSED => '0',
6194
6195 #
6196 # The survey is active and receiving answers
6197 #
6198 ACTIVE => '1',
6199
6200 1 };
6201
6202 #
6203 # Survey's single step info with the answers
6204 #
6205 package ApiTypes::SurveyStep;
6206 sub new
6207 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
6208 0 my $class = shift;
6209 0 my $self = {
6210 #
6211 # Identifier of the step
6212 #
6213 SurveyStepID => shift,
6214
6215 #
6216 # Type of the step
6217 #
6218 SurveyStepType => shift,
6219
6220 #
6221 # Type of the question
6222 #
6223 QuestionType => shift,
6224
6225 #
6226 # Answer's content
6227 #
6228 Content => shift,
6229
6230 #
6231 # Is the answer required
6232 #
6233 Required => shift,
6234
6235 #
6236 # Sequence of the answers
6237 #
6238 Sequence => shift,
6239
6240 #
6241 # Answer object of the step
6242 #
6243 SurveyStepAnswer => shift,
6244
6245 };
6246 0 bless $self, $class;
6247 0 return $self;
6248 }
6249
6250 #
6251 # Single step's answer object
6252 #
6253 package ApiTypes::SurveyStepAnswer;
6254 sub new
6255 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
6256 0 my $class = shift;
6257 0 my $self = {
6258 #
6259 # Identifier of the answer of the step
6260 #
6261 SurveyStepAnswerID => shift,
6262
6263 #
6264 # Answer's content
6265 #
6266 Content => shift,
6267
6268 #
6269 # Sequence of the answers
6270 #
6271 Sequence => shift,
6272
6273 };
6274 0 bless $self, $class;
6275 0 return $self;
6276 }
6277
6278 #
6279 #
6280 #
6281 package ApiTypes::SurveyStepType;
6282 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
6283 #
6284 #
6285 #
6286 1 PAGEBREAK => '1',
6287
6288 #
6289 #
6290 #
6291 QUESTION => '2',
6292
6293 #
6294 #
6295 #
6296 TEXTMEDIA => '3',
6297
6298 #
6299 #
6300 #
6301 CONFIRMATIONPAGE => '4',
6302
6303 #
6304 #
6305 #
6306 EXPIREDPAGE => '5',
6307
6308 1 };
6309
6310 #
6311 # Template
6312 #
6313 package ApiTypes::Template;
6314 sub new
6315 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
6316 0 my $class = shift;
6317 0 my $self = {
6318 #
6319 # ID number of template.
6320 #
6321 TemplateID => shift,
6322
6323 #
6324 # 0 for API connections
6325 #
6326 TemplateType => shift,
6327
6328 #
6329 # Filename
6330 #
6331 Name => shift,
6332
6333 #
6334 # Date of creation in YYYY-MM-DDThh:ii:ss format
6335 #
6336 DateAdded => shift,
6337
6338 #
6339 # CSS style
6340 #
6341 Css => shift,
6342
6343 #
6344 # Default subject of email.
6345 #
6346 Subject => shift,
6347
6348 #
6349 # Default From: email address.
6350 #
6351 FromEmail => shift,
6352
6353 #
6354 # Default From: name.
6355 #
6356 FromName => shift,
6357
6358 #
6359 # HTML code of email (needs escaping).
6360 #
6361 BodyHtml => shift,
6362
6363 #
6364 # Text body of email.
6365 #
6366 BodyText => shift,
6367
6368 #
6369 # ID number of original template.
6370 #
6371 OriginalTemplateID => shift,
6372
6373 #
6374 # Enum: 0 - private, 1 - public, 2 - mockup
6375 #
6376 TemplateScope => shift,
6377
6378 };
6379 0 bless $self, $class;
6380 0 return $self;
6381 }
6382
6383 #
6384 # List of templates (including drafts)
6385 #
6386 package ApiTypes::TemplateList;
6387 sub new
6388 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
6389 0 my $class = shift;
6390 0 my $self = {
6391 #
6392 # List of templates
6393 #
6394 Templates => shift,
6395
6396 #
6397 # List of draft templates
6398 #
6399 DraftTemplate => shift,
6400
6401 };
6402 0 bless $self, $class;
6403 0 return $self;
6404 }
6405
6406 #
6407 #
6408 #
6409 package ApiTypes::TemplateScope;
6410 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
6411 #
6412 # Template is available for this account only.
6413 #
6414 1 PRIVATE => '0',
6415
6416 #
6417 # Template is available for this account and it's sub-accounts.
6418 #
6419 PUBLIC => '1',
6420
6421 1 };
6422
6423 #
6424 #
6425 #
6426 package ApiTypes::TemplateType;
6427 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
6428 #
6429 # Template supports any valid HTML
6430 #
6431 1 RAWHTML => '0',
6432
6433 #
6434 # Template is created and can only be modified in drag and drop editor
6435 #
6436 DRAGDROPEDITOR => '1',
6437
6438 1 };
6439
6440 #
6441 # Information about tracking link and its clicks.
6442 #
6443 package ApiTypes::TrackedLink;
6444 sub new
6445 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
6446 0 my $class = shift;
6447 0 my $self = {
6448 #
6449 # URL clicked
6450 #
6451 Link => shift,
6452
6453 #
6454 # Number of clicks
6455 #
6456 Clicks => shift,
6457
6458 #
6459 # Percent of clicks
6460 #
6461 Percent => shift,
6462
6463 };
6464 0 bless $self, $class;
6465 0 return $self;
6466 }
6467
6468 #
6469 #
6470 #
6471 package ApiTypes::TrackingType;
6472 1 ▶ use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
6473 #
6474 #
6475 #
6476 1 HTTP => '0',
6477
6478 #
6479 #
6480 #
6481 EXTERNALHTTPS => '1',
6482
6483 1 };
6484
6485 #
6486 # Account usage
6487 #
6488 package ApiTypes::Usage;
6489 sub new
6490 0 ▶ {
Subroutine new: not called CC=1 SCAR=6.9
6491 0 my $class = shift;
6492 0 my $self = {
6493 };
6494 0 bless $self, $class;
6495 0 return $self;
6496 }
6497
6498 # EXAMPLE USAGE:
6499 #package main;
6500
6501 # my @postFiles = ("localfile.txt", "C:\path\to\file\file.csv");
6502 # my @params = [subject => 'mysubject', body_text => 'Hello World', to => 'example@email.com', from => 'example@email.com', ...more params];
6503 # my $response = Api::Email->Send(@params, @postFiles);
6504 # print $response, "\n"
6505
6506
6507 =head1 NAME
6508
6509 ElasticEmail - The great new ElasticEmail!
6510
6511 =head1 VERSION
6512
6513 Version 0.03
6514
6515 =cut
6516
6517 1 our $VERSION = '0.03';
6518
6519
6520 =head1 SYNOPSIS
6521
6522 Quick summary of what the module does.
6523
6524 Perhaps a little code snippet.
6525
6526 use ElasticEmail;
6527
6528 my $foo = ElasticEmail->new();
6529 ...
6530
6531 =head1 EXPORT
6532
6533 A list of functions that can be exported. You can delete this section
6534 if you don't export anything, such as for a purely object-oriented module.
6535
6536 =head1 SUBROUTINES/METHODS
6537
6538 =head2 function1
6539
6540 =cut
6541
6542 0 ▶sub function1 {
Subroutine function1: not called CC=1 SCAR=0.0
6543 }
6544
6545 =head2 function2
6546
6547 =cut
6548
6549 0 ▶sub function2 {
Subroutine function2: not called CC=1 SCAR=0.0
6550 }
6551
6552 =head1 AUTHOR
6553
6554 Elastic Email, C<< <support at elasticemail.com> >>
6555
6556 =head1 BUGS
6557
6558 Please report any bugs or feature requests to C<bug-elasticemail at rt.cpan.org>, or through
6559 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ElasticEmail>. I will be notified, and then you'll
6560 automatically be notified of progress on your bug as I make changes.
6561
6562
6563
6564
6565 =head1 SUPPORT
6566
6567 You can find documentation for this module with the perldoc command.
6568
6569 perldoc ElasticEmail
6570
6571
6572 You can also look for information at:
6573
6574 =over 4
6575
6576 =item * RT: CPAN's request tracker (report bugs here)
6577
6578 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=ElasticEmail>
6579
6580 =item * AnnoCPAN: Annotated CPAN documentation
6581
6582 L<http://annocpan.org/dist/ElasticEmail>
6583
6584 =item * CPAN Ratings
6585
6586 L<http://cpanratings.perl.org/d/ElasticEmail>
6587
6588 =item * Search CPAN
6589
6590 L<http://search.cpan.org/dist/ElasticEmail/>
6591
6592 =back
6593
6594
6595 =head1 ACKNOWLEDGEMENTS
6596
6597
6598 =head1 LICENSE AND COPYRIGHT
6599
6600 Copyright 2017 Elastic Email.
6601
6602 This program is distributed under the MIT (X11) License:
6603 L<http://www.opensource.org/licenses/mit-license.php>
6604
6605 Permission is hereby granted, free of charge, to any person
6606 obtaining a copy of this software and associated documentation
6607 files (the "Software"), to deal in the Software without
6608 restriction, including without limitation the rights to use,
6609 copy, modify, merge, publish, distribute, sublicense, and/or sell
6610 copies of the Software, and to permit persons to whom the
6611 Software is furnished to do so, subject to the following
6612 conditions:
6613
6614 The above copyright notice and this permission notice shall be
6615 included in all copies or substantial portions of the Software.
6616
6617 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
6618 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
6619 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
6620 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
6621 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
6622 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
6623 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
6624 OTHER DEALINGS IN THE SOFTWARE.
6625
6626
6627 =cut
6628
6629 1 1; # End of ElasticEmail
↑ Summary ElasticEmail-WebApiClient/t/00-load.t »