mailslurp_client 17.2.0 → 17.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/attachment_controller_api.rb +5 -5
  3. data/lib/mailslurp_client/api/campaign_probe_controller_api.rb +138 -0
  4. data/lib/mailslurp_client/api/domain_monitor_controller_api.rb +264 -0
  5. data/lib/mailslurp_client/api/email_audit_controller_api.rb +334 -0
  6. data/lib/mailslurp_client/api/email_controller_api.rb +126 -2
  7. data/lib/mailslurp_client/api/email_verification_controller_api.rb +64 -0
  8. data/lib/mailslurp_client/api/inbox_controller_api.rb +233 -4
  9. data/lib/mailslurp_client/api/phone_controller_api.rb +2091 -526
  10. data/lib/mailslurp_client/api/sms_controller_api.rb +125 -0
  11. data/lib/mailslurp_client/api/tools_controller_api.rb +806 -0
  12. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +18 -18
  13. data/lib/mailslurp_client/models/acquire_phone_pool_lease_options.rb +233 -0
  14. data/lib/mailslurp_client/models/add_phone_pool_numbers_options.rb +213 -0
  15. data/lib/mailslurp_client/models/ai_transform_mapping_projection.rb +27 -27
  16. data/lib/mailslurp_client/models/ai_transform_projection.rb +28 -28
  17. data/lib/mailslurp_client/models/alias_projection.rb +36 -36
  18. data/lib/mailslurp_client/models/alias_thread_projection.rb +42 -42
  19. data/lib/mailslurp_client/models/analyze_dmarc_report_options.rb +248 -0
  20. data/lib/mailslurp_client/models/analyze_dmarc_report_results.rb +386 -0
  21. data/lib/mailslurp_client/models/analyze_email_headers_options.rb +240 -0
  22. data/lib/mailslurp_client/models/analyze_email_headers_results.rb +275 -0
  23. data/lib/mailslurp_client/models/attachment_projection.rb +66 -66
  24. data/lib/mailslurp_client/models/available_phone_number_dto.rb +325 -0
  25. data/lib/mailslurp_client/models/available_phone_numbers_result.rb +236 -0
  26. data/lib/mailslurp_client/models/bounce_projection.rb +28 -28
  27. data/lib/mailslurp_client/models/bounce_recipient_projection.rb +24 -24
  28. data/lib/mailslurp_client/models/campaign_probe_run_comparison_dto.rb +397 -0
  29. data/lib/mailslurp_client/models/check_campaign_probe_options.rb +371 -0
  30. data/lib/mailslurp_client/models/check_campaign_probe_results.rb +482 -0
  31. data/lib/mailslurp_client/models/check_dns_propagation_options.rb +297 -0
  32. data/lib/mailslurp_client/models/check_dns_propagation_results.rb +361 -0
  33. data/lib/mailslurp_client/models/check_domain_monitor_options.rb +243 -0
  34. data/lib/mailslurp_client/models/check_domain_monitor_results.rb +398 -0
  35. data/lib/mailslurp_client/models/check_email_audit_options.rb +405 -0
  36. data/lib/mailslurp_client/models/check_email_auth_stack_options.rb +248 -0
  37. data/lib/mailslurp_client/models/check_email_auth_stack_results.rb +462 -0
  38. data/lib/mailslurp_client/models/check_email_blacklist_options.rb +241 -0
  39. data/lib/mailslurp_client/models/check_email_blacklist_results.rb +366 -0
  40. data/lib/mailslurp_client/models/connector_event_projection.rb +65 -65
  41. data/lib/mailslurp_client/models/connector_projection.rb +36 -36
  42. data/lib/mailslurp_client/models/contact_projection.rb +29 -29
  43. data/lib/mailslurp_client/models/create_email_audit_options.rb +394 -0
  44. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +58 -29
  45. data/lib/mailslurp_client/models/create_inbox_replier_options.rb +39 -33
  46. data/lib/mailslurp_client/models/create_phone_number_options.rb +58 -4
  47. data/lib/mailslurp_client/models/create_phone_pool_options.rb +220 -0
  48. data/lib/mailslurp_client/models/create_phone_provisioning_job_item_options.rb +256 -0
  49. data/lib/mailslurp_client/models/create_phone_provisioning_job_options.rb +284 -0
  50. data/lib/mailslurp_client/models/dmarc_report_metadata.rb +308 -0
  51. data/lib/mailslurp_client/models/dmarc_report_source_summary.rb +274 -0
  52. data/lib/mailslurp_client/models/dns_propagation_resolver_result.rb +252 -0
  53. data/lib/mailslurp_client/models/domain_monitor_run_comparison_dto.rb +369 -0
  54. data/lib/mailslurp_client/models/domain_monitor_summary_dto.rb +248 -0
  55. data/lib/mailslurp_client/models/email_audit_analysis_result.rb +620 -0
  56. data/lib/mailslurp_client/models/email_audit_comparison_dto.rb +411 -0
  57. data/lib/mailslurp_client/models/email_audit_dto.rb +308 -0
  58. data/lib/mailslurp_client/models/email_audit_spelling_issue.rb +276 -0
  59. data/lib/mailslurp_client/models/email_audit_url_issue.rb +236 -0
  60. data/lib/mailslurp_client/models/email_blacklist_ip_result.rb +242 -0
  61. data/lib/mailslurp_client/models/email_blacklist_listing_result.rb +258 -0
  62. data/lib/mailslurp_client/models/email_header_analysis_summary.rb +242 -0
  63. data/lib/mailslurp_client/models/email_header_received_hop.rb +242 -0
  64. data/lib/mailslurp_client/models/email_intelligence_list_result.rb +285 -0
  65. data/lib/mailslurp_client/models/email_intelligence_options.rb +308 -0
  66. data/lib/mailslurp_client/models/email_intelligence_result_dto.rb +256 -0
  67. data/lib/mailslurp_client/models/email_intelligence_score_breakdown_dto.rb +296 -0
  68. data/lib/mailslurp_client/models/email_intelligence_signals_dto.rb +352 -0
  69. data/lib/mailslurp_client/models/email_intelligence_tests_options.rb +253 -0
  70. data/lib/mailslurp_client/models/email_projection.rb +88 -88
  71. data/lib/mailslurp_client/models/email_thread_projection.rb +57 -57
  72. data/lib/mailslurp_client/models/entity_automation_item_projection.rb +33 -33
  73. data/lib/mailslurp_client/models/entity_event_item_projection.rb +42 -42
  74. data/lib/mailslurp_client/models/entity_favourite_item_projection.rb +32 -32
  75. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +18 -18
  76. data/lib/mailslurp_client/models/extract_attachment_text_options.rb +1 -1
  77. data/lib/mailslurp_client/models/extract_attachment_text_result.rb +1 -1
  78. data/lib/mailslurp_client/models/generate_spf_record_options.rb +357 -0
  79. data/lib/mailslurp_client/models/generate_spf_record_results.rb +318 -0
  80. data/lib/mailslurp_client/models/get_or_create_phone_pool_options.rb +220 -0
  81. data/lib/mailslurp_client/models/group_projection.rb +19 -19
  82. data/lib/mailslurp_client/models/guest_portal_user_projection.rb +41 -41
  83. data/lib/mailslurp_client/models/imap_email_projection.rb +18 -18
  84. data/lib/mailslurp_client/models/import_email_options.rb +269 -0
  85. data/lib/mailslurp_client/models/inbox_automation_match_option.rb +308 -0
  86. data/lib/mailslurp_client/models/inbox_automation_match_options.rb +273 -0
  87. data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +65 -17
  88. data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +36 -36
  89. data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +17 -9
  90. data/lib/mailslurp_client/models/inbox_replier_dto.rb +41 -16
  91. data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +48 -48
  92. data/lib/mailslurp_client/models/inline_object.rb +12 -58
  93. data/lib/mailslurp_client/models/inline_object1.rb +58 -12
  94. data/lib/mailslurp_client/models/inline_object2.rb +211 -0
  95. data/lib/mailslurp_client/models/list_unsubscribe_recipient_projection.rb +19 -19
  96. data/lib/mailslurp_client/models/lookup_dkim_domain_options.rb +275 -0
  97. data/lib/mailslurp_client/models/lookup_dkim_domain_results.rb +304 -0
  98. data/lib/mailslurp_client/models/lookup_ptr_options.rb +241 -0
  99. data/lib/mailslurp_client/models/lookup_ptr_results.rb +305 -0
  100. data/lib/mailslurp_client/models/lookup_spf_domain_options.rb +240 -0
  101. data/lib/mailslurp_client/models/lookup_spf_domain_results.rb +305 -0
  102. data/lib/mailslurp_client/models/missed_email_projection.rb +28 -28
  103. data/lib/mailslurp_client/models/missed_sms_projection.rb +32 -32
  104. data/lib/mailslurp_client/models/opt_in_identity_projection.rb +15 -15
  105. data/lib/mailslurp_client/models/page_ai_transform_mapping_projection.rb +36 -36
  106. data/lib/mailslurp_client/models/page_ai_transform_projection.rb +36 -36
  107. data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +36 -36
  108. data/lib/mailslurp_client/models/page_alias.rb +36 -36
  109. data/lib/mailslurp_client/models/page_alias_thread_projection.rb +36 -36
  110. data/lib/mailslurp_client/models/page_attachment_entity.rb +36 -36
  111. data/lib/mailslurp_client/models/page_bounced_email.rb +36 -36
  112. data/lib/mailslurp_client/models/page_bounced_recipients.rb +36 -36
  113. data/lib/mailslurp_client/models/page_complaint.rb +36 -36
  114. data/lib/mailslurp_client/models/page_connector.rb +36 -36
  115. data/lib/mailslurp_client/models/page_connector_events.rb +36 -36
  116. data/lib/mailslurp_client/models/page_contact_projection.rb +36 -36
  117. data/lib/mailslurp_client/models/page_delivery_status.rb +36 -36
  118. data/lib/mailslurp_client/models/page_device_preview_run_projection.rb +36 -36
  119. data/lib/mailslurp_client/models/page_email_preview.rb +36 -36
  120. data/lib/mailslurp_client/models/page_email_projection.rb +36 -36
  121. data/lib/mailslurp_client/models/page_email_thread_projection.rb +36 -36
  122. data/lib/mailslurp_client/models/page_email_validation_request.rb +36 -36
  123. data/lib/mailslurp_client/models/page_entity_automation_items.rb +36 -36
  124. data/lib/mailslurp_client/models/page_entity_event_items.rb +36 -36
  125. data/lib/mailslurp_client/models/page_entity_favourite_items.rb +36 -36
  126. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +36 -36
  127. data/lib/mailslurp_client/models/page_group_projection.rb +36 -36
  128. data/lib/mailslurp_client/models/page_guest_portal_users.rb +36 -36
  129. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +36 -36
  130. data/lib/mailslurp_client/models/page_inbox_forwarder_events.rb +36 -36
  131. data/lib/mailslurp_client/models/page_inbox_projection.rb +36 -36
  132. data/lib/mailslurp_client/models/page_inbox_replier_dto.rb +36 -36
  133. data/lib/mailslurp_client/models/page_inbox_replier_events.rb +36 -36
  134. data/lib/mailslurp_client/models/page_inbox_tags.rb +36 -36
  135. data/lib/mailslurp_client/models/page_list_unsubscribe_recipients.rb +36 -36
  136. data/lib/mailslurp_client/models/page_missed_email_projection.rb +36 -36
  137. data/lib/mailslurp_client/models/page_missed_sms_projection.rb +36 -36
  138. data/lib/mailslurp_client/models/page_opt_in_identity_projection.rb +36 -36
  139. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +36 -36
  140. data/lib/mailslurp_client/models/page_phone_message_thread_item_projection.rb +36 -36
  141. data/lib/mailslurp_client/models/page_phone_message_thread_projection.rb +36 -36
  142. data/lib/mailslurp_client/models/page_phone_number_projection.rb +36 -36
  143. data/lib/mailslurp_client/models/page_phone_number_release_projection.rb +36 -36
  144. data/lib/mailslurp_client/models/page_plus_address_projection.rb +36 -36
  145. data/lib/mailslurp_client/models/page_reputation_items.rb +36 -36
  146. data/lib/mailslurp_client/models/page_ruleset_dto.rb +36 -36
  147. data/lib/mailslurp_client/models/page_scheduled_jobs.rb +36 -36
  148. data/lib/mailslurp_client/models/page_sent_email_projection.rb +36 -36
  149. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +36 -36
  150. data/lib/mailslurp_client/models/page_sent_sms_projection.rb +36 -36
  151. data/lib/mailslurp_client/models/page_sms_projection.rb +36 -36
  152. data/lib/mailslurp_client/models/page_template_projection.rb +36 -36
  153. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +36 -36
  154. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +36 -36
  155. data/lib/mailslurp_client/models/page_webhook_endpoint_projection.rb +36 -36
  156. data/lib/mailslurp_client/models/page_webhook_projection.rb +36 -36
  157. data/lib/mailslurp_client/models/page_webhook_result.rb +36 -36
  158. data/lib/mailslurp_client/models/pageable_object.rb +28 -28
  159. data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +32 -32
  160. data/lib/mailslurp_client/models/phone_number_dto.rb +65 -4
  161. data/lib/mailslurp_client/models/phone_number_line_type_intelligence_dto.rb +242 -0
  162. data/lib/mailslurp_client/models/phone_number_line_type_lookup_dto.rb +286 -0
  163. data/lib/mailslurp_client/models/phone_number_projection.rb +80 -35
  164. data/lib/mailslurp_client/models/phone_number_release_projection.rb +39 -39
  165. data/lib/mailslurp_client/models/phone_number_tags_options.rb +213 -0
  166. data/lib/mailslurp_client/models/phone_pool_detail_dto.rb +334 -0
  167. data/lib/mailslurp_client/models/phone_pool_dto.rb +318 -0
  168. data/lib/mailslurp_client/models/phone_pool_lease_dto.rb +351 -0
  169. data/lib/mailslurp_client/models/phone_pool_member_dto.rb +333 -0
  170. data/lib/mailslurp_client/models/phone_provider_capabilities_result.rb +284 -0
  171. data/lib/mailslurp_client/models/phone_provisioning_job_dto.rb +434 -0
  172. data/lib/mailslurp_client/models/phone_provisioning_job_item_dto.rb +336 -0
  173. data/lib/mailslurp_client/models/phone_sms_prepaid_credit_dto.rb +340 -0
  174. data/lib/mailslurp_client/models/phone_sms_prepaid_credits_dto.rb +241 -0
  175. data/lib/mailslurp_client/models/plus_address_projection.rb +27 -27
  176. data/lib/mailslurp_client/models/recipient_projection.rb +13 -13
  177. data/lib/mailslurp_client/models/reputation_item_projection.rb +53 -53
  178. data/lib/mailslurp_client/models/search_available_phone_numbers_options.rb +377 -0
  179. data/lib/mailslurp_client/models/sender_projection.rb +13 -13
  180. data/lib/mailslurp_client/models/sent_email_projection.rb +63 -63
  181. data/lib/mailslurp_client/models/sent_sms_projection.rb +18 -18
  182. data/lib/mailslurp_client/models/sms_projection.rb +18 -18
  183. data/lib/mailslurp_client/models/smtp_auth_diagnostic_result.rb +235 -0
  184. data/lib/mailslurp_client/models/smtp_diagnostic_step.rb +236 -0
  185. data/lib/mailslurp_client/models/smtp_tls_diagnostic_result.rb +245 -0
  186. data/lib/mailslurp_client/models/sort_object.rb +10 -10
  187. data/lib/mailslurp_client/models/spf_mechanism_result.rb +229 -0
  188. data/lib/mailslurp_client/models/template_projection.rb +32 -32
  189. data/lib/mailslurp_client/models/test_smtp_server_options.rb +337 -0
  190. data/lib/mailslurp_client/models/test_smtp_server_results.rb +297 -0
  191. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +27 -27
  192. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +27 -27
  193. data/lib/mailslurp_client/models/update_inbox_replier_options.rb +39 -33
  194. data/lib/mailslurp_client/models/update_phone_pool_options.rb +215 -0
  195. data/lib/mailslurp_client/models/validation_dto.rb +1 -5
  196. data/lib/mailslurp_client/models/webhook_projection.rb +50 -50
  197. data/lib/mailslurp_client/version.rb +1 -1
  198. data/lib/mailslurp_client.rb +78 -0
  199. metadata +80 -2
@@ -19,31 +19,37 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Create an emergency address
23
- # Add an emergency address to a phone number
24
- # @param create_emergency_address_options [CreateEmergencyAddressOptions]
22
+ # Acquire phone pool lease
23
+ # Acquire an available phone number from the pool and mark it leased
24
+ # @param pool_id [String]
25
+ # @param acquire_phone_pool_lease_options [AcquirePhonePoolLeaseOptions]
25
26
  # @param [Hash] opts the optional parameters
26
- # @return [EmergencyAddress]
27
- def create_emergency_address(create_emergency_address_options, opts = {})
28
- data, _status_code, _headers = create_emergency_address_with_http_info(create_emergency_address_options, opts)
27
+ # @return [PhonePoolLeaseDto]
28
+ def acquire_phone_pool_lease(pool_id, acquire_phone_pool_lease_options, opts = {})
29
+ data, _status_code, _headers = acquire_phone_pool_lease_with_http_info(pool_id, acquire_phone_pool_lease_options, opts)
29
30
  data
30
31
  end
31
32
 
32
- # Create an emergency address
33
- # Add an emergency address to a phone number
34
- # @param create_emergency_address_options [CreateEmergencyAddressOptions]
33
+ # Acquire phone pool lease
34
+ # Acquire an available phone number from the pool and mark it leased
35
+ # @param pool_id [String]
36
+ # @param acquire_phone_pool_lease_options [AcquirePhonePoolLeaseOptions]
35
37
  # @param [Hash] opts the optional parameters
36
- # @return [Array<(EmergencyAddress, Integer, Hash)>] EmergencyAddress data, response status code and response headers
37
- def create_emergency_address_with_http_info(create_emergency_address_options, opts = {})
38
+ # @return [Array<(PhonePoolLeaseDto, Integer, Hash)>] PhonePoolLeaseDto data, response status code and response headers
39
+ def acquire_phone_pool_lease_with_http_info(pool_id, acquire_phone_pool_lease_options, opts = {})
38
40
  if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.create_emergency_address ...'
41
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.acquire_phone_pool_lease ...'
40
42
  end
41
- # verify the required parameter 'create_emergency_address_options' is set
42
- if @api_client.config.client_side_validation && create_emergency_address_options.nil?
43
- fail ArgumentError, "Missing the required parameter 'create_emergency_address_options' when calling PhoneControllerApi.create_emergency_address"
43
+ # verify the required parameter 'pool_id' is set
44
+ if @api_client.config.client_side_validation && pool_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.acquire_phone_pool_lease"
46
+ end
47
+ # verify the required parameter 'acquire_phone_pool_lease_options' is set
48
+ if @api_client.config.client_side_validation && acquire_phone_pool_lease_options.nil?
49
+ fail ArgumentError, "Missing the required parameter 'acquire_phone_pool_lease_options' when calling PhoneControllerApi.acquire_phone_pool_lease"
44
50
  end
45
51
  # resource path
46
- local_var_path = '/phone/emergency-addresses'
52
+ local_var_path = '/phone/pools/{poolId}/leases'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s))
47
53
 
48
54
  # query parameters
49
55
  query_params = opts[:query_params] || {}
@@ -59,10 +65,10 @@ module MailSlurpClient
59
65
  form_params = opts[:form_params] || {}
60
66
 
61
67
  # http body (model)
62
- post_body = opts[:body] || @api_client.object_to_http_body(create_emergency_address_options)
68
+ post_body = opts[:body] || @api_client.object_to_http_body(acquire_phone_pool_lease_options)
63
69
 
64
70
  # return_type
65
- return_type = opts[:return_type] || 'EmergencyAddress'
71
+ return_type = opts[:return_type] || 'PhonePoolLeaseDto'
66
72
 
67
73
  # auth_names
68
74
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -78,36 +84,36 @@ module MailSlurpClient
78
84
 
79
85
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
86
  if @api_client.config.debugging
81
- @api_client.config.logger.debug "API called: PhoneControllerApi#create_emergency_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ @api_client.config.logger.debug "API called: PhoneControllerApi#acquire_phone_pool_lease\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
88
  end
83
89
  return data, status_code, headers
84
90
  end
85
91
 
86
- # Add phone number to your account. Only works if you have already added a plan and an initial phone number in your account and acknowledged the pricing and terms of service by enabling API phone creation.
87
- # Create new phone number
88
- # @param create_phone_number_options [CreatePhoneNumberOptions]
92
+ # Add all phone numbers to phone pool
93
+ # Add all active owned phone numbers to a pool
94
+ # @param pool_id [String]
89
95
  # @param [Hash] opts the optional parameters
90
- # @return [PhoneNumberDto]
91
- def create_phone_number(create_phone_number_options, opts = {})
92
- data, _status_code, _headers = create_phone_number_with_http_info(create_phone_number_options, opts)
96
+ # @return [PhonePoolDetailDto]
97
+ def add_all_phone_numbers_to_phone_pool(pool_id, opts = {})
98
+ data, _status_code, _headers = add_all_phone_numbers_to_phone_pool_with_http_info(pool_id, opts)
93
99
  data
94
100
  end
95
101
 
96
- # Add phone number to your account. Only works if you have already added a plan and an initial phone number in your account and acknowledged the pricing and terms of service by enabling API phone creation.
97
- # Create new phone number
98
- # @param create_phone_number_options [CreatePhoneNumberOptions]
102
+ # Add all phone numbers to phone pool
103
+ # Add all active owned phone numbers to a pool
104
+ # @param pool_id [String]
99
105
  # @param [Hash] opts the optional parameters
100
- # @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
101
- def create_phone_number_with_http_info(create_phone_number_options, opts = {})
106
+ # @return [Array<(PhonePoolDetailDto, Integer, Hash)>] PhonePoolDetailDto data, response status code and response headers
107
+ def add_all_phone_numbers_to_phone_pool_with_http_info(pool_id, opts = {})
102
108
  if @api_client.config.debugging
103
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.create_phone_number ...'
109
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.add_all_phone_numbers_to_phone_pool ...'
104
110
  end
105
- # verify the required parameter 'create_phone_number_options' is set
106
- if @api_client.config.client_side_validation && create_phone_number_options.nil?
107
- fail ArgumentError, "Missing the required parameter 'create_phone_number_options' when calling PhoneControllerApi.create_phone_number"
111
+ # verify the required parameter 'pool_id' is set
112
+ if @api_client.config.client_side_validation && pool_id.nil?
113
+ fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.add_all_phone_numbers_to_phone_pool"
108
114
  end
109
115
  # resource path
110
- local_var_path = '/phone'
116
+ local_var_path = '/phone/pools/{poolId}/numbers/add-all'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s))
111
117
 
112
118
  # query parameters
113
119
  query_params = opts[:query_params] || {}
@@ -116,17 +122,15 @@ module MailSlurpClient
116
122
  header_params = opts[:header_params] || {}
117
123
  # HTTP header 'Accept' (if needed)
118
124
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
119
- # HTTP header 'Content-Type'
120
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
121
125
 
122
126
  # form parameters
123
127
  form_params = opts[:form_params] || {}
124
128
 
125
129
  # http body (model)
126
- post_body = opts[:body] || @api_client.object_to_http_body(create_phone_number_options)
130
+ post_body = opts[:body]
127
131
 
128
132
  # return_type
129
- return_type = opts[:return_type] || 'PhoneNumberDto'
133
+ return_type = opts[:return_type] || 'PhonePoolDetailDto'
130
134
 
131
135
  # auth_names
132
136
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -142,45 +146,61 @@ module MailSlurpClient
142
146
 
143
147
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
144
148
  if @api_client.config.debugging
145
- @api_client.config.logger.debug "API called: PhoneControllerApi#create_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ @api_client.config.logger.debug "API called: PhoneControllerApi#add_all_phone_numbers_to_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
146
150
  end
147
151
  return data, status_code, headers
148
152
  end
149
153
 
150
- # Delete all phone numbers
151
- # Remove all phone number from account
154
+ # Add phone number tags
155
+ # Add one or more tags to a phone number
156
+ # @param phone_number_id [String]
157
+ # @param phone_number_tags_options [PhoneNumberTagsOptions]
152
158
  # @param [Hash] opts the optional parameters
153
- # @return [nil]
154
- def delete_all_phone_number(opts = {})
155
- delete_all_phone_number_with_http_info(opts)
156
- nil
159
+ # @return [PhoneNumberDto]
160
+ def add_phone_number_tags(phone_number_id, phone_number_tags_options, opts = {})
161
+ data, _status_code, _headers = add_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, opts)
162
+ data
157
163
  end
158
164
 
159
- # Delete all phone numbers
160
- # Remove all phone number from account
165
+ # Add phone number tags
166
+ # Add one or more tags to a phone number
167
+ # @param phone_number_id [String]
168
+ # @param phone_number_tags_options [PhoneNumberTagsOptions]
161
169
  # @param [Hash] opts the optional parameters
162
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
163
- def delete_all_phone_number_with_http_info(opts = {})
170
+ # @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
171
+ def add_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, opts = {})
164
172
  if @api_client.config.debugging
165
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_all_phone_number ...'
173
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.add_phone_number_tags ...'
174
+ end
175
+ # verify the required parameter 'phone_number_id' is set
176
+ if @api_client.config.client_side_validation && phone_number_id.nil?
177
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.add_phone_number_tags"
178
+ end
179
+ # verify the required parameter 'phone_number_tags_options' is set
180
+ if @api_client.config.client_side_validation && phone_number_tags_options.nil?
181
+ fail ArgumentError, "Missing the required parameter 'phone_number_tags_options' when calling PhoneControllerApi.add_phone_number_tags"
166
182
  end
167
183
  # resource path
168
- local_var_path = '/phone/numbers'
184
+ local_var_path = '/phone/numbers/{phoneNumberId}/tags'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
169
185
 
170
186
  # query parameters
171
187
  query_params = opts[:query_params] || {}
172
188
 
173
189
  # header parameters
174
190
  header_params = opts[:header_params] || {}
191
+ # HTTP header 'Accept' (if needed)
192
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
193
+ # HTTP header 'Content-Type'
194
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
175
195
 
176
196
  # form parameters
177
197
  form_params = opts[:form_params] || {}
178
198
 
179
199
  # http body (model)
180
- post_body = opts[:body]
200
+ post_body = opts[:body] || @api_client.object_to_http_body(phone_number_tags_options)
181
201
 
182
202
  # return_type
183
- return_type = opts[:return_type]
203
+ return_type = opts[:return_type] || 'PhoneNumberDto'
184
204
 
185
205
  # auth_names
186
206
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -194,38 +214,44 @@ module MailSlurpClient
194
214
  :return_type => return_type
195
215
  )
196
216
 
197
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
217
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
198
218
  if @api_client.config.debugging
199
- @api_client.config.logger.debug "API called: PhoneControllerApi#delete_all_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
219
+ @api_client.config.logger.debug "API called: PhoneControllerApi#add_phone_number_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
200
220
  end
201
221
  return data, status_code, headers
202
222
  end
203
223
 
204
- # Delete an emergency address
205
- # Delete an emergency address
206
- # @param address_id [String]
224
+ # Add phone numbers to phone pool
225
+ # Add one or more owned phone numbers to a pool
226
+ # @param pool_id [String]
227
+ # @param add_phone_pool_numbers_options [AddPhonePoolNumbersOptions]
207
228
  # @param [Hash] opts the optional parameters
208
- # @return [EmptyResponseDto]
209
- def delete_emergency_address(address_id, opts = {})
210
- data, _status_code, _headers = delete_emergency_address_with_http_info(address_id, opts)
229
+ # @return [PhonePoolDetailDto]
230
+ def add_phone_numbers_to_phone_pool(pool_id, add_phone_pool_numbers_options, opts = {})
231
+ data, _status_code, _headers = add_phone_numbers_to_phone_pool_with_http_info(pool_id, add_phone_pool_numbers_options, opts)
211
232
  data
212
233
  end
213
234
 
214
- # Delete an emergency address
215
- # Delete an emergency address
216
- # @param address_id [String]
235
+ # Add phone numbers to phone pool
236
+ # Add one or more owned phone numbers to a pool
237
+ # @param pool_id [String]
238
+ # @param add_phone_pool_numbers_options [AddPhonePoolNumbersOptions]
217
239
  # @param [Hash] opts the optional parameters
218
- # @return [Array<(EmptyResponseDto, Integer, Hash)>] EmptyResponseDto data, response status code and response headers
219
- def delete_emergency_address_with_http_info(address_id, opts = {})
240
+ # @return [Array<(PhonePoolDetailDto, Integer, Hash)>] PhonePoolDetailDto data, response status code and response headers
241
+ def add_phone_numbers_to_phone_pool_with_http_info(pool_id, add_phone_pool_numbers_options, opts = {})
220
242
  if @api_client.config.debugging
221
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_emergency_address ...'
243
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.add_phone_numbers_to_phone_pool ...'
222
244
  end
223
- # verify the required parameter 'address_id' is set
224
- if @api_client.config.client_side_validation && address_id.nil?
225
- fail ArgumentError, "Missing the required parameter 'address_id' when calling PhoneControllerApi.delete_emergency_address"
245
+ # verify the required parameter 'pool_id' is set
246
+ if @api_client.config.client_side_validation && pool_id.nil?
247
+ fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.add_phone_numbers_to_phone_pool"
248
+ end
249
+ # verify the required parameter 'add_phone_pool_numbers_options' is set
250
+ if @api_client.config.client_side_validation && add_phone_pool_numbers_options.nil?
251
+ fail ArgumentError, "Missing the required parameter 'add_phone_pool_numbers_options' when calling PhoneControllerApi.add_phone_numbers_to_phone_pool"
226
252
  end
227
253
  # resource path
228
- local_var_path = '/phone/emergency-addresses/{addressId}'.sub('{' + 'addressId' + '}', CGI.escape(address_id.to_s))
254
+ local_var_path = '/phone/pools/{poolId}/numbers'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s))
229
255
 
230
256
  # query parameters
231
257
  query_params = opts[:query_params] || {}
@@ -234,15 +260,17 @@ module MailSlurpClient
234
260
  header_params = opts[:header_params] || {}
235
261
  # HTTP header 'Accept' (if needed)
236
262
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
263
+ # HTTP header 'Content-Type'
264
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
237
265
 
238
266
  # form parameters
239
267
  form_params = opts[:form_params] || {}
240
268
 
241
269
  # http body (model)
242
- post_body = opts[:body]
270
+ post_body = opts[:body] || @api_client.object_to_http_body(add_phone_pool_numbers_options)
243
271
 
244
272
  # return_type
245
- return_type = opts[:return_type] || 'EmptyResponseDto'
273
+ return_type = opts[:return_type] || 'PhonePoolDetailDto'
246
274
 
247
275
  # auth_names
248
276
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -256,44 +284,38 @@ module MailSlurpClient
256
284
  :return_type => return_type
257
285
  )
258
286
 
259
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
287
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
260
288
  if @api_client.config.debugging
261
- @api_client.config.logger.debug "API called: PhoneControllerApi#delete_emergency_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
289
+ @api_client.config.logger.debug "API called: PhoneControllerApi#add_phone_numbers_to_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
262
290
  end
263
291
  return data, status_code, headers
264
292
  end
265
293
 
266
- # Delete messages in a phone thread
267
- # Delete all messages in an SMS thread
268
- # @param phone_number_id [String]
269
- # @param other_number [String]
294
+ # Create an emergency address
295
+ # Add an emergency address to a phone number
296
+ # @param create_emergency_address_options [CreateEmergencyAddressOptions]
270
297
  # @param [Hash] opts the optional parameters
271
- # @return [EmptyResponseDto]
272
- def delete_phone_message_thread_items(phone_number_id, other_number, opts = {})
273
- data, _status_code, _headers = delete_phone_message_thread_items_with_http_info(phone_number_id, other_number, opts)
298
+ # @return [EmergencyAddress]
299
+ def create_emergency_address(create_emergency_address_options, opts = {})
300
+ data, _status_code, _headers = create_emergency_address_with_http_info(create_emergency_address_options, opts)
274
301
  data
275
302
  end
276
303
 
277
- # Delete messages in a phone thread
278
- # Delete all messages in an SMS thread
279
- # @param phone_number_id [String]
280
- # @param other_number [String]
304
+ # Create an emergency address
305
+ # Add an emergency address to a phone number
306
+ # @param create_emergency_address_options [CreateEmergencyAddressOptions]
281
307
  # @param [Hash] opts the optional parameters
282
- # @return [Array<(EmptyResponseDto, Integer, Hash)>] EmptyResponseDto data, response status code and response headers
283
- def delete_phone_message_thread_items_with_http_info(phone_number_id, other_number, opts = {})
308
+ # @return [Array<(EmergencyAddress, Integer, Hash)>] EmergencyAddress data, response status code and response headers
309
+ def create_emergency_address_with_http_info(create_emergency_address_options, opts = {})
284
310
  if @api_client.config.debugging
285
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_phone_message_thread_items ...'
286
- end
287
- # verify the required parameter 'phone_number_id' is set
288
- if @api_client.config.client_side_validation && phone_number_id.nil?
289
- fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.delete_phone_message_thread_items"
311
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.create_emergency_address ...'
290
312
  end
291
- # verify the required parameter 'other_number' is set
292
- if @api_client.config.client_side_validation && other_number.nil?
293
- fail ArgumentError, "Missing the required parameter 'other_number' when calling PhoneControllerApi.delete_phone_message_thread_items"
313
+ # verify the required parameter 'create_emergency_address_options' is set
314
+ if @api_client.config.client_side_validation && create_emergency_address_options.nil?
315
+ fail ArgumentError, "Missing the required parameter 'create_emergency_address_options' when calling PhoneControllerApi.create_emergency_address"
294
316
  end
295
317
  # resource path
296
- local_var_path = '/phone/numbers/{phoneNumberId}/message-threads/{otherNumber}'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s)).sub('{' + 'otherNumber' + '}', CGI.escape(other_number.to_s))
318
+ local_var_path = '/phone/emergency-addresses'
297
319
 
298
320
  # query parameters
299
321
  query_params = opts[:query_params] || {}
@@ -302,15 +324,17 @@ module MailSlurpClient
302
324
  header_params = opts[:header_params] || {}
303
325
  # HTTP header 'Accept' (if needed)
304
326
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
327
+ # HTTP header 'Content-Type'
328
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
305
329
 
306
330
  # form parameters
307
331
  form_params = opts[:form_params] || {}
308
332
 
309
333
  # http body (model)
310
- post_body = opts[:body]
334
+ post_body = opts[:body] || @api_client.object_to_http_body(create_emergency_address_options)
311
335
 
312
336
  # return_type
313
- return_type = opts[:return_type] || 'EmptyResponseDto'
337
+ return_type = opts[:return_type] || 'EmergencyAddress'
314
338
 
315
339
  # auth_names
316
340
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -324,53 +348,57 @@ module MailSlurpClient
324
348
  :return_type => return_type
325
349
  )
326
350
 
327
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
351
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
328
352
  if @api_client.config.debugging
329
- @api_client.config.logger.debug "API called: PhoneControllerApi#delete_phone_message_thread_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
353
+ @api_client.config.logger.debug "API called: PhoneControllerApi#create_emergency_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
330
354
  end
331
355
  return data, status_code, headers
332
356
  end
333
357
 
334
- # Delete a phone number
335
- # Remove phone number from account
336
- # @param phone_number_id [String]
358
+ # Add phone number to your account. Only works if you have already added a plan and an initial phone number in your account and acknowledged the pricing and terms of service by enabling API phone creation.
359
+ # Create new phone number
360
+ # @param create_phone_number_options [CreatePhoneNumberOptions]
337
361
  # @param [Hash] opts the optional parameters
338
- # @return [nil]
339
- def delete_phone_number(phone_number_id, opts = {})
340
- delete_phone_number_with_http_info(phone_number_id, opts)
341
- nil
362
+ # @return [PhoneNumberDto]
363
+ def create_phone_number(create_phone_number_options, opts = {})
364
+ data, _status_code, _headers = create_phone_number_with_http_info(create_phone_number_options, opts)
365
+ data
342
366
  end
343
367
 
344
- # Delete a phone number
345
- # Remove phone number from account
346
- # @param phone_number_id [String]
368
+ # Add phone number to your account. Only works if you have already added a plan and an initial phone number in your account and acknowledged the pricing and terms of service by enabling API phone creation.
369
+ # Create new phone number
370
+ # @param create_phone_number_options [CreatePhoneNumberOptions]
347
371
  # @param [Hash] opts the optional parameters
348
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
349
- def delete_phone_number_with_http_info(phone_number_id, opts = {})
372
+ # @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
373
+ def create_phone_number_with_http_info(create_phone_number_options, opts = {})
350
374
  if @api_client.config.debugging
351
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_phone_number ...'
375
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.create_phone_number ...'
352
376
  end
353
- # verify the required parameter 'phone_number_id' is set
354
- if @api_client.config.client_side_validation && phone_number_id.nil?
355
- fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.delete_phone_number"
377
+ # verify the required parameter 'create_phone_number_options' is set
378
+ if @api_client.config.client_side_validation && create_phone_number_options.nil?
379
+ fail ArgumentError, "Missing the required parameter 'create_phone_number_options' when calling PhoneControllerApi.create_phone_number"
356
380
  end
357
381
  # resource path
358
- local_var_path = '/phone/numbers/{phoneNumberId}'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
382
+ local_var_path = '/phone'
359
383
 
360
384
  # query parameters
361
385
  query_params = opts[:query_params] || {}
362
386
 
363
387
  # header parameters
364
388
  header_params = opts[:header_params] || {}
389
+ # HTTP header 'Accept' (if needed)
390
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
391
+ # HTTP header 'Content-Type'
392
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
365
393
 
366
394
  # form parameters
367
395
  form_params = opts[:form_params] || {}
368
396
 
369
397
  # http body (model)
370
- post_body = opts[:body]
398
+ post_body = opts[:body] || @api_client.object_to_http_body(create_phone_number_options)
371
399
 
372
400
  # return_type
373
- return_type = opts[:return_type]
401
+ return_type = opts[:return_type] || 'PhoneNumberDto'
374
402
 
375
403
  # auth_names
376
404
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -384,55 +412,57 @@ module MailSlurpClient
384
412
  :return_type => return_type
385
413
  )
386
414
 
387
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
415
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
388
416
  if @api_client.config.debugging
389
- @api_client.config.logger.debug "API called: PhoneControllerApi#delete_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
417
+ @api_client.config.logger.debug "API called: PhoneControllerApi#create_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
390
418
  end
391
419
  return data, status_code, headers
392
420
  end
393
421
 
394
- # Get the latest messages for all phones
395
- # List all message threads for all phones
422
+ # Create phone pool
423
+ # Create a reusable pool of phone numbers for coordinated leasing
424
+ # @param create_phone_pool_options [CreatePhonePoolOptions]
396
425
  # @param [Hash] opts the optional parameters
397
- # @option opts [Integer] :page (default to 0)
398
- # @option opts [Integer] :size (default to 20)
399
- # @return [PagePhoneMessageThreadProjection]
400
- def get_all_phone_message_threads(opts = {})
401
- data, _status_code, _headers = get_all_phone_message_threads_with_http_info(opts)
426
+ # @return [PhonePoolDetailDto]
427
+ def create_phone_pool(create_phone_pool_options, opts = {})
428
+ data, _status_code, _headers = create_phone_pool_with_http_info(create_phone_pool_options, opts)
402
429
  data
403
430
  end
404
431
 
405
- # Get the latest messages for all phones
406
- # List all message threads for all phones
432
+ # Create phone pool
433
+ # Create a reusable pool of phone numbers for coordinated leasing
434
+ # @param create_phone_pool_options [CreatePhonePoolOptions]
407
435
  # @param [Hash] opts the optional parameters
408
- # @option opts [Integer] :page
409
- # @option opts [Integer] :size
410
- # @return [Array<(PagePhoneMessageThreadProjection, Integer, Hash)>] PagePhoneMessageThreadProjection data, response status code and response headers
411
- def get_all_phone_message_threads_with_http_info(opts = {})
436
+ # @return [Array<(PhonePoolDetailDto, Integer, Hash)>] PhonePoolDetailDto data, response status code and response headers
437
+ def create_phone_pool_with_http_info(create_phone_pool_options, opts = {})
412
438
  if @api_client.config.debugging
413
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_all_phone_message_threads ...'
439
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.create_phone_pool ...'
440
+ end
441
+ # verify the required parameter 'create_phone_pool_options' is set
442
+ if @api_client.config.client_side_validation && create_phone_pool_options.nil?
443
+ fail ArgumentError, "Missing the required parameter 'create_phone_pool_options' when calling PhoneControllerApi.create_phone_pool"
414
444
  end
415
445
  # resource path
416
- local_var_path = '/phone/numbers/message-threads'
446
+ local_var_path = '/phone/pools'
417
447
 
418
448
  # query parameters
419
449
  query_params = opts[:query_params] || {}
420
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
421
- query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
422
450
 
423
451
  # header parameters
424
452
  header_params = opts[:header_params] || {}
425
453
  # HTTP header 'Accept' (if needed)
426
454
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
455
+ # HTTP header 'Content-Type'
456
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
427
457
 
428
458
  # form parameters
429
459
  form_params = opts[:form_params] || {}
430
460
 
431
461
  # http body (model)
432
- post_body = opts[:body]
462
+ post_body = opts[:body] || @api_client.object_to_http_body(create_phone_pool_options)
433
463
 
434
464
  # return_type
435
- return_type = opts[:return_type] || 'PagePhoneMessageThreadProjection'
465
+ return_type = opts[:return_type] || 'PhonePoolDetailDto'
436
466
 
437
467
  # auth_names
438
468
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -446,62 +476,57 @@ module MailSlurpClient
446
476
  :return_type => return_type
447
477
  )
448
478
 
449
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
479
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
450
480
  if @api_client.config.debugging
451
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_all_phone_message_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
481
+ @api_client.config.logger.debug "API called: PhoneControllerApi#create_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
452
482
  end
453
483
  return data, status_code, headers
454
484
  end
455
485
 
456
- # Get all phone number releases
457
- # List released or deleted phone numbers
486
+ # Create a phone provisioning job
487
+ # Create an advanced phone provisioning job from shortlisted numbers
488
+ # @param create_phone_provisioning_job_options [CreatePhoneProvisioningJobOptions]
458
489
  # @param [Hash] opts the optional parameters
459
- # @option opts [Integer] :page (default to 0)
460
- # @option opts [Integer] :size (default to 20)
461
- # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'DESC')
462
- # @return [PagePhoneNumberReleaseProjection]
463
- def get_all_phone_number_releases(opts = {})
464
- data, _status_code, _headers = get_all_phone_number_releases_with_http_info(opts)
490
+ # @return [PhoneProvisioningJobDto]
491
+ def create_phone_provisioning_job(create_phone_provisioning_job_options, opts = {})
492
+ data, _status_code, _headers = create_phone_provisioning_job_with_http_info(create_phone_provisioning_job_options, opts)
465
493
  data
466
494
  end
467
495
 
468
- # Get all phone number releases
469
- # List released or deleted phone numbers
496
+ # Create a phone provisioning job
497
+ # Create an advanced phone provisioning job from shortlisted numbers
498
+ # @param create_phone_provisioning_job_options [CreatePhoneProvisioningJobOptions]
470
499
  # @param [Hash] opts the optional parameters
471
- # @option opts [Integer] :page
472
- # @option opts [Integer] :size
473
- # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
474
- # @return [Array<(PagePhoneNumberReleaseProjection, Integer, Hash)>] PagePhoneNumberReleaseProjection data, response status code and response headers
475
- def get_all_phone_number_releases_with_http_info(opts = {})
500
+ # @return [Array<(PhoneProvisioningJobDto, Integer, Hash)>] PhoneProvisioningJobDto data, response status code and response headers
501
+ def create_phone_provisioning_job_with_http_info(create_phone_provisioning_job_options, opts = {})
476
502
  if @api_client.config.debugging
477
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_all_phone_number_releases ...'
503
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.create_phone_provisioning_job ...'
478
504
  end
479
- allowable_values = ["ASC", "DESC"]
480
- if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
481
- fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
505
+ # verify the required parameter 'create_phone_provisioning_job_options' is set
506
+ if @api_client.config.client_side_validation && create_phone_provisioning_job_options.nil?
507
+ fail ArgumentError, "Missing the required parameter 'create_phone_provisioning_job_options' when calling PhoneControllerApi.create_phone_provisioning_job"
482
508
  end
483
509
  # resource path
484
- local_var_path = '/phone/releases'
510
+ local_var_path = '/phone/provisioning/jobs'
485
511
 
486
512
  # query parameters
487
513
  query_params = opts[:query_params] || {}
488
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
489
- query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
490
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
491
514
 
492
515
  # header parameters
493
516
  header_params = opts[:header_params] || {}
494
517
  # HTTP header 'Accept' (if needed)
495
518
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
519
+ # HTTP header 'Content-Type'
520
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
496
521
 
497
522
  # form parameters
498
523
  form_params = opts[:form_params] || {}
499
524
 
500
525
  # http body (model)
501
- post_body = opts[:body]
526
+ post_body = opts[:body] || @api_client.object_to_http_body(create_phone_provisioning_job_options)
502
527
 
503
528
  # return_type
504
- return_type = opts[:return_type] || 'PagePhoneNumberReleaseProjection'
529
+ return_type = opts[:return_type] || 'PhoneProvisioningJobDto'
505
530
 
506
531
  # auth_names
507
532
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -515,40 +540,38 @@ module MailSlurpClient
515
540
  :return_type => return_type
516
541
  )
517
542
 
518
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
543
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
519
544
  if @api_client.config.debugging
520
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_all_phone_number_releases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
545
+ @api_client.config.logger.debug "API called: PhoneControllerApi#create_phone_provisioning_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
521
546
  end
522
547
  return data, status_code, headers
523
548
  end
524
549
 
525
- # Get consent status
526
- # Get the status of phone usage consent
550
+ # Delete all phone numbers
551
+ # Remove all phone number from account
527
552
  # @param [Hash] opts the optional parameters
528
- # @return [ConsentStatusDto]
529
- def get_consent_status(opts = {})
530
- data, _status_code, _headers = get_consent_status_with_http_info(opts)
531
- data
532
- end
533
-
534
- # Get consent status
535
- # Get the status of phone usage consent
553
+ # @return [nil]
554
+ def delete_all_phone_number(opts = {})
555
+ delete_all_phone_number_with_http_info(opts)
556
+ nil
557
+ end
558
+
559
+ # Delete all phone numbers
560
+ # Remove all phone number from account
536
561
  # @param [Hash] opts the optional parameters
537
- # @return [Array<(ConsentStatusDto, Integer, Hash)>] ConsentStatusDto data, response status code and response headers
538
- def get_consent_status_with_http_info(opts = {})
562
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
563
+ def delete_all_phone_number_with_http_info(opts = {})
539
564
  if @api_client.config.debugging
540
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_consent_status ...'
565
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_all_phone_number ...'
541
566
  end
542
567
  # resource path
543
- local_var_path = '/phone/consent'
568
+ local_var_path = '/phone/numbers'
544
569
 
545
570
  # query parameters
546
571
  query_params = opts[:query_params] || {}
547
572
 
548
573
  # header parameters
549
574
  header_params = opts[:header_params] || {}
550
- # HTTP header 'Accept' (if needed)
551
- header_params['Accept'] = @api_client.select_header_accept(['*/*'])
552
575
 
553
576
  # form parameters
554
577
  form_params = opts[:form_params] || {}
@@ -557,7 +580,7 @@ module MailSlurpClient
557
580
  post_body = opts[:body]
558
581
 
559
582
  # return_type
560
- return_type = opts[:return_type] || 'ConsentStatusDto'
583
+ return_type = opts[:return_type]
561
584
 
562
585
  # auth_names
563
586
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -571,35 +594,35 @@ module MailSlurpClient
571
594
  :return_type => return_type
572
595
  )
573
596
 
574
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
597
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
575
598
  if @api_client.config.debugging
576
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_consent_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
599
+ @api_client.config.logger.debug "API called: PhoneControllerApi#delete_all_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
577
600
  end
578
601
  return data, status_code, headers
579
602
  end
580
603
 
581
- # Get an emergency address
582
- # Fetch an emergency address by ID
604
+ # Delete an emergency address
605
+ # Delete an emergency address
583
606
  # @param address_id [String]
584
607
  # @param [Hash] opts the optional parameters
585
- # @return [EmergencyAddress]
586
- def get_emergency_address(address_id, opts = {})
587
- data, _status_code, _headers = get_emergency_address_with_http_info(address_id, opts)
608
+ # @return [EmptyResponseDto]
609
+ def delete_emergency_address(address_id, opts = {})
610
+ data, _status_code, _headers = delete_emergency_address_with_http_info(address_id, opts)
588
611
  data
589
612
  end
590
613
 
591
- # Get an emergency address
592
- # Fetch an emergency address by ID
614
+ # Delete an emergency address
615
+ # Delete an emergency address
593
616
  # @param address_id [String]
594
617
  # @param [Hash] opts the optional parameters
595
- # @return [Array<(EmergencyAddress, Integer, Hash)>] EmergencyAddress data, response status code and response headers
596
- def get_emergency_address_with_http_info(address_id, opts = {})
618
+ # @return [Array<(EmptyResponseDto, Integer, Hash)>] EmptyResponseDto data, response status code and response headers
619
+ def delete_emergency_address_with_http_info(address_id, opts = {})
597
620
  if @api_client.config.debugging
598
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_emergency_address ...'
621
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_emergency_address ...'
599
622
  end
600
623
  # verify the required parameter 'address_id' is set
601
624
  if @api_client.config.client_side_validation && address_id.nil?
602
- fail ArgumentError, "Missing the required parameter 'address_id' when calling PhoneControllerApi.get_emergency_address"
625
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling PhoneControllerApi.delete_emergency_address"
603
626
  end
604
627
  # resource path
605
628
  local_var_path = '/phone/emergency-addresses/{addressId}'.sub('{' + 'addressId' + '}', CGI.escape(address_id.to_s))
@@ -619,7 +642,7 @@ module MailSlurpClient
619
642
  post_body = opts[:body]
620
643
 
621
644
  # return_type
622
- return_type = opts[:return_type] || 'EmergencyAddress'
645
+ return_type = opts[:return_type] || 'EmptyResponseDto'
623
646
 
624
647
  # auth_names
625
648
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -633,32 +656,44 @@ module MailSlurpClient
633
656
  :return_type => return_type
634
657
  )
635
658
 
636
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
659
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
637
660
  if @api_client.config.debugging
638
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_emergency_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
661
+ @api_client.config.logger.debug "API called: PhoneControllerApi#delete_emergency_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
639
662
  end
640
663
  return data, status_code, headers
641
664
  end
642
665
 
643
- # Get emergency addresses
644
- # List emergency addresses
666
+ # Delete messages in a phone thread
667
+ # Delete all messages in an SMS thread
668
+ # @param phone_number_id [String]
669
+ # @param other_number [String]
645
670
  # @param [Hash] opts the optional parameters
646
- # @return [Array<EmergencyAddressDto>]
647
- def get_emergency_addresses(opts = {})
648
- data, _status_code, _headers = get_emergency_addresses_with_http_info(opts)
671
+ # @return [EmptyResponseDto]
672
+ def delete_phone_message_thread_items(phone_number_id, other_number, opts = {})
673
+ data, _status_code, _headers = delete_phone_message_thread_items_with_http_info(phone_number_id, other_number, opts)
649
674
  data
650
675
  end
651
676
 
652
- # Get emergency addresses
653
- # List emergency addresses
677
+ # Delete messages in a phone thread
678
+ # Delete all messages in an SMS thread
679
+ # @param phone_number_id [String]
680
+ # @param other_number [String]
654
681
  # @param [Hash] opts the optional parameters
655
- # @return [Array<(Array<EmergencyAddressDto>, Integer, Hash)>] Array<EmergencyAddressDto> data, response status code and response headers
656
- def get_emergency_addresses_with_http_info(opts = {})
682
+ # @return [Array<(EmptyResponseDto, Integer, Hash)>] EmptyResponseDto data, response status code and response headers
683
+ def delete_phone_message_thread_items_with_http_info(phone_number_id, other_number, opts = {})
657
684
  if @api_client.config.debugging
658
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_emergency_addresses ...'
685
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_phone_message_thread_items ...'
686
+ end
687
+ # verify the required parameter 'phone_number_id' is set
688
+ if @api_client.config.client_side_validation && phone_number_id.nil?
689
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.delete_phone_message_thread_items"
690
+ end
691
+ # verify the required parameter 'other_number' is set
692
+ if @api_client.config.client_side_validation && other_number.nil?
693
+ fail ArgumentError, "Missing the required parameter 'other_number' when calling PhoneControllerApi.delete_phone_message_thread_items"
659
694
  end
660
695
  # resource path
661
- local_var_path = '/phone/emergency-addresses'
696
+ local_var_path = '/phone/numbers/{phoneNumberId}/message-threads/{otherNumber}'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s)).sub('{' + 'otherNumber' + '}', CGI.escape(other_number.to_s))
662
697
 
663
698
  # query parameters
664
699
  query_params = opts[:query_params] || {}
@@ -675,7 +710,7 @@ module MailSlurpClient
675
710
  post_body = opts[:body]
676
711
 
677
712
  # return_type
678
- return_type = opts[:return_type] || 'Array<EmergencyAddressDto>'
713
+ return_type = opts[:return_type] || 'EmptyResponseDto'
679
714
 
680
715
  # auth_names
681
716
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -689,48 +724,156 @@ module MailSlurpClient
689
724
  :return_type => return_type
690
725
  )
691
726
 
692
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
727
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
693
728
  if @api_client.config.debugging
694
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_emergency_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
729
+ @api_client.config.logger.debug "API called: PhoneControllerApi#delete_phone_message_thread_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
695
730
  end
696
731
  return data, status_code, headers
697
732
  end
698
733
 
699
- # Get messages in a phone thread
700
- # List message thread messages for a phone message thread
734
+ # Delete a phone number
735
+ # Remove phone number from account
701
736
  # @param phone_number_id [String]
702
- # @param other_number [String]
703
737
  # @param [Hash] opts the optional parameters
704
- # @option opts [Integer] :page (default to 0)
705
- # @option opts [Integer] :size (default to 20)
706
- # @return [PagePhoneMessageThreadItemProjection]
707
- def get_phone_message_thread_items(phone_number_id, other_number, opts = {})
708
- data, _status_code, _headers = get_phone_message_thread_items_with_http_info(phone_number_id, other_number, opts)
709
- data
738
+ # @return [nil]
739
+ def delete_phone_number(phone_number_id, opts = {})
740
+ delete_phone_number_with_http_info(phone_number_id, opts)
741
+ nil
710
742
  end
711
743
 
712
- # Get messages in a phone thread
713
- # List message thread messages for a phone message thread
744
+ # Delete a phone number
745
+ # Remove phone number from account
714
746
  # @param phone_number_id [String]
715
- # @param other_number [String]
716
747
  # @param [Hash] opts the optional parameters
717
- # @option opts [Integer] :page
718
- # @option opts [Integer] :size
719
- # @return [Array<(PagePhoneMessageThreadItemProjection, Integer, Hash)>] PagePhoneMessageThreadItemProjection data, response status code and response headers
720
- def get_phone_message_thread_items_with_http_info(phone_number_id, other_number, opts = {})
748
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
749
+ def delete_phone_number_with_http_info(phone_number_id, opts = {})
721
750
  if @api_client.config.debugging
722
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_message_thread_items ...'
751
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_phone_number ...'
723
752
  end
724
753
  # verify the required parameter 'phone_number_id' is set
725
754
  if @api_client.config.client_side_validation && phone_number_id.nil?
726
- fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.get_phone_message_thread_items"
755
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.delete_phone_number"
727
756
  end
728
- # verify the required parameter 'other_number' is set
729
- if @api_client.config.client_side_validation && other_number.nil?
730
- fail ArgumentError, "Missing the required parameter 'other_number' when calling PhoneControllerApi.get_phone_message_thread_items"
757
+ # resource path
758
+ local_var_path = '/phone/numbers/{phoneNumberId}'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
759
+
760
+ # query parameters
761
+ query_params = opts[:query_params] || {}
762
+
763
+ # header parameters
764
+ header_params = opts[:header_params] || {}
765
+
766
+ # form parameters
767
+ form_params = opts[:form_params] || {}
768
+
769
+ # http body (model)
770
+ post_body = opts[:body]
771
+
772
+ # return_type
773
+ return_type = opts[:return_type]
774
+
775
+ # auth_names
776
+ auth_names = opts[:auth_names] || ['API_KEY']
777
+
778
+ new_options = opts.merge(
779
+ :header_params => header_params,
780
+ :query_params => query_params,
781
+ :form_params => form_params,
782
+ :body => post_body,
783
+ :auth_names => auth_names,
784
+ :return_type => return_type
785
+ )
786
+
787
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
788
+ if @api_client.config.debugging
789
+ @api_client.config.logger.debug "API called: PhoneControllerApi#delete_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
790
+ end
791
+ return data, status_code, headers
792
+ end
793
+
794
+ # Delete phone pool
795
+ # Delete a phone pool and release any active leases from that pool
796
+ # @param pool_id [String]
797
+ # @param [Hash] opts the optional parameters
798
+ # @return [nil]
799
+ def delete_phone_pool(pool_id, opts = {})
800
+ delete_phone_pool_with_http_info(pool_id, opts)
801
+ nil
802
+ end
803
+
804
+ # Delete phone pool
805
+ # Delete a phone pool and release any active leases from that pool
806
+ # @param pool_id [String]
807
+ # @param [Hash] opts the optional parameters
808
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
809
+ def delete_phone_pool_with_http_info(pool_id, opts = {})
810
+ if @api_client.config.debugging
811
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_phone_pool ...'
812
+ end
813
+ # verify the required parameter 'pool_id' is set
814
+ if @api_client.config.client_side_validation && pool_id.nil?
815
+ fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.delete_phone_pool"
731
816
  end
732
817
  # resource path
733
- local_var_path = '/phone/numbers/{phoneNumberId}/message-threads/{otherNumber}'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s)).sub('{' + 'otherNumber' + '}', CGI.escape(other_number.to_s))
818
+ local_var_path = '/phone/pools/{poolId}'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s))
819
+
820
+ # query parameters
821
+ query_params = opts[:query_params] || {}
822
+
823
+ # header parameters
824
+ header_params = opts[:header_params] || {}
825
+
826
+ # form parameters
827
+ form_params = opts[:form_params] || {}
828
+
829
+ # http body (model)
830
+ post_body = opts[:body]
831
+
832
+ # return_type
833
+ return_type = opts[:return_type]
834
+
835
+ # auth_names
836
+ auth_names = opts[:auth_names] || ['API_KEY']
837
+
838
+ new_options = opts.merge(
839
+ :header_params => header_params,
840
+ :query_params => query_params,
841
+ :form_params => form_params,
842
+ :body => post_body,
843
+ :auth_names => auth_names,
844
+ :return_type => return_type
845
+ )
846
+
847
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
848
+ if @api_client.config.debugging
849
+ @api_client.config.logger.debug "API called: PhoneControllerApi#delete_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
850
+ end
851
+ return data, status_code, headers
852
+ end
853
+
854
+ # Get the latest messages for all phones
855
+ # List all message threads for all phones
856
+ # @param [Hash] opts the optional parameters
857
+ # @option opts [Integer] :page (default to 0)
858
+ # @option opts [Integer] :size (default to 20)
859
+ # @return [PagePhoneMessageThreadProjection]
860
+ def get_all_phone_message_threads(opts = {})
861
+ data, _status_code, _headers = get_all_phone_message_threads_with_http_info(opts)
862
+ data
863
+ end
864
+
865
+ # Get the latest messages for all phones
866
+ # List all message threads for all phones
867
+ # @param [Hash] opts the optional parameters
868
+ # @option opts [Integer] :page
869
+ # @option opts [Integer] :size
870
+ # @return [Array<(PagePhoneMessageThreadProjection, Integer, Hash)>] PagePhoneMessageThreadProjection data, response status code and response headers
871
+ def get_all_phone_message_threads_with_http_info(opts = {})
872
+ if @api_client.config.debugging
873
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_all_phone_message_threads ...'
874
+ end
875
+ # resource path
876
+ local_var_path = '/phone/numbers/message-threads'
734
877
 
735
878
  # query parameters
736
879
  query_params = opts[:query_params] || {}
@@ -749,7 +892,7 @@ module MailSlurpClient
749
892
  post_body = opts[:body]
750
893
 
751
894
  # return_type
752
- return_type = opts[:return_type] || 'PagePhoneMessageThreadItemProjection'
895
+ return_type = opts[:return_type] || 'PagePhoneMessageThreadProjection'
753
896
 
754
897
  # auth_names
755
898
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -765,45 +908,1335 @@ module MailSlurpClient
765
908
 
766
909
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
767
910
  if @api_client.config.debugging
768
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_message_thread_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
911
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_all_phone_message_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
769
912
  end
770
913
  return data, status_code, headers
771
914
  end
772
915
 
773
- # Get the latest message preview for a thread
774
- # List message threads for a phone
775
- # @param phone_number_id [String]
916
+ # Get all phone number releases
917
+ # List released or deleted phone numbers
776
918
  # @param [Hash] opts the optional parameters
777
919
  # @option opts [Integer] :page (default to 0)
778
920
  # @option opts [Integer] :size (default to 20)
779
- # @return [PagePhoneMessageThreadProjection]
780
- def get_phone_message_threads(phone_number_id, opts = {})
781
- data, _status_code, _headers = get_phone_message_threads_with_http_info(phone_number_id, opts)
921
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'DESC')
922
+ # @return [PagePhoneNumberReleaseProjection]
923
+ def get_all_phone_number_releases(opts = {})
924
+ data, _status_code, _headers = get_all_phone_number_releases_with_http_info(opts)
782
925
  data
783
926
  end
784
927
 
785
- # Get the latest message preview for a thread
786
- # List message threads for a phone
787
- # @param phone_number_id [String]
928
+ # Get all phone number releases
929
+ # List released or deleted phone numbers
930
+ # @param [Hash] opts the optional parameters
931
+ # @option opts [Integer] :page
932
+ # @option opts [Integer] :size
933
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
934
+ # @return [Array<(PagePhoneNumberReleaseProjection, Integer, Hash)>] PagePhoneNumberReleaseProjection data, response status code and response headers
935
+ def get_all_phone_number_releases_with_http_info(opts = {})
936
+ if @api_client.config.debugging
937
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_all_phone_number_releases ...'
938
+ end
939
+ allowable_values = ["ASC", "DESC"]
940
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
941
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
942
+ end
943
+ # resource path
944
+ local_var_path = '/phone/releases'
945
+
946
+ # query parameters
947
+ query_params = opts[:query_params] || {}
948
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
949
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
950
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
951
+
952
+ # header parameters
953
+ header_params = opts[:header_params] || {}
954
+ # HTTP header 'Accept' (if needed)
955
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
956
+
957
+ # form parameters
958
+ form_params = opts[:form_params] || {}
959
+
960
+ # http body (model)
961
+ post_body = opts[:body]
962
+
963
+ # return_type
964
+ return_type = opts[:return_type] || 'PagePhoneNumberReleaseProjection'
965
+
966
+ # auth_names
967
+ auth_names = opts[:auth_names] || ['API_KEY']
968
+
969
+ new_options = opts.merge(
970
+ :header_params => header_params,
971
+ :query_params => query_params,
972
+ :form_params => form_params,
973
+ :body => post_body,
974
+ :auth_names => auth_names,
975
+ :return_type => return_type
976
+ )
977
+
978
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
979
+ if @api_client.config.debugging
980
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_all_phone_number_releases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
981
+ end
982
+ return data, status_code, headers
983
+ end
984
+
985
+ # Get consent status
986
+ # Get the status of phone usage consent
987
+ # @param [Hash] opts the optional parameters
988
+ # @return [ConsentStatusDto]
989
+ def get_consent_status(opts = {})
990
+ data, _status_code, _headers = get_consent_status_with_http_info(opts)
991
+ data
992
+ end
993
+
994
+ # Get consent status
995
+ # Get the status of phone usage consent
996
+ # @param [Hash] opts the optional parameters
997
+ # @return [Array<(ConsentStatusDto, Integer, Hash)>] ConsentStatusDto data, response status code and response headers
998
+ def get_consent_status_with_http_info(opts = {})
999
+ if @api_client.config.debugging
1000
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_consent_status ...'
1001
+ end
1002
+ # resource path
1003
+ local_var_path = '/phone/consent'
1004
+
1005
+ # query parameters
1006
+ query_params = opts[:query_params] || {}
1007
+
1008
+ # header parameters
1009
+ header_params = opts[:header_params] || {}
1010
+ # HTTP header 'Accept' (if needed)
1011
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1012
+
1013
+ # form parameters
1014
+ form_params = opts[:form_params] || {}
1015
+
1016
+ # http body (model)
1017
+ post_body = opts[:body]
1018
+
1019
+ # return_type
1020
+ return_type = opts[:return_type] || 'ConsentStatusDto'
1021
+
1022
+ # auth_names
1023
+ auth_names = opts[:auth_names] || ['API_KEY']
1024
+
1025
+ new_options = opts.merge(
1026
+ :header_params => header_params,
1027
+ :query_params => query_params,
1028
+ :form_params => form_params,
1029
+ :body => post_body,
1030
+ :auth_names => auth_names,
1031
+ :return_type => return_type
1032
+ )
1033
+
1034
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1035
+ if @api_client.config.debugging
1036
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_consent_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1037
+ end
1038
+ return data, status_code, headers
1039
+ end
1040
+
1041
+ # Get an emergency address
1042
+ # Fetch an emergency address by ID
1043
+ # @param address_id [String]
1044
+ # @param [Hash] opts the optional parameters
1045
+ # @return [EmergencyAddress]
1046
+ def get_emergency_address(address_id, opts = {})
1047
+ data, _status_code, _headers = get_emergency_address_with_http_info(address_id, opts)
1048
+ data
1049
+ end
1050
+
1051
+ # Get an emergency address
1052
+ # Fetch an emergency address by ID
1053
+ # @param address_id [String]
1054
+ # @param [Hash] opts the optional parameters
1055
+ # @return [Array<(EmergencyAddress, Integer, Hash)>] EmergencyAddress data, response status code and response headers
1056
+ def get_emergency_address_with_http_info(address_id, opts = {})
1057
+ if @api_client.config.debugging
1058
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_emergency_address ...'
1059
+ end
1060
+ # verify the required parameter 'address_id' is set
1061
+ if @api_client.config.client_side_validation && address_id.nil?
1062
+ fail ArgumentError, "Missing the required parameter 'address_id' when calling PhoneControllerApi.get_emergency_address"
1063
+ end
1064
+ # resource path
1065
+ local_var_path = '/phone/emergency-addresses/{addressId}'.sub('{' + 'addressId' + '}', CGI.escape(address_id.to_s))
1066
+
1067
+ # query parameters
1068
+ query_params = opts[:query_params] || {}
1069
+
1070
+ # header parameters
1071
+ header_params = opts[:header_params] || {}
1072
+ # HTTP header 'Accept' (if needed)
1073
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1074
+
1075
+ # form parameters
1076
+ form_params = opts[:form_params] || {}
1077
+
1078
+ # http body (model)
1079
+ post_body = opts[:body]
1080
+
1081
+ # return_type
1082
+ return_type = opts[:return_type] || 'EmergencyAddress'
1083
+
1084
+ # auth_names
1085
+ auth_names = opts[:auth_names] || ['API_KEY']
1086
+
1087
+ new_options = opts.merge(
1088
+ :header_params => header_params,
1089
+ :query_params => query_params,
1090
+ :form_params => form_params,
1091
+ :body => post_body,
1092
+ :auth_names => auth_names,
1093
+ :return_type => return_type
1094
+ )
1095
+
1096
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1097
+ if @api_client.config.debugging
1098
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_emergency_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1099
+ end
1100
+ return data, status_code, headers
1101
+ end
1102
+
1103
+ # Get emergency addresses
1104
+ # List emergency addresses
1105
+ # @param [Hash] opts the optional parameters
1106
+ # @return [Array<EmergencyAddressDto>]
1107
+ def get_emergency_addresses(opts = {})
1108
+ data, _status_code, _headers = get_emergency_addresses_with_http_info(opts)
1109
+ data
1110
+ end
1111
+
1112
+ # Get emergency addresses
1113
+ # List emergency addresses
1114
+ # @param [Hash] opts the optional parameters
1115
+ # @return [Array<(Array<EmergencyAddressDto>, Integer, Hash)>] Array<EmergencyAddressDto> data, response status code and response headers
1116
+ def get_emergency_addresses_with_http_info(opts = {})
1117
+ if @api_client.config.debugging
1118
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_emergency_addresses ...'
1119
+ end
1120
+ # resource path
1121
+ local_var_path = '/phone/emergency-addresses'
1122
+
1123
+ # query parameters
1124
+ query_params = opts[:query_params] || {}
1125
+
1126
+ # header parameters
1127
+ header_params = opts[:header_params] || {}
1128
+ # HTTP header 'Accept' (if needed)
1129
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1130
+
1131
+ # form parameters
1132
+ form_params = opts[:form_params] || {}
1133
+
1134
+ # http body (model)
1135
+ post_body = opts[:body]
1136
+
1137
+ # return_type
1138
+ return_type = opts[:return_type] || 'Array<EmergencyAddressDto>'
1139
+
1140
+ # auth_names
1141
+ auth_names = opts[:auth_names] || ['API_KEY']
1142
+
1143
+ new_options = opts.merge(
1144
+ :header_params => header_params,
1145
+ :query_params => query_params,
1146
+ :form_params => form_params,
1147
+ :body => post_body,
1148
+ :auth_names => auth_names,
1149
+ :return_type => return_type
1150
+ )
1151
+
1152
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1153
+ if @api_client.config.debugging
1154
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_emergency_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1155
+ end
1156
+ return data, status_code, headers
1157
+ end
1158
+
1159
+ # Get or create phone pool
1160
+ # Get a phone pool by name or create it if it does not exist
1161
+ # @param get_or_create_phone_pool_options [GetOrCreatePhonePoolOptions]
1162
+ # @param [Hash] opts the optional parameters
1163
+ # @return [PhonePoolDetailDto]
1164
+ def get_or_create_phone_pool(get_or_create_phone_pool_options, opts = {})
1165
+ data, _status_code, _headers = get_or_create_phone_pool_with_http_info(get_or_create_phone_pool_options, opts)
1166
+ data
1167
+ end
1168
+
1169
+ # Get or create phone pool
1170
+ # Get a phone pool by name or create it if it does not exist
1171
+ # @param get_or_create_phone_pool_options [GetOrCreatePhonePoolOptions]
1172
+ # @param [Hash] opts the optional parameters
1173
+ # @return [Array<(PhonePoolDetailDto, Integer, Hash)>] PhonePoolDetailDto data, response status code and response headers
1174
+ def get_or_create_phone_pool_with_http_info(get_or_create_phone_pool_options, opts = {})
1175
+ if @api_client.config.debugging
1176
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_or_create_phone_pool ...'
1177
+ end
1178
+ # verify the required parameter 'get_or_create_phone_pool_options' is set
1179
+ if @api_client.config.client_side_validation && get_or_create_phone_pool_options.nil?
1180
+ fail ArgumentError, "Missing the required parameter 'get_or_create_phone_pool_options' when calling PhoneControllerApi.get_or_create_phone_pool"
1181
+ end
1182
+ # resource path
1183
+ local_var_path = '/phone/pools/get-or-create'
1184
+
1185
+ # query parameters
1186
+ query_params = opts[:query_params] || {}
1187
+
1188
+ # header parameters
1189
+ header_params = opts[:header_params] || {}
1190
+ # HTTP header 'Accept' (if needed)
1191
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1192
+ # HTTP header 'Content-Type'
1193
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1194
+
1195
+ # form parameters
1196
+ form_params = opts[:form_params] || {}
1197
+
1198
+ # http body (model)
1199
+ post_body = opts[:body] || @api_client.object_to_http_body(get_or_create_phone_pool_options)
1200
+
1201
+ # return_type
1202
+ return_type = opts[:return_type] || 'PhonePoolDetailDto'
1203
+
1204
+ # auth_names
1205
+ auth_names = opts[:auth_names] || ['API_KEY']
1206
+
1207
+ new_options = opts.merge(
1208
+ :header_params => header_params,
1209
+ :query_params => query_params,
1210
+ :form_params => form_params,
1211
+ :body => post_body,
1212
+ :auth_names => auth_names,
1213
+ :return_type => return_type
1214
+ )
1215
+
1216
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1217
+ if @api_client.config.debugging
1218
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_or_create_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1219
+ end
1220
+ return data, status_code, headers
1221
+ end
1222
+
1223
+ # Get messages in a phone thread
1224
+ # List message thread messages for a phone message thread
1225
+ # @param phone_number_id [String]
1226
+ # @param other_number [String]
1227
+ # @param [Hash] opts the optional parameters
1228
+ # @option opts [Integer] :page (default to 0)
1229
+ # @option opts [Integer] :size (default to 20)
1230
+ # @return [PagePhoneMessageThreadItemProjection]
1231
+ def get_phone_message_thread_items(phone_number_id, other_number, opts = {})
1232
+ data, _status_code, _headers = get_phone_message_thread_items_with_http_info(phone_number_id, other_number, opts)
1233
+ data
1234
+ end
1235
+
1236
+ # Get messages in a phone thread
1237
+ # List message thread messages for a phone message thread
1238
+ # @param phone_number_id [String]
1239
+ # @param other_number [String]
1240
+ # @param [Hash] opts the optional parameters
1241
+ # @option opts [Integer] :page
1242
+ # @option opts [Integer] :size
1243
+ # @return [Array<(PagePhoneMessageThreadItemProjection, Integer, Hash)>] PagePhoneMessageThreadItemProjection data, response status code and response headers
1244
+ def get_phone_message_thread_items_with_http_info(phone_number_id, other_number, opts = {})
1245
+ if @api_client.config.debugging
1246
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_message_thread_items ...'
1247
+ end
1248
+ # verify the required parameter 'phone_number_id' is set
1249
+ if @api_client.config.client_side_validation && phone_number_id.nil?
1250
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.get_phone_message_thread_items"
1251
+ end
1252
+ # verify the required parameter 'other_number' is set
1253
+ if @api_client.config.client_side_validation && other_number.nil?
1254
+ fail ArgumentError, "Missing the required parameter 'other_number' when calling PhoneControllerApi.get_phone_message_thread_items"
1255
+ end
1256
+ # resource path
1257
+ local_var_path = '/phone/numbers/{phoneNumberId}/message-threads/{otherNumber}'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s)).sub('{' + 'otherNumber' + '}', CGI.escape(other_number.to_s))
1258
+
1259
+ # query parameters
1260
+ query_params = opts[:query_params] || {}
1261
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1262
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1263
+
1264
+ # header parameters
1265
+ header_params = opts[:header_params] || {}
1266
+ # HTTP header 'Accept' (if needed)
1267
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1268
+
1269
+ # form parameters
1270
+ form_params = opts[:form_params] || {}
1271
+
1272
+ # http body (model)
1273
+ post_body = opts[:body]
1274
+
1275
+ # return_type
1276
+ return_type = opts[:return_type] || 'PagePhoneMessageThreadItemProjection'
1277
+
1278
+ # auth_names
1279
+ auth_names = opts[:auth_names] || ['API_KEY']
1280
+
1281
+ new_options = opts.merge(
1282
+ :header_params => header_params,
1283
+ :query_params => query_params,
1284
+ :form_params => form_params,
1285
+ :body => post_body,
1286
+ :auth_names => auth_names,
1287
+ :return_type => return_type
1288
+ )
1289
+
1290
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1291
+ if @api_client.config.debugging
1292
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_message_thread_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1293
+ end
1294
+ return data, status_code, headers
1295
+ end
1296
+
1297
+ # Get the latest message preview for a thread
1298
+ # List message threads for a phone
1299
+ # @param phone_number_id [String]
1300
+ # @param [Hash] opts the optional parameters
1301
+ # @option opts [Integer] :page (default to 0)
1302
+ # @option opts [Integer] :size (default to 20)
1303
+ # @return [PagePhoneMessageThreadProjection]
1304
+ def get_phone_message_threads(phone_number_id, opts = {})
1305
+ data, _status_code, _headers = get_phone_message_threads_with_http_info(phone_number_id, opts)
1306
+ data
1307
+ end
1308
+
1309
+ # Get the latest message preview for a thread
1310
+ # List message threads for a phone
1311
+ # @param phone_number_id [String]
1312
+ # @param [Hash] opts the optional parameters
1313
+ # @option opts [Integer] :page
1314
+ # @option opts [Integer] :size
1315
+ # @return [Array<(PagePhoneMessageThreadProjection, Integer, Hash)>] PagePhoneMessageThreadProjection data, response status code and response headers
1316
+ def get_phone_message_threads_with_http_info(phone_number_id, opts = {})
1317
+ if @api_client.config.debugging
1318
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_message_threads ...'
1319
+ end
1320
+ # verify the required parameter 'phone_number_id' is set
1321
+ if @api_client.config.client_side_validation && phone_number_id.nil?
1322
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.get_phone_message_threads"
1323
+ end
1324
+ # resource path
1325
+ local_var_path = '/phone/numbers/{phoneNumberId}/message-threads'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
1326
+
1327
+ # query parameters
1328
+ query_params = opts[:query_params] || {}
1329
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1330
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1331
+
1332
+ # header parameters
1333
+ header_params = opts[:header_params] || {}
1334
+ # HTTP header 'Accept' (if needed)
1335
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1336
+
1337
+ # form parameters
1338
+ form_params = opts[:form_params] || {}
1339
+
1340
+ # http body (model)
1341
+ post_body = opts[:body]
1342
+
1343
+ # return_type
1344
+ return_type = opts[:return_type] || 'PagePhoneMessageThreadProjection'
1345
+
1346
+ # auth_names
1347
+ auth_names = opts[:auth_names] || ['API_KEY']
1348
+
1349
+ new_options = opts.merge(
1350
+ :header_params => header_params,
1351
+ :query_params => query_params,
1352
+ :form_params => form_params,
1353
+ :body => post_body,
1354
+ :auth_names => auth_names,
1355
+ :return_type => return_type
1356
+ )
1357
+
1358
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1359
+ if @api_client.config.debugging
1360
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_message_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1361
+ end
1362
+ return data, status_code, headers
1363
+ end
1364
+
1365
+ # Get a phone number by ID
1366
+ # Get a phone number by ID
1367
+ # @param phone_number_id [String]
1368
+ # @param [Hash] opts the optional parameters
1369
+ # @return [PhoneNumberDto]
1370
+ def get_phone_number(phone_number_id, opts = {})
1371
+ data, _status_code, _headers = get_phone_number_with_http_info(phone_number_id, opts)
1372
+ data
1373
+ end
1374
+
1375
+ # Get a phone number by ID
1376
+ # Get a phone number by ID
1377
+ # @param phone_number_id [String]
1378
+ # @param [Hash] opts the optional parameters
1379
+ # @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
1380
+ def get_phone_number_with_http_info(phone_number_id, opts = {})
1381
+ if @api_client.config.debugging
1382
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_number ...'
1383
+ end
1384
+ # verify the required parameter 'phone_number_id' is set
1385
+ if @api_client.config.client_side_validation && phone_number_id.nil?
1386
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.get_phone_number"
1387
+ end
1388
+ # resource path
1389
+ local_var_path = '/phone/numbers/{phoneNumberId}'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
1390
+
1391
+ # query parameters
1392
+ query_params = opts[:query_params] || {}
1393
+
1394
+ # header parameters
1395
+ header_params = opts[:header_params] || {}
1396
+ # HTTP header 'Accept' (if needed)
1397
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1398
+
1399
+ # form parameters
1400
+ form_params = opts[:form_params] || {}
1401
+
1402
+ # http body (model)
1403
+ post_body = opts[:body]
1404
+
1405
+ # return_type
1406
+ return_type = opts[:return_type] || 'PhoneNumberDto'
1407
+
1408
+ # auth_names
1409
+ auth_names = opts[:auth_names] || ['API_KEY']
1410
+
1411
+ new_options = opts.merge(
1412
+ :header_params => header_params,
1413
+ :query_params => query_params,
1414
+ :form_params => form_params,
1415
+ :body => post_body,
1416
+ :auth_names => auth_names,
1417
+ :return_type => return_type
1418
+ )
1419
+
1420
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1421
+ if @api_client.config.debugging
1422
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1423
+ end
1424
+ return data, status_code, headers
1425
+ end
1426
+
1427
+ # Get a phone number by name
1428
+ # Get a phone number by name
1429
+ # @param name [String]
1430
+ # @param [Hash] opts the optional parameters
1431
+ # @return [PhoneNumberDto]
1432
+ def get_phone_number_by_name(name, opts = {})
1433
+ data, _status_code, _headers = get_phone_number_by_name_with_http_info(name, opts)
1434
+ data
1435
+ end
1436
+
1437
+ # Get a phone number by name
1438
+ # Get a phone number by name
1439
+ # @param name [String]
1440
+ # @param [Hash] opts the optional parameters
1441
+ # @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
1442
+ def get_phone_number_by_name_with_http_info(name, opts = {})
1443
+ if @api_client.config.debugging
1444
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_number_by_name ...'
1445
+ end
1446
+ # verify the required parameter 'name' is set
1447
+ if @api_client.config.client_side_validation && name.nil?
1448
+ fail ArgumentError, "Missing the required parameter 'name' when calling PhoneControllerApi.get_phone_number_by_name"
1449
+ end
1450
+ # resource path
1451
+ local_var_path = '/phone/numbers/by-name'
1452
+
1453
+ # query parameters
1454
+ query_params = opts[:query_params] || {}
1455
+ query_params[:'name'] = name
1456
+
1457
+ # header parameters
1458
+ header_params = opts[:header_params] || {}
1459
+ # HTTP header 'Accept' (if needed)
1460
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1461
+
1462
+ # form parameters
1463
+ form_params = opts[:form_params] || {}
1464
+
1465
+ # http body (model)
1466
+ post_body = opts[:body]
1467
+
1468
+ # return_type
1469
+ return_type = opts[:return_type] || 'PhoneNumberDto'
1470
+
1471
+ # auth_names
1472
+ auth_names = opts[:auth_names] || ['API_KEY']
1473
+
1474
+ new_options = opts.merge(
1475
+ :header_params => header_params,
1476
+ :query_params => query_params,
1477
+ :form_params => form_params,
1478
+ :body => post_body,
1479
+ :auth_names => auth_names,
1480
+ :return_type => return_type
1481
+ )
1482
+
1483
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1484
+ if @api_client.config.debugging
1485
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_number_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1486
+ end
1487
+ return data, status_code, headers
1488
+ end
1489
+
1490
+ # Get a phone number by phone number
1491
+ # Get a phone number by phone number
1492
+ # @param phone_number [String]
1493
+ # @param [Hash] opts the optional parameters
1494
+ # @return [PhoneNumberDto]
1495
+ def get_phone_number_by_phone_number(phone_number, opts = {})
1496
+ data, _status_code, _headers = get_phone_number_by_phone_number_with_http_info(phone_number, opts)
1497
+ data
1498
+ end
1499
+
1500
+ # Get a phone number by phone number
1501
+ # Get a phone number by phone number
1502
+ # @param phone_number [String]
1503
+ # @param [Hash] opts the optional parameters
1504
+ # @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
1505
+ def get_phone_number_by_phone_number_with_http_info(phone_number, opts = {})
1506
+ if @api_client.config.debugging
1507
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_number_by_phone_number ...'
1508
+ end
1509
+ # verify the required parameter 'phone_number' is set
1510
+ if @api_client.config.client_side_validation && phone_number.nil?
1511
+ fail ArgumentError, "Missing the required parameter 'phone_number' when calling PhoneControllerApi.get_phone_number_by_phone_number"
1512
+ end
1513
+ # resource path
1514
+ local_var_path = '/phone/numbers/by-phone-number'
1515
+
1516
+ # query parameters
1517
+ query_params = opts[:query_params] || {}
1518
+ query_params[:'phoneNumber'] = phone_number
1519
+
1520
+ # header parameters
1521
+ header_params = opts[:header_params] || {}
1522
+ # HTTP header 'Accept' (if needed)
1523
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1524
+
1525
+ # form parameters
1526
+ form_params = opts[:form_params] || {}
1527
+
1528
+ # http body (model)
1529
+ post_body = opts[:body]
1530
+
1531
+ # return_type
1532
+ return_type = opts[:return_type] || 'PhoneNumberDto'
1533
+
1534
+ # auth_names
1535
+ auth_names = opts[:auth_names] || ['API_KEY']
1536
+
1537
+ new_options = opts.merge(
1538
+ :header_params => header_params,
1539
+ :query_params => query_params,
1540
+ :form_params => form_params,
1541
+ :body => post_body,
1542
+ :auth_names => auth_names,
1543
+ :return_type => return_type
1544
+ )
1545
+
1546
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1547
+ if @api_client.config.debugging
1548
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_number_by_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1549
+ end
1550
+ return data, status_code, headers
1551
+ end
1552
+
1553
+ # Get line type intelligence for a phone number
1554
+ # Lookup line type intelligence for a phone number
1555
+ # @param validate_phone_number_options [ValidatePhoneNumberOptions]
1556
+ # @param [Hash] opts the optional parameters
1557
+ # @return [PhoneNumberLineTypeLookupDto]
1558
+ def get_phone_number_line_type_intelligence(validate_phone_number_options, opts = {})
1559
+ data, _status_code, _headers = get_phone_number_line_type_intelligence_with_http_info(validate_phone_number_options, opts)
1560
+ data
1561
+ end
1562
+
1563
+ # Get line type intelligence for a phone number
1564
+ # Lookup line type intelligence for a phone number
1565
+ # @param validate_phone_number_options [ValidatePhoneNumberOptions]
1566
+ # @param [Hash] opts the optional parameters
1567
+ # @return [Array<(PhoneNumberLineTypeLookupDto, Integer, Hash)>] PhoneNumberLineTypeLookupDto data, response status code and response headers
1568
+ def get_phone_number_line_type_intelligence_with_http_info(validate_phone_number_options, opts = {})
1569
+ if @api_client.config.debugging
1570
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_number_line_type_intelligence ...'
1571
+ end
1572
+ # verify the required parameter 'validate_phone_number_options' is set
1573
+ if @api_client.config.client_side_validation && validate_phone_number_options.nil?
1574
+ fail ArgumentError, "Missing the required parameter 'validate_phone_number_options' when calling PhoneControllerApi.get_phone_number_line_type_intelligence"
1575
+ end
1576
+ # resource path
1577
+ local_var_path = '/phone/validate/line-type-intelligence'
1578
+
1579
+ # query parameters
1580
+ query_params = opts[:query_params] || {}
1581
+
1582
+ # header parameters
1583
+ header_params = opts[:header_params] || {}
1584
+ # HTTP header 'Accept' (if needed)
1585
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1586
+ # HTTP header 'Content-Type'
1587
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1588
+
1589
+ # form parameters
1590
+ form_params = opts[:form_params] || {}
1591
+
1592
+ # http body (model)
1593
+ post_body = opts[:body] || @api_client.object_to_http_body(validate_phone_number_options)
1594
+
1595
+ # return_type
1596
+ return_type = opts[:return_type] || 'PhoneNumberLineTypeLookupDto'
1597
+
1598
+ # auth_names
1599
+ auth_names = opts[:auth_names] || ['API_KEY']
1600
+
1601
+ new_options = opts.merge(
1602
+ :header_params => header_params,
1603
+ :query_params => query_params,
1604
+ :form_params => form_params,
1605
+ :body => post_body,
1606
+ :auth_names => auth_names,
1607
+ :return_type => return_type
1608
+ )
1609
+
1610
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1611
+ if @api_client.config.debugging
1612
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_number_line_type_intelligence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1613
+ end
1614
+ return data, status_code, headers
1615
+ end
1616
+
1617
+ # Get phone number release
1618
+ # Get a released or deleted phone numbers
1619
+ # @param release_id [String]
1620
+ # @param [Hash] opts the optional parameters
1621
+ # @return [PhoneNumberReleaseProjection]
1622
+ def get_phone_number_release(release_id, opts = {})
1623
+ data, _status_code, _headers = get_phone_number_release_with_http_info(release_id, opts)
1624
+ data
1625
+ end
1626
+
1627
+ # Get phone number release
1628
+ # Get a released or deleted phone numbers
1629
+ # @param release_id [String]
1630
+ # @param [Hash] opts the optional parameters
1631
+ # @return [Array<(PhoneNumberReleaseProjection, Integer, Hash)>] PhoneNumberReleaseProjection data, response status code and response headers
1632
+ def get_phone_number_release_with_http_info(release_id, opts = {})
1633
+ if @api_client.config.debugging
1634
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_number_release ...'
1635
+ end
1636
+ # verify the required parameter 'release_id' is set
1637
+ if @api_client.config.client_side_validation && release_id.nil?
1638
+ fail ArgumentError, "Missing the required parameter 'release_id' when calling PhoneControllerApi.get_phone_number_release"
1639
+ end
1640
+ # resource path
1641
+ local_var_path = '/phone/releases/{releaseId}'.sub('{' + 'releaseId' + '}', CGI.escape(release_id.to_s))
1642
+
1643
+ # query parameters
1644
+ query_params = opts[:query_params] || {}
1645
+
1646
+ # header parameters
1647
+ header_params = opts[:header_params] || {}
1648
+ # HTTP header 'Accept' (if needed)
1649
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1650
+
1651
+ # form parameters
1652
+ form_params = opts[:form_params] || {}
1653
+
1654
+ # http body (model)
1655
+ post_body = opts[:body]
1656
+
1657
+ # return_type
1658
+ return_type = opts[:return_type] || 'PhoneNumberReleaseProjection'
1659
+
1660
+ # auth_names
1661
+ auth_names = opts[:auth_names] || ['API_KEY']
1662
+
1663
+ new_options = opts.merge(
1664
+ :header_params => header_params,
1665
+ :query_params => query_params,
1666
+ :form_params => form_params,
1667
+ :body => post_body,
1668
+ :auth_names => auth_names,
1669
+ :return_type => return_type
1670
+ )
1671
+
1672
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1673
+ if @api_client.config.debugging
1674
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_number_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1675
+ end
1676
+ return data, status_code, headers
1677
+ end
1678
+
1679
+ # Get phone number tags
1680
+ # Get tags for a specific phone number
1681
+ # @param phone_number_id [String]
1682
+ # @param [Hash] opts the optional parameters
1683
+ # @return [Array<String>]
1684
+ def get_phone_number_tags(phone_number_id, opts = {})
1685
+ data, _status_code, _headers = get_phone_number_tags_with_http_info(phone_number_id, opts)
1686
+ data
1687
+ end
1688
+
1689
+ # Get phone number tags
1690
+ # Get tags for a specific phone number
1691
+ # @param phone_number_id [String]
1692
+ # @param [Hash] opts the optional parameters
1693
+ # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
1694
+ def get_phone_number_tags_with_http_info(phone_number_id, opts = {})
1695
+ if @api_client.config.debugging
1696
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_number_tags ...'
1697
+ end
1698
+ # verify the required parameter 'phone_number_id' is set
1699
+ if @api_client.config.client_side_validation && phone_number_id.nil?
1700
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.get_phone_number_tags"
1701
+ end
1702
+ # resource path
1703
+ local_var_path = '/phone/numbers/{phoneNumberId}/tags'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
1704
+
1705
+ # query parameters
1706
+ query_params = opts[:query_params] || {}
1707
+
1708
+ # header parameters
1709
+ header_params = opts[:header_params] || {}
1710
+ # HTTP header 'Accept' (if needed)
1711
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1712
+
1713
+ # form parameters
1714
+ form_params = opts[:form_params] || {}
1715
+
1716
+ # http body (model)
1717
+ post_body = opts[:body]
1718
+
1719
+ # return_type
1720
+ return_type = opts[:return_type] || 'Array<String>'
1721
+
1722
+ # auth_names
1723
+ auth_names = opts[:auth_names] || ['API_KEY']
1724
+
1725
+ new_options = opts.merge(
1726
+ :header_params => header_params,
1727
+ :query_params => query_params,
1728
+ :form_params => form_params,
1729
+ :body => post_body,
1730
+ :auth_names => auth_names,
1731
+ :return_type => return_type
1732
+ )
1733
+
1734
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1735
+ if @api_client.config.debugging
1736
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_number_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1737
+ end
1738
+ return data, status_code, headers
1739
+ end
1740
+
1741
+ # Get phone numbers
1742
+ # List phone numbers for account
1743
+ # @param [Hash] opts the optional parameters
1744
+ # @option opts [String] :phone_country Optional phone country
1745
+ # @option opts [String] :line_type Optional line type filter
1746
+ # @option opts [String] :carrier_name Optional carrier name filter
1747
+ # @option opts [String] :mobile_country_code Optional mobile country code filter
1748
+ # @option opts [String] :mobile_network_code Optional mobile network code filter
1749
+ # @option opts [String] :provider_label Optional provider label filter such as T1 or T2
1750
+ # @option opts [Integer] :page Optional page index for list pagination (default to 0)
1751
+ # @option opts [Integer] :size Optional page size for list pagination (default to 20)
1752
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
1753
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
1754
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
1755
+ # @option opts [String] :search Optional search filter
1756
+ # @option opts [Array<String>] :tag Optional tags to filter by. A phone must include all provided tags
1757
+ # @option opts [Array<String>] :include Optional phoneIds to include in result
1758
+ # @option opts [Boolean] :favourite Optionally filter results for favourites only (default to false)
1759
+ # @return [PagePhoneNumberProjection]
1760
+ def get_phone_numbers(opts = {})
1761
+ data, _status_code, _headers = get_phone_numbers_with_http_info(opts)
1762
+ data
1763
+ end
1764
+
1765
+ # Get phone numbers
1766
+ # List phone numbers for account
1767
+ # @param [Hash] opts the optional parameters
1768
+ # @option opts [String] :phone_country Optional phone country
1769
+ # @option opts [String] :line_type Optional line type filter
1770
+ # @option opts [String] :carrier_name Optional carrier name filter
1771
+ # @option opts [String] :mobile_country_code Optional mobile country code filter
1772
+ # @option opts [String] :mobile_network_code Optional mobile network code filter
1773
+ # @option opts [String] :provider_label Optional provider label filter such as T1 or T2
1774
+ # @option opts [Integer] :page Optional page index for list pagination
1775
+ # @option opts [Integer] :size Optional page size for list pagination
1776
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
1777
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
1778
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
1779
+ # @option opts [String] :search Optional search filter
1780
+ # @option opts [Array<String>] :tag Optional tags to filter by. A phone must include all provided tags
1781
+ # @option opts [Array<String>] :include Optional phoneIds to include in result
1782
+ # @option opts [Boolean] :favourite Optionally filter results for favourites only
1783
+ # @return [Array<(PagePhoneNumberProjection, Integer, Hash)>] PagePhoneNumberProjection data, response status code and response headers
1784
+ def get_phone_numbers_with_http_info(opts = {})
1785
+ if @api_client.config.debugging
1786
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_numbers ...'
1787
+ end
1788
+ allowable_values = ["US", "GB", "AU", "CA", "EE", "HK", "PL", "PT", "NL", "IL", "FI", "SE"]
1789
+ if @api_client.config.client_side_validation && opts[:'phone_country'] && !allowable_values.include?(opts[:'phone_country'])
1790
+ fail ArgumentError, "invalid value for \"phone_country\", must be one of #{allowable_values}"
1791
+ end
1792
+ allowable_values = ["ASC", "DESC"]
1793
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1794
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1795
+ end
1796
+ # resource path
1797
+ local_var_path = '/phone/numbers'
1798
+
1799
+ # query parameters
1800
+ query_params = opts[:query_params] || {}
1801
+ query_params[:'phoneCountry'] = opts[:'phone_country'] if !opts[:'phone_country'].nil?
1802
+ query_params[:'lineType'] = opts[:'line_type'] if !opts[:'line_type'].nil?
1803
+ query_params[:'carrierName'] = opts[:'carrier_name'] if !opts[:'carrier_name'].nil?
1804
+ query_params[:'mobileCountryCode'] = opts[:'mobile_country_code'] if !opts[:'mobile_country_code'].nil?
1805
+ query_params[:'mobileNetworkCode'] = opts[:'mobile_network_code'] if !opts[:'mobile_network_code'].nil?
1806
+ query_params[:'providerLabel'] = opts[:'provider_label'] if !opts[:'provider_label'].nil?
1807
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1808
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1809
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1810
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
1811
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
1812
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
1813
+ query_params[:'tag'] = @api_client.build_collection_param(opts[:'tag'], :multi) if !opts[:'tag'].nil?
1814
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if !opts[:'include'].nil?
1815
+ query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
1816
+
1817
+ # header parameters
1818
+ header_params = opts[:header_params] || {}
1819
+ # HTTP header 'Accept' (if needed)
1820
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1821
+
1822
+ # form parameters
1823
+ form_params = opts[:form_params] || {}
1824
+
1825
+ # http body (model)
1826
+ post_body = opts[:body]
1827
+
1828
+ # return_type
1829
+ return_type = opts[:return_type] || 'PagePhoneNumberProjection'
1830
+
1831
+ # auth_names
1832
+ auth_names = opts[:auth_names] || ['API_KEY']
1833
+
1834
+ new_options = opts.merge(
1835
+ :header_params => header_params,
1836
+ :query_params => query_params,
1837
+ :form_params => form_params,
1838
+ :body => post_body,
1839
+ :auth_names => auth_names,
1840
+ :return_type => return_type
1841
+ )
1842
+
1843
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1844
+ if @api_client.config.debugging
1845
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_numbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1846
+ end
1847
+ return data, status_code, headers
1848
+ end
1849
+
1850
+ # Get phone plans
1851
+ # Get phone number plans
1852
+ # @param [Hash] opts the optional parameters
1853
+ # @return [Array<PhonePlanDto>]
1854
+ def get_phone_plans(opts = {})
1855
+ data, _status_code, _headers = get_phone_plans_with_http_info(opts)
1856
+ data
1857
+ end
1858
+
1859
+ # Get phone plans
1860
+ # Get phone number plans
1861
+ # @param [Hash] opts the optional parameters
1862
+ # @return [Array<(Array<PhonePlanDto>, Integer, Hash)>] Array<PhonePlanDto> data, response status code and response headers
1863
+ def get_phone_plans_with_http_info(opts = {})
1864
+ if @api_client.config.debugging
1865
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_plans ...'
1866
+ end
1867
+ # resource path
1868
+ local_var_path = '/phone/plans'
1869
+
1870
+ # query parameters
1871
+ query_params = opts[:query_params] || {}
1872
+
1873
+ # header parameters
1874
+ header_params = opts[:header_params] || {}
1875
+ # HTTP header 'Accept' (if needed)
1876
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1877
+
1878
+ # form parameters
1879
+ form_params = opts[:form_params] || {}
1880
+
1881
+ # http body (model)
1882
+ post_body = opts[:body]
1883
+
1884
+ # return_type
1885
+ return_type = opts[:return_type] || 'Array<PhonePlanDto>'
1886
+
1887
+ # auth_names
1888
+ auth_names = opts[:auth_names] || ['API_KEY']
1889
+
1890
+ new_options = opts.merge(
1891
+ :header_params => header_params,
1892
+ :query_params => query_params,
1893
+ :form_params => form_params,
1894
+ :body => post_body,
1895
+ :auth_names => auth_names,
1896
+ :return_type => return_type
1897
+ )
1898
+
1899
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1900
+ if @api_client.config.debugging
1901
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1902
+ end
1903
+ return data, status_code, headers
1904
+ end
1905
+
1906
+ # Get phone plans availability
1907
+ # @param [Hash] opts the optional parameters
1908
+ # @return [PhonePlanAvailability]
1909
+ def get_phone_plans_availability(opts = {})
1910
+ data, _status_code, _headers = get_phone_plans_availability_with_http_info(opts)
1911
+ data
1912
+ end
1913
+
1914
+ # Get phone plans availability
1915
+ # @param [Hash] opts the optional parameters
1916
+ # @return [Array<(PhonePlanAvailability, Integer, Hash)>] PhonePlanAvailability data, response status code and response headers
1917
+ def get_phone_plans_availability_with_http_info(opts = {})
1918
+ if @api_client.config.debugging
1919
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_plans_availability ...'
1920
+ end
1921
+ # resource path
1922
+ local_var_path = '/phone/plans/availability'
1923
+
1924
+ # query parameters
1925
+ query_params = opts[:query_params] || {}
1926
+
1927
+ # header parameters
1928
+ header_params = opts[:header_params] || {}
1929
+ # HTTP header 'Accept' (if needed)
1930
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1931
+
1932
+ # form parameters
1933
+ form_params = opts[:form_params] || {}
1934
+
1935
+ # http body (model)
1936
+ post_body = opts[:body]
1937
+
1938
+ # return_type
1939
+ return_type = opts[:return_type] || 'PhonePlanAvailability'
1940
+
1941
+ # auth_names
1942
+ auth_names = opts[:auth_names] || ['API_KEY']
1943
+
1944
+ new_options = opts.merge(
1945
+ :header_params => header_params,
1946
+ :query_params => query_params,
1947
+ :form_params => form_params,
1948
+ :body => post_body,
1949
+ :auth_names => auth_names,
1950
+ :return_type => return_type
1951
+ )
1952
+
1953
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1954
+ if @api_client.config.debugging
1955
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_plans_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1956
+ end
1957
+ return data, status_code, headers
1958
+ end
1959
+
1960
+ # Get phone pool
1961
+ # Get phone pool details by ID
1962
+ # @param pool_id [String]
1963
+ # @param [Hash] opts the optional parameters
1964
+ # @return [PhonePoolDetailDto]
1965
+ def get_phone_pool(pool_id, opts = {})
1966
+ data, _status_code, _headers = get_phone_pool_with_http_info(pool_id, opts)
1967
+ data
1968
+ end
1969
+
1970
+ # Get phone pool
1971
+ # Get phone pool details by ID
1972
+ # @param pool_id [String]
1973
+ # @param [Hash] opts the optional parameters
1974
+ # @return [Array<(PhonePoolDetailDto, Integer, Hash)>] PhonePoolDetailDto data, response status code and response headers
1975
+ def get_phone_pool_with_http_info(pool_id, opts = {})
1976
+ if @api_client.config.debugging
1977
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_pool ...'
1978
+ end
1979
+ # verify the required parameter 'pool_id' is set
1980
+ if @api_client.config.client_side_validation && pool_id.nil?
1981
+ fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.get_phone_pool"
1982
+ end
1983
+ # resource path
1984
+ local_var_path = '/phone/pools/{poolId}'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s))
1985
+
1986
+ # query parameters
1987
+ query_params = opts[:query_params] || {}
1988
+
1989
+ # header parameters
1990
+ header_params = opts[:header_params] || {}
1991
+ # HTTP header 'Accept' (if needed)
1992
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1993
+
1994
+ # form parameters
1995
+ form_params = opts[:form_params] || {}
1996
+
1997
+ # http body (model)
1998
+ post_body = opts[:body]
1999
+
2000
+ # return_type
2001
+ return_type = opts[:return_type] || 'PhonePoolDetailDto'
2002
+
2003
+ # auth_names
2004
+ auth_names = opts[:auth_names] || ['API_KEY']
2005
+
2006
+ new_options = opts.merge(
2007
+ :header_params => header_params,
2008
+ :query_params => query_params,
2009
+ :form_params => form_params,
2010
+ :body => post_body,
2011
+ :auth_names => auth_names,
2012
+ :return_type => return_type
2013
+ )
2014
+
2015
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2016
+ if @api_client.config.debugging
2017
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2018
+ end
2019
+ return data, status_code, headers
2020
+ end
2021
+
2022
+ # Get phone pool by name
2023
+ # Get phone pool details by name
2024
+ # @param name [String]
2025
+ # @param [Hash] opts the optional parameters
2026
+ # @return [PhonePoolDetailDto]
2027
+ def get_phone_pool_by_name(name, opts = {})
2028
+ data, _status_code, _headers = get_phone_pool_by_name_with_http_info(name, opts)
2029
+ data
2030
+ end
2031
+
2032
+ # Get phone pool by name
2033
+ # Get phone pool details by name
2034
+ # @param name [String]
2035
+ # @param [Hash] opts the optional parameters
2036
+ # @return [Array<(PhonePoolDetailDto, Integer, Hash)>] PhonePoolDetailDto data, response status code and response headers
2037
+ def get_phone_pool_by_name_with_http_info(name, opts = {})
2038
+ if @api_client.config.debugging
2039
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_pool_by_name ...'
2040
+ end
2041
+ # verify the required parameter 'name' is set
2042
+ if @api_client.config.client_side_validation && name.nil?
2043
+ fail ArgumentError, "Missing the required parameter 'name' when calling PhoneControllerApi.get_phone_pool_by_name"
2044
+ end
2045
+ # resource path
2046
+ local_var_path = '/phone/pools/by-name'
2047
+
2048
+ # query parameters
2049
+ query_params = opts[:query_params] || {}
2050
+ query_params[:'name'] = name
2051
+
2052
+ # header parameters
2053
+ header_params = opts[:header_params] || {}
2054
+ # HTTP header 'Accept' (if needed)
2055
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
2056
+
2057
+ # form parameters
2058
+ form_params = opts[:form_params] || {}
2059
+
2060
+ # http body (model)
2061
+ post_body = opts[:body]
2062
+
2063
+ # return_type
2064
+ return_type = opts[:return_type] || 'PhonePoolDetailDto'
2065
+
2066
+ # auth_names
2067
+ auth_names = opts[:auth_names] || ['API_KEY']
2068
+
2069
+ new_options = opts.merge(
2070
+ :header_params => header_params,
2071
+ :query_params => query_params,
2072
+ :form_params => form_params,
2073
+ :body => post_body,
2074
+ :auth_names => auth_names,
2075
+ :return_type => return_type
2076
+ )
2077
+
2078
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2079
+ if @api_client.config.debugging
2080
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_pool_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2081
+ end
2082
+ return data, status_code, headers
2083
+ end
2084
+
2085
+ # Get phone pools
2086
+ # List phone pools for the authenticated user
2087
+ # @param [Hash] opts the optional parameters
2088
+ # @return [Array<PhonePoolDto>]
2089
+ def get_phone_pools(opts = {})
2090
+ data, _status_code, _headers = get_phone_pools_with_http_info(opts)
2091
+ data
2092
+ end
2093
+
2094
+ # Get phone pools
2095
+ # List phone pools for the authenticated user
2096
+ # @param [Hash] opts the optional parameters
2097
+ # @return [Array<(Array<PhonePoolDto>, Integer, Hash)>] Array<PhonePoolDto> data, response status code and response headers
2098
+ def get_phone_pools_with_http_info(opts = {})
2099
+ if @api_client.config.debugging
2100
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_pools ...'
2101
+ end
2102
+ # resource path
2103
+ local_var_path = '/phone/pools'
2104
+
2105
+ # query parameters
2106
+ query_params = opts[:query_params] || {}
2107
+
2108
+ # header parameters
2109
+ header_params = opts[:header_params] || {}
2110
+ # HTTP header 'Accept' (if needed)
2111
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
2112
+
2113
+ # form parameters
2114
+ form_params = opts[:form_params] || {}
2115
+
2116
+ # http body (model)
2117
+ post_body = opts[:body]
2118
+
2119
+ # return_type
2120
+ return_type = opts[:return_type] || 'Array<PhonePoolDto>'
2121
+
2122
+ # auth_names
2123
+ auth_names = opts[:auth_names] || ['API_KEY']
2124
+
2125
+ new_options = opts.merge(
2126
+ :header_params => header_params,
2127
+ :query_params => query_params,
2128
+ :form_params => form_params,
2129
+ :body => post_body,
2130
+ :auth_names => auth_names,
2131
+ :return_type => return_type
2132
+ )
2133
+
2134
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2135
+ if @api_client.config.debugging
2136
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_pools\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2137
+ end
2138
+ return data, status_code, headers
2139
+ end
2140
+
2141
+ # Get phone provisioning capabilities
2142
+ # Get supported provider-country variant capabilities for advanced provisioning
2143
+ # @param phone_country [String]
2144
+ # @param [Hash] opts the optional parameters
2145
+ # @option opts [String] :provider_label
2146
+ # @return [PhoneProviderCapabilitiesResult]
2147
+ def get_phone_provisioning_capabilities(phone_country, opts = {})
2148
+ data, _status_code, _headers = get_phone_provisioning_capabilities_with_http_info(phone_country, opts)
2149
+ data
2150
+ end
2151
+
2152
+ # Get phone provisioning capabilities
2153
+ # Get supported provider-country variant capabilities for advanced provisioning
2154
+ # @param phone_country [String]
2155
+ # @param [Hash] opts the optional parameters
2156
+ # @option opts [String] :provider_label
2157
+ # @return [Array<(PhoneProviderCapabilitiesResult, Integer, Hash)>] PhoneProviderCapabilitiesResult data, response status code and response headers
2158
+ def get_phone_provisioning_capabilities_with_http_info(phone_country, opts = {})
2159
+ if @api_client.config.debugging
2160
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_provisioning_capabilities ...'
2161
+ end
2162
+ # verify the required parameter 'phone_country' is set
2163
+ if @api_client.config.client_side_validation && phone_country.nil?
2164
+ fail ArgumentError, "Missing the required parameter 'phone_country' when calling PhoneControllerApi.get_phone_provisioning_capabilities"
2165
+ end
2166
+ # verify enum value
2167
+ allowable_values = ["US", "GB", "AU", "CA", "EE", "HK", "PL", "PT", "NL", "IL", "FI", "SE"]
2168
+ if @api_client.config.client_side_validation && !allowable_values.include?(phone_country)
2169
+ fail ArgumentError, "invalid value for \"phone_country\", must be one of #{allowable_values}"
2170
+ end
2171
+ # resource path
2172
+ local_var_path = '/phone/provisioning/capabilities'
2173
+
2174
+ # query parameters
2175
+ query_params = opts[:query_params] || {}
2176
+ query_params[:'phoneCountry'] = phone_country
2177
+ query_params[:'providerLabel'] = opts[:'provider_label'] if !opts[:'provider_label'].nil?
2178
+
2179
+ # header parameters
2180
+ header_params = opts[:header_params] || {}
2181
+ # HTTP header 'Accept' (if needed)
2182
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
2183
+
2184
+ # form parameters
2185
+ form_params = opts[:form_params] || {}
2186
+
2187
+ # http body (model)
2188
+ post_body = opts[:body]
2189
+
2190
+ # return_type
2191
+ return_type = opts[:return_type] || 'PhoneProviderCapabilitiesResult'
2192
+
2193
+ # auth_names
2194
+ auth_names = opts[:auth_names] || ['API_KEY']
2195
+
2196
+ new_options = opts.merge(
2197
+ :header_params => header_params,
2198
+ :query_params => query_params,
2199
+ :form_params => form_params,
2200
+ :body => post_body,
2201
+ :auth_names => auth_names,
2202
+ :return_type => return_type
2203
+ )
2204
+
2205
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2206
+ if @api_client.config.debugging
2207
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_provisioning_capabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2208
+ end
2209
+ return data, status_code, headers
2210
+ end
2211
+
2212
+ # Get phone provisioning job
2213
+ # Get advanced phone provisioning job status
2214
+ # @param job_id [String]
2215
+ # @param [Hash] opts the optional parameters
2216
+ # @return [PhoneProvisioningJobDto]
2217
+ def get_phone_provisioning_job(job_id, opts = {})
2218
+ data, _status_code, _headers = get_phone_provisioning_job_with_http_info(job_id, opts)
2219
+ data
2220
+ end
2221
+
2222
+ # Get phone provisioning job
2223
+ # Get advanced phone provisioning job status
2224
+ # @param job_id [String]
788
2225
  # @param [Hash] opts the optional parameters
789
- # @option opts [Integer] :page
790
- # @option opts [Integer] :size
791
- # @return [Array<(PagePhoneMessageThreadProjection, Integer, Hash)>] PagePhoneMessageThreadProjection data, response status code and response headers
792
- def get_phone_message_threads_with_http_info(phone_number_id, opts = {})
2226
+ # @return [Array<(PhoneProvisioningJobDto, Integer, Hash)>] PhoneProvisioningJobDto data, response status code and response headers
2227
+ def get_phone_provisioning_job_with_http_info(job_id, opts = {})
793
2228
  if @api_client.config.debugging
794
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_message_threads ...'
2229
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_provisioning_job ...'
795
2230
  end
796
- # verify the required parameter 'phone_number_id' is set
797
- if @api_client.config.client_side_validation && phone_number_id.nil?
798
- fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.get_phone_message_threads"
2231
+ # verify the required parameter 'job_id' is set
2232
+ if @api_client.config.client_side_validation && job_id.nil?
2233
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling PhoneControllerApi.get_phone_provisioning_job"
799
2234
  end
800
2235
  # resource path
801
- local_var_path = '/phone/numbers/{phoneNumberId}/message-threads'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
2236
+ local_var_path = '/phone/provisioning/jobs/{jobId}'.sub('{' + 'jobId' + '}', CGI.escape(job_id.to_s))
802
2237
 
803
2238
  # query parameters
804
2239
  query_params = opts[:query_params] || {}
805
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
806
- query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
807
2240
 
808
2241
  # header parameters
809
2242
  header_params = opts[:header_params] || {}
@@ -817,7 +2250,7 @@ module MailSlurpClient
817
2250
  post_body = opts[:body]
818
2251
 
819
2252
  # return_type
820
- return_type = opts[:return_type] || 'PagePhoneMessageThreadProjection'
2253
+ return_type = opts[:return_type] || 'PhoneProvisioningJobDto'
821
2254
 
822
2255
  # auth_names
823
2256
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -833,36 +2266,36 @@ module MailSlurpClient
833
2266
 
834
2267
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
835
2268
  if @api_client.config.debugging
836
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_message_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2269
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_provisioning_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
837
2270
  end
838
2271
  return data, status_code, headers
839
2272
  end
840
2273
 
841
- # Get a phone number by ID
842
- # Get a phone number by ID
843
- # @param phone_number_id [String]
2274
+ # Get SMS prepaid credit
2275
+ # Get a specific SMS prepaid credit balance for the authenticated account
2276
+ # @param credit_id [String]
844
2277
  # @param [Hash] opts the optional parameters
845
- # @return [PhoneNumberDto]
846
- def get_phone_number(phone_number_id, opts = {})
847
- data, _status_code, _headers = get_phone_number_with_http_info(phone_number_id, opts)
2278
+ # @return [PhoneSmsPrepaidCreditDto]
2279
+ def get_phone_sms_prepaid_credit(credit_id, opts = {})
2280
+ data, _status_code, _headers = get_phone_sms_prepaid_credit_with_http_info(credit_id, opts)
848
2281
  data
849
2282
  end
850
2283
 
851
- # Get a phone number by ID
852
- # Get a phone number by ID
853
- # @param phone_number_id [String]
2284
+ # Get SMS prepaid credit
2285
+ # Get a specific SMS prepaid credit balance for the authenticated account
2286
+ # @param credit_id [String]
854
2287
  # @param [Hash] opts the optional parameters
855
- # @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
856
- def get_phone_number_with_http_info(phone_number_id, opts = {})
2288
+ # @return [Array<(PhoneSmsPrepaidCreditDto, Integer, Hash)>] PhoneSmsPrepaidCreditDto data, response status code and response headers
2289
+ def get_phone_sms_prepaid_credit_with_http_info(credit_id, opts = {})
857
2290
  if @api_client.config.debugging
858
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_number ...'
2291
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_sms_prepaid_credit ...'
859
2292
  end
860
- # verify the required parameter 'phone_number_id' is set
861
- if @api_client.config.client_side_validation && phone_number_id.nil?
862
- fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.get_phone_number"
2293
+ # verify the required parameter 'credit_id' is set
2294
+ if @api_client.config.client_side_validation && credit_id.nil?
2295
+ fail ArgumentError, "Missing the required parameter 'credit_id' when calling PhoneControllerApi.get_phone_sms_prepaid_credit"
863
2296
  end
864
2297
  # resource path
865
- local_var_path = '/phone/numbers/{phoneNumberId}'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
2298
+ local_var_path = '/phone/sms-prepaid-credits/{creditId}'.sub('{' + 'creditId' + '}', CGI.escape(credit_id.to_s))
866
2299
 
867
2300
  # query parameters
868
2301
  query_params = opts[:query_params] || {}
@@ -879,7 +2312,7 @@ module MailSlurpClient
879
2312
  post_body = opts[:body]
880
2313
 
881
2314
  # return_type
882
- return_type = opts[:return_type] || 'PhoneNumberDto'
2315
+ return_type = opts[:return_type] || 'PhoneSmsPrepaidCreditDto'
883
2316
 
884
2317
  # auth_names
885
2318
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -895,40 +2328,33 @@ module MailSlurpClient
895
2328
 
896
2329
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
897
2330
  if @api_client.config.debugging
898
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2331
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_sms_prepaid_credit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
899
2332
  end
900
2333
  return data, status_code, headers
901
2334
  end
902
2335
 
903
- # Get a phone number by name
904
- # Get a phone number by name
905
- # @param name [String]
2336
+ # Get SMS prepaid credits
2337
+ # List SMS prepaid credits for the authenticated account
906
2338
  # @param [Hash] opts the optional parameters
907
- # @return [PhoneNumberDto]
908
- def get_phone_number_by_name(name, opts = {})
909
- data, _status_code, _headers = get_phone_number_by_name_with_http_info(name, opts)
2339
+ # @return [PhoneSmsPrepaidCreditsDto]
2340
+ def get_phone_sms_prepaid_credits(opts = {})
2341
+ data, _status_code, _headers = get_phone_sms_prepaid_credits_with_http_info(opts)
910
2342
  data
911
2343
  end
912
2344
 
913
- # Get a phone number by name
914
- # Get a phone number by name
915
- # @param name [String]
2345
+ # Get SMS prepaid credits
2346
+ # List SMS prepaid credits for the authenticated account
916
2347
  # @param [Hash] opts the optional parameters
917
- # @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
918
- def get_phone_number_by_name_with_http_info(name, opts = {})
2348
+ # @return [Array<(PhoneSmsPrepaidCreditsDto, Integer, Hash)>] PhoneSmsPrepaidCreditsDto data, response status code and response headers
2349
+ def get_phone_sms_prepaid_credits_with_http_info(opts = {})
919
2350
  if @api_client.config.debugging
920
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_number_by_name ...'
921
- end
922
- # verify the required parameter 'name' is set
923
- if @api_client.config.client_side_validation && name.nil?
924
- fail ArgumentError, "Missing the required parameter 'name' when calling PhoneControllerApi.get_phone_number_by_name"
2351
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_sms_prepaid_credits ...'
925
2352
  end
926
2353
  # resource path
927
- local_var_path = '/phone/numbers/by-name'
2354
+ local_var_path = '/phone/sms-prepaid-credits'
928
2355
 
929
2356
  # query parameters
930
2357
  query_params = opts[:query_params] || {}
931
- query_params[:'name'] = name
932
2358
 
933
2359
  # header parameters
934
2360
  header_params = opts[:header_params] || {}
@@ -942,7 +2368,7 @@ module MailSlurpClient
942
2368
  post_body = opts[:body]
943
2369
 
944
2370
  # return_type
945
- return_type = opts[:return_type] || 'PhoneNumberDto'
2371
+ return_type = opts[:return_type] || 'PhoneSmsPrepaidCreditsDto'
946
2372
 
947
2373
  # auth_names
948
2374
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -958,40 +2384,33 @@ module MailSlurpClient
958
2384
 
959
2385
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
960
2386
  if @api_client.config.debugging
961
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_number_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2387
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_sms_prepaid_credits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
962
2388
  end
963
2389
  return data, status_code, headers
964
2390
  end
965
2391
 
966
- # Get a phone number by phone number
967
- # Get a phone number by phone number
968
- # @param phone_number [String]
2392
+ # Get phone summary
2393
+ # Get overview of assigned phones
969
2394
  # @param [Hash] opts the optional parameters
970
- # @return [PhoneNumberDto]
971
- def get_phone_number_by_phone_number(phone_number, opts = {})
972
- data, _status_code, _headers = get_phone_number_by_phone_number_with_http_info(phone_number, opts)
2395
+ # @return [PhoneSummaryDto]
2396
+ def get_phone_summary(opts = {})
2397
+ data, _status_code, _headers = get_phone_summary_with_http_info(opts)
973
2398
  data
974
2399
  end
975
2400
 
976
- # Get a phone number by phone number
977
- # Get a phone number by phone number
978
- # @param phone_number [String]
2401
+ # Get phone summary
2402
+ # Get overview of assigned phones
979
2403
  # @param [Hash] opts the optional parameters
980
- # @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
981
- def get_phone_number_by_phone_number_with_http_info(phone_number, opts = {})
2404
+ # @return [Array<(PhoneSummaryDto, Integer, Hash)>] PhoneSummaryDto data, response status code and response headers
2405
+ def get_phone_summary_with_http_info(opts = {})
982
2406
  if @api_client.config.debugging
983
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_number_by_phone_number ...'
984
- end
985
- # verify the required parameter 'phone_number' is set
986
- if @api_client.config.client_side_validation && phone_number.nil?
987
- fail ArgumentError, "Missing the required parameter 'phone_number' when calling PhoneControllerApi.get_phone_number_by_phone_number"
2407
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_summary ...'
988
2408
  end
989
2409
  # resource path
990
- local_var_path = '/phone/numbers/by-phone-number'
2410
+ local_var_path = '/phone/summary'
991
2411
 
992
2412
  # query parameters
993
2413
  query_params = opts[:query_params] || {}
994
- query_params[:'phoneNumber'] = phone_number
995
2414
 
996
2415
  # header parameters
997
2416
  header_params = opts[:header_params] || {}
@@ -1005,7 +2424,7 @@ module MailSlurpClient
1005
2424
  post_body = opts[:body]
1006
2425
 
1007
2426
  # return_type
1008
- return_type = opts[:return_type] || 'PhoneNumberDto'
2427
+ return_type = opts[:return_type] || 'PhoneSummaryDto'
1009
2428
 
1010
2429
  # auth_names
1011
2430
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -1021,39 +2440,36 @@ module MailSlurpClient
1021
2440
 
1022
2441
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1023
2442
  if @api_client.config.debugging
1024
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_number_by_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2443
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1025
2444
  end
1026
2445
  return data, status_code, headers
1027
2446
  end
1028
2447
 
1029
- # Get phone number release
1030
- # Get a released or deleted phone numbers
1031
- # @param release_id [String]
2448
+ # Get phone tags
2449
+ # List all unique tags used by your phone numbers
1032
2450
  # @param [Hash] opts the optional parameters
1033
- # @return [PhoneNumberReleaseProjection]
1034
- def get_phone_number_release(release_id, opts = {})
1035
- data, _status_code, _headers = get_phone_number_release_with_http_info(release_id, opts)
2451
+ # @option opts [String] :search Optional search filter
2452
+ # @return [Array<String>]
2453
+ def get_phone_tags(opts = {})
2454
+ data, _status_code, _headers = get_phone_tags_with_http_info(opts)
1036
2455
  data
1037
2456
  end
1038
2457
 
1039
- # Get phone number release
1040
- # Get a released or deleted phone numbers
1041
- # @param release_id [String]
2458
+ # Get phone tags
2459
+ # List all unique tags used by your phone numbers
1042
2460
  # @param [Hash] opts the optional parameters
1043
- # @return [Array<(PhoneNumberReleaseProjection, Integer, Hash)>] PhoneNumberReleaseProjection data, response status code and response headers
1044
- def get_phone_number_release_with_http_info(release_id, opts = {})
2461
+ # @option opts [String] :search Optional search filter
2462
+ # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
2463
+ def get_phone_tags_with_http_info(opts = {})
1045
2464
  if @api_client.config.debugging
1046
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_number_release ...'
1047
- end
1048
- # verify the required parameter 'release_id' is set
1049
- if @api_client.config.client_side_validation && release_id.nil?
1050
- fail ArgumentError, "Missing the required parameter 'release_id' when calling PhoneControllerApi.get_phone_number_release"
2465
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_tags ...'
1051
2466
  end
1052
2467
  # resource path
1053
- local_var_path = '/phone/releases/{releaseId}'.sub('{' + 'releaseId' + '}', CGI.escape(release_id.to_s))
2468
+ local_var_path = '/phone/tags'
1054
2469
 
1055
2470
  # query parameters
1056
2471
  query_params = opts[:query_params] || {}
2472
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
1057
2473
 
1058
2474
  # header parameters
1059
2475
  header_params = opts[:header_params] || {}
@@ -1067,7 +2483,7 @@ module MailSlurpClient
1067
2483
  post_body = opts[:body]
1068
2484
 
1069
2485
  # return_type
1070
- return_type = opts[:return_type] || 'PhoneNumberReleaseProjection'
2486
+ return_type = opts[:return_type] || 'Array<String>'
1071
2487
 
1072
2488
  # auth_names
1073
2489
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -1083,68 +2499,65 @@ module MailSlurpClient
1083
2499
 
1084
2500
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1085
2501
  if @api_client.config.debugging
1086
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_number_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2502
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1087
2503
  end
1088
2504
  return data, status_code, headers
1089
2505
  end
1090
2506
 
1091
- # Get phone numbers
1092
- # List phone numbers for account
2507
+ # List sent TXT messages for a phone number
2508
+ # Get sent SMS messages for a phone number
2509
+ # @param phone_number_id [String]
1093
2510
  # @param [Hash] opts the optional parameters
1094
- # @option opts [String] :phone_country Optional phone country
1095
- # @option opts [Integer] :page Optional page index for list pagination (default to 0)
1096
- # @option opts [Integer] :size Optional page size for list pagination (default to 20)
2511
+ # @option opts [Integer] :page Optional page index in SMS list pagination (default to 0)
2512
+ # @option opts [Integer] :size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (default to 20)
1097
2513
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
1098
- # @option opts [DateTime] :since Filter by created at after the given timestamp
1099
- # @option opts [DateTime] :before Filter by created at before the given timestamp
2514
+ # @option opts [DateTime] :since Optional filter SMSs received after given date time
2515
+ # @option opts [DateTime] :before Optional filter SMSs received before given date time
1100
2516
  # @option opts [String] :search Optional search filter
1101
- # @option opts [Array<String>] :include Optional phoneIds to include in result
1102
- # @option opts [Boolean] :favourite Optionally filter results for favourites only (default to false)
1103
- # @return [PagePhoneNumberProjection]
1104
- def get_phone_numbers(opts = {})
1105
- data, _status_code, _headers = get_phone_numbers_with_http_info(opts)
2517
+ # @return [PageSentSmsProjection]
2518
+ def get_sent_sms_by_phone_number(phone_number_id, opts = {})
2519
+ data, _status_code, _headers = get_sent_sms_by_phone_number_with_http_info(phone_number_id, opts)
1106
2520
  data
1107
2521
  end
1108
2522
 
1109
- # Get phone numbers
1110
- # List phone numbers for account
2523
+ # List sent TXT messages for a phone number
2524
+ # Get sent SMS messages for a phone number
2525
+ # @param phone_number_id [String]
1111
2526
  # @param [Hash] opts the optional parameters
1112
- # @option opts [String] :phone_country Optional phone country
1113
- # @option opts [Integer] :page Optional page index for list pagination
1114
- # @option opts [Integer] :size Optional page size for list pagination
2527
+ # @option opts [Integer] :page Optional page index in SMS list pagination
2528
+ # @option opts [Integer] :size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results
1115
2529
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
1116
- # @option opts [DateTime] :since Filter by created at after the given timestamp
1117
- # @option opts [DateTime] :before Filter by created at before the given timestamp
2530
+ # @option opts [DateTime] :since Optional filter SMSs received after given date time
2531
+ # @option opts [DateTime] :before Optional filter SMSs received before given date time
1118
2532
  # @option opts [String] :search Optional search filter
1119
- # @option opts [Array<String>] :include Optional phoneIds to include in result
1120
- # @option opts [Boolean] :favourite Optionally filter results for favourites only
1121
- # @return [Array<(PagePhoneNumberProjection, Integer, Hash)>] PagePhoneNumberProjection data, response status code and response headers
1122
- def get_phone_numbers_with_http_info(opts = {})
2533
+ # @return [Array<(PageSentSmsProjection, Integer, Hash)>] PageSentSmsProjection data, response status code and response headers
2534
+ def get_sent_sms_by_phone_number_with_http_info(phone_number_id, opts = {})
1123
2535
  if @api_client.config.debugging
1124
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_numbers ...'
2536
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_sent_sms_by_phone_number ...'
1125
2537
  end
1126
- allowable_values = ["US", "GB", "AU", "CA", "EE", "HK", "PL", "PT", "NL", "IL", "FI", "SE"]
1127
- if @api_client.config.client_side_validation && opts[:'phone_country'] && !allowable_values.include?(opts[:'phone_country'])
1128
- fail ArgumentError, "invalid value for \"phone_country\", must be one of #{allowable_values}"
2538
+ # verify the required parameter 'phone_number_id' is set
2539
+ if @api_client.config.client_side_validation && phone_number_id.nil?
2540
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.get_sent_sms_by_phone_number"
1129
2541
  end
2542
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
2543
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling PhoneControllerApi.get_sent_sms_by_phone_number, must be smaller than or equal to 100.'
2544
+ end
2545
+
1130
2546
  allowable_values = ["ASC", "DESC"]
1131
2547
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1132
2548
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1133
2549
  end
1134
2550
  # resource path
1135
- local_var_path = '/phone/numbers'
2551
+ local_var_path = '/phone/numbers/{phoneNumberId}/sms-sent'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
1136
2552
 
1137
2553
  # query parameters
1138
2554
  query_params = opts[:query_params] || {}
1139
- query_params[:'phoneCountry'] = opts[:'phone_country'] if !opts[:'phone_country'].nil?
1140
2555
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1141
2556
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1142
2557
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1143
2558
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
1144
2559
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
1145
2560
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
1146
- query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if !opts[:'include'].nil?
1147
- query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
1148
2561
 
1149
2562
  # header parameters
1150
2563
  header_params = opts[:header_params] || {}
@@ -1158,7 +2571,7 @@ module MailSlurpClient
1158
2571
  post_body = opts[:body]
1159
2572
 
1160
2573
  # return_type
1161
- return_type = opts[:return_type] || 'PagePhoneNumberProjection'
2574
+ return_type = opts[:return_type] || 'PageSentSmsProjection'
1162
2575
 
1163
2576
  # auth_names
1164
2577
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -1174,33 +2587,71 @@ module MailSlurpClient
1174
2587
 
1175
2588
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1176
2589
  if @api_client.config.debugging
1177
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_numbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2590
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_sent_sms_by_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1178
2591
  end
1179
2592
  return data, status_code, headers
1180
2593
  end
1181
2594
 
1182
- # Get phone plans
1183
- # Get phone number plans
2595
+ # List SMS messages for a phone number
2596
+ # Get SMS messages for a phone number
2597
+ # @param phone_number_id [String]
1184
2598
  # @param [Hash] opts the optional parameters
1185
- # @return [Array<PhonePlanDto>]
1186
- def get_phone_plans(opts = {})
1187
- data, _status_code, _headers = get_phone_plans_with_http_info(opts)
2599
+ # @option opts [Integer] :page Optional page index in SMS list pagination (default to 0)
2600
+ # @option opts [Integer] :size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (default to 20)
2601
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
2602
+ # @option opts [Boolean] :unread_only Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (default to false)
2603
+ # @option opts [DateTime] :since Optional filter SMSs received after given date time
2604
+ # @option opts [DateTime] :before Optional filter SMSs received before given date time
2605
+ # @option opts [String] :search Optional search filter
2606
+ # @option opts [Boolean] :favourite Optionally filter results for favourites only (default to false)
2607
+ # @return [PageSmsProjection]
2608
+ def get_sms_by_phone_number(phone_number_id, opts = {})
2609
+ data, _status_code, _headers = get_sms_by_phone_number_with_http_info(phone_number_id, opts)
1188
2610
  data
1189
2611
  end
1190
2612
 
1191
- # Get phone plans
1192
- # Get phone number plans
2613
+ # List SMS messages for a phone number
2614
+ # Get SMS messages for a phone number
2615
+ # @param phone_number_id [String]
1193
2616
  # @param [Hash] opts the optional parameters
1194
- # @return [Array<(Array<PhonePlanDto>, Integer, Hash)>] Array<PhonePlanDto> data, response status code and response headers
1195
- def get_phone_plans_with_http_info(opts = {})
2617
+ # @option opts [Integer] :page Optional page index in SMS list pagination
2618
+ # @option opts [Integer] :size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results
2619
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
2620
+ # @option opts [Boolean] :unread_only Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly
2621
+ # @option opts [DateTime] :since Optional filter SMSs received after given date time
2622
+ # @option opts [DateTime] :before Optional filter SMSs received before given date time
2623
+ # @option opts [String] :search Optional search filter
2624
+ # @option opts [Boolean] :favourite Optionally filter results for favourites only
2625
+ # @return [Array<(PageSmsProjection, Integer, Hash)>] PageSmsProjection data, response status code and response headers
2626
+ def get_sms_by_phone_number_with_http_info(phone_number_id, opts = {})
1196
2627
  if @api_client.config.debugging
1197
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_plans ...'
2628
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_sms_by_phone_number ...'
2629
+ end
2630
+ # verify the required parameter 'phone_number_id' is set
2631
+ if @api_client.config.client_side_validation && phone_number_id.nil?
2632
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.get_sms_by_phone_number"
2633
+ end
2634
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
2635
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling PhoneControllerApi.get_sms_by_phone_number, must be smaller than or equal to 100.'
2636
+ end
2637
+
2638
+ allowable_values = ["ASC", "DESC"]
2639
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
2640
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1198
2641
  end
1199
2642
  # resource path
1200
- local_var_path = '/phone/plans'
2643
+ local_var_path = '/phone/numbers/{phoneNumberId}/sms'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
1201
2644
 
1202
2645
  # query parameters
1203
2646
  query_params = opts[:query_params] || {}
2647
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2648
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
2649
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
2650
+ query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
2651
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
2652
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
2653
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
2654
+ query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
1204
2655
 
1205
2656
  # header parameters
1206
2657
  header_params = opts[:header_params] || {}
@@ -1214,7 +2665,7 @@ module MailSlurpClient
1214
2665
  post_body = opts[:body]
1215
2666
 
1216
2667
  # return_type
1217
- return_type = opts[:return_type] || 'Array<PhonePlanDto>'
2668
+ return_type = opts[:return_type] || 'PageSmsProjection'
1218
2669
 
1219
2670
  # auth_names
1220
2671
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -1230,28 +2681,36 @@ module MailSlurpClient
1230
2681
 
1231
2682
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1232
2683
  if @api_client.config.debugging
1233
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2684
+ @api_client.config.logger.debug "API called: PhoneControllerApi#get_sms_by_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1234
2685
  end
1235
2686
  return data, status_code, headers
1236
2687
  end
1237
2688
 
1238
- # Get phone plans availability
2689
+ # Reassign phone number release
2690
+ # Reassign phone number that was released or deleted
2691
+ # @param release_id [String]
1239
2692
  # @param [Hash] opts the optional parameters
1240
- # @return [PhonePlanAvailability]
1241
- def get_phone_plans_availability(opts = {})
1242
- data, _status_code, _headers = get_phone_plans_availability_with_http_info(opts)
2693
+ # @return [PhoneNumberDto]
2694
+ def reassign_phone_number_release(release_id, opts = {})
2695
+ data, _status_code, _headers = reassign_phone_number_release_with_http_info(release_id, opts)
1243
2696
  data
1244
2697
  end
1245
2698
 
1246
- # Get phone plans availability
2699
+ # Reassign phone number release
2700
+ # Reassign phone number that was released or deleted
2701
+ # @param release_id [String]
1247
2702
  # @param [Hash] opts the optional parameters
1248
- # @return [Array<(PhonePlanAvailability, Integer, Hash)>] PhonePlanAvailability data, response status code and response headers
1249
- def get_phone_plans_availability_with_http_info(opts = {})
2703
+ # @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
2704
+ def reassign_phone_number_release_with_http_info(release_id, opts = {})
1250
2705
  if @api_client.config.debugging
1251
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_plans_availability ...'
2706
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.reassign_phone_number_release ...'
2707
+ end
2708
+ # verify the required parameter 'release_id' is set
2709
+ if @api_client.config.client_side_validation && release_id.nil?
2710
+ fail ArgumentError, "Missing the required parameter 'release_id' when calling PhoneControllerApi.reassign_phone_number_release"
1252
2711
  end
1253
2712
  # resource path
1254
- local_var_path = '/phone/plans/availability'
2713
+ local_var_path = '/phone/releases/{releaseId}/reassign'.sub('{' + 'releaseId' + '}', CGI.escape(release_id.to_s))
1255
2714
 
1256
2715
  # query parameters
1257
2716
  query_params = opts[:query_params] || {}
@@ -1268,7 +2727,7 @@ module MailSlurpClient
1268
2727
  post_body = opts[:body]
1269
2728
 
1270
2729
  # return_type
1271
- return_type = opts[:return_type] || 'PhonePlanAvailability'
2730
+ return_type = opts[:return_type] || 'PhoneNumberDto'
1272
2731
 
1273
2732
  # auth_names
1274
2733
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -1284,38 +2743,48 @@ module MailSlurpClient
1284
2743
 
1285
2744
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1286
2745
  if @api_client.config.debugging
1287
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_plans_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2746
+ @api_client.config.logger.debug "API called: PhoneControllerApi#reassign_phone_number_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1288
2747
  end
1289
2748
  return data, status_code, headers
1290
2749
  end
1291
2750
 
1292
- # Get phone summary
1293
- # Get overview of assigned phones
2751
+ # Release phone pool lease
2752
+ # Release an active phone pool lease
2753
+ # @param pool_id [String]
2754
+ # @param lease_id [String]
1294
2755
  # @param [Hash] opts the optional parameters
1295
- # @return [PhoneSummaryDto]
1296
- def get_phone_summary(opts = {})
1297
- data, _status_code, _headers = get_phone_summary_with_http_info(opts)
1298
- data
2756
+ # @return [nil]
2757
+ def release_phone_pool_lease(pool_id, lease_id, opts = {})
2758
+ release_phone_pool_lease_with_http_info(pool_id, lease_id, opts)
2759
+ nil
1299
2760
  end
1300
2761
 
1301
- # Get phone summary
1302
- # Get overview of assigned phones
2762
+ # Release phone pool lease
2763
+ # Release an active phone pool lease
2764
+ # @param pool_id [String]
2765
+ # @param lease_id [String]
1303
2766
  # @param [Hash] opts the optional parameters
1304
- # @return [Array<(PhoneSummaryDto, Integer, Hash)>] PhoneSummaryDto data, response status code and response headers
1305
- def get_phone_summary_with_http_info(opts = {})
2767
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2768
+ def release_phone_pool_lease_with_http_info(pool_id, lease_id, opts = {})
1306
2769
  if @api_client.config.debugging
1307
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_summary ...'
2770
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.release_phone_pool_lease ...'
2771
+ end
2772
+ # verify the required parameter 'pool_id' is set
2773
+ if @api_client.config.client_side_validation && pool_id.nil?
2774
+ fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.release_phone_pool_lease"
2775
+ end
2776
+ # verify the required parameter 'lease_id' is set
2777
+ if @api_client.config.client_side_validation && lease_id.nil?
2778
+ fail ArgumentError, "Missing the required parameter 'lease_id' when calling PhoneControllerApi.release_phone_pool_lease"
1308
2779
  end
1309
2780
  # resource path
1310
- local_var_path = '/phone/summary'
2781
+ local_var_path = '/phone/pools/{poolId}/leases/{leaseId}'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s)).sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))
1311
2782
 
1312
2783
  # query parameters
1313
2784
  query_params = opts[:query_params] || {}
1314
2785
 
1315
2786
  # header parameters
1316
2787
  header_params = opts[:header_params] || {}
1317
- # HTTP header 'Accept' (if needed)
1318
- header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1319
2788
 
1320
2789
  # form parameters
1321
2790
  form_params = opts[:form_params] || {}
@@ -1324,7 +2793,7 @@ module MailSlurpClient
1324
2793
  post_body = opts[:body]
1325
2794
 
1326
2795
  # return_type
1327
- return_type = opts[:return_type] || 'PhoneSummaryDto'
2796
+ return_type = opts[:return_type]
1328
2797
 
1329
2798
  # auth_names
1330
2799
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -1338,72 +2807,50 @@ module MailSlurpClient
1338
2807
  :return_type => return_type
1339
2808
  )
1340
2809
 
1341
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2810
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1342
2811
  if @api_client.config.debugging
1343
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2812
+ @api_client.config.logger.debug "API called: PhoneControllerApi#release_phone_pool_lease\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1344
2813
  end
1345
2814
  return data, status_code, headers
1346
2815
  end
1347
2816
 
1348
- # List sent TXT messages for a phone number
1349
- # Get sent SMS messages for a phone number
2817
+ # Remove phone number from phone pool
2818
+ # Remove a phone number from a pool. If the number is leased from this pool the lease is released.
2819
+ # @param pool_id [String]
1350
2820
  # @param phone_number_id [String]
1351
2821
  # @param [Hash] opts the optional parameters
