Class: SibApiV3Sdk::TransactionalEmailsApi
- Inherits:
-
Object
- Object
- SibApiV3Sdk::TransactionalEmailsApi
- Defined in:
- lib/sib-api-v3-sdk/api/transactional_emails_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#block_new_domain(block_domain, opts = {}) ⇒ nil
Add a new domain to the list of blocked domains Blocks a new domain in order to avoid messages being sent to the same.
-
#block_new_domain_with_http_info(block_domain, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Add a new domain to the list of blocked domains Blocks a new domain in order to avoid messages being sent to the same.
-
#create_smtp_template(smtp_template, opts = {}) ⇒ CreateModel
Create an email template.
-
#create_smtp_template_with_http_info(smtp_template, opts = {}) ⇒ Array<(CreateModel, Fixnum, Hash)>
Create an email template.
-
#delete_blocked_domain(domain, opts = {}) ⇒ nil
Unblock an existing domain from the list of blocked domains Unblocks an existing domain from the list of blocked domains.
-
#delete_blocked_domain_with_http_info(domain, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Unblock an existing domain from the list of blocked domains Unblocks an existing domain from the list of blocked domains.
-
#delete_hardbounces(opts = {}) ⇒ nil
Delete hardbounces Delete hardbounces.
-
#delete_hardbounces_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete hardbounces Delete hardbounces.
-
#delete_smtp_template(template_id, opts = {}) ⇒ nil
Delete an inactive email template.
-
#delete_smtp_template_with_http_info(template_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete an inactive email template.
-
#get_aggregated_smtp_report(opts = {}) ⇒ GetAggregatedReport
Get your transactional email activity aggregated over a period of time This endpoint will show the aggregated stats for past 90 days by default if ‘startDate` and `endDate` OR `days` is not passed.
-
#get_aggregated_smtp_report_with_http_info(opts = {}) ⇒ Array<(GetAggregatedReport, Fixnum, Hash)>
Get your transactional email activity aggregated over a period of time This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed.
-
#get_blocked_domains(opts = {}) ⇒ GetBlockedDomains
Get the list of blocked domains Get the list of blocked domains.
-
#get_blocked_domains_with_http_info(opts = {}) ⇒ Array<(GetBlockedDomains, Fixnum, Hash)>
Get the list of blocked domains Get the list of blocked domains.
-
#get_email_event_report(opts = {}) ⇒ GetEmailEventReport
Get all your transactional email activity (unaggregated events) This endpoint will show the aggregated stats for past 30 days by default if ‘startDate` and `endDate` OR `days` is not passed.
-
#get_email_event_report_with_http_info(opts = {}) ⇒ Array<(GetEmailEventReport, Fixnum, Hash)>
Get all your transactional email activity (unaggregated events) This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed.
-
#get_smtp_report(opts = {}) ⇒ GetReports
Get your transactional email activity aggregated per day.
-
#get_smtp_report_with_http_info(opts = {}) ⇒ Array<(GetReports, Fixnum, Hash)>
Get your transactional email activity aggregated per day.
-
#get_smtp_template(template_id, opts = {}) ⇒ GetSmtpTemplateOverview
Returns the template information.
-
#get_smtp_template_with_http_info(template_id, opts = {}) ⇒ Array<(GetSmtpTemplateOverview, Fixnum, Hash)>
Returns the template information.
-
#get_smtp_templates(opts = {}) ⇒ GetSmtpTemplates
Get the list of email templates.
-
#get_smtp_templates_with_http_info(opts = {}) ⇒ Array<(GetSmtpTemplates, Fixnum, Hash)>
Get the list of email templates.
-
#get_transac_blocked_contacts(opts = {}) ⇒ GetTransacBlockedContacts
Get the list of blocked or unsubscribed transactional contacts.
-
#get_transac_blocked_contacts_with_http_info(opts = {}) ⇒ Array<(GetTransacBlockedContacts, Fixnum, Hash)>
Get the list of blocked or unsubscribed transactional contacts.
-
#get_transac_email_content(uuid, opts = {}) ⇒ GetTransacEmailContent
Get the personalized content of a sent transactional email.
-
#get_transac_email_content_with_http_info(uuid, opts = {}) ⇒ Array<(GetTransacEmailContent, Fixnum, Hash)>
Get the personalized content of a sent transactional email.
-
#get_transac_emails_list(opts = {}) ⇒ GetTransacEmailsList
Get the list of transactional emails on the basis of allowed filters This endpoint will show the list of emails for past 30 days by default.
-
#get_transac_emails_list_with_http_info(opts = {}) ⇒ Array<(GetTransacEmailsList, Fixnum, Hash)>
Get the list of transactional emails on the basis of allowed filters This endpoint will show the list of emails for past 30 days by default.
-
#initialize(api_client = ApiClient.default) ⇒ TransactionalEmailsApi
constructor
A new instance of TransactionalEmailsApi.
-
#send_test_template(template_id, send_test_email, opts = {}) ⇒ nil
Send a template to your test list.
-
#send_test_template_with_http_info(template_id, send_test_email, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Send a template to your test list.
-
#send_transac_email(send_smtp_email, opts = {}) ⇒ CreateSmtpEmail
Send a transactional email.
-
#send_transac_email_with_http_info(send_smtp_email, opts = {}) ⇒ Array<(CreateSmtpEmail, Fixnum, Hash)>
Send a transactional email.
-
#setUserAgent(user_agent) ⇒ Object
Set custom user_agent if explicitly passed in api default will still remain Swagger-Codegen/#VERSION/ruby.
-
#smtp_blocked_contacts_email_delete(email, opts = {}) ⇒ nil
Unblock or resubscribe a transactional contact.
-
#smtp_blocked_contacts_email_delete_with_http_info(email, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Unblock or resubscribe a transactional contact.
-
#smtp_log_message_id_delete(message_id, opts = {}) ⇒ nil
Delete an SMTP transactional log.
-
#smtp_log_message_id_delete_with_http_info(message_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete an SMTP transactional log.
-
#update_smtp_template(template_id, smtp_template, opts = {}) ⇒ nil
Update an email template.
-
#update_smtp_template_with_http_info(template_id, smtp_template, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update an email template.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TransactionalEmailsApi
Returns a new instance of TransactionalEmailsApi.
19 20 21 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#block_new_domain(block_domain, opts = {}) ⇒ nil
Add a new domain to the list of blocked domains Blocks a new domain in order to avoid messages being sent to the same
37 38 39 40 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 37 def block_new_domain(block_domain, opts = {}) block_new_domain_with_http_info(block_domain, opts) nil end |
#block_new_domain_with_http_info(block_domain, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Add a new domain to the list of blocked domains Blocks a new domain in order to avoid messages being sent to the same
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 47 def block_new_domain_with_http_info(block_domain, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.block_new_domain ...' end # verify the required parameter 'block_domain' is set if @api_client.config.client_side_validation && block_domain.nil? fail ArgumentError, "Missing the required parameter 'block_domain' when calling TransactionalEmailsApi.block_new_domain" end # resource path local_var_path = '/smtp/blockedDomains' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(block_domain) auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#block_new_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_smtp_template(smtp_template, opts = {}) ⇒ CreateModel
Create an email template
89 90 91 92 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 89 def create_smtp_template(smtp_template, opts = {}) data, _status_code, _headers = create_smtp_template_with_http_info(smtp_template, opts) data end |
#create_smtp_template_with_http_info(smtp_template, opts = {}) ⇒ Array<(CreateModel, Fixnum, Hash)>
Create an email template
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 98 def create_smtp_template_with_http_info(smtp_template, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.create_smtp_template ...' end # verify the required parameter 'smtp_template' is set if @api_client.config.client_side_validation && smtp_template.nil? fail ArgumentError, "Missing the required parameter 'smtp_template' when calling TransactionalEmailsApi.create_smtp_template" end # resource path local_var_path = '/smtp/templates' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(smtp_template) auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CreateModel') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#create_smtp_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_blocked_domain(domain, opts = {}) ⇒ nil
Unblock an existing domain from the list of blocked domains Unblocks an existing domain from the list of blocked domains
142 143 144 145 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 142 def delete_blocked_domain(domain, opts = {}) delete_blocked_domain_with_http_info(domain, opts) nil end |
#delete_blocked_domain_with_http_info(domain, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Unblock an existing domain from the list of blocked domains Unblocks an existing domain from the list of blocked domains
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 152 def delete_blocked_domain_with_http_info(domain, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.delete_blocked_domain ...' end # verify the required parameter 'domain' is set if @api_client.config.client_side_validation && domain.nil? fail ArgumentError, "Missing the required parameter 'domain' when calling TransactionalEmailsApi.delete_blocked_domain" end # resource path local_var_path = '/smtp/blockedDomains/{domain}'.sub('{' + 'domain' + '}', domain.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#delete_blocked_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_hardbounces(opts = {}) ⇒ nil
Delete hardbounces Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures)
195 196 197 198 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 195 def delete_hardbounces(opts = {}) delete_hardbounces_with_http_info(opts) nil end |
#delete_hardbounces_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete hardbounces Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures)
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 205 def delete_hardbounces_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.delete_hardbounces ...' end # resource path local_var_path = '/smtp/deleteHardbounces' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'delete_hardbounces']) auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#delete_hardbounces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_smtp_template(template_id, opts = {}) ⇒ nil
Delete an inactive email template
243 244 245 246 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 243 def delete_smtp_template(template_id, opts = {}) delete_smtp_template_with_http_info(template_id, opts) nil end |
#delete_smtp_template_with_http_info(template_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete an inactive email template
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 252 def delete_smtp_template_with_http_info(template_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.delete_smtp_template ...' end # verify the required parameter 'template_id' is set if @api_client.config.client_side_validation && template_id.nil? fail ArgumentError, "Missing the required parameter 'template_id' when calling TransactionalEmailsApi.delete_smtp_template" end # resource path local_var_path = '/smtp/templates/{templateId}'.sub('{' + 'templateId' + '}', template_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#delete_smtp_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_aggregated_smtp_report(opts = {}) ⇒ GetAggregatedReport
Get your transactional email activity aggregated over a period of time This endpoint will show the aggregated stats for past 90 days by default if ‘startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
298 299 300 301 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 298 def get_aggregated_smtp_report(opts = {}) data, _status_code, _headers = get_aggregated_smtp_report_with_http_info(opts) data end |
#get_aggregated_smtp_report_with_http_info(opts = {}) ⇒ Array<(GetAggregatedReport, Fixnum, Hash)>
Get your transactional email activity aggregated over a period of time This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 311 def get_aggregated_smtp_report_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_aggregated_smtp_report ...' end # resource path local_var_path = '/smtp/statistics/aggregatedReport' # query parameters query_params = {} query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil? query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetAggregatedReport') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#get_aggregated_smtp_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_blocked_domains(opts = {}) ⇒ GetBlockedDomains
Get the list of blocked domains Get the list of blocked domains
354 355 356 357 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 354 def get_blocked_domains(opts = {}) data, _status_code, _headers = get_blocked_domains_with_http_info(opts) data end |
#get_blocked_domains_with_http_info(opts = {}) ⇒ Array<(GetBlockedDomains, Fixnum, Hash)>
Get the list of blocked domains Get the list of blocked domains
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 363 def get_blocked_domains_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_blocked_domains ...' end # resource path local_var_path = '/smtp/blockedDomains' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetBlockedDomains') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#get_blocked_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_email_event_report(opts = {}) ⇒ GetEmailEventReport
Get all your transactional email activity (unaggregated events) This endpoint will show the aggregated stats for past 30 days by default if ‘startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
413 414 415 416 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 413 def get_email_event_report(opts = {}) data, _status_code, _headers = get_email_event_report_with_http_info(opts) data end |
#get_email_event_report_with_http_info(opts = {}) ⇒ Array<(GetEmailEventReport, Fixnum, Hash)>
Get all your transactional email activity (unaggregated events) This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 433 def get_email_event_report_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_email_event_report ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_email_event_report, must be smaller than or equal to 100.' end 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']) fail ArgumentError, 'invalid value for "event", must be one of bounces, hardBounces, softBounces, delivered, spam, requests, opened, clicks, invalid, deferred, blocked, unsubscribed, error' end if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end # resource path local_var_path = '/smtp/statistics/events' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil? query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil? query_params[:'event'] = opts[:'event'] if !opts[:'event'].nil? query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil? query_params[:'messageId'] = opts[:'message_id'] if !opts[:'message_id'].nil? query_params[:'templateId'] = opts[:'template_id'] if !opts[:'template_id'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetEmailEventReport') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#get_email_event_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_smtp_report(opts = {}) ⇒ GetReports
Get your transactional email activity aggregated per day
499 500 501 502 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 499 def get_smtp_report(opts = {}) data, _status_code, _headers = get_smtp_report_with_http_info(opts) data end |
#get_smtp_report_with_http_info(opts = {}) ⇒ Array<(GetReports, Fixnum, Hash)>
Get your transactional email activity aggregated per day
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 514 def get_smtp_report_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_smtp_report ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 30 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_smtp_report, must be smaller than or equal to 30.' end if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end # resource path local_var_path = '/smtp/statistics/reports' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil? query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetReports') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#get_smtp_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_smtp_template(template_id, opts = {}) ⇒ GetSmtpTemplateOverview
Returns the template information
567 568 569 570 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 567 def get_smtp_template(template_id, opts = {}) data, _status_code, _headers = get_smtp_template_with_http_info(template_id, opts) data end |
#get_smtp_template_with_http_info(template_id, opts = {}) ⇒ Array<(GetSmtpTemplateOverview, Fixnum, Hash)>
Returns the template information
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 576 def get_smtp_template_with_http_info(template_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_smtp_template ...' end # verify the required parameter 'template_id' is set if @api_client.config.client_side_validation && template_id.nil? fail ArgumentError, "Missing the required parameter 'template_id' when calling TransactionalEmailsApi.get_smtp_template" end # resource path local_var_path = '/smtp/templates/{templateId}'.sub('{' + 'templateId' + '}', template_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetSmtpTemplateOverview') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#get_smtp_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_smtp_templates(opts = {}) ⇒ GetSmtpTemplates
Get the list of email templates
622 623 624 625 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 622 def get_smtp_templates(opts = {}) data, _status_code, _headers = get_smtp_templates_with_http_info(opts) data end |
#get_smtp_templates_with_http_info(opts = {}) ⇒ Array<(GetSmtpTemplates, Fixnum, Hash)>
Get the list of email templates
634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 634 def get_smtp_templates_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_smtp_templates ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_smtp_templates, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end # resource path local_var_path = '/smtp/templates' # query parameters query_params = {} query_params[:'templateStatus'] = opts[:'template_status'] if !opts[:'template_status'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetSmtpTemplates') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#get_smtp_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_transac_blocked_contacts(opts = {}) ⇒ GetTransacBlockedContacts
Get the list of blocked or unsubscribed transactional contacts
689 690 691 692 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 689 def get_transac_blocked_contacts(opts = {}) data, _status_code, _headers = get_transac_blocked_contacts_with_http_info(opts) data end |
#get_transac_blocked_contacts_with_http_info(opts = {}) ⇒ Array<(GetTransacBlockedContacts, Fixnum, Hash)>
Get the list of blocked or unsubscribed transactional contacts
703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 703 def get_transac_blocked_contacts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_transac_blocked_contacts ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_transac_blocked_contacts, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end # resource path local_var_path = '/smtp/blockedContacts' # query parameters query_params = {} query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'senders'] = @api_client.build_collection_param(opts[:'senders'], :csv) if !opts[:'senders'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetTransacBlockedContacts') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#get_transac_blocked_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_transac_email_content(uuid, opts = {}) ⇒ GetTransacEmailContent
Get the personalized content of a sent transactional email
755 756 757 758 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 755 def get_transac_email_content(uuid, opts = {}) data, _status_code, _headers = get_transac_email_content_with_http_info(uuid, opts) data end |
#get_transac_email_content_with_http_info(uuid, opts = {}) ⇒ Array<(GetTransacEmailContent, Fixnum, Hash)>
Get the personalized content of a sent transactional email
764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 764 def get_transac_email_content_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_transac_email_content ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling TransactionalEmailsApi.get_transac_email_content" end # resource path local_var_path = '/smtp/emails/{uuid}'.sub('{' + 'uuid' + '}', uuid.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetTransacEmailContent') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#get_transac_email_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_transac_emails_list(opts = {}) ⇒ GetTransacEmailsList
Get the list of transactional emails on the basis of allowed filters This endpoint will show the list of emails for past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters.
815 816 817 818 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 815 def get_transac_emails_list(opts = {}) data, _status_code, _headers = get_transac_emails_list_with_http_info(opts) data end |
#get_transac_emails_list_with_http_info(opts = {}) ⇒ Array<(GetTransacEmailsList, Fixnum, Hash)>
Get the list of transactional emails on the basis of allowed filters This endpoint will show the list of emails for past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters.
832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 832 def get_transac_emails_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.get_transac_emails_list ...' end if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionalEmailsApi.get_transac_emails_list, must be smaller than or equal to 1000.' end # resource path local_var_path = '/smtp/emails' # query parameters query_params = {} query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil? query_params[:'templateId'] = opts[:'template_id'] if !opts[:'template_id'].nil? query_params[:'messageId'] = opts[:'message_id'] if !opts[:'message_id'].nil? query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetTransacEmailsList') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#get_transac_emails_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_test_template(template_id, send_test_email, opts = {}) ⇒ nil
Send a template to your test list
887 888 889 890 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 887 def send_test_template(template_id, send_test_email, opts = {}) send_test_template_with_http_info(template_id, send_test_email, opts) nil end |
#send_test_template_with_http_info(template_id, send_test_email, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Send a template to your test list
897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 897 def send_test_template_with_http_info(template_id, send_test_email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.send_test_template ...' end # verify the required parameter 'template_id' is set if @api_client.config.client_side_validation && template_id.nil? fail ArgumentError, "Missing the required parameter 'template_id' when calling TransactionalEmailsApi.send_test_template" end # verify the required parameter 'send_test_email' is set if @api_client.config.client_side_validation && send_test_email.nil? fail ArgumentError, "Missing the required parameter 'send_test_email' when calling TransactionalEmailsApi.send_test_template" end # resource path local_var_path = '/smtp/templates/{templateId}/sendTest'.sub('{' + 'templateId' + '}', template_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(send_test_email) auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#send_test_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_transac_email(send_smtp_email, opts = {}) ⇒ CreateSmtpEmail
Send a transactional email
943 944 945 946 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 943 def send_transac_email(send_smtp_email, opts = {}) data, _status_code, _headers = send_transac_email_with_http_info(send_smtp_email, opts) data end |
#send_transac_email_with_http_info(send_smtp_email, opts = {}) ⇒ Array<(CreateSmtpEmail, Fixnum, Hash)>
Send a transactional email
952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 952 def send_transac_email_with_http_info(send_smtp_email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.send_transac_email ...' end # verify the required parameter 'send_smtp_email' is set if @api_client.config.client_side_validation && send_smtp_email.nil? fail ArgumentError, "Missing the required parameter 'send_smtp_email' when calling TransactionalEmailsApi.send_transac_email" end # resource path local_var_path = '/smtp/email' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(send_smtp_email) auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CreateSmtpEmail') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#send_transac_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#setUserAgent(user_agent) ⇒ Object
Set custom user_agent if explicitly passed in api default will still remain Swagger-Codegen/#VERSION/ruby
25 26 27 28 29 30 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 25 def setUserAgent(user_agent) @user_agent = user_agent if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_') @api_client.default_headers['User-Agent'] = @user_agent end end |
#smtp_blocked_contacts_email_delete(email, opts = {}) ⇒ nil
Unblock or resubscribe a transactional contact
995 996 997 998 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 995 def smtp_blocked_contacts_email_delete(email, opts = {}) smtp_blocked_contacts_email_delete_with_http_info(email, opts) nil end |
#smtp_blocked_contacts_email_delete_with_http_info(email, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Unblock or resubscribe a transactional contact
1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 1004 def smtp_blocked_contacts_email_delete_with_http_info(email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.smtp_blocked_contacts_email_delete ...' end # verify the required parameter 'email' is set if @api_client.config.client_side_validation && email.nil? fail ArgumentError, "Missing the required parameter 'email' when calling TransactionalEmailsApi.smtp_blocked_contacts_email_delete" end # resource path local_var_path = '/smtp/blockedContacts/{email}'.sub('{' + 'email' + '}', email.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#smtp_blocked_contacts_email_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#smtp_log_message_id_delete(message_id, opts = {}) ⇒ nil
Delete an SMTP transactional log
1046 1047 1048 1049 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 1046 def (, opts = {}) (, opts) nil end |
#smtp_log_message_id_delete_with_http_info(message_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete an SMTP transactional log
1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 1055 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.smtp_log_message_id_delete ...' end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling TransactionalEmailsApi.smtp_log_message_id_delete" end # resource path local_var_path = '/smtp/log/{messageId}'.sub('{' + 'messageId' + '}', .to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#smtp_log_message_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_smtp_template(template_id, smtp_template, opts = {}) ⇒ nil
Update an email template
1098 1099 1100 1101 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 1098 def update_smtp_template(template_id, smtp_template, opts = {}) update_smtp_template_with_http_info(template_id, smtp_template, opts) nil end |
#update_smtp_template_with_http_info(template_id, smtp_template, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update an email template
1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 |
# File 'lib/sib-api-v3-sdk/api/transactional_emails_api.rb', line 1108 def update_smtp_template_with_http_info(template_id, smtp_template, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.update_smtp_template ...' end # verify the required parameter 'template_id' is set if @api_client.config.client_side_validation && template_id.nil? fail ArgumentError, "Missing the required parameter 'template_id' when calling TransactionalEmailsApi.update_smtp_template" end # verify the required parameter 'smtp_template' is set if @api_client.config.client_side_validation && smtp_template.nil? fail ArgumentError, "Missing the required parameter 'smtp_template' when calling TransactionalEmailsApi.update_smtp_template" end # resource path local_var_path = '/smtp/templates/{templateId}'.sub('{' + 'templateId' + '}', template_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(smtp_template) auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionalEmailsApi#update_smtp_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |