sib-api-v3-sdk 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/docs/AttributesApi.md +2 -2
- data/docs/ContactsApi.md +32 -32
- data/docs/CreateEmailCampaign.md +1 -1
- data/docs/CreateSmsCampaign.md +1 -1
- data/docs/{CreaUpdateFolder.md → CreateUpdateFolder.md} +1 -1
- data/docs/EmailCampaignsApi.md +16 -16
- data/docs/FoldersApi.md +16 -16
- data/docs/GetAccountPlan.md +2 -0
- data/docs/GetCampaignOverview.md +1 -1
- data/docs/GetContactCampaignStatsOpened.md +1 -1
- data/docs/GetContactDetails.md +1 -1
- data/docs/GetEmailCampaign.md +3 -3
- data/docs/GetEmailEventReportEvents.md +4 -4
- data/docs/GetExtendedCampaignOverview.md +3 -3
- data/docs/GetExtendedContactDetails.md +1 -1
- data/docs/GetExtendedContactDetailsStatisticsLinks.md +1 -1
- data/docs/GetExtendedContactDetailsStatisticsMessagesSent.md +1 -1
- data/docs/GetExtendedContactDetailsStatisticsOpened.md +1 -1
- data/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md +1 -1
- data/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md +1 -1
- data/docs/GetExtendedList.md +1 -1
- data/docs/GetSmsCampaign.md +3 -3
- data/docs/GetSmsCampaignOverview.md +3 -3
- data/docs/GetSmsEventReportEvents.md +2 -2
- data/docs/GetSmtpTemplateOverview.md +2 -2
- data/docs/GetWebhook.md +2 -2
- data/docs/ListsApi.md +16 -16
- data/docs/ProcessApi.md +2 -2
- data/docs/ResellerApi.md +7 -7
- data/docs/SMSCampaignsApi.md +16 -16
- data/docs/SMTPApi.md +10 -10
- data/docs/SendTransacSms.md +1 -0
- data/docs/SendersApi.md +6 -6
- data/docs/UpdateEmailCampaign.md +1 -1
- data/docs/UpdateSmsCampaign.md +1 -1
- data/docs/WebhooksApi.md +6 -6
- data/lib/sib-api-v3-sdk.rb +1 -1
- data/lib/sib-api-v3-sdk/api/contacts_api.rb +20 -24
- data/lib/sib-api-v3-sdk/api/folders_api.rb +18 -18
- data/lib/sib-api-v3-sdk/api/lists_api.rb +2 -6
- data/lib/sib-api-v3-sdk/api/smtp_api.rb +2 -2
- data/lib/sib-api-v3-sdk/models/create_email_campaign.rb +2 -18
- data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +2 -18
- data/lib/sib-api-v3-sdk/models/{crea_update_folder.rb → create_update_folder.rb} +1 -1
- data/lib/sib-api-v3-sdk/models/get_account_plan.rb +24 -4
- data/lib/sib-api-v3-sdk/models/get_campaign_overview.rb +2 -18
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_opened.rb +1 -20
- data/lib/sib-api-v3-sdk/models/get_contact_details.rb +2 -21
- data/lib/sib-api-v3-sdk/models/get_email_campaign.rb +6 -60
- data/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb +4 -4
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview.rb +6 -60
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details.rb +2 -21
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_links.rb +1 -20
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_messages_sent.rb +1 -20
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_opened.rb +1 -20
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.rb +1 -20
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.rb +1 -20
- data/lib/sib-api-v3-sdk/models/get_extended_list.rb +2 -21
- data/lib/sib-api-v3-sdk/models/get_sms_campaign.rb +6 -63
- data/lib/sib-api-v3-sdk/models/get_sms_campaign_overview.rb +6 -63
- data/lib/sib-api-v3-sdk/models/get_sms_event_report_events.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_smtp_template_overview.rb +4 -42
- data/lib/sib-api-v3-sdk/models/get_webhook.rb +4 -42
- data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +46 -1
- data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +2 -18
- data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +2 -18
- data/lib/sib-api-v3-sdk/version.rb +1 -1
- data/spec/api/contacts_api_spec.rb +3 -3
- data/spec/api/folders_api_spec.rb +2 -2
- data/spec/api/lists_api_spec.rb +1 -1
- data/spec/api/smtp_api_spec.rb +1 -1
- data/spec/models/{crea_update_folder_spec.rb → create_update_folder_spec.rb} +6 -6
- data/spec/models/get_account_plan_spec.rb +12 -0
- data/spec/models/send_transac_sms_spec.rb +10 -0
- metadata +6 -6
@@ -193,26 +193,26 @@ module SibApiV3Sdk
|
|
193
193
|
|
194
194
|
# Create a folder
|
195
195
|
#
|
196
|
-
# @param
|
196
|
+
# @param create_folder Name of the folder
|
197
197
|
# @param [Hash] opts the optional parameters
|
198
198
|
# @return [CreateModel]
|
199
|
-
def create_folder(
|
200
|
-
data, _status_code, _headers = create_folder_with_http_info(
|
199
|
+
def create_folder(create_folder, opts = {})
|
200
|
+
data, _status_code, _headers = create_folder_with_http_info(create_folder, opts)
|
201
201
|
return data
|
202
202
|
end
|
203
203
|
|
204
204
|
# Create a folder
|
205
205
|
#
|
206
|
-
# @param
|
206
|
+
# @param create_folder Name of the folder
|
207
207
|
# @param [Hash] opts the optional parameters
|
208
208
|
# @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
|
209
|
-
def create_folder_with_http_info(
|
209
|
+
def create_folder_with_http_info(create_folder, opts = {})
|
210
210
|
if @api_client.config.debugging
|
211
211
|
@api_client.config.logger.debug "Calling API: ContactsApi.create_folder ..."
|
212
212
|
end
|
213
|
-
# verify the required parameter '
|
214
|
-
if @api_client.config.client_side_validation &&
|
215
|
-
fail ArgumentError, "Missing the required parameter '
|
213
|
+
# verify the required parameter 'create_folder' is set
|
214
|
+
if @api_client.config.client_side_validation && create_folder.nil?
|
215
|
+
fail ArgumentError, "Missing the required parameter 'create_folder' when calling ContactsApi.create_folder"
|
216
216
|
end
|
217
217
|
# resource path
|
218
218
|
local_var_path = "/contacts/folders"
|
@@ -231,7 +231,7 @@ module SibApiV3Sdk
|
|
231
231
|
form_params = {}
|
232
232
|
|
233
233
|
# http body (model)
|
234
|
-
post_body = @api_client.object_to_http_body(
|
234
|
+
post_body = @api_client.object_to_http_body(create_folder)
|
235
235
|
auth_names = ['api-key']
|
236
236
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
237
237
|
:header_params => header_params,
|
@@ -685,7 +685,7 @@ module SibApiV3Sdk
|
|
685
685
|
#
|
686
686
|
# @param list_id Id of the list
|
687
687
|
# @param [Hash] opts the optional parameters
|
688
|
-
# @option opts [
|
688
|
+
# @option opts [DateTime] :modified_since Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ)
|
689
689
|
# @option opts [Integer] :limit Number of documents per page (default to 50)
|
690
690
|
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
691
691
|
# @return [GetContacts]
|
@@ -698,7 +698,7 @@ module SibApiV3Sdk
|
|
698
698
|
#
|
699
699
|
# @param list_id Id of the list
|
700
700
|
# @param [Hash] opts the optional parameters
|
701
|
-
# @option opts [
|
701
|
+
# @option opts [DateTime] :modified_since Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ)
|
702
702
|
# @option opts [Integer] :limit Number of documents per page
|
703
703
|
# @option opts [Integer] :offset Index of the first document of the page
|
704
704
|
# @return [Array<(GetContacts, Fixnum, Hash)>] GetContacts data, response status code and response headers
|
@@ -710,10 +710,6 @@ module SibApiV3Sdk
|
|
710
710
|
if @api_client.config.client_side_validation && list_id.nil?
|
711
711
|
fail ArgumentError, "Missing the required parameter 'list_id' when calling ContactsApi.get_contacts_from_list"
|
712
712
|
end
|
713
|
-
if @api_client.config.client_side_validation && !opts[:'modified_since'].nil? && opts[:'modified_since'] !~ Regexp.new(/YYYY-MM-DD HH:mm:ss/)
|
714
|
-
fail ArgumentError, "invalid value for 'opts[:\"modified_since\"]' when calling ContactsApi.get_contacts_from_list, must conform to the pattern /YYYY-MM-DD HH:mm:ss/."
|
715
|
-
end
|
716
|
-
|
717
713
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
718
714
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_contacts_from_list, must be smaller than or equal to 500.'
|
719
715
|
end
|
@@ -1288,21 +1284,21 @@ module SibApiV3Sdk
|
|
1288
1284
|
# Update a contact folder
|
1289
1285
|
#
|
1290
1286
|
# @param folder_id Id of the folder
|
1291
|
-
# @param
|
1287
|
+
# @param update_folder Name of the folder
|
1292
1288
|
# @param [Hash] opts the optional parameters
|
1293
1289
|
# @return [nil]
|
1294
|
-
def update_folder(folder_id,
|
1295
|
-
update_folder_with_http_info(folder_id,
|
1290
|
+
def update_folder(folder_id, update_folder, opts = {})
|
1291
|
+
update_folder_with_http_info(folder_id, update_folder, opts)
|
1296
1292
|
return nil
|
1297
1293
|
end
|
1298
1294
|
|
1299
1295
|
# Update a contact folder
|
1300
1296
|
#
|
1301
1297
|
# @param folder_id Id of the folder
|
1302
|
-
# @param
|
1298
|
+
# @param update_folder Name of the folder
|
1303
1299
|
# @param [Hash] opts the optional parameters
|
1304
1300
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
1305
|
-
def update_folder_with_http_info(folder_id,
|
1301
|
+
def update_folder_with_http_info(folder_id, update_folder, opts = {})
|
1306
1302
|
if @api_client.config.debugging
|
1307
1303
|
@api_client.config.logger.debug "Calling API: ContactsApi.update_folder ..."
|
1308
1304
|
end
|
@@ -1310,9 +1306,9 @@ module SibApiV3Sdk
|
|
1310
1306
|
if @api_client.config.client_side_validation && folder_id.nil?
|
1311
1307
|
fail ArgumentError, "Missing the required parameter 'folder_id' when calling ContactsApi.update_folder"
|
1312
1308
|
end
|
1313
|
-
# verify the required parameter '
|
1314
|
-
if @api_client.config.client_side_validation &&
|
1315
|
-
fail ArgumentError, "Missing the required parameter '
|
1309
|
+
# verify the required parameter 'update_folder' is set
|
1310
|
+
if @api_client.config.client_side_validation && update_folder.nil?
|
1311
|
+
fail ArgumentError, "Missing the required parameter 'update_folder' when calling ContactsApi.update_folder"
|
1316
1312
|
end
|
1317
1313
|
# resource path
|
1318
1314
|
local_var_path = "/contacts/folders/{folderId}".sub('{' + 'folderId' + '}', folder_id.to_s)
|
@@ -1331,7 +1327,7 @@ module SibApiV3Sdk
|
|
1331
1327
|
form_params = {}
|
1332
1328
|
|
1333
1329
|
# http body (model)
|
1334
|
-
post_body = @api_client.object_to_http_body(
|
1330
|
+
post_body = @api_client.object_to_http_body(update_folder)
|
1335
1331
|
auth_names = ['api-key']
|
1336
1332
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1337
1333
|
:header_params => header_params,
|
@@ -22,26 +22,26 @@ module SibApiV3Sdk
|
|
22
22
|
|
23
23
|
# Create a folder
|
24
24
|
#
|
25
|
-
# @param
|
25
|
+
# @param create_folder Name of the folder
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [CreateModel]
|
28
|
-
def create_folder(
|
29
|
-
data, _status_code, _headers = create_folder_with_http_info(
|
28
|
+
def create_folder(create_folder, opts = {})
|
29
|
+
data, _status_code, _headers = create_folder_with_http_info(create_folder, opts)
|
30
30
|
return data
|
31
31
|
end
|
32
32
|
|
33
33
|
# Create a folder
|
34
34
|
#
|
35
|
-
# @param
|
35
|
+
# @param create_folder Name of the folder
|
36
36
|
# @param [Hash] opts the optional parameters
|
37
37
|
# @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
|
38
|
-
def create_folder_with_http_info(
|
38
|
+
def create_folder_with_http_info(create_folder, opts = {})
|
39
39
|
if @api_client.config.debugging
|
40
40
|
@api_client.config.logger.debug "Calling API: FoldersApi.create_folder ..."
|
41
41
|
end
|
42
|
-
# verify the required parameter '
|
43
|
-
if @api_client.config.client_side_validation &&
|
44
|
-
fail ArgumentError, "Missing the required parameter '
|
42
|
+
# verify the required parameter 'create_folder' is set
|
43
|
+
if @api_client.config.client_side_validation && create_folder.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'create_folder' when calling FoldersApi.create_folder"
|
45
45
|
end
|
46
46
|
# resource path
|
47
47
|
local_var_path = "/contacts/folders"
|
@@ -60,7 +60,7 @@ module SibApiV3Sdk
|
|
60
60
|
form_params = {}
|
61
61
|
|
62
62
|
# http body (model)
|
63
|
-
post_body = @api_client.object_to_http_body(
|
63
|
+
post_body = @api_client.object_to_http_body(create_folder)
|
64
64
|
auth_names = ['api-key']
|
65
65
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
66
66
|
:header_params => header_params,
|
@@ -319,21 +319,21 @@ module SibApiV3Sdk
|
|
319
319
|
# Update a contact folder
|
320
320
|
#
|
321
321
|
# @param folder_id Id of the folder
|
322
|
-
# @param
|
322
|
+
# @param update_folder Name of the folder
|
323
323
|
# @param [Hash] opts the optional parameters
|
324
324
|
# @return [nil]
|
325
|
-
def update_folder(folder_id,
|
326
|
-
update_folder_with_http_info(folder_id,
|
325
|
+
def update_folder(folder_id, update_folder, opts = {})
|
326
|
+
update_folder_with_http_info(folder_id, update_folder, opts)
|
327
327
|
return nil
|
328
328
|
end
|
329
329
|
|
330
330
|
# Update a contact folder
|
331
331
|
#
|
332
332
|
# @param folder_id Id of the folder
|
333
|
-
# @param
|
333
|
+
# @param update_folder Name of the folder
|
334
334
|
# @param [Hash] opts the optional parameters
|
335
335
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
336
|
-
def update_folder_with_http_info(folder_id,
|
336
|
+
def update_folder_with_http_info(folder_id, update_folder, opts = {})
|
337
337
|
if @api_client.config.debugging
|
338
338
|
@api_client.config.logger.debug "Calling API: FoldersApi.update_folder ..."
|
339
339
|
end
|
@@ -341,9 +341,9 @@ module SibApiV3Sdk
|
|
341
341
|
if @api_client.config.client_side_validation && folder_id.nil?
|
342
342
|
fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.update_folder"
|
343
343
|
end
|
344
|
-
# verify the required parameter '
|
345
|
-
if @api_client.config.client_side_validation &&
|
346
|
-
fail ArgumentError, "Missing the required parameter '
|
344
|
+
# verify the required parameter 'update_folder' is set
|
345
|
+
if @api_client.config.client_side_validation && update_folder.nil?
|
346
|
+
fail ArgumentError, "Missing the required parameter 'update_folder' when calling FoldersApi.update_folder"
|
347
347
|
end
|
348
348
|
# resource path
|
349
349
|
local_var_path = "/contacts/folders/{folderId}".sub('{' + 'folderId' + '}', folder_id.to_s)
|
@@ -362,7 +362,7 @@ module SibApiV3Sdk
|
|
362
362
|
form_params = {}
|
363
363
|
|
364
364
|
# http body (model)
|
365
|
-
post_body = @api_client.object_to_http_body(
|
365
|
+
post_body = @api_client.object_to_http_body(update_folder)
|
366
366
|
auth_names = ['api-key']
|
367
367
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
368
368
|
:header_params => header_params,
|
@@ -194,7 +194,7 @@ module SibApiV3Sdk
|
|
194
194
|
#
|
195
195
|
# @param list_id Id of the list
|
196
196
|
# @param [Hash] opts the optional parameters
|
197
|
-
# @option opts [
|
197
|
+
# @option opts [DateTime] :modified_since Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ)
|
198
198
|
# @option opts [Integer] :limit Number of documents per page (default to 50)
|
199
199
|
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
200
200
|
# @return [GetContacts]
|
@@ -207,7 +207,7 @@ module SibApiV3Sdk
|
|
207
207
|
#
|
208
208
|
# @param list_id Id of the list
|
209
209
|
# @param [Hash] opts the optional parameters
|
210
|
-
# @option opts [
|
210
|
+
# @option opts [DateTime] :modified_since Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ)
|
211
211
|
# @option opts [Integer] :limit Number of documents per page
|
212
212
|
# @option opts [Integer] :offset Index of the first document of the page
|
213
213
|
# @return [Array<(GetContacts, Fixnum, Hash)>] GetContacts data, response status code and response headers
|
@@ -219,10 +219,6 @@ module SibApiV3Sdk
|
|
219
219
|
if @api_client.config.client_side_validation && list_id.nil?
|
220
220
|
fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.get_contacts_from_list"
|
221
221
|
end
|
222
|
-
if @api_client.config.client_side_validation && !opts[:'modified_since'].nil? && opts[:'modified_since'] !~ Regexp.new(/YYYY-MM-DD HH:mm:ss/)
|
223
|
-
fail ArgumentError, "invalid value for 'opts[:\"modified_since\"]' when calling ListsApi.get_contacts_from_list, must conform to the pattern /YYYY-MM-DD HH:mm:ss/."
|
224
|
-
end
|
225
|
-
|
226
222
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
227
223
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ListsApi.get_contacts_from_list, must be smaller than or equal to 500.'
|
228
224
|
end
|
@@ -198,7 +198,7 @@ module SibApiV3Sdk
|
|
198
198
|
# @option opts [String] :event Filter the report for a specific event type
|
199
199
|
# @option opts [String] :tags Filter the report for tags (serialized and urlencoded array)
|
200
200
|
# @option opts [String] :message_id Filter on a specific message id
|
201
|
-
# @option opts [
|
201
|
+
# @option opts [Integer] :template_id Filter on a specific template id
|
202
202
|
# @return [GetEmailEventReport]
|
203
203
|
def get_email_event_report(opts = {})
|
204
204
|
data, _status_code, _headers = get_email_event_report_with_http_info(opts)
|
@@ -217,7 +217,7 @@ module SibApiV3Sdk
|
|
217
217
|
# @option opts [String] :event Filter the report for a specific event type
|
218
218
|
# @option opts [String] :tags Filter the report for tags (serialized and urlencoded array)
|
219
219
|
# @option opts [String] :message_id Filter on a specific message id
|
220
|
-
# @option opts [
|
220
|
+
# @option opts [Integer] :template_id Filter on a specific template id
|
221
221
|
# @return [Array<(GetEmailEventReport, Fixnum, Hash)>] GetEmailEventReport data, response status code and response headers
|
222
222
|
def get_email_event_report_with_http_info(opts = {})
|
223
223
|
if @api_client.config.debugging
|
@@ -29,7 +29,7 @@ module SibApiV3Sdk
|
|
29
29
|
# Mandatory if htmlContent is empty. Url to the message (HTML)
|
30
30
|
attr_accessor :html_url
|
31
31
|
|
32
|
-
# Sending date and time (YYYY-MM-
|
32
|
+
# Sending date and time (YYYY-MM-DDTHH:mm:ss.SSSZ)
|
33
33
|
attr_accessor :scheduled_at
|
34
34
|
|
35
35
|
# Subject of the campaign
|
@@ -121,7 +121,7 @@ module SibApiV3Sdk
|
|
121
121
|
:'name' => :'String',
|
122
122
|
:'html_content' => :'String',
|
123
123
|
:'html_url' => :'String',
|
124
|
-
:'scheduled_at' => :'
|
124
|
+
:'scheduled_at' => :'DateTime',
|
125
125
|
:'subject' => :'String',
|
126
126
|
:'reply_to' => :'String',
|
127
127
|
:'to_field' => :'String',
|
@@ -231,10 +231,6 @@ module SibApiV3Sdk
|
|
231
231
|
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
232
232
|
end
|
233
233
|
|
234
|
-
if !@scheduled_at.nil? && @scheduled_at !~ Regexp.new(/^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/)
|
235
|
-
invalid_properties.push("invalid value for 'scheduled_at', must conform to the pattern /^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/.")
|
236
|
-
end
|
237
|
-
|
238
234
|
if @subject.nil?
|
239
235
|
invalid_properties.push("invalid value for 'subject', subject cannot be nil.")
|
240
236
|
end
|
@@ -250,7 +246,6 @@ module SibApiV3Sdk
|
|
250
246
|
# @return true if the model is valid
|
251
247
|
def valid?
|
252
248
|
return false if @name.nil?
|
253
|
-
return false if !@scheduled_at.nil? && @scheduled_at !~ Regexp.new(/^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/)
|
254
249
|
return false if @subject.nil?
|
255
250
|
return false if @type.nil?
|
256
251
|
type_validator = EnumAttributeValidator.new('String', ["classic", "trigger"])
|
@@ -258,17 +253,6 @@ module SibApiV3Sdk
|
|
258
253
|
return true
|
259
254
|
end
|
260
255
|
|
261
|
-
# Custom attribute writer method with validation
|
262
|
-
# @param [Object] scheduled_at Value to be assigned
|
263
|
-
def scheduled_at=(scheduled_at)
|
264
|
-
|
265
|
-
if !scheduled_at.nil? && scheduled_at !~ Regexp.new(/^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/)
|
266
|
-
fail ArgumentError, "invalid value for 'scheduled_at', must conform to the pattern /^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/."
|
267
|
-
end
|
268
|
-
|
269
|
-
@scheduled_at = scheduled_at
|
270
|
-
end
|
271
|
-
|
272
256
|
# Custom attribute writer method checking allowed values (enum).
|
273
257
|
# @param [Object] type Object to be assigned
|
274
258
|
def type=(type)
|
@@ -26,7 +26,7 @@ module SibApiV3Sdk
|
|
26
26
|
|
27
27
|
attr_accessor :recipients
|
28
28
|
|
29
|
-
# Date and time on which the campaign has to run (YYYY-MM-
|
29
|
+
# Date and time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ)
|
30
30
|
attr_accessor :scheduled_at
|
31
31
|
|
32
32
|
|
@@ -48,7 +48,7 @@ module SibApiV3Sdk
|
|
48
48
|
:'sender' => :'String',
|
49
49
|
:'content' => :'String',
|
50
50
|
:'recipients' => :'CreateSmsCampaignRecipients',
|
51
|
-
:'scheduled_at' => :'
|
51
|
+
:'scheduled_at' => :'DateTime'
|
52
52
|
}
|
53
53
|
end
|
54
54
|
|
@@ -98,10 +98,6 @@ module SibApiV3Sdk
|
|
98
98
|
invalid_properties.push("invalid value for 'sender', the character length must be smaller than or equal to 11.")
|
99
99
|
end
|
100
100
|
|
101
|
-
if !@scheduled_at.nil? && @scheduled_at !~ Regexp.new(/^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/)
|
102
|
-
invalid_properties.push("invalid value for 'scheduled_at', must conform to the pattern /^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/.")
|
103
|
-
end
|
104
|
-
|
105
101
|
return invalid_properties
|
106
102
|
end
|
107
103
|
|
@@ -111,7 +107,6 @@ module SibApiV3Sdk
|
|
111
107
|
return false if @name.nil?
|
112
108
|
return false if @sender.nil?
|
113
109
|
return false if @sender.to_s.length > 11
|
114
|
-
return false if !@scheduled_at.nil? && @scheduled_at !~ Regexp.new(/^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/)
|
115
110
|
return true
|
116
111
|
end
|
117
112
|
|
@@ -129,17 +124,6 @@ module SibApiV3Sdk
|
|
129
124
|
@sender = sender
|
130
125
|
end
|
131
126
|
|
132
|
-
# Custom attribute writer method with validation
|
133
|
-
# @param [Object] scheduled_at Value to be assigned
|
134
|
-
def scheduled_at=(scheduled_at)
|
135
|
-
|
136
|
-
if !scheduled_at.nil? && scheduled_at !~ Regexp.new(/^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/)
|
137
|
-
fail ArgumentError, "invalid value for 'scheduled_at', must conform to the pattern /^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/."
|
138
|
-
end
|
139
|
-
|
140
|
-
@scheduled_at = scheduled_at
|
141
|
-
end
|
142
|
-
|
143
127
|
# Checks equality by comparing each attribute.
|
144
128
|
# @param [Object] Object to be compared
|
145
129
|
def ==(o)
|
@@ -24,6 +24,12 @@ module SibApiV3Sdk
|
|
24
24
|
# Remaining credits of the user. This can either be \"User Limit\" or \"Send Limit\" depending on the plan.
|
25
25
|
attr_accessor :credits
|
26
26
|
|
27
|
+
# Date of the period from which the plan will start (only available for \"subscription\", \"unlimited\" and \"reseller\" plan type)
|
28
|
+
attr_accessor :start_date
|
29
|
+
|
30
|
+
# Date of the period from which the plan will end (only available for \"subscription\", \"unlimited\" and \"reseller\" plan type)
|
31
|
+
attr_accessor :end_date
|
32
|
+
|
27
33
|
class EnumAttributeValidator
|
28
34
|
attr_reader :datatype
|
29
35
|
attr_reader :allowable_values
|
@@ -51,7 +57,9 @@ module SibApiV3Sdk
|
|
51
57
|
{
|
52
58
|
:'type' => :'type',
|
53
59
|
:'credits_type' => :'creditsType',
|
54
|
-
:'credits' => :'credits'
|
60
|
+
:'credits' => :'credits',
|
61
|
+
:'start_date' => :'startDate',
|
62
|
+
:'end_date' => :'endDate'
|
55
63
|
}
|
56
64
|
end
|
57
65
|
|
@@ -60,7 +68,9 @@ module SibApiV3Sdk
|
|
60
68
|
{
|
61
69
|
:'type' => :'String',
|
62
70
|
:'credits_type' => :'String',
|
63
|
-
:'credits' => :'Float'
|
71
|
+
:'credits' => :'Float',
|
72
|
+
:'start_date' => :'Date',
|
73
|
+
:'end_date' => :'Date'
|
64
74
|
}
|
65
75
|
end
|
66
76
|
|
@@ -84,6 +94,14 @@ module SibApiV3Sdk
|
|
84
94
|
self.credits = attributes[:'credits']
|
85
95
|
end
|
86
96
|
|
97
|
+
if attributes.has_key?(:'startDate')
|
98
|
+
self.start_date = attributes[:'startDate']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.has_key?(:'endDate')
|
102
|
+
self.end_date = attributes[:'endDate']
|
103
|
+
end
|
104
|
+
|
87
105
|
end
|
88
106
|
|
89
107
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -145,7 +163,9 @@ module SibApiV3Sdk
|
|
145
163
|
self.class == o.class &&
|
146
164
|
type == o.type &&
|
147
165
|
credits_type == o.credits_type &&
|
148
|
-
credits == o.credits
|
166
|
+
credits == o.credits &&
|
167
|
+
start_date == o.start_date &&
|
168
|
+
end_date == o.end_date
|
149
169
|
end
|
150
170
|
|
151
171
|
# @see the `==` method
|
@@ -157,7 +177,7 @@ module SibApiV3Sdk
|
|
157
177
|
# Calculates hash code according to all attributes.
|
158
178
|
# @return [Fixnum] Hash code
|
159
179
|
def hash
|
160
|
-
[type, credits_type, credits].hash
|
180
|
+
[type, credits_type, credits, start_date, end_date].hash
|
161
181
|
end
|
162
182
|
|
163
183
|
# Builds the object from hash
|
@@ -30,7 +30,7 @@ module SibApiV3Sdk
|
|
30
30
|
# Status of the campaign
|
31
31
|
attr_accessor :status
|
32
32
|
|
33
|
-
# Date on which campaign is scheduled (YYYY-MM-
|
33
|
+
# Date on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)
|
34
34
|
attr_accessor :scheduled_at
|
35
35
|
|
36
36
|
class EnumAttributeValidator
|
@@ -75,7 +75,7 @@ module SibApiV3Sdk
|
|
75
75
|
:'subject' => :'String',
|
76
76
|
:'type' => :'String',
|
77
77
|
:'status' => :'String',
|
78
|
-
:'scheduled_at' => :'
|
78
|
+
:'scheduled_at' => :'DateTime'
|
79
79
|
}
|
80
80
|
end
|
81
81
|
|
@@ -137,10 +137,6 @@ module SibApiV3Sdk
|
|
137
137
|
invalid_properties.push("invalid value for 'status', status cannot be nil.")
|
138
138
|
end
|
139
139
|
|
140
|
-
if !@scheduled_at.nil? && @scheduled_at !~ Regexp.new(/^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/)
|
141
|
-
invalid_properties.push("invalid value for 'scheduled_at', must conform to the pattern /^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/.")
|
142
|
-
end
|
143
|
-
|
144
140
|
return invalid_properties
|
145
141
|
end
|
146
142
|
|
@@ -156,7 +152,6 @@ module SibApiV3Sdk
|
|
156
152
|
return false if @status.nil?
|
157
153
|
status_validator = EnumAttributeValidator.new('String', ["draft", "sent", "archive", "queued", "suspended", "in_process"])
|
158
154
|
return false unless status_validator.valid?(@status)
|
159
|
-
return false if !@scheduled_at.nil? && @scheduled_at !~ Regexp.new(/^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/)
|
160
155
|
return true
|
161
156
|
end
|
162
157
|
|
@@ -180,17 +175,6 @@ module SibApiV3Sdk
|
|
180
175
|
@status = status
|
181
176
|
end
|
182
177
|
|
183
|
-
# Custom attribute writer method with validation
|
184
|
-
# @param [Object] scheduled_at Value to be assigned
|
185
|
-
def scheduled_at=(scheduled_at)
|
186
|
-
|
187
|
-
if !scheduled_at.nil? && scheduled_at !~ Regexp.new(/^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/)
|
188
|
-
fail ArgumentError, "invalid value for 'scheduled_at', must conform to the pattern /^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/."
|
189
|
-
end
|
190
|
-
|
191
|
-
@scheduled_at = scheduled_at
|
192
|
-
end
|
193
|
-
|
194
178
|
# Checks equality by comparing each attribute.
|
195
179
|
# @param [Object] Object to be compared
|
196
180
|
def ==(o)
|