1352
- # @option opts [Integer] :page Optional page index in SMS list pagination (default to 0)
1353
- # @option opts [Integer] :size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (default to 20)
1354
- # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
1355
- # @option opts [DateTime] :since Optional filter SMSs received after given date time
1356
- # @option opts [DateTime] :before Optional filter SMSs received before given date time
1357
- # @option opts [String] :search Optional search filter
1358
- # @return [PageSentSmsProjection]
1359
- def get_sent_sms_by_phone_number(phone_number_id, opts = {})
1360
- data, _status_code, _headers = get_sent_sms_by_phone_number_with_http_info(phone_number_id, opts)
1361
- data
2822
+ # @return [nil]
2823
+ def remove_phone_number_from_phone_pool(pool_id, phone_number_id, opts = {})
2824
+ remove_phone_number_from_phone_pool_with_http_info(pool_id, phone_number_id, opts)
2825
+ nil
1362
2826
  end
1363
2827
 
1364
- # List sent TXT messages for a phone number
1365
- # Get sent SMS messages for a phone number
2828
+ # Remove phone number from phone pool
2829
+ # Remove a phone number from a pool. If the number is leased from this pool the lease is released.
2830
+ # @param pool_id [String]
1366
2831
  # @param phone_number_id [String]
1367
2832
  # @param [Hash] opts the optional parameters
1368
- # @option opts [Integer] :page Optional page index in SMS list pagination
1369
- # @option opts [Integer] :size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results
1370
- # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
1371
- # @option opts [DateTime] :since Optional filter SMSs received after given date time
1372
- # @option opts [DateTime] :before Optional filter SMSs received before given date time
1373
- # @option opts [String] :search Optional search filter
1374
- # @return [Array<(PageSentSmsProjection, Integer, Hash)>] PageSentSmsProjection data, response status code and response headers
1375
- def get_sent_sms_by_phone_number_with_http_info(phone_number_id, opts = {})
2833
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2834
+ def remove_phone_number_from_phone_pool_with_http_info(pool_id, phone_number_id, opts = {})
1376
2835
  if @api_client.config.debugging
1377
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_sent_sms_by_phone_number ...'
2836
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.remove_phone_number_from_phone_pool ...'
2837
+ end
2838
+ # verify the required parameter 'pool_id' is set
2839
+ if @api_client.config.client_side_validation && pool_id.nil?
2840
+ fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.remove_phone_number_from_phone_pool"
1378
2841
  end
1379
2842
  # verify the required parameter 'phone_number_id' is set
1380
2843
  if @api_client.config.client_side_validation && phone_number_id.nil?
1381
- fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.get_sent_sms_by_phone_number"
1382
- end
1383
- if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
1384
- fail ArgumentError, 'invalid value for "opts[:"size"]" when calling PhoneControllerApi.get_sent_sms_by_phone_number, must be smaller than or equal to 100.'
1385
- end
1386
-
1387
- allowable_values = ["ASC", "DESC"]
1388
- if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1389
- fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
2844
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.remove_phone_number_from_phone_pool"
1390
2845
  end
1391
2846
  # resource path
1392
- local_var_path = '/phone/numbers/{phoneNumberId}/sms-sent'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
2847
+ local_var_path = '/phone/pools/{poolId}/numbers/{phoneNumberId}'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s)).sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
1393
2848
 
1394
2849
  # query parameters
1395
2850
  query_params = opts[:query_params] || {}
1396
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1397
- query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1398
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1399
- query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
1400
- query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
1401
- query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
1402
2851
 
1403
2852
  # header parameters
1404
2853
  header_params = opts[:header_params] || {}
1405
- # HTTP header 'Accept' (if needed)
1406
- header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1407
2854
 
1408
2855
  # form parameters
1409
2856
  form_params = opts[:form_params] || {}
@@ -1412,7 +2859,7 @@ module MailSlurpClient
1412
2859
  post_body = opts[:body]
1413
2860
 
1414
2861
  # return_type
1415
- return_type = opts[:return_type] || 'PageSentSmsProjection'
2862
+ return_type = opts[:return_type]
1416
2863
 
1417
2864
  # auth_names
1418
2865
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -1426,87 +2873,63 @@ module MailSlurpClient
1426
2873
  :return_type => return_type
1427
2874
  )
1428
2875
 
1429
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2876
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1430
2877
  if @api_client.config.debugging
1431
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_sent_sms_by_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2878
+ @api_client.config.logger.debug "API called: PhoneControllerApi#remove_phone_number_from_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1432
2879
  end
1433
2880
  return data, status_code, headers
1434
2881
  end
1435
2882
 
1436
- # List SMS messages for a phone number
1437
- # Get SMS messages for a phone number
2883
+ # Remove phone number tags
2884
+ # Remove one or more tags from a phone number
1438
2885
  # @param phone_number_id [String]
2886
+ # @param phone_number_tags_options [PhoneNumberTagsOptions]
1439
2887
  # @param [Hash] opts the optional parameters
1440
- # @option opts [Integer] :page Optional page index in SMS list pagination (default to 0)
1441
- # @option opts [Integer] :size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (default to 20)
1442
- # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
1443
- # @option opts [Boolean] :unread_only Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (default to false)
1444
- # @option opts [DateTime] :since Optional filter SMSs received after given date time
1445
- # @option opts [DateTime] :before Optional filter SMSs received before given date time
1446
- # @option opts [String] :search Optional search filter
1447
- # @option opts [Boolean] :favourite Optionally filter results for favourites only (default to false)
1448
- # @return [PageSmsProjection]
1449
- def get_sms_by_phone_number(phone_number_id, opts = {})
1450
- data, _status_code, _headers = get_sms_by_phone_number_with_http_info(phone_number_id, opts)
2888
+ # @return [PhoneNumberDto]
2889
+ def remove_phone_number_tags(phone_number_id, phone_number_tags_options, opts = {})
2890
+ data, _status_code, _headers = remove_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, opts)
1451
2891
  data
1452
2892
  end
1453
2893
 
1454
- # List SMS messages for a phone number
1455
- # Get SMS messages for a phone number
2894
+ # Remove phone number tags
2895
+ # Remove one or more tags from a phone number
1456
2896
  # @param phone_number_id [String]
2897
+ # @param phone_number_tags_options [PhoneNumberTagsOptions]
1457
2898
  # @param [Hash] opts the optional parameters
1458
- # @option opts [Integer] :page Optional page index in SMS list pagination
1459
- # @option opts [Integer] :size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results
1460
- # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
1461
- # @option opts [Boolean] :unread_only Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly
1462
- # @option opts [DateTime] :since Optional filter SMSs received after given date time
1463
- # @option opts [DateTime] :before Optional filter SMSs received before given date time
1464
- # @option opts [String] :search Optional search filter
1465
- # @option opts [Boolean] :favourite Optionally filter results for favourites only
1466
- # @return [Array<(PageSmsProjection, Integer, Hash)>] PageSmsProjection data, response status code and response headers
1467
- def get_sms_by_phone_number_with_http_info(phone_number_id, opts = {})
2899
+ # @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
2900
+ def remove_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, opts = {})
1468
2901
  if @api_client.config.debugging
1469
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_sms_by_phone_number ...'
2902
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.remove_phone_number_tags ...'
1470
2903
  end
1471
2904
  # verify the required parameter 'phone_number_id' is set
1472
2905
  if @api_client.config.client_side_validation && phone_number_id.nil?
1473
- fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.get_sms_by_phone_number"
1474
- end
1475
- if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
1476
- fail ArgumentError, 'invalid value for "opts[:"size"]" when calling PhoneControllerApi.get_sms_by_phone_number, must be smaller than or equal to 100.'
2906
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.remove_phone_number_tags"
1477
2907
  end
1478
-
1479
- allowable_values = ["ASC", "DESC"]
1480
- if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1481
- fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
2908
+ # verify the required parameter 'phone_number_tags_options' is set
2909
+ if @api_client.config.client_side_validation && phone_number_tags_options.nil?
2910
+ fail ArgumentError, "Missing the required parameter 'phone_number_tags_options' when calling PhoneControllerApi.remove_phone_number_tags"
1482
2911
  end
1483
2912
  # resource path
1484
- local_var_path = '/phone/numbers/{phoneNumberId}/sms'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
2913
+ local_var_path = '/phone/numbers/{phoneNumberId}/tags'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
1485
2914
 
1486
2915
  # query parameters
1487
2916
  query_params = opts[:query_params] || {}
1488
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1489
- query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1490
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1491
- query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
1492
- query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
1493
- query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
1494
- query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
1495
- query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
1496
2917
 
1497
2918
  # header parameters
1498
2919
  header_params = opts[:header_params] || {}
1499
2920
  # HTTP header 'Accept' (if needed)
1500
2921
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
2922
+ # HTTP header 'Content-Type'
2923
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1501
2924
 
1502
2925
  # form parameters
1503
2926
  form_params = opts[:form_params] || {}
1504
2927
 
1505
2928
  # http body (model)
1506
- post_body = opts[:body]
2929
+ post_body = opts[:body] || @api_client.object_to_http_body(phone_number_tags_options)
1507
2930
 
1508
2931
  # return_type
1509
- return_type = opts[:return_type] || 'PageSmsProjection'
2932
+ return_type = opts[:return_type] || 'PhoneNumberDto'
1510
2933
 
1511
2934
  # auth_names
1512
2935
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -1520,38 +2943,38 @@ module MailSlurpClient
1520
2943
  :return_type => return_type
1521
2944
  )
1522
2945
 
1523
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2946
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1524
2947
  if @api_client.config.debugging
1525
- @api_client.config.logger.debug "API called: PhoneControllerApi#get_sms_by_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2948
+ @api_client.config.logger.debug "API called: PhoneControllerApi#remove_phone_number_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1526
2949
  end
1527
2950
  return data, status_code, headers
1528
2951
  end
1529
2952
 
1530
- # Reassign phone number release
1531
- # Reassign phone number that was released or deleted
1532
- # @param release_id [String]
2953
+ # Search available phone numbers
2954
+ # Search available numbers for advanced provisioning
2955
+ # @param search_available_phone_numbers_options [SearchAvailablePhoneNumbersOptions]
1533
2956
  # @param [Hash] opts the optional parameters
1534
- # @return [PhoneNumberDto]
1535
- def reassign_phone_number_release(release_id, opts = {})
1536
- data, _status_code, _headers = reassign_phone_number_release_with_http_info(release_id, opts)
2957
+ # @return [AvailablePhoneNumbersResult]
2958
+ def search_available_phone_numbers(search_available_phone_numbers_options, opts = {})
2959
+ data, _status_code, _headers = search_available_phone_numbers_with_http_info(search_available_phone_numbers_options, opts)
1537
2960
  data
1538
2961
  end
1539
2962
 
1540
- # Reassign phone number release
1541
- # Reassign phone number that was released or deleted
1542
- # @param release_id [String]
2963
+ # Search available phone numbers
2964
+ # Search available numbers for advanced provisioning
2965
+ # @param search_available_phone_numbers_options [SearchAvailablePhoneNumbersOptions]
1543
2966
  # @param [Hash] opts the optional parameters
1544
- # @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
1545
- def reassign_phone_number_release_with_http_info(release_id, opts = {})
2967
+ # @return [Array<(AvailablePhoneNumbersResult, Integer, Hash)>] AvailablePhoneNumbersResult data, response status code and response headers
2968
+ def search_available_phone_numbers_with_http_info(search_available_phone_numbers_options, opts = {})
1546
2969
  if @api_client.config.debugging
1547
- @api_client.config.logger.debug 'Calling API: PhoneControllerApi.reassign_phone_number_release ...'
2970
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.search_available_phone_numbers ...'
1548
2971
  end
1549
- # verify the required parameter 'release_id' is set
1550
- if @api_client.config.client_side_validation && release_id.nil?
1551
- fail ArgumentError, "Missing the required parameter 'release_id' when calling PhoneControllerApi.reassign_phone_number_release"
2972
+ # verify the required parameter 'search_available_phone_numbers_options' is set
2973
+ if @api_client.config.client_side_validation && search_available_phone_numbers_options.nil?
2974
+ fail ArgumentError, "Missing the required parameter 'search_available_phone_numbers_options' when calling PhoneControllerApi.search_available_phone_numbers"
1552
2975
  end
1553
2976
  # resource path
1554
- local_var_path = '/phone/releases/{releaseId}/reassign'.sub('{' + 'releaseId' + '}', CGI.escape(release_id.to_s))
2977
+ local_var_path = '/phone/provisioning/search'
1555
2978
 
1556
2979
  # query parameters
1557
2980
  query_params = opts[:query_params] || {}
@@ -1560,15 +2983,17 @@ module MailSlurpClient
1560
2983
  header_params = opts[:header_params] || {}
1561
2984
  # HTTP header 'Accept' (if needed)
1562
2985
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
2986
+ # HTTP header 'Content-Type'
2987
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1563
2988
 
1564
2989
  # form parameters
1565
2990
  form_params = opts[:form_params] || {}
1566
2991
 
1567
2992
  # http body (model)
1568
- post_body = opts[:body]
2993
+ post_body = opts[:body] || @api_client.object_to_http_body(search_available_phone_numbers_options)
1569
2994
 
1570
2995
  # return_type
1571
- return_type = opts[:return_type] || 'PhoneNumberDto'
2996
+ return_type = opts[:return_type] || 'AvailablePhoneNumbersResult'
1572
2997
 
1573
2998
  # auth_names
1574
2999
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -1582,9 +3007,9 @@ module MailSlurpClient
1582
3007
  :return_type => return_type
1583
3008
  )
1584
3009
 
1585
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3010
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1586
3011
  if @api_client.config.debugging
1587
- @api_client.config.logger.debug "API called: PhoneControllerApi#reassign_phone_number_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3012
+ @api_client.config.logger.debug "API called: PhoneControllerApi#search_available_phone_numbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1588
3013
  end
1589
3014
  return data, status_code, headers
1590
3015
  end
@@ -1792,6 +3217,76 @@ module MailSlurpClient
1792
3217
  return data, status_code, headers
1793
3218
  end
1794
3219
 
3220
+ # Set phone number tags
3221
+ # Replace all tags on a phone number
3222
+ # @param phone_number_id [String]
3223
+ # @param phone_number_tags_options [PhoneNumberTagsOptions]
3224
+ # @param [Hash] opts the optional parameters
3225
+ # @return [PhoneNumberDto]
3226
+ def set_phone_number_tags(phone_number_id, phone_number_tags_options, opts = {})
3227
+ data, _status_code, _headers = set_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, opts)
3228
+ data
3229
+ end
3230
+
3231
+ # Set phone number tags
3232
+ # Replace all tags on a phone number
3233
+ # @param phone_number_id [String]
3234
+ # @param phone_number_tags_options [PhoneNumberTagsOptions]
3235
+ # @param [Hash] opts the optional parameters
3236
+ # @return [Array<(PhoneNumberDto, Integer, Hash)>] PhoneNumberDto data, response status code and response headers
3237
+ def set_phone_number_tags_with_http_info(phone_number_id, phone_number_tags_options, opts = {})
3238
+ if @api_client.config.debugging
3239
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.set_phone_number_tags ...'
3240
+ end
3241
+ # verify the required parameter 'phone_number_id' is set
3242
+ if @api_client.config.client_side_validation && phone_number_id.nil?
3243
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.set_phone_number_tags"
3244
+ end
3245
+ # verify the required parameter 'phone_number_tags_options' is set
3246
+ if @api_client.config.client_side_validation && phone_number_tags_options.nil?
3247
+ fail ArgumentError, "Missing the required parameter 'phone_number_tags_options' when calling PhoneControllerApi.set_phone_number_tags"
3248
+ end
3249
+ # resource path
3250
+ local_var_path = '/phone/numbers/{phoneNumberId}/tags'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
3251
+
3252
+ # query parameters
3253
+ query_params = opts[:query_params] || {}
3254
+
3255
+ # header parameters
3256
+ header_params = opts[:header_params] || {}
3257
+ # HTTP header 'Accept' (if needed)
3258
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
3259
+ # HTTP header 'Content-Type'
3260
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
3261
+
3262
+ # form parameters
3263
+ form_params = opts[:form_params] || {}
3264
+
3265
+ # http body (model)
3266
+ post_body = opts[:body] || @api_client.object_to_http_body(phone_number_tags_options)
3267
+
3268
+ # return_type
3269
+ return_type = opts[:return_type] || 'PhoneNumberDto'
3270
+
3271
+ # auth_names
3272
+ auth_names = opts[:auth_names] || ['API_KEY']
3273
+
3274
+ new_options = opts.merge(
3275
+ :header_params => header_params,
3276
+ :query_params => query_params,
3277
+ :form_params => form_params,
3278
+ :body => post_body,
3279
+ :auth_names => auth_names,
3280
+ :return_type => return_type
3281
+ )
3282
+
3283
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3284
+ if @api_client.config.debugging
3285
+ @api_client.config.logger.debug "API called: PhoneControllerApi#set_phone_number_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3286
+ end
3287
+ return data, status_code, headers
3288
+ end
3289
+
1795
3290
  # Test sending an SMS to a number
1796
3291
  # Test a phone number by sending an SMS to it. NOTE this is only for internal use to check that a phone number is working. For end-to-end phone testing see https://docs.mailslurp.com/txt-sms/
1797
3292
  # @param phone_number_id [String]
@@ -1933,6 +3428,76 @@ module MailSlurpClient
1933
3428
  return data, status_code, headers
1934
3429
  end
1935
3430
 
3431
+ # Update phone pool
3432
+ # Update phone pool metadata such as name or description
3433
+ # @param pool_id [String]
3434
+ # @param update_phone_pool_options [UpdatePhonePoolOptions]
3435
+ # @param [Hash] opts the optional parameters
3436
+ # @return [PhonePoolDetailDto]
3437
+ def update_phone_pool(pool_id, update_phone_pool_options, opts = {})
3438
+ data, _status_code, _headers = update_phone_pool_with_http_info(pool_id, update_phone_pool_options, opts)
3439
+ data
3440
+ end
3441
+
3442
+ # Update phone pool
3443
+ # Update phone pool metadata such as name or description
3444
+ # @param pool_id [String]
3445
+ # @param update_phone_pool_options [UpdatePhonePoolOptions]
3446
+ # @param [Hash] opts the optional parameters
3447
+ # @return [Array<(PhonePoolDetailDto, Integer, Hash)>] PhonePoolDetailDto data, response status code and response headers
3448
+ def update_phone_pool_with_http_info(pool_id, update_phone_pool_options, opts = {})
3449
+ if @api_client.config.debugging
3450
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.update_phone_pool ...'
3451
+ end
3452
+ # verify the required parameter 'pool_id' is set
3453
+ if @api_client.config.client_side_validation && pool_id.nil?
3454
+ fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.update_phone_pool"
3455
+ end
3456
+ # verify the required parameter 'update_phone_pool_options' is set
3457
+ if @api_client.config.client_side_validation && update_phone_pool_options.nil?
3458
+ fail ArgumentError, "Missing the required parameter 'update_phone_pool_options' when calling PhoneControllerApi.update_phone_pool"
3459
+ end
3460
+ # resource path
3461
+ local_var_path = '/phone/pools/{poolId}'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s))
3462
+
3463
+ # query parameters
3464
+ query_params = opts[:query_params] || {}
3465
+
3466
+ # header parameters
3467
+ header_params = opts[:header_params] || {}
3468
+ # HTTP header 'Accept' (if needed)
3469
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
3470
+ # HTTP header 'Content-Type'
3471
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
3472
+
3473
+ # form parameters
3474
+ form_params = opts[:form_params] || {}
3475
+
3476
+ # http body (model)
3477
+ post_body = opts[:body] || @api_client.object_to_http_body(update_phone_pool_options)
3478
+
3479
+ # return_type
3480
+ return_type = opts[:return_type] || 'PhonePoolDetailDto'
3481
+
3482
+ # auth_names
3483
+ auth_names = opts[:auth_names] || ['API_KEY']
3484
+
3485
+ new_options = opts.merge(
3486
+ :header_params => header_params,
3487
+ :query_params => query_params,
3488
+ :form_params => form_params,
3489
+ :body => post_body,
3490
+ :auth_names => auth_names,
3491
+ :return_type => return_type
3492
+ )
3493
+
3494
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3495
+ if @api_client.config.debugging
3496
+ @api_client.config.logger.debug "API called: PhoneControllerApi#update_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3497
+ end
3498
+ return data, status_code, headers
3499
+ end
3500
+
1936
3501
  # Verify validity of a phone number
1937
3502
  # Validate a phone number
1938
3503
  # @param validate_phone_number_options [ValidatePhoneNumberOptions]