Class: MailSlurpClient::PhoneControllerApi
- Inherits:
-
Object
- Object
- MailSlurpClient::PhoneControllerApi
- Defined in:
- lib/mailslurp_client/api/phone_controller_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
- #create_emergency_address(create_emergency_address_options, opts = {}) ⇒ EmergencyAddress
-
#create_emergency_address_with_http_info(create_emergency_address_options, opts = {}) ⇒ Array<(EmergencyAddress, Integer, Hash)>
EmergencyAddress data, response status code and response headers.
- #delete_emergency_address(address_id, opts = {}) ⇒ EmptyResponseDto
-
#delete_emergency_address_with_http_info(address_id, opts = {}) ⇒ Array<(EmptyResponseDto, Integer, Hash)>
EmptyResponseDto data, response status code and response headers.
- #delete_phone_number(phone_number_id, opts = {}) ⇒ nil
-
#delete_phone_number_with_http_info(phone_number_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Nil, response status code and response headers.
- #get_emergency_address(address_id, opts = {}) ⇒ EmergencyAddress
-
#get_emergency_address_with_http_info(address_id, opts = {}) ⇒ Array<(EmergencyAddress, Integer, Hash)>
EmergencyAddress data, response status code and response headers.
- #get_emergency_addresses(opts = {}) ⇒ Array<EmergencyAddressDto>
-
#get_emergency_addresses_with_http_info(opts = {}) ⇒ Array<(Array<EmergencyAddressDto>, Integer, Hash)>
Array<EmergencyAddressDto> data, response status code and response headers.
- #get_phone_number(phone_number_id, opts = {}) ⇒ PhoneNumberDto
-
#get_phone_number_with_http_info(phone_number_id, opts = {}) ⇒ Array<(PhoneNumberDto, Integer, Hash)>
PhoneNumberDto data, response status code and response headers.
- #get_phone_numbers(opts = {}) ⇒ PagePhoneNumberProjection
-
#get_phone_numbers_with_http_info(opts = {}) ⇒ Array<(PagePhoneNumberProjection, Integer, Hash)>
PagePhoneNumberProjection data, response status code and response headers.
- #get_phone_plans(opts = {}) ⇒ Array<PhonePlanDto>
-
#get_phone_plans_with_http_info(opts = {}) ⇒ Array<(Array<PhonePlanDto>, Integer, Hash)>
Array<PhonePlanDto> data, response status code and response headers.
-
#initialize(api_client = ApiClient.default) ⇒ PhoneControllerApi
constructor
A new instance of PhoneControllerApi.
- #test_phone_number_send_sms(phone_number_id, test_phone_number_options, opts = {}) ⇒ nil
-
#test_phone_number_send_sms_with_http_info(phone_number_id, test_phone_number_options, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Nil, response status code and response headers.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ PhoneControllerApi
Returns a new instance of PhoneControllerApi.
19 20 21 |
# File 'lib/mailslurp_client/api/phone_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/phone_controller_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_emergency_address(create_emergency_address_options, opts = {}) ⇒ EmergencyAddress
25 26 27 28 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 25 def create_emergency_address(, opts = {}) data, _status_code, _headers = create_emergency_address_with_http_info(, opts) data end |
#create_emergency_address_with_http_info(create_emergency_address_options, opts = {}) ⇒ Array<(EmergencyAddress, Integer, Hash)>
Returns EmergencyAddress data, response status code and response headers.
33 34 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 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 33 def create_emergency_address_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.create_emergency_address ...' end # verify the required parameter 'create_emergency_address_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'create_emergency_address_options' when calling PhoneControllerApi.create_emergency_address" end # resource path local_var_path = '/phone/emergency-addresses' # 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] || 'EmergencyAddress' # 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: PhoneControllerApi#create_emergency_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_emergency_address(address_id, opts = {}) ⇒ EmptyResponseDto
85 86 87 88 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 85 def delete_emergency_address(address_id, opts = {}) data, _status_code, _headers = delete_emergency_address_with_http_info(address_id, opts) data end |
#delete_emergency_address_with_http_info(address_id, opts = {}) ⇒ Array<(EmptyResponseDto, Integer, Hash)>
Returns EmptyResponseDto data, response status code and response headers.
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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 93 def delete_emergency_address_with_http_info(address_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_emergency_address ...' end # verify the required parameter 'address_id' is set if @api_client.config.client_side_validation && address_id.nil? fail ArgumentError, "Missing the required parameter 'address_id' when calling PhoneControllerApi.delete_emergency_address" end # resource path local_var_path = '/phone/emergency-addresses/{addressId}'.sub('{' + 'addressId' + '}', CGI.escape(address_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] || 'EmptyResponseDto' # 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: PhoneControllerApi#delete_emergency_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_phone_number(phone_number_id, opts = {}) ⇒ nil
143 144 145 146 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 143 def delete_phone_number(phone_number_id, opts = {}) delete_phone_number_with_http_info(phone_number_id, opts) nil end |
#delete_phone_number_with_http_info(phone_number_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Returns nil, response status code and response headers.
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 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 151 def delete_phone_number_with_http_info(phone_number_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_phone_number ...' end # verify the required parameter 'phone_number_id' is set if @api_client.config.client_side_validation && phone_number_id.nil? fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.delete_phone_number" end # resource path local_var_path = '/phone/numbers/{phoneNumberId}'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_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: PhoneControllerApi#delete_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_emergency_address(address_id, opts = {}) ⇒ EmergencyAddress
199 200 201 202 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 199 def get_emergency_address(address_id, opts = {}) data, _status_code, _headers = get_emergency_address_with_http_info(address_id, opts) data end |
#get_emergency_address_with_http_info(address_id, opts = {}) ⇒ Array<(EmergencyAddress, Integer, Hash)>
Returns EmergencyAddress data, response status code and response headers.
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 250 251 252 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 207 def get_emergency_address_with_http_info(address_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_emergency_address ...' end # verify the required parameter 'address_id' is set if @api_client.config.client_side_validation && address_id.nil? fail ArgumentError, "Missing the required parameter 'address_id' when calling PhoneControllerApi.get_emergency_address" end # resource path local_var_path = '/phone/emergency-addresses/{addressId}'.sub('{' + 'addressId' + '}', CGI.escape(address_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] || 'EmergencyAddress' # 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: PhoneControllerApi#get_emergency_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_emergency_addresses(opts = {}) ⇒ Array<EmergencyAddressDto>
256 257 258 259 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 256 def get_emergency_addresses(opts = {}) data, _status_code, _headers = get_emergency_addresses_with_http_info(opts) data end |
#get_emergency_addresses_with_http_info(opts = {}) ⇒ Array<(Array<EmergencyAddressDto>, Integer, Hash)>
Returns Array<EmergencyAddressDto> data, response status code and response headers.
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 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 263 def get_emergency_addresses_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_emergency_addresses ...' end # resource path local_var_path = '/phone/emergency-addresses' # 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] || 'Array<EmergencyAddressDto>' # 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: PhoneControllerApi#get_emergency_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_phone_number(phone_number_id, opts = {}) ⇒ PhoneNumberDto
309 310 311 312 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 309 def get_phone_number(phone_number_id, opts = {}) data, _status_code, _headers = get_phone_number_with_http_info(phone_number_id, opts) data end |
#get_phone_number_with_http_info(phone_number_id, opts = {}) ⇒ Array<(PhoneNumberDto, Integer, Hash)>
Returns PhoneNumberDto data, response status code and response headers.
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 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 317 def get_phone_number_with_http_info(phone_number_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_number ...' end # verify the required parameter 'phone_number_id' is set if @api_client.config.client_side_validation && phone_number_id.nil? fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.get_phone_number" end # resource path local_var_path = '/phone/numbers/{phoneNumberId}'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_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] || 'PhoneNumberDto' # 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: PhoneControllerApi#get_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_phone_numbers(opts = {}) ⇒ PagePhoneNumberProjection
372 373 374 375 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 372 def get_phone_numbers(opts = {}) data, _status_code, _headers = get_phone_numbers_with_http_info(opts) data end |
#get_phone_numbers_with_http_info(opts = {}) ⇒ Array<(PagePhoneNumberProjection, Integer, Hash)>
Returns PagePhoneNumberProjection data, response status code and response headers.
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 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 385 def get_phone_numbers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_numbers ...' end allowable_values = ["US", "GB", "AU"] if @api_client.config.client_side_validation && opts[:'phone_country'] && !allowable_values.include?(opts[:'phone_country']) fail ArgumentError, "invalid value for \"phone_country\", must be one of #{allowable_values}" 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 = '/phone/numbers' # query parameters query_params = opts[:query_params] || {} query_params[:'phoneCountry'] = opts[:'phone_country'] if !opts[:'phone_country'].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? # 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] || 'PagePhoneNumberProjection' # 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: PhoneControllerApi#get_phone_numbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_phone_plans(opts = {}) ⇒ Array<PhonePlanDto>
444 445 446 447 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 444 def get_phone_plans(opts = {}) data, _status_code, _headers = get_phone_plans_with_http_info(opts) data end |
#get_phone_plans_with_http_info(opts = {}) ⇒ Array<(Array<PhonePlanDto>, Integer, Hash)>
Returns Array<PhonePlanDto> data, response status code and response headers.
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 489 490 491 492 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 451 def get_phone_plans_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_plans ...' end # resource path local_var_path = '/phone/plans' # 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] || 'Array<PhonePlanDto>' # 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: PhoneControllerApi#get_phone_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#test_phone_number_send_sms(phone_number_id, test_phone_number_options, opts = {}) ⇒ nil
499 500 501 502 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 499 def test_phone_number_send_sms(phone_number_id, , opts = {}) test_phone_number_send_sms_with_http_info(phone_number_id, , opts) nil end |
#test_phone_number_send_sms_with_http_info(phone_number_id, test_phone_number_options, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Returns nil, response status code and response headers.
509 510 511 512 513 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 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 509 def test_phone_number_send_sms_with_http_info(phone_number_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.test_phone_number_send_sms ...' end # verify the required parameter 'phone_number_id' is set if @api_client.config.client_side_validation && phone_number_id.nil? fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.test_phone_number_send_sms" end # verify the required parameter 'test_phone_number_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'test_phone_number_options' when calling PhoneControllerApi.test_phone_number_send_sms" end # resource path local_var_path = '/phone/numbers/{phoneNumberId}/test'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'x-test-id'] = opts[:'x_test_id'] if !opts[:'x_test_id'].nil? # 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] # 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: PhoneControllerApi#test_phone_number_send_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |