sib-api-v3-sdk 7.1.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/docs/BlockDomain.md +8 -0
- data/docs/ContactsApi.md +18 -6
- data/docs/CreateSmtpTemplateSender.md +1 -1
- data/docs/EmailCampaignsApi.md +3 -1
- data/docs/FoldersApi.md +9 -3
- data/docs/GetBlockedDomains.md +8 -0
- data/docs/GetChildDomain.md +2 -2
- data/docs/GetChildrenList.md +1 -1
- data/docs/GetEmailCampaign.md +2 -2
- data/docs/GetEmailCampaigns.md +1 -1
- data/docs/GetEmailEventReportEvents.md +1 -0
- data/docs/GetExtendedCampaignOverview.md +2 -2
- data/docs/GetFolderLists.md +2 -2
- data/docs/GetLists.md +2 -2
- data/docs/GetProcesses.md +1 -1
- data/docs/GetSmsCampaign.md +1 -1
- data/docs/GetSmsCampaignOverview.md +1 -1
- data/docs/GetSmsCampaigns.md +1 -1
- data/docs/GetSmsEventReportEvents.md +4 -4
- data/docs/GetTransacAggregatedSmsReport.md +10 -10
- data/docs/GetTransacSmsReportReports.md +10 -10
- data/docs/ListsApi.md +9 -3
- data/docs/ProcessApi.md +3 -1
- data/docs/SMSCampaignsApi.md +3 -1
- data/docs/SendSmtpEmailSender.md +3 -3
- data/docs/TransactionalEmailsApi.md +187 -5
- data/docs/TransactionalSMSApi.md +6 -2
- data/lib/sib-api-v3-sdk.rb +2 -0
- data/lib/sib-api-v3-sdk/api/account_api.rb +10 -0
- data/lib/sib-api-v3-sdk/api/attributes_api.rb +10 -0
- data/lib/sib-api-v3-sdk/api/contacts_api.rb +40 -0
- data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +16 -0
- data/lib/sib-api-v3-sdk/api/folders_api.rb +22 -0
- data/lib/sib-api-v3-sdk/api/lists_api.rb +28 -0
- data/lib/sib-api-v3-sdk/api/process_api.rb +16 -0
- data/lib/sib-api-v3-sdk/api/reseller_api.rb +10 -0
- data/lib/sib-api-v3-sdk/api/senders_api.rb +10 -0
- data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +16 -0
- data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +196 -2
- data/lib/sib-api-v3-sdk/api/transactional_sms_api.rb +22 -0
- data/lib/sib-api-v3-sdk/api/webhooks_api.rb +10 -0
- data/lib/sib-api-v3-sdk/models/block_domain.rb +189 -0
- data/lib/sib-api-v3-sdk/models/create_smtp_template_sender.rb +0 -5
- data/lib/sib-api-v3-sdk/models/get_blocked_domains.rb +192 -0
- data/lib/sib-api-v3-sdk/models/get_child_domain.rb +0 -10
- data/lib/sib-api-v3-sdk/models/get_children_list.rb +0 -5
- data/lib/sib-api-v3-sdk/models/get_email_campaign.rb +0 -10
- data/lib/sib-api-v3-sdk/models/get_email_campaigns.rb +0 -5
- data/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb +16 -6
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview.rb +0 -10
- data/lib/sib-api-v3-sdk/models/get_folder_lists.rb +0 -10
- data/lib/sib-api-v3-sdk/models/get_lists.rb +0 -10
- data/lib/sib-api-v3-sdk/models/get_processes.rb +0 -5
- data/lib/sib-api-v3-sdk/models/get_sms_campaign.rb +0 -5
- data/lib/sib-api-v3-sdk/models/get_sms_campaign_overview.rb +0 -5
- data/lib/sib-api-v3-sdk/models/get_sms_campaigns.rb +0 -5
- data/lib/sib-api-v3-sdk/models/get_sms_event_report_events.rb +0 -20
- data/lib/sib-api-v3-sdk/models/get_transac_aggregated_sms_report.rb +0 -50
- data/lib/sib-api-v3-sdk/models/get_transac_sms_report_reports.rb +0 -50
- data/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb +4 -9
- data/lib/sib-api-v3-sdk/version.rb +1 -1
- data/spec/api/contacts_api_spec.rb +5 -0
- data/spec/api/email_campaigns_api_spec.rb +1 -0
- data/spec/api/folders_api_spec.rb +2 -0
- data/spec/api/lists_api_spec.rb +3 -0
- data/spec/api/process_api_spec.rb +1 -0
- data/spec/api/sms_campaigns_api_spec.rb +1 -0
- data/spec/api/transactional_emails_api_spec.rb +40 -0
- data/spec/api/transactional_sms_api_spec.rb +2 -0
- data/spec/models/block_domain_spec.rb +41 -0
- data/spec/models/get_blocked_domains_spec.rb +41 -0
- data/spec/models/get_email_event_report_events_spec.rb +7 -1
- data/testfile.rb +26 -0
- metadata +11 -2
@@ -19,6 +19,16 @@ module SibApiV3Sdk
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
|
23
|
+
# Set custom user_agent if explicitly passed in api
|
24
|
+
# default will still remain Swagger-Codegen/#{VERSION}/ruby
|
25
|
+
def setUserAgent(user_agent)
|
26
|
+
@user_agent = user_agent
|
27
|
+
if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_')
|
28
|
+
@api_client.default_headers['User-Agent'] = @user_agent
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
22
32
|
# Create an email campaign
|
23
33
|
# @param email_campaigns Values to create a campaign
|
24
34
|
# @param [Hash] opts the optional parameters
|
@@ -290,6 +300,7 @@ module SibApiV3Sdk
|
|
290
300
|
# @option opts [DateTime] :end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
|
291
301
|
# @option opts [Integer] :limit Number of documents per page (default to 500)
|
292
302
|
# @option opts [Integer] :offset Index of the first document in the page (default to 0)
|
303
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
293
304
|
# @return [GetEmailCampaigns]
|
294
305
|
def get_email_campaigns(opts = {})
|
295
306
|
data, _status_code, _headers = get_email_campaigns_with_http_info(opts)
|
@@ -304,6 +315,7 @@ module SibApiV3Sdk
|
|
304
315
|
# @option opts [DateTime] :end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
|
305
316
|
# @option opts [Integer] :limit Number of documents per page
|
306
317
|
# @option opts [Integer] :offset Index of the first document in the page
|
318
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
307
319
|
# @return [Array<(GetEmailCampaigns, Fixnum, Hash)>] GetEmailCampaigns data, response status code and response headers
|
308
320
|
def get_email_campaigns_with_http_info(opts = {})
|
309
321
|
if @api_client.config.debugging
|
@@ -319,6 +331,9 @@ module SibApiV3Sdk
|
|
319
331
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EmailCampaignsApi.get_email_campaigns, must be smaller than or equal to 1000.'
|
320
332
|
end
|
321
333
|
|
334
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
335
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
336
|
+
end
|
322
337
|
# resource path
|
323
338
|
local_var_path = '/emailCampaigns'
|
324
339
|
|
@@ -330,6 +345,7 @@ module SibApiV3Sdk
|
|
330
345
|
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
331
346
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
332
347
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
348
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
333
349
|
|
334
350
|
# header parameters
|
335
351
|
header_params = {}
|
@@ -19,6 +19,16 @@ module SibApiV3Sdk
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
|
23
|
+
# Set custom user_agent if explicitly passed in api
|
24
|
+
# default will still remain Swagger-Codegen/#{VERSION}/ruby
|
25
|
+
def setUserAgent(user_agent)
|
26
|
+
@user_agent = user_agent
|
27
|
+
if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_')
|
28
|
+
@api_client.default_headers['User-Agent'] = @user_agent
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
22
32
|
# Create a folder
|
23
33
|
# @param create_folder Name of the folder
|
24
34
|
# @param [Hash] opts the optional parameters
|
@@ -179,6 +189,7 @@ module SibApiV3Sdk
|
|
179
189
|
# @param [Hash] opts the optional parameters
|
180
190
|
# @option opts [Integer] :limit Number of documents per page (default to 10)
|
181
191
|
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
192
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
182
193
|
# @return [GetFolderLists]
|
183
194
|
def get_folder_lists(folder_id, opts = {})
|
184
195
|
data, _status_code, _headers = get_folder_lists_with_http_info(folder_id, opts)
|
@@ -190,6 +201,7 @@ module SibApiV3Sdk
|
|
190
201
|
# @param [Hash] opts the optional parameters
|
191
202
|
# @option opts [Integer] :limit Number of documents per page
|
192
203
|
# @option opts [Integer] :offset Index of the first document of the page
|
204
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
193
205
|
# @return [Array<(GetFolderLists, Fixnum, Hash)>] GetFolderLists data, response status code and response headers
|
194
206
|
def get_folder_lists_with_http_info(folder_id, opts = {})
|
195
207
|
if @api_client.config.debugging
|
@@ -203,6 +215,9 @@ module SibApiV3Sdk
|
|
203
215
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FoldersApi.get_folder_lists, must be smaller than or equal to 50.'
|
204
216
|
end
|
205
217
|
|
218
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
219
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
220
|
+
end
|
206
221
|
# resource path
|
207
222
|
local_var_path = '/contacts/folders/{folderId}/lists'.sub('{' + 'folderId' + '}', folder_id.to_s)
|
208
223
|
|
@@ -210,6 +225,7 @@ module SibApiV3Sdk
|
|
210
225
|
query_params = {}
|
211
226
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
212
227
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
228
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
213
229
|
|
214
230
|
# header parameters
|
215
231
|
header_params = {}
|
@@ -240,6 +256,7 @@ module SibApiV3Sdk
|
|
240
256
|
# @param limit Number of documents per page
|
241
257
|
# @param offset Index of the first document of the page
|
242
258
|
# @param [Hash] opts the optional parameters
|
259
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
243
260
|
# @return [GetFolders]
|
244
261
|
def get_folders(limit, offset, opts = {})
|
245
262
|
data, _status_code, _headers = get_folders_with_http_info(limit, offset, opts)
|
@@ -250,6 +267,7 @@ module SibApiV3Sdk
|
|
250
267
|
# @param limit Number of documents per page
|
251
268
|
# @param offset Index of the first document of the page
|
252
269
|
# @param [Hash] opts the optional parameters
|
270
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
253
271
|
# @return [Array<(GetFolders, Fixnum, Hash)>] GetFolders data, response status code and response headers
|
254
272
|
def get_folders_with_http_info(limit, offset, opts = {})
|
255
273
|
if @api_client.config.debugging
|
@@ -267,6 +285,9 @@ module SibApiV3Sdk
|
|
267
285
|
if @api_client.config.client_side_validation && offset.nil?
|
268
286
|
fail ArgumentError, "Missing the required parameter 'offset' when calling FoldersApi.get_folders"
|
269
287
|
end
|
288
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
289
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
290
|
+
end
|
270
291
|
# resource path
|
271
292
|
local_var_path = '/contacts/folders'
|
272
293
|
|
@@ -274,6 +295,7 @@ module SibApiV3Sdk
|
|
274
295
|
query_params = {}
|
275
296
|
query_params[:'limit'] = limit
|
276
297
|
query_params[:'offset'] = offset
|
298
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
277
299
|
|
278
300
|
# header parameters
|
279
301
|
header_params = {}
|
@@ -19,6 +19,16 @@ module SibApiV3Sdk
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
|
23
|
+
# Set custom user_agent if explicitly passed in api
|
24
|
+
# default will still remain Swagger-Codegen/#{VERSION}/ruby
|
25
|
+
def setUserAgent(user_agent)
|
26
|
+
@user_agent = user_agent
|
27
|
+
if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_')
|
28
|
+
@api_client.default_headers['User-Agent'] = @user_agent
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
22
32
|
# Add existing contacts to a list
|
23
33
|
# @param list_id Id of the list
|
24
34
|
# @param contact_emails Emails addresses OR IDs of the contacts
|
@@ -186,6 +196,7 @@ module SibApiV3Sdk
|
|
186
196
|
# @option opts [DateTime] :modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
|
187
197
|
# @option opts [Integer] :limit Number of documents per page (default to 50)
|
188
198
|
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
199
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
189
200
|
# @return [GetContacts]
|
190
201
|
def get_contacts_from_list(list_id, opts = {})
|
191
202
|
data, _status_code, _headers = get_contacts_from_list_with_http_info(list_id, opts)
|
@@ -198,6 +209,7 @@ module SibApiV3Sdk
|
|
198
209
|
# @option opts [DateTime] :modified_since Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
|
199
210
|
# @option opts [Integer] :limit Number of documents per page
|
200
211
|
# @option opts [Integer] :offset Index of the first document of the page
|
212
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
201
213
|
# @return [Array<(GetContacts, Fixnum, Hash)>] GetContacts data, response status code and response headers
|
202
214
|
def get_contacts_from_list_with_http_info(list_id, opts = {})
|
203
215
|
if @api_client.config.debugging
|
@@ -211,6 +223,9 @@ module SibApiV3Sdk
|
|
211
223
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ListsApi.get_contacts_from_list, must be smaller than or equal to 500.'
|
212
224
|
end
|
213
225
|
|
226
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
227
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
228
|
+
end
|
214
229
|
# resource path
|
215
230
|
local_var_path = '/contacts/lists/{listId}/contacts'.sub('{' + 'listId' + '}', list_id.to_s)
|
216
231
|
|
@@ -219,6 +234,7 @@ module SibApiV3Sdk
|
|
219
234
|
query_params[:'modifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil?
|
220
235
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
221
236
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
237
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
222
238
|
|
223
239
|
# header parameters
|
224
240
|
header_params = {}
|
@@ -250,6 +266,7 @@ module SibApiV3Sdk
|
|
250
266
|
# @param [Hash] opts the optional parameters
|
251
267
|
# @option opts [Integer] :limit Number of documents per page (default to 10)
|
252
268
|
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
269
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
253
270
|
# @return [GetFolderLists]
|
254
271
|
def get_folder_lists(folder_id, opts = {})
|
255
272
|
data, _status_code, _headers = get_folder_lists_with_http_info(folder_id, opts)
|
@@ -261,6 +278,7 @@ module SibApiV3Sdk
|
|
261
278
|
# @param [Hash] opts the optional parameters
|
262
279
|
# @option opts [Integer] :limit Number of documents per page
|
263
280
|
# @option opts [Integer] :offset Index of the first document of the page
|
281
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
264
282
|
# @return [Array<(GetFolderLists, Fixnum, Hash)>] GetFolderLists data, response status code and response headers
|
265
283
|
def get_folder_lists_with_http_info(folder_id, opts = {})
|
266
284
|
if @api_client.config.debugging
|
@@ -274,6 +292,9 @@ module SibApiV3Sdk
|
|
274
292
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ListsApi.get_folder_lists, must be smaller than or equal to 50.'
|
275
293
|
end
|
276
294
|
|
295
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
296
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
297
|
+
end
|
277
298
|
# resource path
|
278
299
|
local_var_path = '/contacts/folders/{folderId}/lists'.sub('{' + 'folderId' + '}', folder_id.to_s)
|
279
300
|
|
@@ -281,6 +302,7 @@ module SibApiV3Sdk
|
|
281
302
|
query_params = {}
|
282
303
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
283
304
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
305
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
284
306
|
|
285
307
|
# header parameters
|
286
308
|
header_params = {}
|
@@ -363,6 +385,7 @@ module SibApiV3Sdk
|
|
363
385
|
# @param [Hash] opts the optional parameters
|
364
386
|
# @option opts [Integer] :limit Number of documents per page (default to 10)
|
365
387
|
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
|
388
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
366
389
|
# @return [GetLists]
|
367
390
|
def get_lists(opts = {})
|
368
391
|
data, _status_code, _headers = get_lists_with_http_info(opts)
|
@@ -373,6 +396,7 @@ module SibApiV3Sdk
|
|
373
396
|
# @param [Hash] opts the optional parameters
|
374
397
|
# @option opts [Integer] :limit Number of documents per page
|
375
398
|
# @option opts [Integer] :offset Index of the first document of the page
|
399
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
376
400
|
# @return [Array<(GetLists, Fixnum, Hash)>] GetLists data, response status code and response headers
|
377
401
|
def get_lists_with_http_info(opts = {})
|
378
402
|
if @api_client.config.debugging
|
@@ -382,6 +406,9 @@ module SibApiV3Sdk
|
|
382
406
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ListsApi.get_lists, must be smaller than or equal to 50.'
|
383
407
|
end
|
384
408
|
|
409
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
410
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
411
|
+
end
|
385
412
|
# resource path
|
386
413
|
local_var_path = '/contacts/lists'
|
387
414
|
|
@@ -389,6 +416,7 @@ module SibApiV3Sdk
|
|
389
416
|
query_params = {}
|
390
417
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
391
418
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
419
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
392
420
|
|
393
421
|
# header parameters
|
394
422
|
header_params = {}
|
@@ -19,6 +19,16 @@ module SibApiV3Sdk
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
|
23
|
+
# Set custom user_agent if explicitly passed in api
|
24
|
+
# default will still remain Swagger-Codegen/#{VERSION}/ruby
|
25
|
+
def setUserAgent(user_agent)
|
26
|
+
@user_agent = user_agent
|
27
|
+
if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_')
|
28
|
+
@api_client.default_headers['User-Agent'] = @user_agent
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
22
32
|
# Return the informations for a process
|
23
33
|
# @param process_id Id of the process
|
24
34
|
# @param [Hash] opts the optional parameters
|
@@ -75,6 +85,7 @@ module SibApiV3Sdk
|
|
75
85
|
# @param [Hash] opts the optional parameters
|
76
86
|
# @option opts [Integer] :limit Number limitation for the result returned (default to 10)
|
77
87
|
# @option opts [Integer] :offset Beginning point in the list to retrieve from. (default to 0)
|
88
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
78
89
|
# @return [GetProcesses]
|
79
90
|
def get_processes(opts = {})
|
80
91
|
data, _status_code, _headers = get_processes_with_http_info(opts)
|
@@ -85,6 +96,7 @@ module SibApiV3Sdk
|
|
85
96
|
# @param [Hash] opts the optional parameters
|
86
97
|
# @option opts [Integer] :limit Number limitation for the result returned
|
87
98
|
# @option opts [Integer] :offset Beginning point in the list to retrieve from.
|
99
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
88
100
|
# @return [Array<(GetProcesses, Fixnum, Hash)>] GetProcesses data, response status code and response headers
|
89
101
|
def get_processes_with_http_info(opts = {})
|
90
102
|
if @api_client.config.debugging
|
@@ -94,6 +106,9 @@ module SibApiV3Sdk
|
|
94
106
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProcessApi.get_processes, must be smaller than or equal to 50.'
|
95
107
|
end
|
96
108
|
|
109
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
110
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
111
|
+
end
|
97
112
|
# resource path
|
98
113
|
local_var_path = '/processes'
|
99
114
|
|
@@ -101,6 +116,7 @@ module SibApiV3Sdk
|
|
101
116
|
query_params = {}
|
102
117
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
103
118
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
119
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
104
120
|
|
105
121
|
# header parameters
|
106
122
|
header_params = {}
|
@@ -19,6 +19,16 @@ module SibApiV3Sdk
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
|
23
|
+
# Set custom user_agent if explicitly passed in api
|
24
|
+
# default will still remain Swagger-Codegen/#{VERSION}/ruby
|
25
|
+
def setUserAgent(user_agent)
|
26
|
+
@user_agent = user_agent
|
27
|
+
if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_')
|
28
|
+
@api_client.default_headers['User-Agent'] = @user_agent
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
22
32
|
# Add Email and/or SMS credits to a specific child account
|
23
33
|
# @param child_identifier Either auth key or id of reseller's child
|
24
34
|
# @param add_credits Values to post to add credit to a specific child account
|
@@ -19,6 +19,16 @@ module SibApiV3Sdk
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
|
23
|
+
# Set custom user_agent if explicitly passed in api
|
24
|
+
# default will still remain Swagger-Codegen/#{VERSION}/ruby
|
25
|
+
def setUserAgent(user_agent)
|
26
|
+
@user_agent = user_agent
|
27
|
+
if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_')
|
28
|
+
@api_client.default_headers['User-Agent'] = @user_agent
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
22
32
|
# Create a new sender
|
23
33
|
# @param [Hash] opts the optional parameters
|
24
34
|
# @option opts [CreateSender] :sender sender's name
|
@@ -19,6 +19,16 @@ module SibApiV3Sdk
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
|
23
|
+
# Set custom user_agent if explicitly passed in api
|
24
|
+
# default will still remain Swagger-Codegen/#{VERSION}/ruby
|
25
|
+
def setUserAgent(user_agent)
|
26
|
+
@user_agent = user_agent
|
27
|
+
if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_')
|
28
|
+
@api_client.default_headers['User-Agent'] = @user_agent
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
22
32
|
# Creates an SMS campaign
|
23
33
|
# @param create_sms_campaign Values to create an SMS Campaign
|
24
34
|
# @param [Hash] opts the optional parameters
|
@@ -181,6 +191,7 @@ module SibApiV3Sdk
|
|
181
191
|
# @option opts [DateTime] :end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
|
182
192
|
# @option opts [Integer] :limit Number limitation for the result returned (default to 500)
|
183
193
|
# @option opts [Integer] :offset Beginning point in the list to retrieve from. (default to 0)
|
194
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
184
195
|
# @return [GetSmsCampaigns]
|
185
196
|
def get_sms_campaigns(opts = {})
|
186
197
|
data, _status_code, _headers = get_sms_campaigns_with_http_info(opts)
|
@@ -194,6 +205,7 @@ module SibApiV3Sdk
|
|
194
205
|
# @option opts [DateTime] :end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
|
195
206
|
# @option opts [Integer] :limit Number limitation for the result returned
|
196
207
|
# @option opts [Integer] :offset Beginning point in the list to retrieve from.
|
208
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
197
209
|
# @return [Array<(GetSmsCampaigns, Fixnum, Hash)>] GetSmsCampaigns data, response status code and response headers
|
198
210
|
def get_sms_campaigns_with_http_info(opts = {})
|
199
211
|
if @api_client.config.debugging
|
@@ -206,6 +218,9 @@ module SibApiV3Sdk
|
|
206
218
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SMSCampaignsApi.get_sms_campaigns, must be smaller than or equal to 1000.'
|
207
219
|
end
|
208
220
|
|
221
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
222
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
223
|
+
end
|
209
224
|
# resource path
|
210
225
|
local_var_path = '/smsCampaigns'
|
211
226
|
|
@@ -216,6 +231,7 @@ module SibApiV3Sdk
|
|
216
231
|
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
217
232
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
218
233
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
234
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
219
235
|
|
220
236
|
# header parameters
|
221
237
|
header_params = {}
|
@@ -19,6 +19,69 @@ module SibApiV3Sdk
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
|
23
|
+
# Set custom user_agent if explicitly passed in api
|
24
|
+
# default will still remain Swagger-Codegen/#{VERSION}/ruby
|
25
|
+
def setUserAgent(user_agent)
|
26
|
+
@user_agent = user_agent
|
27
|
+
if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_')
|
28
|
+
@api_client.default_headers['User-Agent'] = @user_agent
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# Add a new domain to the list of blocked domains
|
33
|
+
# Blocks a new domain in order to avoid messages being sent to the same
|
34
|
+
# @param block_domain
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [nil]
|
37
|
+
def block_new_domain(block_domain, opts = {})
|
38
|
+
block_new_domain_with_http_info(block_domain, opts)
|
39
|
+
nil
|
40
|
+
end
|
41
|
+
|
42
|
+
# Add a new domain to the list of blocked domains
|
43
|
+
# Blocks a new domain in order to avoid messages being sent to the same
|
44
|
+
# @param block_domain
|
45
|
+
# @param [Hash] opts the optional parameters
|
46
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
47
|
+
def block_new_domain_with_http_info(block_domain, opts = {})
|
48
|
+
if @api_client.config.debugging
|
49
|
+
@api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.block_new_domain ...'
|
50
|
+
end
|
51
|
+
# verify the required parameter 'block_domain' is set
|
52
|
+
if @api_client.config.client_side_validation && block_domain.nil?
|
53
|
+
fail ArgumentError, "Missing the required parameter 'block_domain' when calling TransactionalEmailsApi.block_new_domain"
|
54
|
+
end
|
55
|
+
# resource path
|
56
|
+
local_var_path = '/smtp/blockedDomains'
|
57
|
+
|
58
|
+
# query parameters
|
59
|
+
query_params = {}
|
60
|
+
|
61
|
+
# header parameters
|
62
|
+
header_params = {}
|
63
|
+
# HTTP header 'Accept' (if needed)
|
64
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
65
|
+
# HTTP header 'Content-Type'
|
66
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
67
|
+
|
68
|
+
# form parameters
|
69
|
+
form_params = {}
|
70
|
+
|
71
|
+
# http body (model)
|
72
|
+
post_body = @api_client.object_to_http_body(block_domain)
|
73
|
+
auth_names = ['api-key', 'partner-key']
|
74
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names)
|
80
|
+
if @api_client.config.debugging
|
81
|
+
@api_client.config.logger.debug "API called: TransactionalEmailsApi#block_new_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
22
85
|
# Create an email template
|
23
86
|
# @param smtp_template values to update in transactional email template
|
24
87
|
# @param [Hash] opts the optional parameters
|
@@ -71,6 +134,59 @@ module SibApiV3Sdk
|
|
71
134
|
end
|
72
135
|
return data, status_code, headers
|
73
136
|
end
|
137
|
+
# Unblock an existing domain from the list of blocked domains
|
138
|
+
# Unblocks an existing domain from the list of blocked domains
|
139
|
+
# @param domain The name of the domain to be deleted
|
140
|
+
# @param [Hash] opts the optional parameters
|
141
|
+
# @return [nil]
|
142
|
+
def delete_blocked_domain(domain, opts = {})
|
143
|
+
delete_blocked_domain_with_http_info(domain, opts)
|
144
|
+
nil
|
145
|
+
end
|
146
|
+
|
147
|
+
# Unblock an existing domain from the list of blocked domains
|
148
|
+
# Unblocks an existing domain from the list of blocked domains
|
149
|
+
# @param domain The name of the domain to be deleted
|
150
|
+
# @param [Hash] opts the optional parameters
|
151
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
152
|
+
def delete_blocked_domain_with_http_info(domain, opts = {})
|
153
|
+
if @api_client.config.debugging
|
154
|
+
@api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.delete_blocked_domain ...'
|
155
|
+
end
|
156
|
+
# verify the required parameter 'domain' is set
|
157
|
+
if @api_client.config.client_side_validation && domain.nil?
|
158
|
+
fail ArgumentError, "Missing the required parameter 'domain' when calling TransactionalEmailsApi.delete_blocked_domain"
|
159
|
+
end
|
160
|
+
# resource path
|
161
|
+
local_var_path = '/smtp/blockedDomains/{domain}'.sub('{' + 'domain' + '}', domain.to_s)
|
162
|
+
|
163
|
+
# query parameters
|
164
|
+
query_params = {}
|
165
|
+
|
166
|
+
# header parameters
|
167
|
+
header_params = {}
|
168
|
+
# HTTP header 'Accept' (if needed)
|
169
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
170
|
+
# HTTP header 'Content-Type'
|
171
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
172
|
+
|
173
|
+
# form parameters
|
174
|
+
form_params = {}
|
175
|
+
|
176
|
+
# http body (model)
|
177
|
+
post_body = nil
|
178
|
+
auth_names = ['api-key', 'partner-key']
|
179
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
180
|
+
:header_params => header_params,
|
181
|
+
:query_params => query_params,
|
182
|
+
:form_params => form_params,
|
183
|
+
:body => post_body,
|
184
|
+
:auth_names => auth_names)
|
185
|
+
if @api_client.config.debugging
|
186
|
+
@api_client.config.logger.debug "API called: TransactionalEmailsApi#delete_blocked_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
187
|
+
end
|
188
|
+
return data, status_code, headers
|
189
|
+
end
|
74
190
|
# Delete hardbounces
|
75
191
|
# Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures)
|
76
192
|
# @param [Hash] opts the optional parameters
|
@@ -229,6 +345,54 @@ module SibApiV3Sdk
|
|
229
345
|
end
|
230
346
|
return data, status_code, headers
|
231
347
|
end
|
348
|
+
# Get the list of blocked domains
|
349
|
+
# Get the list of blocked domains
|
350
|
+
# @param [Hash] opts the optional parameters
|
351
|
+
# @return [GetBlockedDomains]
|
352
|
+
def get_blocked_domains(opts = {})
|
353
|
+
data, _status_code, _headers = get_blocked_domains_with_http_info(opts)
|
354
|
+
data
|
355
|
+
end
|
356
|
+
|
357
|
+
# Get the list of blocked domains
|
358
|
+
# Get the list of blocked domains
|
359
|
+
# @param [Hash] opts the optional parameters
|
360
|
+
# @return [Array<(GetBlockedDomains, Fixnum, Hash)>] GetBlockedDomains data, response status code and response headers
|
361
|
+
def get_blocked_domains_with_http_info(opts = {})
|
362
|
+
if @api_client.config.debugging
|
363
|
+
@api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_blocked_domains ...'
|
364
|
+
end
|
365
|
+
# resource path
|
366
|
+
local_var_path = '/smtp/blockedDomains'
|
367
|
+
|
368
|
+
# query parameters
|
369
|
+
query_params = {}
|
370
|
+
|
371
|
+
# header parameters
|
372
|
+
header_params = {}
|
373
|
+
# HTTP header 'Accept' (if needed)
|
374
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
375
|
+
# HTTP header 'Content-Type'
|
376
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
377
|
+
|
378
|
+
# form parameters
|
379
|
+
form_params = {}
|
380
|
+
|
381
|
+
# http body (model)
|
382
|
+
post_body = nil
|
383
|
+
auth_names = ['api-key', 'partner-key']
|
384
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
385
|
+
:header_params => header_params,
|
386
|
+
:query_params => query_params,
|
387
|
+
:form_params => form_params,
|
388
|
+
:body => post_body,
|
389
|
+
:auth_names => auth_names,
|
390
|
+
:return_type => 'GetBlockedDomains')
|
391
|
+
if @api_client.config.debugging
|
392
|
+
@api_client.config.logger.debug "API called: TransactionalEmailsApi#get_blocked_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
393
|
+
end
|
394
|
+
return data, status_code, headers
|
395
|
+
end
|
232
396
|
# Get all your transactional email activity (unaggregated events)
|
233
397
|
# @param [Hash] opts the optional parameters
|
234
398
|
# @option opts [Integer] :limit Number limitation for the result returned (default to 50)
|
@@ -241,6 +405,7 @@ module SibApiV3Sdk
|
|
241
405
|
# @option opts [String] :tags Filter the report for tags (serialized and urlencoded array)
|
242
406
|
# @option opts [String] :message_id Filter on a specific message id
|
243
407
|
# @option opts [Integer] :template_id Filter on a specific template id
|
408
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
244
409
|
# @return [GetEmailEventReport]
|
245
410
|
def get_email_event_report(opts = {})
|
246
411
|
data, _status_code, _headers = get_email_event_report_with_http_info(opts)
|
@@ -259,6 +424,7 @@ module SibApiV3Sdk
|
|
259
424
|
# @option opts [String] :tags Filter the report for tags (serialized and urlencoded array)
|
260
425
|
# @option opts [String] :message_id Filter on a specific message id
|
261
426
|
# @option opts [Integer] :template_id Filter on a specific template id
|
427
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
262
428
|
# @return [Array<(GetEmailEventReport, Fixnum, Hash)>] GetEmailEventReport data, response status code and response headers
|
263
429
|
def get_email_event_report_with_http_info(opts = {})
|
264
430
|
if @api_client.config.debugging
|
@@ -268,8 +434,11 @@ module SibApiV3Sdk
|
|
268
434
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_email_event_report, must be smaller than or equal to 100.'
|
269
435
|
end
|
270
436
|
|
271
|
-
if @api_client.config.client_side_validation && opts[:'event'] && !['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed'].include?(opts[:'event'])
|
272
|
-
fail ArgumentError, 'invalid value for "event", must be one of bounces, hardBounces, softBounces, delivered, spam, requests, opened, clicks, invalid, deferred, blocked, unsubscribed'
|
437
|
+
if @api_client.config.client_side_validation && opts[:'event'] && !['bounces', 'hardBounces', 'softBounces', 'delivered', 'spam', 'requests', 'opened', 'clicks', 'invalid', 'deferred', 'blocked', 'unsubscribed', 'error'].include?(opts[:'event'])
|
438
|
+
fail ArgumentError, 'invalid value for "event", must be one of bounces, hardBounces, softBounces, delivered, spam, requests, opened, clicks, invalid, deferred, blocked, unsubscribed, error'
|
439
|
+
end
|
440
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
441
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
273
442
|
end
|
274
443
|
# resource path
|
275
444
|
local_var_path = '/smtp/statistics/events'
|
@@ -286,6 +455,7 @@ module SibApiV3Sdk
|
|
286
455
|
query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
|
287
456
|
query_params[:'messageId'] = opts[:'message_id'] if !opts[:'message_id'].nil?
|
288
457
|
query_params[:'templateId'] = opts[:'template_id'] if !opts[:'template_id'].nil?
|
458
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
289
459
|
|
290
460
|
# header parameters
|
291
461
|
header_params = {}
|
@@ -320,6 +490,7 @@ module SibApiV3Sdk
|
|
320
490
|
# @option opts [String] :end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD)
|
321
491
|
# @option opts [Integer] :days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
|
322
492
|
# @option opts [String] :tag Tag of the emails
|
493
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
323
494
|
# @return [GetReports]
|
324
495
|
def get_smtp_report(opts = {})
|
325
496
|
data, _status_code, _headers = get_smtp_report_with_http_info(opts)
|
@@ -334,6 +505,7 @@ module SibApiV3Sdk
|
|
334
505
|
# @option opts [String] :end_date Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD)
|
335
506
|
# @option opts [Integer] :days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
|
336
507
|
# @option opts [String] :tag Tag of the emails
|
508
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
337
509
|
# @return [Array<(GetReports, Fixnum, Hash)>] GetReports data, response status code and response headers
|
338
510
|
def get_smtp_report_with_http_info(opts = {})
|
339
511
|
if @api_client.config.debugging
|
@@ -343,6 +515,9 @@ module SibApiV3Sdk
|
|
343
515
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_smtp_report, must be smaller than or equal to 30.'
|
344
516
|
end
|
345
517
|
|
518
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
519
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
520
|
+
end
|
346
521
|
# resource path
|
347
522
|
local_var_path = '/smtp/statistics/reports'
|
348
523
|
|
@@ -354,6 +529,7 @@ module SibApiV3Sdk
|
|
354
529
|
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
355
530
|
query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil?
|
356
531
|
query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
|
532
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
357
533
|
|
358
534
|
# header parameters
|
359
535
|
header_params = {}
|
@@ -437,6 +613,7 @@ module SibApiV3Sdk
|
|
437
613
|
# @option opts [BOOLEAN] :template_status Filter on the status of the template. Active = true, inactive = false
|
438
614
|
# @option opts [Integer] :limit Number of documents returned per page (default to 50)
|
439
615
|
# @option opts [Integer] :offset Index of the first document in the page (default to 0)
|
616
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
440
617
|
# @return [GetSmtpTemplates]
|
441
618
|
def get_smtp_templates(opts = {})
|
442
619
|
data, _status_code, _headers = get_smtp_templates_with_http_info(opts)
|
@@ -448,6 +625,7 @@ module SibApiV3Sdk
|
|
448
625
|
# @option opts [BOOLEAN] :template_status Filter on the status of the template. Active = true, inactive = false
|
449
626
|
# @option opts [Integer] :limit Number of documents returned per page
|
450
627
|
# @option opts [Integer] :offset Index of the first document in the page
|
628
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
451
629
|
# @return [Array<(GetSmtpTemplates, Fixnum, Hash)>] GetSmtpTemplates data, response status code and response headers
|
452
630
|
def get_smtp_templates_with_http_info(opts = {})
|
453
631
|
if @api_client.config.debugging
|
@@ -457,6 +635,9 @@ module SibApiV3Sdk
|
|
457
635
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_smtp_templates, must be smaller than or equal to 1000.'
|
458
636
|
end
|
459
637
|
|
638
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
639
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
640
|
+
end
|
460
641
|
# resource path
|
461
642
|
local_var_path = '/smtp/templates'
|
462
643
|
|
@@ -465,6 +646,7 @@ module SibApiV3Sdk
|
|
465
646
|
query_params[:'templateStatus'] = opts[:'template_status'] if !opts[:'template_status'].nil?
|
466
647
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
467
648
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
649
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
468
650
|
|
469
651
|
# header parameters
|
470
652
|
header_params = {}
|
@@ -498,6 +680,7 @@ module SibApiV3Sdk
|
|
498
680
|
# @option opts [Integer] :limit Number of documents returned per page (default to 50)
|
499
681
|
# @option opts [Integer] :offset Index of the first document on the page (default to 0)
|
500
682
|
# @option opts [Array<String>] :senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed
|
683
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
501
684
|
# @return [GetTransacBlockedContacts]
|
502
685
|
def get_transac_blocked_contacts(opts = {})
|
503
686
|
data, _status_code, _headers = get_transac_blocked_contacts_with_http_info(opts)
|
@@ -511,6 +694,7 @@ module SibApiV3Sdk
|
|
511
694
|
# @option opts [Integer] :limit Number of documents returned per page
|
512
695
|
# @option opts [Integer] :offset Index of the first document on the page
|
513
696
|
# @option opts [Array<String>] :senders Comma separated list of emails of the senders from which contacts are blocked or unsubscribed
|
697
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
514
698
|
# @return [Array<(GetTransacBlockedContacts, Fixnum, Hash)>] GetTransacBlockedContacts data, response status code and response headers
|
515
699
|
def get_transac_blocked_contacts_with_http_info(opts = {})
|
516
700
|
if @api_client.config.debugging
|
@@ -520,6 +704,9 @@ module SibApiV3Sdk
|
|
520
704
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_transac_blocked_contacts, must be smaller than or equal to 100.'
|
521
705
|
end
|
522
706
|
|
707
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
708
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
709
|
+
end
|
523
710
|
# resource path
|
524
711
|
local_var_path = '/smtp/blockedContacts'
|
525
712
|
|
@@ -530,6 +717,7 @@ module SibApiV3Sdk
|
|
530
717
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
531
718
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
532
719
|
query_params[:'senders'] = @api_client.build_collection_param(opts[:'senders'], :csv) if !opts[:'senders'].nil?
|
720
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
533
721
|
|
534
722
|
# header parameters
|
535
723
|
header_params = {}
|
@@ -616,6 +804,7 @@ module SibApiV3Sdk
|
|
616
804
|
# @option opts [String] :message_id Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent.
|
617
805
|
# @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month.
|
618
806
|
# @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
|
807
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation (default to desc)
|
619
808
|
# @return [GetTransacEmailsList]
|
620
809
|
def get_transac_emails_list(opts = {})
|
621
810
|
data, _status_code, _headers = get_transac_emails_list_with_http_info(opts)
|
@@ -630,11 +819,15 @@ module SibApiV3Sdk
|
|
630
819
|
# @option opts [String] :message_id Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent.
|
631
820
|
# @option opts [Date] :start_date Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month.
|
632
821
|
# @option opts [Date] :end_date Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
|
822
|
+
# @option opts [String] :sort Sort the results in the ascending/descending order of record creation
|
633
823
|
# @return [Array<(GetTransacEmailsList, Fixnum, Hash)>] GetTransacEmailsList data, response status code and response headers
|
634
824
|
def get_transac_emails_list_with_http_info(opts = {})
|
635
825
|
if @api_client.config.debugging
|
636
826
|
@api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_transac_emails_list ...'
|
637
827
|
end
|
828
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
829
|
+
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
830
|
+
end
|
638
831
|
# resource path
|
639
832
|
local_var_path = '/smtp/emails'
|
640
833
|
|
@@ -645,6 +838,7 @@ module SibApiV3Sdk
|
|
645
838
|
query_params[:'messageId'] = opts[:'message_id'] if !opts[:'message_id'].nil?
|
646
839
|
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
647
840
|
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
841
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
648
842
|
|
649
843
|
# header parameters
|
650
844
|
header_params = {}
|