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 an emergency address Add an emergency address to a phone number.
-
#create_emergency_address_with_http_info(create_emergency_address_options, opts = {}) ⇒ Array<(EmergencyAddress, Integer, Hash)>
Create an emergency address Add an emergency address to a phone number.
-
#delete_emergency_address(address_id, opts = {}) ⇒ EmptyResponseDto
Delete an emergency address Delete an emergency address.
-
#delete_emergency_address_with_http_info(address_id, opts = {}) ⇒ Array<(EmptyResponseDto, Integer, Hash)>
Delete an emergency address Delete an emergency address.
-
#delete_phone_number(phone_number_id, opts = {}) ⇒ nil
Delete a phone number Remove phone number from account.
-
#delete_phone_number_with_http_info(phone_number_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a phone number Remove phone number from account.
-
#get_consent_status(opts = {}) ⇒ ConsentStatusDto
Get consent status Get the status of phone usage consent.
-
#get_consent_status_with_http_info(opts = {}) ⇒ Array<(ConsentStatusDto, Integer, Hash)>
Get consent status Get the status of phone usage consent.
-
#get_emergency_address(address_id, opts = {}) ⇒ EmergencyAddress
Get an emergency address Fetch an emergency address by ID.
-
#get_emergency_address_with_http_info(address_id, opts = {}) ⇒ Array<(EmergencyAddress, Integer, Hash)>
Get an emergency address Fetch an emergency address by ID.
-
#get_emergency_addresses(opts = {}) ⇒ Array<EmergencyAddressDto>
Get emergency addresses List emergency addresses.
-
#get_emergency_addresses_with_http_info(opts = {}) ⇒ Array<(Array<EmergencyAddressDto>, Integer, Hash)>
Get emergency addresses List emergency addresses.
-
#get_phone_number(phone_number_id, opts = {}) ⇒ PhoneNumberDto
Get a phone number by ID Get a phone number by ID.
-
#get_phone_number_with_http_info(phone_number_id, opts = {}) ⇒ Array<(PhoneNumberDto, Integer, Hash)>
Get a phone number by ID Get a phone number by ID.
-
#get_phone_numbers(opts = {}) ⇒ PagePhoneNumberProjection
Get phone numbers List phone numbers for account.
-
#get_phone_numbers_with_http_info(opts = {}) ⇒ Array<(PagePhoneNumberProjection, Integer, Hash)>
Get phone numbers List phone numbers for account.
-
#get_phone_plans(opts = {}) ⇒ Array<PhonePlanDto>
Get phone plans Get phone number plans.
-
#get_phone_plans_availability(opts = {}) ⇒ PhonePlanAvailability
Get phone plans availability.
-
#get_phone_plans_availability_with_http_info(opts = {}) ⇒ Array<(PhonePlanAvailability, Integer, Hash)>
Get phone plans availability.
-
#get_phone_plans_with_http_info(opts = {}) ⇒ Array<(Array<PhonePlanDto>, Integer, Hash)>
Get phone plans Get phone number plans.
-
#get_sent_sms_by_phone_number(phone_number_id, opts = {}) ⇒ PageSentSmsProjection
List sent TXT messages for a phone number Get sent SMS messages for a phone number.
-
#get_sent_sms_by_phone_number_with_http_info(phone_number_id, opts = {}) ⇒ Array<(PageSentSmsProjection, Integer, Hash)>
List sent TXT messages for a phone number Get sent SMS messages for a phone number.
-
#get_sms_by_phone_number(phone_number_id, opts = {}) ⇒ PageSmsProjection
List SMS messages for a phone number Get SMS messages for a phone number.
-
#get_sms_by_phone_number_with_http_info(phone_number_id, opts = {}) ⇒ Array<(PageSmsProjection, Integer, Hash)>
List SMS messages for a phone number Get SMS messages for a phone number.
-
#initialize(api_client = ApiClient.default) ⇒ PhoneControllerApi
constructor
A new instance of PhoneControllerApi.
-
#send_sms_from_phone_number(phone_number_id, sms_send_options, opts = {}) ⇒ SentSmsDto
Send TXT message from a phone number Send SMS from a phone number.
-
#send_sms_from_phone_number_with_http_info(phone_number_id, sms_send_options, opts = {}) ⇒ Array<(SentSmsDto, Integer, Hash)>
Send TXT message from a phone number Send SMS from a phone number.
-
#set_consent_status(agree, opts = {}) ⇒ ConsentStatusDto
Set consent status Give or revoke consent for phone usage.
-
#set_consent_status_with_http_info(agree, opts = {}) ⇒ Array<(ConsentStatusDto, Integer, Hash)>
Set consent status Give or revoke consent for phone usage.
-
#set_phone_favourited(phone_number_id, set_phone_favourited_options, opts = {}) ⇒ PhoneNumberDto
Set phone favourited state Set and return new favorite state for a phone.
-
#set_phone_favourited_with_http_info(phone_number_id, set_phone_favourited_options, opts = {}) ⇒ Array<(PhoneNumberDto, Integer, Hash)>
Set phone favourited state Set and return new favorite state for a phone.
-
#test_phone_number_send_sms(phone_number_id, test_phone_number_options, opts = {}) ⇒ nil
Test sending an SMS to a number Test a phone number by sending an SMS to it.
-
#test_phone_number_send_sms_with_http_info(phone_number_id, test_phone_number_options, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Test sending an SMS to a number Test a phone number by sending an SMS to it.
-
#update_phone_number(phone_number_id, update_phone_number_options, opts = {}) ⇒ PhoneNumberDto
Update a phone number Set field for phone number.
-
#update_phone_number_with_http_info(phone_number_id, update_phone_number_options, opts = {}) ⇒ Array<(PhoneNumberDto, Integer, Hash)>
Update a phone number Set field for phone number.
-
#validate_phone_number(validate_phone_number_options, opts = {}) ⇒ PhoneNumberValidationDto
Verify validity of a phone number Validate a phone number.
-
#validate_phone_number_with_http_info(validate_phone_number_options, opts = {}) ⇒ Array<(PhoneNumberValidationDto, Integer, Hash)>
Verify validity of a phone number Validate a phone number.
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
Create an emergency address Add an emergency address to a phone number
27 28 29 30 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 27 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)>
Create an emergency address Add an emergency address to a phone number
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 81 82 83 84 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 37 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
Delete an emergency address Delete an emergency address
91 92 93 94 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 91 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)>
Delete an emergency address Delete an emergency address
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 139 140 141 142 143 144 145 146 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 101 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
Delete a phone number Remove phone number from account
153 154 155 156 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 153 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)>
Delete a phone number Remove phone number from account
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 198 199 200 201 202 203 204 205 206 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 163 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_consent_status(opts = {}) ⇒ ConsentStatusDto
Get consent status Get the status of phone usage consent
212 213 214 215 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 212 def (opts = {}) data, _status_code, _headers = (opts) data end |
#get_consent_status_with_http_info(opts = {}) ⇒ Array<(ConsentStatusDto, Integer, Hash)>
Get consent status Get the status of phone usage consent
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 255 256 257 258 259 260 261 262 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 221 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_consent_status ...' end # resource path local_var_path = '/phone/consent' # 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] || 'ConsentStatusDto' # 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_consent_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_emergency_address(address_id, opts = {}) ⇒ EmergencyAddress
Get an emergency address Fetch an emergency address by ID
269 270 271 272 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 269 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)>
Get an emergency address Fetch an emergency address by ID
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 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 279 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>
Get emergency addresses List emergency addresses
330 331 332 333 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 330 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)>
Get emergency addresses List emergency addresses
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 369 370 371 372 373 374 375 376 377 378 379 380 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 339 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
Get a phone number by ID Get a phone number by ID
387 388 389 390 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 387 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)>
Get a phone number by ID Get a phone number by ID
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 441 442 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 397 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
Get phone numbers List phone numbers for account
457 458 459 460 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 457 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)>
Get phone numbers List phone numbers for account
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 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 475 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? query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if !opts[:'include'].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] || '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>
Get phone plans Get phone number plans
539 540 541 542 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 539 def get_phone_plans(opts = {}) data, _status_code, _headers = get_phone_plans_with_http_info(opts) data end |
#get_phone_plans_availability(opts = {}) ⇒ PhonePlanAvailability
Get phone plans availability
594 595 596 597 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 594 def get_phone_plans_availability(opts = {}) data, _status_code, _headers = get_phone_plans_availability_with_http_info(opts) data end |
#get_phone_plans_availability_with_http_info(opts = {}) ⇒ Array<(PhonePlanAvailability, Integer, Hash)>
Get phone plans availability
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 643 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 602 def get_phone_plans_availability_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_plans_availability ...' end # resource path local_var_path = '/phone/plans/availability' # 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] || 'PhonePlanAvailability' # 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_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_phone_plans_with_http_info(opts = {}) ⇒ Array<(Array<PhonePlanDto>, Integer, Hash)>
Get phone plans Get phone number plans
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 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 548 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 |
#get_sent_sms_by_phone_number(phone_number_id, opts = {}) ⇒ PageSentSmsProjection
List sent TXT messages for a phone number Get sent SMS messages for a phone number
656 657 658 659 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 656 def get_sent_sms_by_phone_number(phone_number_id, opts = {}) data, _status_code, _headers = get_sent_sms_by_phone_number_with_http_info(phone_number_id, opts) data end |
#get_sent_sms_by_phone_number_with_http_info(phone_number_id, opts = {}) ⇒ Array<(PageSentSmsProjection, Integer, Hash)>
List sent TXT messages for a phone number Get sent SMS messages for a phone number
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 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 722 723 724 725 726 727 728 729 730 731 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 672 def get_sent_sms_by_phone_number_with_http_info(phone_number_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_sent_sms_by_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_sent_sms_by_phone_number" end if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100 fail ArgumentError, 'invalid value for "opts[:"size"]" when calling PhoneControllerApi.get_sent_sms_by_phone_number, 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 = '/phone/numbers/{phoneNumberId}/sms-sent'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s)) # query parameters query_params = opts[:query_params] || {} 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: PhoneControllerApi#get_sent_sms_by_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_sms_by_phone_number(phone_number_id, opts = {}) ⇒ PageSmsProjection
List SMS messages for a phone number Get SMS messages for a phone number
746 747 748 749 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 746 def get_sms_by_phone_number(phone_number_id, opts = {}) data, _status_code, _headers = get_sms_by_phone_number_with_http_info(phone_number_id, opts) data end |
#get_sms_by_phone_number_with_http_info(phone_number_id, opts = {}) ⇒ Array<(PageSmsProjection, Integer, Hash)>
List SMS messages for a phone number Get SMS messages for a phone number
764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 764 def get_sms_by_phone_number_with_http_info(phone_number_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_sms_by_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_sms_by_phone_number" end if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100 fail ArgumentError, 'invalid value for "opts[:"size"]" when calling PhoneControllerApi.get_sms_by_phone_number, 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 = '/phone/numbers/{phoneNumberId}/sms'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s)) # query parameters query_params = opts[:query_params] || {} 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[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].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: PhoneControllerApi#get_sms_by_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_sms_from_phone_number(phone_number_id, sms_send_options, opts = {}) ⇒ SentSmsDto
Send TXT message from a phone number Send SMS from a phone number
833 834 835 836 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 833 def send_sms_from_phone_number(phone_number_id, , opts = {}) data, _status_code, _headers = send_sms_from_phone_number_with_http_info(phone_number_id, , opts) data end |
#send_sms_from_phone_number_with_http_info(phone_number_id, sms_send_options, opts = {}) ⇒ Array<(SentSmsDto, Integer, Hash)>
Send TXT message from a phone number Send SMS from a phone number
844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 844 def send_sms_from_phone_number_with_http_info(phone_number_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.send_sms_from_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.send_sms_from_phone_number" 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 PhoneControllerApi.send_sms_from_phone_number" end # resource path local_var_path = '/phone/numbers/{phoneNumberId}/sms'.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(['*/*']) # 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: PhoneControllerApi#send_sms_from_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_consent_status(agree, opts = {}) ⇒ ConsentStatusDto
Set consent status Give or revoke consent for phone usage
902 903 904 905 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 902 def (agree, opts = {}) data, _status_code, _headers = (agree, opts) data end |
#set_consent_status_with_http_info(agree, opts = {}) ⇒ Array<(ConsentStatusDto, Integer, Hash)>
Set consent status Give or revoke consent for phone usage
912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 912 def (agree, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.set_consent_status ...' end # verify the required parameter 'agree' is set if @api_client.config.client_side_validation && agree.nil? fail ArgumentError, "Missing the required parameter 'agree' when calling PhoneControllerApi.set_consent_status" end # resource path local_var_path = '/phone/consent' # query parameters query_params = opts[:query_params] || {} query_params[:'agree'] = agree # 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] || 'ConsentStatusDto' # 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#set_consent_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_phone_favourited(phone_number_id, set_phone_favourited_options, opts = {}) ⇒ PhoneNumberDto
Set phone favourited state Set and return new favorite state for a phone
966 967 968 969 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 966 def set_phone_favourited(phone_number_id, , opts = {}) data, _status_code, _headers = set_phone_favourited_with_http_info(phone_number_id, , opts) data end |
#set_phone_favourited_with_http_info(phone_number_id, set_phone_favourited_options, opts = {}) ⇒ Array<(PhoneNumberDto, Integer, Hash)>
Set phone favourited state Set and return new favorite state for a phone
977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 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 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 977 def set_phone_favourited_with_http_info(phone_number_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.set_phone_favourited ...' 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.set_phone_favourited" end # verify the required parameter 'set_phone_favourited_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'set_phone_favourited_options' when calling PhoneControllerApi.set_phone_favourited" end # resource path local_var_path = '/phone/numbers/{phoneNumberId}/favourite'.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(['*/*']) # 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] || '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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneControllerApi#set_phone_favourited\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
Test sending an SMS to a number Test a phone number by sending an SMS to it
1037 1038 1039 1040 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 1037 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)>
Test sending an SMS to a number Test a phone number by sending an SMS to it
1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 1049 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 |
#update_phone_number(phone_number_id, update_phone_number_options, opts = {}) ⇒ PhoneNumberDto
Update a phone number Set field for phone number
1107 1108 1109 1110 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 1107 def update_phone_number(phone_number_id, , opts = {}) data, _status_code, _headers = update_phone_number_with_http_info(phone_number_id, , opts) data end |
#update_phone_number_with_http_info(phone_number_id, update_phone_number_options, opts = {}) ⇒ Array<(PhoneNumberDto, Integer, Hash)>
Update a phone number Set field for phone number
1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 1118 def update_phone_number_with_http_info(phone_number_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.update_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.update_phone_number" end # verify the required parameter 'update_phone_number_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'update_phone_number_options' when calling PhoneControllerApi.update_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(['*/*']) # 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] || '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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PhoneControllerApi#update_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#validate_phone_number(validate_phone_number_options, opts = {}) ⇒ PhoneNumberValidationDto
Verify validity of a phone number Validate a phone number
1176 1177 1178 1179 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 1176 def validate_phone_number(, opts = {}) data, _status_code, _headers = validate_phone_number_with_http_info(, opts) data end |
#validate_phone_number_with_http_info(validate_phone_number_options, opts = {}) ⇒ Array<(PhoneNumberValidationDto, Integer, Hash)>
Verify validity of a phone number Validate a phone number
1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 |
# File 'lib/mailslurp_client/api/phone_controller_api.rb', line 1186 def validate_phone_number_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PhoneControllerApi.validate_phone_number ...' end # verify the required parameter 'validate_phone_number_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'validate_phone_number_options' when calling PhoneControllerApi.validate_phone_number" end # resource path local_var_path = '/phone/validate' # 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] || 'PhoneNumberValidationDto' # 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#validate_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |