Class: ClickSendClient::SMSApi
- Inherits:
-
Object
- Object
- ClickSendClient::SMSApi
- Defined in:
- lib/clicksend_client/api/sms_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ SMSApi
constructor
A new instance of SMSApi.
-
#sms_cancel_all_put(opts = {}) ⇒ String
Update all scheduled message as cancelled Update all scheduled message as cancelled.
-
#sms_cancel_all_put_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Update all scheduled message as cancelled Update all scheduled message as cancelled.
-
#sms_cancel_by_message_id_put(message_id, opts = {}) ⇒ String
Update scheduled message as cancelled Update scheduled message as cancelled.
-
#sms_cancel_by_message_id_put_with_http_info(message_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Update scheduled message as cancelled Update scheduled message as cancelled.
-
#sms_history_export_get(filename, opts = {}) ⇒ String
Export all sms history Export all sms history.
-
#sms_history_export_get_with_http_info(filename, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Export all sms history Export all sms history.
-
#sms_history_get(opts = {}) ⇒ String
Get all sms history Get all sms history.
-
#sms_history_get_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get all sms history Get all sms history.
-
#sms_inbound_get(opts = {}) ⇒ String
Get all inbound sms Get all inbound sms.
-
#sms_inbound_get_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get all inbound sms Get all inbound sms.
-
#sms_inbound_post(url, opts = {}) ⇒ String
Create inbound sms Create inbound sms.
-
#sms_inbound_post_with_http_info(url, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Create inbound sms Create inbound sms.
-
#sms_inbound_read_by_message_id_put(message_id, opts = {}) ⇒ String
Mark inbound SMS as read Mark specific inbound SMS as read.
-
#sms_inbound_read_by_message_id_put_with_http_info(message_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Mark inbound SMS as read Mark specific inbound SMS as read.
-
#sms_inbound_read_put(opts = {}) ⇒ String
Mark inbound SMS as read Mark all inbound SMS as read optionally before a certain date.
-
#sms_inbound_read_put_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Mark inbound SMS as read Mark all inbound SMS as read optionally before a certain date.
-
#sms_price_post(sms_messages, opts = {}) ⇒ String
Calculate sms price Calculate sms price.
-
#sms_price_post_with_http_info(sms_messages, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Calculate sms price Calculate sms price.
-
#sms_receipts_by_message_id_get(message_id, opts = {}) ⇒ String
Get a Specific Delivery Receipt Get a Specific Delivery Receipt.
-
#sms_receipts_by_message_id_get_with_http_info(message_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get a Specific Delivery Receipt Get a Specific Delivery Receipt.
-
#sms_receipts_get(opts = {}) ⇒ String
Get all delivery receipts Get all delivery receipts.
-
#sms_receipts_get_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get all delivery receipts Get all delivery receipts.
-
#sms_receipts_post(url, opts = {}) ⇒ String
Add a delivery receipt Add a delivery receipt.
-
#sms_receipts_post_with_http_info(url, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Add a delivery receipt Add a delivery receipt.
-
#sms_receipts_read_put(opts = {}) ⇒ String
Mark delivery receipts as read Mark delivery receipts as read.
-
#sms_receipts_read_put_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Mark delivery receipts as read Mark delivery receipts as read.
-
#sms_send_post(sms_messages, opts = {}) ⇒ String
Send sms message(s) # Send one or more SMS messages You can post up to 1000 messages with each API call.
-
#sms_send_post_with_http_info(sms_messages, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Send sms message(s) # Send one or more SMS messages You can post up to 1000 messages with each API call.
-
#sms_templates_by_template_id_delete(template_id, opts = {}) ⇒ String
Delete sms template Delete sms template.
-
#sms_templates_by_template_id_delete_with_http_info(template_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Delete sms template Delete sms template.
-
#sms_templates_by_template_id_put(template_id, sms_template, opts = {}) ⇒ String
Update sms template Update sms template.
-
#sms_templates_by_template_id_put_with_http_info(template_id, sms_template, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Update sms template Update sms template.
-
#sms_templates_get(opts = {}) ⇒ String
Get lists of all sms templates Get lists of all sms templates.
-
#sms_templates_get_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get lists of all sms templates Get lists of all sms templates.
-
#sms_templates_post(sms_template, opts = {}) ⇒ String
Create sms template Create sms template.
-
#sms_templates_post_with_http_info(sms_template, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Create sms template Create sms template.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/clicksend_client/api/sms_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#sms_cancel_all_put(opts = {}) ⇒ String
Update all scheduled message as cancelled Update all scheduled message as cancelled
26 27 28 29 |
# File 'lib/clicksend_client/api/sms_api.rb', line 26 def sms_cancel_all_put(opts = {}) data, _status_code, _headers = sms_cancel_all_put_with_http_info(opts) data end |
#sms_cancel_all_put_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Update all scheduled message as cancelled Update all scheduled message as cancelled
35 36 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 |
# File 'lib/clicksend_client/api/sms_api.rb', line 35 def sms_cancel_all_put_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_cancel_all_put ...' end # resource path local_var_path = '/sms/cancel-all' # 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 = ['BasicAuth'] 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, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_cancel_all_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_cancel_by_message_id_put(message_id, opts = {}) ⇒ String
Update scheduled message as cancelled Update scheduled message as cancelled
75 76 77 78 |
# File 'lib/clicksend_client/api/sms_api.rb', line 75 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#sms_cancel_by_message_id_put_with_http_info(message_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Update scheduled message as cancelled Update scheduled message as cancelled
85 86 87 88 89 90 91 92 93 94 95 96 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 |
# File 'lib/clicksend_client/api/sms_api.rb', line 85 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_cancel_by_message_id_put ...' 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 SMSApi.sms_cancel_by_message_id_put" end # resource path local_var_path = '/sms/{message_id}/cancel'.sub('{' + 'message_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 = ['BasicAuth'] 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, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_cancel_by_message_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_history_export_get(filename, opts = {}) ⇒ String
Export all sms history Export all sms history
129 130 131 132 |
# File 'lib/clicksend_client/api/sms_api.rb', line 129 def sms_history_export_get(filename, opts = {}) data, _status_code, _headers = sms_history_export_get_with_http_info(filename, opts) data end |
#sms_history_export_get_with_http_info(filename, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Export all sms history Export all sms history
139 140 141 142 143 144 145 146 147 148 149 150 151 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 |
# File 'lib/clicksend_client/api/sms_api.rb', line 139 def sms_history_export_get_with_http_info(filename, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_history_export_get ...' end # verify the required parameter 'filename' is set if @api_client.config.client_side_validation && filename.nil? fail ArgumentError, "Missing the required parameter 'filename' when calling SMSApi.sms_history_export_get" end # resource path local_var_path = '/sms/history/export' # query parameters query_params = {} query_params[:'filename'] = filename # 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 = ['BasicAuth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_history_export_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_history_get(opts = {}) ⇒ String
Get all sms history Get all sms history
188 189 190 191 |
# File 'lib/clicksend_client/api/sms_api.rb', line 188 def sms_history_get(opts = {}) data, _status_code, _headers = sms_history_get_with_http_info(opts) data end |
#sms_history_get_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get all sms history Get all sms history
202 203 204 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 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/clicksend_client/api/sms_api.rb', line 202 def sms_history_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_history_get ...' end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SMSApi.sms_history_get, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SMSApi.sms_history_get, must be greater than or equal to 1.' end # resource path local_var_path = '/sms/history' # query parameters query_params = {} query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'date_from'] = opts[:'date_from'] if !opts[:'date_from'].nil? query_params[:'date_to'] = opts[:'date_to'] if !opts[:'date_to'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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 = ['BasicAuth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_inbound_get(opts = {}) ⇒ String
Get all inbound sms Get all inbound sms
257 258 259 260 |
# File 'lib/clicksend_client/api/sms_api.rb', line 257 def sms_inbound_get(opts = {}) data, _status_code, _headers = sms_inbound_get_with_http_info(opts) data end |
#sms_inbound_get_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get all inbound sms Get all inbound sms
269 270 271 272 273 274 275 276 277 278 279 280 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 |
# File 'lib/clicksend_client/api/sms_api.rb', line 269 def sms_inbound_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_inbound_get ...' end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SMSApi.sms_inbound_get, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SMSApi.sms_inbound_get, must be greater than or equal to 1.' end # resource path local_var_path = '/sms/inbound' # query parameters query_params = {} query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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 = ['BasicAuth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_inbound_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_inbound_post(url, opts = {}) ⇒ String
Create inbound sms Create inbound sms
320 321 322 323 |
# File 'lib/clicksend_client/api/sms_api.rb', line 320 def sms_inbound_post(url, opts = {}) data, _status_code, _headers = sms_inbound_post_with_http_info(url, opts) data end |
#sms_inbound_post_with_http_info(url, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Create inbound sms Create inbound sms
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/clicksend_client/api/sms_api.rb', line 330 def sms_inbound_post_with_http_info(url, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_inbound_post ...' end # verify the required parameter 'url' is set if @api_client.config.client_side_validation && url.nil? fail ArgumentError, "Missing the required parameter 'url' when calling SMSApi.sms_inbound_post" end # resource path local_var_path = '/sms/inbound' # 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(url) auth_names = ['BasicAuth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_inbound_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_inbound_read_by_message_id_put(message_id, opts = {}) ⇒ String
Mark inbound SMS as read Mark specific inbound SMS as read
374 375 376 377 |
# File 'lib/clicksend_client/api/sms_api.rb', line 374 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#sms_inbound_read_by_message_id_put_with_http_info(message_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Mark inbound SMS as read Mark specific inbound SMS as read
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/clicksend_client/api/sms_api.rb', line 384 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_inbound_read_by_message_id_put ...' 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 SMSApi.sms_inbound_read_by_message_id_put" end # resource path local_var_path = '/sms/inbound-read/{message_id}'.sub('{' + 'message_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 = ['BasicAuth'] 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, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_inbound_read_by_message_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_inbound_read_put(opts = {}) ⇒ String
Mark inbound SMS as read Mark all inbound SMS as read optionally before a certain date
428 429 430 431 |
# File 'lib/clicksend_client/api/sms_api.rb', line 428 def sms_inbound_read_put(opts = {}) data, _status_code, _headers = sms_inbound_read_put_with_http_info(opts) data end |
#sms_inbound_read_put_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Mark inbound SMS as read Mark all inbound SMS as read optionally before a certain date
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 |
# File 'lib/clicksend_client/api/sms_api.rb', line 438 def sms_inbound_read_put_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_inbound_read_put ...' end # resource path local_var_path = '/sms/inbound-read' # 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[:'date_before']) auth_names = ['BasicAuth'] 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, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_inbound_read_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_price_post(sms_messages, opts = {}) ⇒ String
Calculate sms price Calculate sms price
478 479 480 481 |
# File 'lib/clicksend_client/api/sms_api.rb', line 478 def sms_price_post(, opts = {}) data, _status_code, _headers = sms_price_post_with_http_info(, opts) data end |
#sms_price_post_with_http_info(sms_messages, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Calculate sms price Calculate sms price
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 519 520 521 522 523 524 525 526 |
# File 'lib/clicksend_client/api/sms_api.rb', line 488 def sms_price_post_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_price_post ...' end # verify the required parameter 'sms_messages' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'sms_messages' when calling SMSApi.sms_price_post" end # resource path local_var_path = '/sms/price' # 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() auth_names = ['BasicAuth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_price_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_receipts_by_message_id_get(message_id, opts = {}) ⇒ String
Get a Specific Delivery Receipt Get a Specific Delivery Receipt
532 533 534 535 |
# File 'lib/clicksend_client/api/sms_api.rb', line 532 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#sms_receipts_by_message_id_get_with_http_info(message_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get a Specific Delivery Receipt Get a Specific Delivery Receipt
542 543 544 545 546 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 |
# File 'lib/clicksend_client/api/sms_api.rb', line 542 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_receipts_by_message_id_get ...' 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 SMSApi.sms_receipts_by_message_id_get" end # resource path local_var_path = '/sms/receipts/{message_id}'.sub('{' + 'message_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 = ['BasicAuth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_receipts_by_message_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_receipts_get(opts = {}) ⇒ String
Get all delivery receipts Get all delivery receipts
587 588 589 590 |
# File 'lib/clicksend_client/api/sms_api.rb', line 587 def sms_receipts_get(opts = {}) data, _status_code, _headers = sms_receipts_get_with_http_info(opts) data end |
#sms_receipts_get_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get all delivery receipts Get all delivery receipts
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 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 |
# File 'lib/clicksend_client/api/sms_api.rb', line 598 def sms_receipts_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_receipts_get ...' end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SMSApi.sms_receipts_get, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SMSApi.sms_receipts_get, must be greater than or equal to 1.' end # resource path local_var_path = '/sms/receipts' # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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 = ['BasicAuth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_receipts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_receipts_post(url, opts = {}) ⇒ String
Add a delivery receipt Add a delivery receipt
648 649 650 651 |
# File 'lib/clicksend_client/api/sms_api.rb', line 648 def sms_receipts_post(url, opts = {}) data, _status_code, _headers = sms_receipts_post_with_http_info(url, opts) data end |
#sms_receipts_post_with_http_info(url, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Add a delivery receipt Add a delivery receipt
658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 |
# File 'lib/clicksend_client/api/sms_api.rb', line 658 def sms_receipts_post_with_http_info(url, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_receipts_post ...' end # verify the required parameter 'url' is set if @api_client.config.client_side_validation && url.nil? fail ArgumentError, "Missing the required parameter 'url' when calling SMSApi.sms_receipts_post" end # resource path local_var_path = '/sms/receipts' # 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(url) auth_names = ['BasicAuth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_receipts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_receipts_read_put(opts = {}) ⇒ String
Mark delivery receipts as read Mark delivery receipts as read
702 703 704 705 |
# File 'lib/clicksend_client/api/sms_api.rb', line 702 def sms_receipts_read_put(opts = {}) data, _status_code, _headers = sms_receipts_read_put_with_http_info(opts) data end |
#sms_receipts_read_put_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Mark delivery receipts as read Mark delivery receipts as read
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 |
# File 'lib/clicksend_client/api/sms_api.rb', line 712 def sms_receipts_read_put_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_receipts_read_put ...' end # resource path local_var_path = '/sms/receipts-read' # 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[:'date_before']) auth_names = ['BasicAuth'] 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, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_receipts_read_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_send_post(sms_messages, opts = {}) ⇒ String
Send sms message(s)
# Send one or more SMS messages You can post up to 1000 messages with each API call. You can send to a mix of contacts and contact lists, as long as the total number of recipients is up to 1000. The response contains status and details for each recipient. *Refer to [Application Status Codes](https://dashboard.clicksend.com/#/signup/step1/) for the possible response message status strings.*
752 753 754 755 |
# File 'lib/clicksend_client/api/sms_api.rb', line 752 def sms_send_post(, opts = {}) data, _status_code, _headers = sms_send_post_with_http_info(, opts) data end |
#sms_send_post_with_http_info(sms_messages, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Send sms message(s)
# Send one or more SMS messages You can post up to 1000 messages with each API call. You can send to a mix of contacts and contact lists, as long as the total number of recipients is up to 1000. The response contains status and details for each recipient. *Refer to [Application Status Codes](https://dashboard.clicksend.com/#/signup/step1/) for the possible response message status strings.*
762 763 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 |
# File 'lib/clicksend_client/api/sms_api.rb', line 762 def sms_send_post_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_send_post ...' end # verify the required parameter 'sms_messages' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'sms_messages' when calling SMSApi.sms_send_post" end # resource path local_var_path = '/sms/send' # 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() auth_names = ['BasicAuth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_send_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_templates_by_template_id_delete(template_id, opts = {}) ⇒ String
Delete sms template Delete sms template
806 807 808 809 |
# File 'lib/clicksend_client/api/sms_api.rb', line 806 def sms_templates_by_template_id_delete(template_id, opts = {}) data, _status_code, _headers = sms_templates_by_template_id_delete_with_http_info(template_id, opts) data end |
#sms_templates_by_template_id_delete_with_http_info(template_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Delete sms template Delete sms template
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 848 849 850 851 852 853 854 |
# File 'lib/clicksend_client/api/sms_api.rb', line 816 def sms_templates_by_template_id_delete_with_http_info(template_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_templates_by_template_id_delete ...' 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 SMSApi.sms_templates_by_template_id_delete" end # resource path local_var_path = '/sms/templates/{template_id}'.sub('{' + 'template_id' + '}', 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 = ['BasicAuth'] 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, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_templates_by_template_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_templates_by_template_id_put(template_id, sms_template, opts = {}) ⇒ String
Update sms template Update sms template
861 862 863 864 |
# File 'lib/clicksend_client/api/sms_api.rb', line 861 def sms_templates_by_template_id_put(template_id, sms_template, opts = {}) data, _status_code, _headers = sms_templates_by_template_id_put_with_http_info(template_id, sms_template, opts) data end |
#sms_templates_by_template_id_put_with_http_info(template_id, sms_template, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Update sms template Update sms template
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 914 |
# File 'lib/clicksend_client/api/sms_api.rb', line 872 def sms_templates_by_template_id_put_with_http_info(template_id, sms_template, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_templates_by_template_id_put ...' 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 SMSApi.sms_templates_by_template_id_put" end # verify the required parameter 'sms_template' is set if @api_client.config.client_side_validation && sms_template.nil? fail ArgumentError, "Missing the required parameter 'sms_template' when calling SMSApi.sms_templates_by_template_id_put" end # resource path local_var_path = '/sms/templates/{template_id}'.sub('{' + 'template_id' + '}', 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(sms_template) auth_names = ['BasicAuth'] 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, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_templates_by_template_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_templates_get(opts = {}) ⇒ String
Get lists of all sms templates Get lists of all sms templates
921 922 923 924 |
# File 'lib/clicksend_client/api/sms_api.rb', line 921 def sms_templates_get(opts = {}) data, _status_code, _headers = sms_templates_get_with_http_info(opts) data end |
#sms_templates_get_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get lists of all sms templates Get lists of all sms templates
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 |
# File 'lib/clicksend_client/api/sms_api.rb', line 932 def sms_templates_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_templates_get ...' end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SMSApi.sms_templates_get, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SMSApi.sms_templates_get, must be greater than or equal to 1.' end # resource path local_var_path = '/sms/templates' # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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 = ['BasicAuth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_templates_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sms_templates_post(sms_template, opts = {}) ⇒ String
Create sms template Create sms template
982 983 984 985 |
# File 'lib/clicksend_client/api/sms_api.rb', line 982 def sms_templates_post(sms_template, opts = {}) data, _status_code, _headers = sms_templates_post_with_http_info(sms_template, opts) data end |
#sms_templates_post_with_http_info(sms_template, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Create sms template Create sms template
992 993 994 995 996 997 998 999 1000 1001 1002 1003 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 |
# File 'lib/clicksend_client/api/sms_api.rb', line 992 def sms_templates_post_with_http_info(sms_template, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SMSApi.sms_templates_post ...' end # verify the required parameter 'sms_template' is set if @api_client.config.client_side_validation && sms_template.nil? fail ArgumentError, "Missing the required parameter 'sms_template' when calling SMSApi.sms_templates_post" end # resource path local_var_path = '/sms/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(sms_template) auth_names = ['BasicAuth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: SMSApi#sms_templates_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |