Class: MailSlurpClient::SmsControllerApi
- Inherits:
-
Object
- Object
- MailSlurpClient::SmsControllerApi
- Defined in:
- lib/mailslurp_client/api/sms_controller_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_sent_sms_message(sent_sms_id, opts = {}) ⇒ nil
Delete sent SMS message.
-
#delete_sent_sms_message_with_http_info(sent_sms_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete sent SMS message.
-
#delete_sent_sms_messages(opts = {}) ⇒ nil
Delete all sent SMS messages Delete all sent SMS messages or all messages for a given phone number.
-
#delete_sent_sms_messages_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete all sent SMS messages Delete all sent SMS messages or all messages for a given phone number.
-
#delete_sms_message(sms_id, opts = {}) ⇒ nil
Delete SMS message.
-
#delete_sms_message_with_http_info(sms_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete SMS message.
-
#delete_sms_messages(opts = {}) ⇒ nil
Delete all SMS messages Delete all SMS messages or all messages for a given phone number.
-
#delete_sms_messages_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete all SMS messages Delete all SMS messages or all messages for a given phone number.
- #get_all_sms_messages(opts = {}) ⇒ PageSmsProjection
-
#get_all_sms_messages_with_http_info(opts = {}) ⇒ Array<(PageSmsProjection, Integer, Hash)>
PageSmsProjection data, response status code and response headers.
-
#get_reply_for_sms_message(sms_id, opts = {}) ⇒ ReplyForSms
Get reply for an SMS message Get reply for an SMS message.
-
#get_reply_for_sms_message_with_http_info(sms_id, opts = {}) ⇒ Array<(ReplyForSms, Integer, Hash)>
Get reply for an SMS message Get reply for an SMS message.
-
#get_sent_sms_count(opts = {}) ⇒ CountDto
Get sent SMS count Get number of sent SMS.
-
#get_sent_sms_count_with_http_info(opts = {}) ⇒ Array<(CountDto, Integer, Hash)>
Get sent SMS count Get number of sent SMS.
-
#get_sent_sms_message(sent_sms_id, opts = {}) ⇒ SentSmsDto
Get sent SMS content including body.
-
#get_sent_sms_message_with_http_info(sent_sms_id, opts = {}) ⇒ Array<(SentSmsDto, Integer, Hash)>
Get sent SMS content including body.
-
#get_sent_sms_messages_paginated(opts = {}) ⇒ PageSentSmsProjection
Get all SMS messages in all phone numbers in paginated form.
-
#get_sent_sms_messages_paginated_with_http_info(opts = {}) ⇒ Array<(PageSentSmsProjection, Integer, Hash)>
Get all SMS messages in all phone numbers in paginated form.
-
#get_sms_count(opts = {}) ⇒ CountDto
Get SMS count Get number of SMS.
-
#get_sms_count_with_http_info(opts = {}) ⇒ Array<(CountDto, Integer, Hash)>
Get SMS count Get number of SMS.
-
#get_sms_message(sms_id, opts = {}) ⇒ SmsDto
Get SMS content including body.
-
#get_sms_message_with_http_info(sms_id, opts = {}) ⇒ Array<(SmsDto, Integer, Hash)>
Get SMS content including body.
-
#get_unread_sms_count(opts = {}) ⇒ UnreadCount
Get unread SMS count Get number of SMS unread.
-
#get_unread_sms_count_with_http_info(opts = {}) ⇒ Array<(UnreadCount, Integer, Hash)>
Get unread SMS count Get number of SMS unread.
-
#initialize(api_client = ApiClient.default) ⇒ SmsControllerApi
constructor
A new instance of SmsControllerApi.
-
#reply_to_sms_message(sms_id, sms_reply_options, opts = {}) ⇒ SentSmsDto
Send a reply to a received SMS message.
-
#reply_to_sms_message_with_http_info(sms_id, sms_reply_options, opts = {}) ⇒ Array<(SentSmsDto, Integer, Hash)>
Send a reply to a received SMS message.
- #send_sms(sms_send_options, opts = {}) ⇒ SentSmsDto
-
#send_sms_with_http_info(sms_send_options, opts = {}) ⇒ Array<(SentSmsDto, Integer, Hash)>
SentSmsDto data, response status code and response headers.
- #set_sms_favourited(sms_id, favourited, opts = {}) ⇒ SmsDto
-
#set_sms_favourited_with_http_info(sms_id, favourited, opts = {}) ⇒ Array<(SmsDto, Integer, Hash)>
SmsDto data, response status code and response headers.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SmsControllerApi
Returns a new instance of SmsControllerApi.
19 20 21 |
# File 'lib/mailslurp_client/api/sms_controller_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/mailslurp_client/api/sms_controller_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_sent_sms_message(sent_sms_id, opts = {}) ⇒ nil
Delete sent SMS message. Delete a sent SMS message
27 28 29 30 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 27 def (sent_sms_id, opts = {}) (sent_sms_id, opts) nil end |
#delete_sent_sms_message_with_http_info(sent_sms_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete sent SMS message. Delete a sent SMS message
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 37 def (sent_sms_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.delete_sent_sms_message ...' end # verify the required parameter 'sent_sms_id' is set if @api_client.config.client_side_validation && sent_sms_id.nil? fail ArgumentError, "Missing the required parameter 'sent_sms_id' when calling SmsControllerApi.delete_sent_sms_message" end # resource path local_var_path = '/sms/sent/{sentSmsId}'.sub('{' + 'sentSmsId' + '}', CGI.escape(sent_sms_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#delete_sent_sms_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_sent_sms_messages(opts = {}) ⇒ nil
Delete all sent SMS messages Delete all sent SMS messages or all messages for a given phone number
87 88 89 90 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 87 def (opts = {}) (opts) nil end |
#delete_sent_sms_messages_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete all sent SMS messages Delete all sent SMS messages or all messages for a given phone number
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 97 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.delete_sent_sms_messages ...' end # resource path local_var_path = '/sms/sent' # query parameters query_params = opts[:query_params] || {} query_params[:'phoneNumberId'] = opts[:'phone_number_id'] if !opts[:'phone_number_id'].nil? # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#delete_sent_sms_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_sms_message(sms_id, opts = {}) ⇒ nil
Delete SMS message. Delete an SMS message
144 145 146 147 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 144 def (sms_id, opts = {}) (sms_id, opts) nil end |
#delete_sms_message_with_http_info(sms_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete SMS message. Delete an SMS message
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 154 def (sms_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.delete_sms_message ...' end # verify the required parameter 'sms_id' is set if @api_client.config.client_side_validation && sms_id.nil? fail ArgumentError, "Missing the required parameter 'sms_id' when calling SmsControllerApi.delete_sms_message" end # resource path local_var_path = '/sms/{smsId}'.sub('{' + 'smsId' + '}', CGI.escape(sms_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#delete_sms_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_sms_messages(opts = {}) ⇒ nil
Delete all SMS messages Delete all SMS messages or all messages for a given phone number
204 205 206 207 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 204 def (opts = {}) (opts) nil end |
#delete_sms_messages_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete all SMS messages Delete all SMS messages or all messages for a given phone number
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 214 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.delete_sms_messages ...' end # resource path local_var_path = '/sms' # query parameters query_params = opts[:query_params] || {} query_params[:'phoneNumberId'] = opts[:'phone_number_id'] if !opts[:'phone_number_id'].nil? # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#delete_sms_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_all_sms_messages(opts = {}) ⇒ PageSmsProjection
266 267 268 269 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 266 def (opts = {}) data, _status_code, _headers = (opts) data end |
#get_all_sms_messages_with_http_info(opts = {}) ⇒ Array<(PageSmsProjection, Integer, Hash)>
Returns PageSmsProjection data, response status code and response headers.
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 281 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.get_all_sms_messages ...' end if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100 fail ArgumentError, 'invalid value for "opts[:"size"]" when calling SmsControllerApi.get_all_sms_messages, must be smaller than or equal to 100.' end allowable_values = ["ASC", "DESC"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/sms' # query parameters query_params = opts[:query_params] || {} query_params[:'phoneNumber'] = opts[:'phone_number'] if !opts[:'phone_number'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'PageSmsProjection' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#get_all_sms_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_reply_for_sms_message(sms_id, opts = {}) ⇒ ReplyForSms
Get reply for an SMS message Get reply for an SMS message.
345 346 347 348 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 345 def (sms_id, opts = {}) data, _status_code, _headers = (sms_id, opts) data end |
#get_reply_for_sms_message_with_http_info(sms_id, opts = {}) ⇒ Array<(ReplyForSms, Integer, Hash)>
Get reply for an SMS message Get reply for an SMS message.
355 356 357 358 359 360 361 362 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 398 399 400 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 355 def (sms_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.get_reply_for_sms_message ...' end # verify the required parameter 'sms_id' is set if @api_client.config.client_side_validation && sms_id.nil? fail ArgumentError, "Missing the required parameter 'sms_id' when calling SmsControllerApi.get_reply_for_sms_message" end # resource path local_var_path = '/sms/{smsId}/reply'.sub('{' + 'smsId' + '}', CGI.escape(sms_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ReplyForSms' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#get_reply_for_sms_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_sent_sms_count(opts = {}) ⇒ CountDto
Get sent SMS count Get number of sent SMS
406 407 408 409 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 406 def get_sent_sms_count(opts = {}) data, _status_code, _headers = get_sent_sms_count_with_http_info(opts) data end |
#get_sent_sms_count_with_http_info(opts = {}) ⇒ Array<(CountDto, Integer, Hash)>
Get sent SMS count Get number of sent SMS
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 415 def get_sent_sms_count_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.get_sent_sms_count ...' end # resource path local_var_path = '/sms/sent/count' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'CountDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#get_sent_sms_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_sent_sms_message(sent_sms_id, opts = {}) ⇒ SentSmsDto
Get sent SMS content including body. Expects sent SMS to exist by ID. Returns an SMS summary object with content.
463 464 465 466 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 463 def (sent_sms_id, opts = {}) data, _status_code, _headers = (sent_sms_id, opts) data end |
#get_sent_sms_message_with_http_info(sent_sms_id, opts = {}) ⇒ Array<(SentSmsDto, Integer, Hash)>
Get sent SMS content including body. Expects sent SMS to exist by ID. Returns an SMS summary object with content.
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 473 def (sent_sms_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.get_sent_sms_message ...' end # verify the required parameter 'sent_sms_id' is set if @api_client.config.client_side_validation && sent_sms_id.nil? fail ArgumentError, "Missing the required parameter 'sent_sms_id' when calling SmsControllerApi.get_sent_sms_message" end # resource path local_var_path = '/sms/sent/{sentSmsId}'.sub('{' + 'sentSmsId' + '}', CGI.escape(sent_sms_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'SentSmsDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#get_sent_sms_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_sent_sms_messages_paginated(opts = {}) ⇒ PageSentSmsProjection
Get all SMS messages in all phone numbers in paginated form. . By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages
531 532 533 534 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 531 def (opts = {}) data, _status_code, _headers = (opts) data end |
#get_sent_sms_messages_paginated_with_http_info(opts = {}) ⇒ Array<(PageSentSmsProjection, Integer, Hash)>
Get all SMS messages in all phone numbers in paginated form. . By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages
547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 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 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 547 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.get_sent_sms_messages_paginated ...' end if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100 fail ArgumentError, 'invalid value for "opts[:"size"]" when calling SmsControllerApi.get_sent_sms_messages_paginated, must be smaller than or equal to 100.' end allowable_values = ["ASC", "DESC"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/sms/sent' # query parameters query_params = opts[:query_params] || {} query_params[:'phoneNumber'] = opts[:'phone_number'] if !opts[:'phone_number'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'PageSentSmsProjection' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#get_sent_sms_messages_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_sms_count(opts = {}) ⇒ CountDto
Get SMS count Get number of SMS
609 610 611 612 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 609 def get_sms_count(opts = {}) data, _status_code, _headers = get_sms_count_with_http_info(opts) data end |
#get_sms_count_with_http_info(opts = {}) ⇒ Array<(CountDto, Integer, Hash)>
Get SMS count Get number of SMS
618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 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 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 618 def get_sms_count_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.get_sms_count ...' end # resource path local_var_path = '/sms/count' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'CountDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#get_sms_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_sms_message(sms_id, opts = {}) ⇒ SmsDto
Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. Returns a SMS summary object with content.
666 667 668 669 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 666 def (sms_id, opts = {}) data, _status_code, _headers = (sms_id, opts) data end |
#get_sms_message_with_http_info(sms_id, opts = {}) ⇒ Array<(SmsDto, Integer, Hash)>
Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. Returns a SMS summary object with content.
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 676 def (sms_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.get_sms_message ...' end # verify the required parameter 'sms_id' is set if @api_client.config.client_side_validation && sms_id.nil? fail ArgumentError, "Missing the required parameter 'sms_id' when calling SmsControllerApi.get_sms_message" end # resource path local_var_path = '/sms/{smsId}'.sub('{' + 'smsId' + '}', CGI.escape(sms_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'SmsDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#get_sms_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_unread_sms_count(opts = {}) ⇒ UnreadCount
Get unread SMS count Get number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response
727 728 729 730 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 727 def get_unread_sms_count(opts = {}) data, _status_code, _headers = get_unread_sms_count_with_http_info(opts) data end |
#get_unread_sms_count_with_http_info(opts = {}) ⇒ Array<(UnreadCount, Integer, Hash)>
Get unread SMS count Get number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response
736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 736 def get_unread_sms_count_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.get_unread_sms_count ...' end # resource path local_var_path = '/sms/unreadCount' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'UnreadCount' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#get_unread_sms_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reply_to_sms_message(sms_id, sms_reply_options, opts = {}) ⇒ SentSmsDto
Send a reply to a received SMS message. Replies are sent from the receiving number. Reply to an SMS message.
785 786 787 788 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 785 def (sms_id, , opts = {}) data, _status_code, _headers = (sms_id, , opts) data end |
#reply_to_sms_message_with_http_info(sms_id, sms_reply_options, opts = {}) ⇒ Array<(SentSmsDto, Integer, Hash)>
Send a reply to a received SMS message. Replies are sent from the receiving number. Reply to an SMS message.
796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 796 def (sms_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.reply_to_sms_message ...' end # verify the required parameter 'sms_id' is set if @api_client.config.client_side_validation && sms_id.nil? fail ArgumentError, "Missing the required parameter 'sms_id' when calling SmsControllerApi.reply_to_sms_message" end # verify the required parameter 'sms_reply_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'sms_reply_options' when calling SmsControllerApi.reply_to_sms_message" end # resource path local_var_path = '/sms/{smsId}/reply'.sub('{' + 'smsId' + '}', CGI.escape(sms_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body() # return_type return_type = opts[:return_type] || 'SentSmsDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#reply_to_sms_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_sms(sms_send_options, opts = {}) ⇒ SentSmsDto
854 855 856 857 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 854 def send_sms(, opts = {}) data, _status_code, _headers = send_sms_with_http_info(, opts) data end |
#send_sms_with_http_info(sms_send_options, opts = {}) ⇒ Array<(SentSmsDto, Integer, Hash)>
Returns SentSmsDto data, response status code and response headers.
864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 864 def send_sms_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.send_sms ...' end # verify the required parameter 'sms_send_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'sms_send_options' when calling SmsControllerApi.send_sms" end # resource path local_var_path = '/sms/send' # query parameters query_params = opts[:query_params] || {} query_params[:'fromPhoneNumber'] = opts[:'from_phone_number'] if !opts[:'from_phone_number'].nil? query_params[:'fromPhoneId'] = opts[:'from_phone_id'] if !opts[:'from_phone_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body() # return_type return_type = opts[:return_type] || 'SentSmsDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#send_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_sms_favourited(sms_id, favourited, opts = {}) ⇒ SmsDto
919 920 921 922 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 919 def set_sms_favourited(sms_id, favourited, opts = {}) data, _status_code, _headers = set_sms_favourited_with_http_info(sms_id, favourited, opts) data end |
#set_sms_favourited_with_http_info(sms_id, favourited, opts = {}) ⇒ Array<(SmsDto, Integer, Hash)>
Returns SmsDto data, response status code and response headers.
928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 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 |
# File 'lib/mailslurp_client/api/sms_controller_api.rb', line 928 def set_sms_favourited_with_http_info(sms_id, favourited, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SmsControllerApi.set_sms_favourited ...' end # verify the required parameter 'sms_id' is set if @api_client.config.client_side_validation && sms_id.nil? fail ArgumentError, "Missing the required parameter 'sms_id' when calling SmsControllerApi.set_sms_favourited" end # verify the required parameter 'favourited' is set if @api_client.config.client_side_validation && favourited.nil? fail ArgumentError, "Missing the required parameter 'favourited' when calling SmsControllerApi.set_sms_favourited" end # resource path local_var_path = '/sms/{smsId}/favourite'.sub('{' + 'smsId' + '}', CGI.escape(sms_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'favourited'] = favourited # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'SmsDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SmsControllerApi#set_sms_favourited\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |