mailslurp_client 17.2.0 → 17.3.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.
- checksums.yaml +4 -4
- data/lib/mailslurp_client/api/campaign_probe_controller_api.rb +138 -0
- data/lib/mailslurp_client/api/domain_monitor_controller_api.rb +264 -0
- data/lib/mailslurp_client/api/email_audit_controller_api.rb +334 -0
- data/lib/mailslurp_client/api/email_controller_api.rb +124 -0
- data/lib/mailslurp_client/api/inbox_controller_api.rb +4 -4
- data/lib/mailslurp_client/api/phone_controller_api.rb +1312 -81
- data/lib/mailslurp_client/api/sms_controller_api.rb +125 -0
- data/lib/mailslurp_client/api/tools_controller_api.rb +806 -0
- data/lib/mailslurp_client/models/abstract_webhook_payload.rb +15 -15
- data/lib/mailslurp_client/models/acquire_phone_pool_lease_options.rb +233 -0
- data/lib/mailslurp_client/models/add_phone_pool_numbers_options.rb +213 -0
- data/lib/mailslurp_client/models/ai_transform_mapping_projection.rb +27 -27
- data/lib/mailslurp_client/models/ai_transform_projection.rb +28 -28
- data/lib/mailslurp_client/models/alias_projection.rb +45 -45
- data/lib/mailslurp_client/models/alias_thread_projection.rb +42 -42
- data/lib/mailslurp_client/models/analyze_dmarc_report_options.rb +248 -0
- data/lib/mailslurp_client/models/analyze_dmarc_report_results.rb +386 -0
- data/lib/mailslurp_client/models/analyze_email_headers_options.rb +240 -0
- data/lib/mailslurp_client/models/analyze_email_headers_results.rb +275 -0
- data/lib/mailslurp_client/models/attachment_projection.rb +50 -50
- data/lib/mailslurp_client/models/available_phone_number_dto.rb +325 -0
- data/lib/mailslurp_client/models/available_phone_numbers_result.rb +236 -0
- data/lib/mailslurp_client/models/bounce_projection.rb +28 -28
- data/lib/mailslurp_client/models/bounce_recipient_projection.rb +10 -10
- data/lib/mailslurp_client/models/campaign_probe_run_comparison_dto.rb +397 -0
- data/lib/mailslurp_client/models/check_campaign_probe_options.rb +371 -0
- data/lib/mailslurp_client/models/check_campaign_probe_results.rb +482 -0
- data/lib/mailslurp_client/models/check_dns_propagation_options.rb +297 -0
- data/lib/mailslurp_client/models/check_dns_propagation_results.rb +361 -0
- data/lib/mailslurp_client/models/check_domain_monitor_options.rb +243 -0
- data/lib/mailslurp_client/models/check_domain_monitor_results.rb +398 -0
- data/lib/mailslurp_client/models/check_email_audit_options.rb +405 -0
- data/lib/mailslurp_client/models/check_email_auth_stack_options.rb +248 -0
- data/lib/mailslurp_client/models/check_email_auth_stack_results.rb +462 -0
- data/lib/mailslurp_client/models/check_email_blacklist_options.rb +241 -0
- data/lib/mailslurp_client/models/check_email_blacklist_results.rb +366 -0
- data/lib/mailslurp_client/models/connector_event_projection.rb +42 -42
- data/lib/mailslurp_client/models/connector_projection.rb +42 -42
- data/lib/mailslurp_client/models/contact_projection.rb +15 -15
- data/lib/mailslurp_client/models/create_email_audit_options.rb +394 -0
- data/lib/mailslurp_client/models/create_phone_number_options.rb +25 -4
- data/lib/mailslurp_client/models/create_phone_pool_options.rb +220 -0
- data/lib/mailslurp_client/models/create_phone_provisioning_job_item_options.rb +256 -0
- data/lib/mailslurp_client/models/create_phone_provisioning_job_options.rb +284 -0
- data/lib/mailslurp_client/models/dmarc_report_metadata.rb +308 -0
- data/lib/mailslurp_client/models/dmarc_report_source_summary.rb +274 -0
- data/lib/mailslurp_client/models/dns_propagation_resolver_result.rb +252 -0
- data/lib/mailslurp_client/models/domain_monitor_run_comparison_dto.rb +369 -0
- data/lib/mailslurp_client/models/domain_monitor_summary_dto.rb +248 -0
- data/lib/mailslurp_client/models/email_audit_analysis_result.rb +620 -0
- data/lib/mailslurp_client/models/email_audit_comparison_dto.rb +411 -0
- data/lib/mailslurp_client/models/email_audit_dto.rb +308 -0
- data/lib/mailslurp_client/models/email_audit_spelling_issue.rb +276 -0
- data/lib/mailslurp_client/models/email_audit_url_issue.rb +236 -0
- data/lib/mailslurp_client/models/email_blacklist_ip_result.rb +242 -0
- data/lib/mailslurp_client/models/email_blacklist_listing_result.rb +258 -0
- data/lib/mailslurp_client/models/email_header_analysis_summary.rb +242 -0
- data/lib/mailslurp_client/models/email_header_received_hop.rb +242 -0
- data/lib/mailslurp_client/models/email_projection.rb +88 -88
- data/lib/mailslurp_client/models/email_thread_projection.rb +54 -54
- data/lib/mailslurp_client/models/entity_automation_item_projection.rb +33 -33
- data/lib/mailslurp_client/models/entity_event_item_projection.rb +42 -42
- data/lib/mailslurp_client/models/entity_favourite_item_projection.rb +29 -29
- data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +27 -27
- data/lib/mailslurp_client/models/generate_spf_record_options.rb +357 -0
- data/lib/mailslurp_client/models/generate_spf_record_results.rb +318 -0
- data/lib/mailslurp_client/models/get_or_create_phone_pool_options.rb +220 -0
- data/lib/mailslurp_client/models/group_projection.rb +15 -15
- data/lib/mailslurp_client/models/guest_portal_user_projection.rb +47 -47
- data/lib/mailslurp_client/models/imap_email_projection.rb +18 -18
- data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +21 -21
- data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +33 -33
- data/lib/mailslurp_client/models/list_unsubscribe_recipient_projection.rb +19 -19
- data/lib/mailslurp_client/models/lookup_dkim_domain_options.rb +275 -0
- data/lib/mailslurp_client/models/lookup_dkim_domain_results.rb +304 -0
- data/lib/mailslurp_client/models/lookup_ptr_options.rb +241 -0
- data/lib/mailslurp_client/models/lookup_ptr_results.rb +305 -0
- data/lib/mailslurp_client/models/lookup_spf_domain_options.rb +240 -0
- data/lib/mailslurp_client/models/lookup_spf_domain_results.rb +305 -0
- data/lib/mailslurp_client/models/missed_email_projection.rb +28 -28
- data/lib/mailslurp_client/models/missed_sms_projection.rb +32 -32
- data/lib/mailslurp_client/models/opt_in_identity_projection.rb +18 -18
- data/lib/mailslurp_client/models/page_ai_transform_mapping_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_ai_transform_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_alias.rb +19 -19
- data/lib/mailslurp_client/models/page_alias_thread_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_attachment_entity.rb +19 -19
- data/lib/mailslurp_client/models/page_bounced_email.rb +19 -19
- data/lib/mailslurp_client/models/page_bounced_recipients.rb +19 -19
- data/lib/mailslurp_client/models/page_complaint.rb +19 -19
- data/lib/mailslurp_client/models/page_connector.rb +19 -19
- data/lib/mailslurp_client/models/page_connector_events.rb +19 -19
- data/lib/mailslurp_client/models/page_contact_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_delivery_status.rb +19 -19
- data/lib/mailslurp_client/models/page_device_preview_run_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_email_preview.rb +19 -19
- data/lib/mailslurp_client/models/page_email_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_email_thread_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_email_validation_request.rb +19 -19
- data/lib/mailslurp_client/models/page_entity_automation_items.rb +19 -19
- data/lib/mailslurp_client/models/page_entity_event_items.rb +19 -19
- data/lib/mailslurp_client/models/page_entity_favourite_items.rb +19 -19
- data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_group_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_guest_portal_users.rb +19 -19
- data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +19 -19
- data/lib/mailslurp_client/models/page_inbox_forwarder_events.rb +19 -19
- data/lib/mailslurp_client/models/page_inbox_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_inbox_replier_dto.rb +19 -19
- data/lib/mailslurp_client/models/page_inbox_replier_events.rb +19 -19
- data/lib/mailslurp_client/models/page_inbox_tags.rb +19 -19
- data/lib/mailslurp_client/models/page_list_unsubscribe_recipients.rb +19 -19
- data/lib/mailslurp_client/models/page_missed_email_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_missed_sms_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_opt_in_identity_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_phone_message_thread_item_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_phone_message_thread_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_phone_number_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_phone_number_release_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_plus_address_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_reputation_items.rb +19 -19
- data/lib/mailslurp_client/models/page_ruleset_dto.rb +19 -19
- data/lib/mailslurp_client/models/page_scheduled_jobs.rb +19 -19
- data/lib/mailslurp_client/models/page_sent_email_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_sent_sms_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_sms_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_template_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_webhook_endpoint_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_webhook_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_webhook_result.rb +19 -19
- data/lib/mailslurp_client/models/pageable_object.rb +22 -22
- data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +18 -18
- data/lib/mailslurp_client/models/phone_number_dto.rb +49 -4
- data/lib/mailslurp_client/models/phone_number_line_type_intelligence_dto.rb +242 -0
- data/lib/mailslurp_client/models/phone_number_line_type_lookup_dto.rb +286 -0
- data/lib/mailslurp_client/models/phone_number_projection.rb +80 -35
- data/lib/mailslurp_client/models/phone_number_release_projection.rb +39 -39
- data/lib/mailslurp_client/models/phone_pool_detail_dto.rb +334 -0
- data/lib/mailslurp_client/models/phone_pool_dto.rb +318 -0
- data/lib/mailslurp_client/models/phone_pool_lease_dto.rb +351 -0
- data/lib/mailslurp_client/models/phone_pool_member_dto.rb +333 -0
- data/lib/mailslurp_client/models/phone_provider_capabilities_result.rb +284 -0
- data/lib/mailslurp_client/models/phone_provisioning_job_dto.rb +434 -0
- data/lib/mailslurp_client/models/phone_provisioning_job_item_dto.rb +336 -0
- data/lib/mailslurp_client/models/phone_sms_prepaid_credit_dto.rb +340 -0
- data/lib/mailslurp_client/models/phone_sms_prepaid_credits_dto.rb +241 -0
- data/lib/mailslurp_client/models/plus_address_projection.rb +27 -27
- data/lib/mailslurp_client/models/recipient_projection.rb +13 -13
- data/lib/mailslurp_client/models/reputation_item_projection.rb +41 -41
- data/lib/mailslurp_client/models/search_available_phone_numbers_options.rb +377 -0
- data/lib/mailslurp_client/models/sender_projection.rb +13 -13
- data/lib/mailslurp_client/models/sent_email_projection.rb +63 -63
- data/lib/mailslurp_client/models/sent_sms_projection.rb +18 -18
- data/lib/mailslurp_client/models/sms_projection.rb +18 -18
- data/lib/mailslurp_client/models/smtp_auth_diagnostic_result.rb +235 -0
- data/lib/mailslurp_client/models/smtp_diagnostic_step.rb +236 -0
- data/lib/mailslurp_client/models/smtp_tls_diagnostic_result.rb +245 -0
- data/lib/mailslurp_client/models/sort_object.rb +10 -10
- data/lib/mailslurp_client/models/spf_mechanism_result.rb +229 -0
- data/lib/mailslurp_client/models/template_projection.rb +41 -41
- data/lib/mailslurp_client/models/test_smtp_server_options.rb +337 -0
- data/lib/mailslurp_client/models/test_smtp_server_results.rb +297 -0
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +27 -27
- data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +27 -27
- data/lib/mailslurp_client/models/update_phone_pool_options.rb +215 -0
- data/lib/mailslurp_client/models/validation_dto.rb +1 -5
- data/lib/mailslurp_client/models/webhook_projection.rb +45 -45
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +67 -0
- metadata +69 -2
|
@@ -19,6 +19,208 @@ module MailSlurpClient
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
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]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
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)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
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]
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
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 = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.acquire_phone_pool_lease ...'
|
|
42
|
+
end
|
|
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"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/phone/pools/{poolId}/leases'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s))
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
61
|
+
# HTTP header 'Content-Type'
|
|
62
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
63
|
+
|
|
64
|
+
# form parameters
|
|
65
|
+
form_params = opts[:form_params] || {}
|
|
66
|
+
|
|
67
|
+
# http body (model)
|
|
68
|
+
post_body = opts[:body] || @api_client.object_to_http_body(acquire_phone_pool_lease_options)
|
|
69
|
+
|
|
70
|
+
# return_type
|
|
71
|
+
return_type = opts[:return_type] || 'PhonePoolLeaseDto'
|
|
72
|
+
|
|
73
|
+
# auth_names
|
|
74
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
75
|
+
|
|
76
|
+
new_options = opts.merge(
|
|
77
|
+
:header_params => header_params,
|
|
78
|
+
:query_params => query_params,
|
|
79
|
+
:form_params => form_params,
|
|
80
|
+
:body => post_body,
|
|
81
|
+
:auth_names => auth_names,
|
|
82
|
+
:return_type => return_type
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
86
|
+
if @api_client.config.debugging
|
|
87
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#acquire_phone_pool_lease\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
88
|
+
end
|
|
89
|
+
return data, status_code, headers
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Add all phone numbers to phone pool
|
|
93
|
+
# Add all active owned phone numbers to a pool
|
|
94
|
+
# @param pool_id [String]
|
|
95
|
+
# @param [Hash] opts the optional parameters
|
|
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)
|
|
99
|
+
data
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Add all phone numbers to phone pool
|
|
103
|
+
# Add all active owned phone numbers to a pool
|
|
104
|
+
# @param pool_id [String]
|
|
105
|
+
# @param [Hash] opts the optional parameters
|
|
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 = {})
|
|
108
|
+
if @api_client.config.debugging
|
|
109
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.add_all_phone_numbers_to_phone_pool ...'
|
|
110
|
+
end
|
|
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"
|
|
114
|
+
end
|
|
115
|
+
# resource path
|
|
116
|
+
local_var_path = '/phone/pools/{poolId}/numbers/add-all'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s))
|
|
117
|
+
|
|
118
|
+
# query parameters
|
|
119
|
+
query_params = opts[:query_params] || {}
|
|
120
|
+
|
|
121
|
+
# header parameters
|
|
122
|
+
header_params = opts[:header_params] || {}
|
|
123
|
+
# HTTP header 'Accept' (if needed)
|
|
124
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
125
|
+
|
|
126
|
+
# form parameters
|
|
127
|
+
form_params = opts[:form_params] || {}
|
|
128
|
+
|
|
129
|
+
# http body (model)
|
|
130
|
+
post_body = opts[:body]
|
|
131
|
+
|
|
132
|
+
# return_type
|
|
133
|
+
return_type = opts[:return_type] || 'PhonePoolDetailDto'
|
|
134
|
+
|
|
135
|
+
# auth_names
|
|
136
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
137
|
+
|
|
138
|
+
new_options = opts.merge(
|
|
139
|
+
:header_params => header_params,
|
|
140
|
+
:query_params => query_params,
|
|
141
|
+
:form_params => form_params,
|
|
142
|
+
:body => post_body,
|
|
143
|
+
:auth_names => auth_names,
|
|
144
|
+
:return_type => return_type
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
148
|
+
if @api_client.config.debugging
|
|
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}"
|
|
150
|
+
end
|
|
151
|
+
return data, status_code, headers
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Add phone numbers to phone pool
|
|
155
|
+
# Add one or more owned phone numbers to a pool
|
|
156
|
+
# @param pool_id [String]
|
|
157
|
+
# @param add_phone_pool_numbers_options [AddPhonePoolNumbersOptions]
|
|
158
|
+
# @param [Hash] opts the optional parameters
|
|
159
|
+
# @return [PhonePoolDetailDto]
|
|
160
|
+
def add_phone_numbers_to_phone_pool(pool_id, add_phone_pool_numbers_options, opts = {})
|
|
161
|
+
data, _status_code, _headers = add_phone_numbers_to_phone_pool_with_http_info(pool_id, add_phone_pool_numbers_options, opts)
|
|
162
|
+
data
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Add phone numbers to phone pool
|
|
166
|
+
# Add one or more owned phone numbers to a pool
|
|
167
|
+
# @param pool_id [String]
|
|
168
|
+
# @param add_phone_pool_numbers_options [AddPhonePoolNumbersOptions]
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
170
|
+
# @return [Array<(PhonePoolDetailDto, Integer, Hash)>] PhonePoolDetailDto data, response status code and response headers
|
|
171
|
+
def add_phone_numbers_to_phone_pool_with_http_info(pool_id, add_phone_pool_numbers_options, opts = {})
|
|
172
|
+
if @api_client.config.debugging
|
|
173
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.add_phone_numbers_to_phone_pool ...'
|
|
174
|
+
end
|
|
175
|
+
# verify the required parameter 'pool_id' is set
|
|
176
|
+
if @api_client.config.client_side_validation && pool_id.nil?
|
|
177
|
+
fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.add_phone_numbers_to_phone_pool"
|
|
178
|
+
end
|
|
179
|
+
# verify the required parameter 'add_phone_pool_numbers_options' is set
|
|
180
|
+
if @api_client.config.client_side_validation && add_phone_pool_numbers_options.nil?
|
|
181
|
+
fail ArgumentError, "Missing the required parameter 'add_phone_pool_numbers_options' when calling PhoneControllerApi.add_phone_numbers_to_phone_pool"
|
|
182
|
+
end
|
|
183
|
+
# resource path
|
|
184
|
+
local_var_path = '/phone/pools/{poolId}/numbers'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s))
|
|
185
|
+
|
|
186
|
+
# query parameters
|
|
187
|
+
query_params = opts[:query_params] || {}
|
|
188
|
+
|
|
189
|
+
# header parameters
|
|
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'])
|
|
195
|
+
|
|
196
|
+
# form parameters
|
|
197
|
+
form_params = opts[:form_params] || {}
|
|
198
|
+
|
|
199
|
+
# http body (model)
|
|
200
|
+
post_body = opts[:body] || @api_client.object_to_http_body(add_phone_pool_numbers_options)
|
|
201
|
+
|
|
202
|
+
# return_type
|
|
203
|
+
return_type = opts[:return_type] || 'PhonePoolDetailDto'
|
|
204
|
+
|
|
205
|
+
# auth_names
|
|
206
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
207
|
+
|
|
208
|
+
new_options = opts.merge(
|
|
209
|
+
:header_params => header_params,
|
|
210
|
+
:query_params => query_params,
|
|
211
|
+
:form_params => form_params,
|
|
212
|
+
:body => post_body,
|
|
213
|
+
:auth_names => auth_names,
|
|
214
|
+
:return_type => return_type
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
218
|
+
if @api_client.config.debugging
|
|
219
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#add_phone_numbers_to_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
220
|
+
end
|
|
221
|
+
return data, status_code, headers
|
|
222
|
+
end
|
|
223
|
+
|
|
22
224
|
# Create an emergency address
|
|
23
225
|
# Add an emergency address to a phone number
|
|
24
226
|
# @param create_emergency_address_options [CreateEmergencyAddressOptions]
|
|
@@ -147,6 +349,134 @@ module MailSlurpClient
|
|
|
147
349
|
return data, status_code, headers
|
|
148
350
|
end
|
|
149
351
|
|
|
352
|
+
# Create phone pool
|
|
353
|
+
# Create a reusable pool of phone numbers for coordinated leasing
|
|
354
|
+
# @param create_phone_pool_options [CreatePhonePoolOptions]
|
|
355
|
+
# @param [Hash] opts the optional parameters
|
|
356
|
+
# @return [PhonePoolDetailDto]
|
|
357
|
+
def create_phone_pool(create_phone_pool_options, opts = {})
|
|
358
|
+
data, _status_code, _headers = create_phone_pool_with_http_info(create_phone_pool_options, opts)
|
|
359
|
+
data
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Create phone pool
|
|
363
|
+
# Create a reusable pool of phone numbers for coordinated leasing
|
|
364
|
+
# @param create_phone_pool_options [CreatePhonePoolOptions]
|
|
365
|
+
# @param [Hash] opts the optional parameters
|
|
366
|
+
# @return [Array<(PhonePoolDetailDto, Integer, Hash)>] PhonePoolDetailDto data, response status code and response headers
|
|
367
|
+
def create_phone_pool_with_http_info(create_phone_pool_options, opts = {})
|
|
368
|
+
if @api_client.config.debugging
|
|
369
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.create_phone_pool ...'
|
|
370
|
+
end
|
|
371
|
+
# verify the required parameter 'create_phone_pool_options' is set
|
|
372
|
+
if @api_client.config.client_side_validation && create_phone_pool_options.nil?
|
|
373
|
+
fail ArgumentError, "Missing the required parameter 'create_phone_pool_options' when calling PhoneControllerApi.create_phone_pool"
|
|
374
|
+
end
|
|
375
|
+
# resource path
|
|
376
|
+
local_var_path = '/phone/pools'
|
|
377
|
+
|
|
378
|
+
# query parameters
|
|
379
|
+
query_params = opts[:query_params] || {}
|
|
380
|
+
|
|
381
|
+
# header parameters
|
|
382
|
+
header_params = opts[:header_params] || {}
|
|
383
|
+
# HTTP header 'Accept' (if needed)
|
|
384
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
385
|
+
# HTTP header 'Content-Type'
|
|
386
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
387
|
+
|
|
388
|
+
# form parameters
|
|
389
|
+
form_params = opts[:form_params] || {}
|
|
390
|
+
|
|
391
|
+
# http body (model)
|
|
392
|
+
post_body = opts[:body] || @api_client.object_to_http_body(create_phone_pool_options)
|
|
393
|
+
|
|
394
|
+
# return_type
|
|
395
|
+
return_type = opts[:return_type] || 'PhonePoolDetailDto'
|
|
396
|
+
|
|
397
|
+
# auth_names
|
|
398
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
399
|
+
|
|
400
|
+
new_options = opts.merge(
|
|
401
|
+
:header_params => header_params,
|
|
402
|
+
:query_params => query_params,
|
|
403
|
+
:form_params => form_params,
|
|
404
|
+
:body => post_body,
|
|
405
|
+
:auth_names => auth_names,
|
|
406
|
+
:return_type => return_type
|
|
407
|
+
)
|
|
408
|
+
|
|
409
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
410
|
+
if @api_client.config.debugging
|
|
411
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#create_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
412
|
+
end
|
|
413
|
+
return data, status_code, headers
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
# Create a phone provisioning job
|
|
417
|
+
# Create an advanced phone provisioning job from shortlisted numbers
|
|
418
|
+
# @param create_phone_provisioning_job_options [CreatePhoneProvisioningJobOptions]
|
|
419
|
+
# @param [Hash] opts the optional parameters
|
|
420
|
+
# @return [PhoneProvisioningJobDto]
|
|
421
|
+
def create_phone_provisioning_job(create_phone_provisioning_job_options, opts = {})
|
|
422
|
+
data, _status_code, _headers = create_phone_provisioning_job_with_http_info(create_phone_provisioning_job_options, opts)
|
|
423
|
+
data
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
# Create a phone provisioning job
|
|
427
|
+
# Create an advanced phone provisioning job from shortlisted numbers
|
|
428
|
+
# @param create_phone_provisioning_job_options [CreatePhoneProvisioningJobOptions]
|
|
429
|
+
# @param [Hash] opts the optional parameters
|
|
430
|
+
# @return [Array<(PhoneProvisioningJobDto, Integer, Hash)>] PhoneProvisioningJobDto data, response status code and response headers
|
|
431
|
+
def create_phone_provisioning_job_with_http_info(create_phone_provisioning_job_options, opts = {})
|
|
432
|
+
if @api_client.config.debugging
|
|
433
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.create_phone_provisioning_job ...'
|
|
434
|
+
end
|
|
435
|
+
# verify the required parameter 'create_phone_provisioning_job_options' is set
|
|
436
|
+
if @api_client.config.client_side_validation && create_phone_provisioning_job_options.nil?
|
|
437
|
+
fail ArgumentError, "Missing the required parameter 'create_phone_provisioning_job_options' when calling PhoneControllerApi.create_phone_provisioning_job"
|
|
438
|
+
end
|
|
439
|
+
# resource path
|
|
440
|
+
local_var_path = '/phone/provisioning/jobs'
|
|
441
|
+
|
|
442
|
+
# query parameters
|
|
443
|
+
query_params = opts[:query_params] || {}
|
|
444
|
+
|
|
445
|
+
# header parameters
|
|
446
|
+
header_params = opts[:header_params] || {}
|
|
447
|
+
# HTTP header 'Accept' (if needed)
|
|
448
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
449
|
+
# HTTP header 'Content-Type'
|
|
450
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
451
|
+
|
|
452
|
+
# form parameters
|
|
453
|
+
form_params = opts[:form_params] || {}
|
|
454
|
+
|
|
455
|
+
# http body (model)
|
|
456
|
+
post_body = opts[:body] || @api_client.object_to_http_body(create_phone_provisioning_job_options)
|
|
457
|
+
|
|
458
|
+
# return_type
|
|
459
|
+
return_type = opts[:return_type] || 'PhoneProvisioningJobDto'
|
|
460
|
+
|
|
461
|
+
# auth_names
|
|
462
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
463
|
+
|
|
464
|
+
new_options = opts.merge(
|
|
465
|
+
:header_params => header_params,
|
|
466
|
+
:query_params => query_params,
|
|
467
|
+
:form_params => form_params,
|
|
468
|
+
:body => post_body,
|
|
469
|
+
:auth_names => auth_names,
|
|
470
|
+
:return_type => return_type
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
474
|
+
if @api_client.config.debugging
|
|
475
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#create_phone_provisioning_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
476
|
+
end
|
|
477
|
+
return data, status_code, headers
|
|
478
|
+
end
|
|
479
|
+
|
|
150
480
|
# Delete all phone numbers
|
|
151
481
|
# Remove all phone number from account
|
|
152
482
|
# @param [Hash] opts the optional parameters
|
|
@@ -391,39 +721,37 @@ module MailSlurpClient
|
|
|
391
721
|
return data, status_code, headers
|
|
392
722
|
end
|
|
393
723
|
|
|
394
|
-
#
|
|
395
|
-
#
|
|
724
|
+
# Delete phone pool
|
|
725
|
+
# Delete a phone pool and release any active leases from that pool
|
|
726
|
+
# @param pool_id [String]
|
|
396
727
|
# @param [Hash] opts the optional parameters
|
|
397
|
-
# @
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
data, _status_code, _headers = get_all_phone_message_threads_with_http_info(opts)
|
|
402
|
-
data
|
|
728
|
+
# @return [nil]
|
|
729
|
+
def delete_phone_pool(pool_id, opts = {})
|
|
730
|
+
delete_phone_pool_with_http_info(pool_id, opts)
|
|
731
|
+
nil
|
|
403
732
|
end
|
|
404
733
|
|
|
405
|
-
#
|
|
406
|
-
#
|
|
734
|
+
# Delete phone pool
|
|
735
|
+
# Delete a phone pool and release any active leases from that pool
|
|
736
|
+
# @param pool_id [String]
|
|
407
737
|
# @param [Hash] opts the optional parameters
|
|
408
|
-
# @
|
|
409
|
-
|
|
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 = {})
|
|
738
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
739
|
+
def delete_phone_pool_with_http_info(pool_id, opts = {})
|
|
412
740
|
if @api_client.config.debugging
|
|
413
|
-
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.
|
|
741
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.delete_phone_pool ...'
|
|
742
|
+
end
|
|
743
|
+
# verify the required parameter 'pool_id' is set
|
|
744
|
+
if @api_client.config.client_side_validation && pool_id.nil?
|
|
745
|
+
fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.delete_phone_pool"
|
|
414
746
|
end
|
|
415
747
|
# resource path
|
|
416
|
-
local_var_path = '/phone/
|
|
748
|
+
local_var_path = '/phone/pools/{poolId}'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s))
|
|
417
749
|
|
|
418
750
|
# query parameters
|
|
419
751
|
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
752
|
|
|
423
753
|
# header parameters
|
|
424
754
|
header_params = opts[:header_params] || {}
|
|
425
|
-
# HTTP header 'Accept' (if needed)
|
|
426
|
-
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
427
755
|
|
|
428
756
|
# form parameters
|
|
429
757
|
form_params = opts[:form_params] || {}
|
|
@@ -432,7 +760,7 @@ module MailSlurpClient
|
|
|
432
760
|
post_body = opts[:body]
|
|
433
761
|
|
|
434
762
|
# return_type
|
|
435
|
-
return_type = opts[:return_type]
|
|
763
|
+
return_type = opts[:return_type]
|
|
436
764
|
|
|
437
765
|
# auth_names
|
|
438
766
|
auth_names = opts[:auth_names] || ['API_KEY']
|
|
@@ -446,14 +774,76 @@ module MailSlurpClient
|
|
|
446
774
|
:return_type => return_type
|
|
447
775
|
)
|
|
448
776
|
|
|
449
|
-
data, status_code, headers = @api_client.call_api(:
|
|
777
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
450
778
|
if @api_client.config.debugging
|
|
451
|
-
@api_client.config.logger.debug "API called: PhoneControllerApi#
|
|
779
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#delete_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
452
780
|
end
|
|
453
781
|
return data, status_code, headers
|
|
454
782
|
end
|
|
455
783
|
|
|
456
|
-
# Get
|
|
784
|
+
# Get the latest messages for all phones
|
|
785
|
+
# List all message threads for all phones
|
|
786
|
+
# @param [Hash] opts the optional parameters
|
|
787
|
+
# @option opts [Integer] :page (default to 0)
|
|
788
|
+
# @option opts [Integer] :size (default to 20)
|
|
789
|
+
# @return [PagePhoneMessageThreadProjection]
|
|
790
|
+
def get_all_phone_message_threads(opts = {})
|
|
791
|
+
data, _status_code, _headers = get_all_phone_message_threads_with_http_info(opts)
|
|
792
|
+
data
|
|
793
|
+
end
|
|
794
|
+
|
|
795
|
+
# Get the latest messages for all phones
|
|
796
|
+
# List all message threads for all phones
|
|
797
|
+
# @param [Hash] opts the optional parameters
|
|
798
|
+
# @option opts [Integer] :page
|
|
799
|
+
# @option opts [Integer] :size
|
|
800
|
+
# @return [Array<(PagePhoneMessageThreadProjection, Integer, Hash)>] PagePhoneMessageThreadProjection data, response status code and response headers
|
|
801
|
+
def get_all_phone_message_threads_with_http_info(opts = {})
|
|
802
|
+
if @api_client.config.debugging
|
|
803
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_all_phone_message_threads ...'
|
|
804
|
+
end
|
|
805
|
+
# resource path
|
|
806
|
+
local_var_path = '/phone/numbers/message-threads'
|
|
807
|
+
|
|
808
|
+
# query parameters
|
|
809
|
+
query_params = opts[:query_params] || {}
|
|
810
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
811
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
|
812
|
+
|
|
813
|
+
# header parameters
|
|
814
|
+
header_params = opts[:header_params] || {}
|
|
815
|
+
# HTTP header 'Accept' (if needed)
|
|
816
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
817
|
+
|
|
818
|
+
# form parameters
|
|
819
|
+
form_params = opts[:form_params] || {}
|
|
820
|
+
|
|
821
|
+
# http body (model)
|
|
822
|
+
post_body = opts[:body]
|
|
823
|
+
|
|
824
|
+
# return_type
|
|
825
|
+
return_type = opts[:return_type] || 'PagePhoneMessageThreadProjection'
|
|
826
|
+
|
|
827
|
+
# auth_names
|
|
828
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
829
|
+
|
|
830
|
+
new_options = opts.merge(
|
|
831
|
+
:header_params => header_params,
|
|
832
|
+
:query_params => query_params,
|
|
833
|
+
:form_params => form_params,
|
|
834
|
+
:body => post_body,
|
|
835
|
+
:auth_names => auth_names,
|
|
836
|
+
:return_type => return_type
|
|
837
|
+
)
|
|
838
|
+
|
|
839
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
840
|
+
if @api_client.config.debugging
|
|
841
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_all_phone_message_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
842
|
+
end
|
|
843
|
+
return data, status_code, headers
|
|
844
|
+
end
|
|
845
|
+
|
|
846
|
+
# Get all phone number releases
|
|
457
847
|
# List released or deleted phone numbers
|
|
458
848
|
# @param [Hash] opts the optional parameters
|
|
459
849
|
# @option opts [Integer] :page (default to 0)
|
|
@@ -696,6 +1086,70 @@ module MailSlurpClient
|
|
|
696
1086
|
return data, status_code, headers
|
|
697
1087
|
end
|
|
698
1088
|
|
|
1089
|
+
# Get or create phone pool
|
|
1090
|
+
# Get a phone pool by name or create it if it does not exist
|
|
1091
|
+
# @param get_or_create_phone_pool_options [GetOrCreatePhonePoolOptions]
|
|
1092
|
+
# @param [Hash] opts the optional parameters
|
|
1093
|
+
# @return [PhonePoolDetailDto]
|
|
1094
|
+
def get_or_create_phone_pool(get_or_create_phone_pool_options, opts = {})
|
|
1095
|
+
data, _status_code, _headers = get_or_create_phone_pool_with_http_info(get_or_create_phone_pool_options, opts)
|
|
1096
|
+
data
|
|
1097
|
+
end
|
|
1098
|
+
|
|
1099
|
+
# Get or create phone pool
|
|
1100
|
+
# Get a phone pool by name or create it if it does not exist
|
|
1101
|
+
# @param get_or_create_phone_pool_options [GetOrCreatePhonePoolOptions]
|
|
1102
|
+
# @param [Hash] opts the optional parameters
|
|
1103
|
+
# @return [Array<(PhonePoolDetailDto, Integer, Hash)>] PhonePoolDetailDto data, response status code and response headers
|
|
1104
|
+
def get_or_create_phone_pool_with_http_info(get_or_create_phone_pool_options, opts = {})
|
|
1105
|
+
if @api_client.config.debugging
|
|
1106
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_or_create_phone_pool ...'
|
|
1107
|
+
end
|
|
1108
|
+
# verify the required parameter 'get_or_create_phone_pool_options' is set
|
|
1109
|
+
if @api_client.config.client_side_validation && get_or_create_phone_pool_options.nil?
|
|
1110
|
+
fail ArgumentError, "Missing the required parameter 'get_or_create_phone_pool_options' when calling PhoneControllerApi.get_or_create_phone_pool"
|
|
1111
|
+
end
|
|
1112
|
+
# resource path
|
|
1113
|
+
local_var_path = '/phone/pools/get-or-create'
|
|
1114
|
+
|
|
1115
|
+
# query parameters
|
|
1116
|
+
query_params = opts[:query_params] || {}
|
|
1117
|
+
|
|
1118
|
+
# header parameters
|
|
1119
|
+
header_params = opts[:header_params] || {}
|
|
1120
|
+
# HTTP header 'Accept' (if needed)
|
|
1121
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
1122
|
+
# HTTP header 'Content-Type'
|
|
1123
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1124
|
+
|
|
1125
|
+
# form parameters
|
|
1126
|
+
form_params = opts[:form_params] || {}
|
|
1127
|
+
|
|
1128
|
+
# http body (model)
|
|
1129
|
+
post_body = opts[:body] || @api_client.object_to_http_body(get_or_create_phone_pool_options)
|
|
1130
|
+
|
|
1131
|
+
# return_type
|
|
1132
|
+
return_type = opts[:return_type] || 'PhonePoolDetailDto'
|
|
1133
|
+
|
|
1134
|
+
# auth_names
|
|
1135
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
1136
|
+
|
|
1137
|
+
new_options = opts.merge(
|
|
1138
|
+
:header_params => header_params,
|
|
1139
|
+
:query_params => query_params,
|
|
1140
|
+
:form_params => form_params,
|
|
1141
|
+
:body => post_body,
|
|
1142
|
+
:auth_names => auth_names,
|
|
1143
|
+
:return_type => return_type
|
|
1144
|
+
)
|
|
1145
|
+
|
|
1146
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1147
|
+
if @api_client.config.debugging
|
|
1148
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_or_create_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1149
|
+
end
|
|
1150
|
+
return data, status_code, headers
|
|
1151
|
+
end
|
|
1152
|
+
|
|
699
1153
|
# Get messages in a phone thread
|
|
700
1154
|
# List message thread messages for a phone message thread
|
|
701
1155
|
# @param phone_number_id [String]
|
|
@@ -1026,6 +1480,70 @@ module MailSlurpClient
|
|
|
1026
1480
|
return data, status_code, headers
|
|
1027
1481
|
end
|
|
1028
1482
|
|
|
1483
|
+
# Get line type intelligence for a phone number
|
|
1484
|
+
# Lookup line type intelligence for a phone number
|
|
1485
|
+
# @param validate_phone_number_options [ValidatePhoneNumberOptions]
|
|
1486
|
+
# @param [Hash] opts the optional parameters
|
|
1487
|
+
# @return [PhoneNumberLineTypeLookupDto]
|
|
1488
|
+
def get_phone_number_line_type_intelligence(validate_phone_number_options, opts = {})
|
|
1489
|
+
data, _status_code, _headers = get_phone_number_line_type_intelligence_with_http_info(validate_phone_number_options, opts)
|
|
1490
|
+
data
|
|
1491
|
+
end
|
|
1492
|
+
|
|
1493
|
+
# Get line type intelligence for a phone number
|
|
1494
|
+
# Lookup line type intelligence for a phone number
|
|
1495
|
+
# @param validate_phone_number_options [ValidatePhoneNumberOptions]
|
|
1496
|
+
# @param [Hash] opts the optional parameters
|
|
1497
|
+
# @return [Array<(PhoneNumberLineTypeLookupDto, Integer, Hash)>] PhoneNumberLineTypeLookupDto data, response status code and response headers
|
|
1498
|
+
def get_phone_number_line_type_intelligence_with_http_info(validate_phone_number_options, opts = {})
|
|
1499
|
+
if @api_client.config.debugging
|
|
1500
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_number_line_type_intelligence ...'
|
|
1501
|
+
end
|
|
1502
|
+
# verify the required parameter 'validate_phone_number_options' is set
|
|
1503
|
+
if @api_client.config.client_side_validation && validate_phone_number_options.nil?
|
|
1504
|
+
fail ArgumentError, "Missing the required parameter 'validate_phone_number_options' when calling PhoneControllerApi.get_phone_number_line_type_intelligence"
|
|
1505
|
+
end
|
|
1506
|
+
# resource path
|
|
1507
|
+
local_var_path = '/phone/validate/line-type-intelligence'
|
|
1508
|
+
|
|
1509
|
+
# query parameters
|
|
1510
|
+
query_params = opts[:query_params] || {}
|
|
1511
|
+
|
|
1512
|
+
# header parameters
|
|
1513
|
+
header_params = opts[:header_params] || {}
|
|
1514
|
+
# HTTP header 'Accept' (if needed)
|
|
1515
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
1516
|
+
# HTTP header 'Content-Type'
|
|
1517
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1518
|
+
|
|
1519
|
+
# form parameters
|
|
1520
|
+
form_params = opts[:form_params] || {}
|
|
1521
|
+
|
|
1522
|
+
# http body (model)
|
|
1523
|
+
post_body = opts[:body] || @api_client.object_to_http_body(validate_phone_number_options)
|
|
1524
|
+
|
|
1525
|
+
# return_type
|
|
1526
|
+
return_type = opts[:return_type] || 'PhoneNumberLineTypeLookupDto'
|
|
1527
|
+
|
|
1528
|
+
# auth_names
|
|
1529
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
1530
|
+
|
|
1531
|
+
new_options = opts.merge(
|
|
1532
|
+
:header_params => header_params,
|
|
1533
|
+
:query_params => query_params,
|
|
1534
|
+
:form_params => form_params,
|
|
1535
|
+
:body => post_body,
|
|
1536
|
+
:auth_names => auth_names,
|
|
1537
|
+
:return_type => return_type
|
|
1538
|
+
)
|
|
1539
|
+
|
|
1540
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1541
|
+
if @api_client.config.debugging
|
|
1542
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_number_line_type_intelligence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1543
|
+
end
|
|
1544
|
+
return data, status_code, headers
|
|
1545
|
+
end
|
|
1546
|
+
|
|
1029
1547
|
# Get phone number release
|
|
1030
1548
|
# Get a released or deleted phone numbers
|
|
1031
1549
|
# @param release_id [String]
|
|
@@ -1092,6 +1610,11 @@ module MailSlurpClient
|
|
|
1092
1610
|
# List phone numbers for account
|
|
1093
1611
|
# @param [Hash] opts the optional parameters
|
|
1094
1612
|
# @option opts [String] :phone_country Optional phone country
|
|
1613
|
+
# @option opts [String] :line_type Optional line type filter
|
|
1614
|
+
# @option opts [String] :carrier_name Optional carrier name filter
|
|
1615
|
+
# @option opts [String] :mobile_country_code Optional mobile country code filter
|
|
1616
|
+
# @option opts [String] :mobile_network_code Optional mobile network code filter
|
|
1617
|
+
# @option opts [String] :provider_label Optional provider label filter such as T1 or T2
|
|
1095
1618
|
# @option opts [Integer] :page Optional page index for list pagination (default to 0)
|
|
1096
1619
|
# @option opts [Integer] :size Optional page size for list pagination (default to 20)
|
|
1097
1620
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
|
@@ -1106,45 +1629,479 @@ module MailSlurpClient
|
|
|
1106
1629
|
data
|
|
1107
1630
|
end
|
|
1108
1631
|
|
|
1109
|
-
# Get phone numbers
|
|
1110
|
-
# List phone numbers for account
|
|
1632
|
+
# Get phone numbers
|
|
1633
|
+
# List phone numbers for account
|
|
1634
|
+
# @param [Hash] opts the optional parameters
|
|
1635
|
+
# @option opts [String] :phone_country Optional phone country
|
|
1636
|
+
# @option opts [String] :line_type Optional line type filter
|
|
1637
|
+
# @option opts [String] :carrier_name Optional carrier name filter
|
|
1638
|
+
# @option opts [String] :mobile_country_code Optional mobile country code filter
|
|
1639
|
+
# @option opts [String] :mobile_network_code Optional mobile network code filter
|
|
1640
|
+
# @option opts [String] :provider_label Optional provider label filter such as T1 or T2
|
|
1641
|
+
# @option opts [Integer] :page Optional page index for list pagination
|
|
1642
|
+
# @option opts [Integer] :size Optional page size for list pagination
|
|
1643
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
|
1644
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
|
1645
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
|
1646
|
+
# @option opts [String] :search Optional search filter
|
|
1647
|
+
# @option opts [Array<String>] :include Optional phoneIds to include in result
|
|
1648
|
+
# @option opts [Boolean] :favourite Optionally filter results for favourites only
|
|
1649
|
+
# @return [Array<(PagePhoneNumberProjection, Integer, Hash)>] PagePhoneNumberProjection data, response status code and response headers
|
|
1650
|
+
def get_phone_numbers_with_http_info(opts = {})
|
|
1651
|
+
if @api_client.config.debugging
|
|
1652
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_numbers ...'
|
|
1653
|
+
end
|
|
1654
|
+
allowable_values = ["US", "GB", "AU", "CA", "EE", "HK", "PL", "PT", "NL", "IL", "FI", "SE"]
|
|
1655
|
+
if @api_client.config.client_side_validation && opts[:'phone_country'] && !allowable_values.include?(opts[:'phone_country'])
|
|
1656
|
+
fail ArgumentError, "invalid value for \"phone_country\", must be one of #{allowable_values}"
|
|
1657
|
+
end
|
|
1658
|
+
allowable_values = ["ASC", "DESC"]
|
|
1659
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
1660
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
1661
|
+
end
|
|
1662
|
+
# resource path
|
|
1663
|
+
local_var_path = '/phone/numbers'
|
|
1664
|
+
|
|
1665
|
+
# query parameters
|
|
1666
|
+
query_params = opts[:query_params] || {}
|
|
1667
|
+
query_params[:'phoneCountry'] = opts[:'phone_country'] if !opts[:'phone_country'].nil?
|
|
1668
|
+
query_params[:'lineType'] = opts[:'line_type'] if !opts[:'line_type'].nil?
|
|
1669
|
+
query_params[:'carrierName'] = opts[:'carrier_name'] if !opts[:'carrier_name'].nil?
|
|
1670
|
+
query_params[:'mobileCountryCode'] = opts[:'mobile_country_code'] if !opts[:'mobile_country_code'].nil?
|
|
1671
|
+
query_params[:'mobileNetworkCode'] = opts[:'mobile_network_code'] if !opts[:'mobile_network_code'].nil?
|
|
1672
|
+
query_params[:'providerLabel'] = opts[:'provider_label'] if !opts[:'provider_label'].nil?
|
|
1673
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1674
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
|
1675
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1676
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
|
1677
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
1678
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
1679
|
+
query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if !opts[:'include'].nil?
|
|
1680
|
+
query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
|
|
1681
|
+
|
|
1682
|
+
# header parameters
|
|
1683
|
+
header_params = opts[:header_params] || {}
|
|
1684
|
+
# HTTP header 'Accept' (if needed)
|
|
1685
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
1686
|
+
|
|
1687
|
+
# form parameters
|
|
1688
|
+
form_params = opts[:form_params] || {}
|
|
1689
|
+
|
|
1690
|
+
# http body (model)
|
|
1691
|
+
post_body = opts[:body]
|
|
1692
|
+
|
|
1693
|
+
# return_type
|
|
1694
|
+
return_type = opts[:return_type] || 'PagePhoneNumberProjection'
|
|
1695
|
+
|
|
1696
|
+
# auth_names
|
|
1697
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
1698
|
+
|
|
1699
|
+
new_options = opts.merge(
|
|
1700
|
+
:header_params => header_params,
|
|
1701
|
+
:query_params => query_params,
|
|
1702
|
+
:form_params => form_params,
|
|
1703
|
+
:body => post_body,
|
|
1704
|
+
:auth_names => auth_names,
|
|
1705
|
+
:return_type => return_type
|
|
1706
|
+
)
|
|
1707
|
+
|
|
1708
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1709
|
+
if @api_client.config.debugging
|
|
1710
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_numbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1711
|
+
end
|
|
1712
|
+
return data, status_code, headers
|
|
1713
|
+
end
|
|
1714
|
+
|
|
1715
|
+
# Get phone plans
|
|
1716
|
+
# Get phone number plans
|
|
1717
|
+
# @param [Hash] opts the optional parameters
|
|
1718
|
+
# @return [Array<PhonePlanDto>]
|
|
1719
|
+
def get_phone_plans(opts = {})
|
|
1720
|
+
data, _status_code, _headers = get_phone_plans_with_http_info(opts)
|
|
1721
|
+
data
|
|
1722
|
+
end
|
|
1723
|
+
|
|
1724
|
+
# Get phone plans
|
|
1725
|
+
# Get phone number plans
|
|
1726
|
+
# @param [Hash] opts the optional parameters
|
|
1727
|
+
# @return [Array<(Array<PhonePlanDto>, Integer, Hash)>] Array<PhonePlanDto> data, response status code and response headers
|
|
1728
|
+
def get_phone_plans_with_http_info(opts = {})
|
|
1729
|
+
if @api_client.config.debugging
|
|
1730
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_plans ...'
|
|
1731
|
+
end
|
|
1732
|
+
# resource path
|
|
1733
|
+
local_var_path = '/phone/plans'
|
|
1734
|
+
|
|
1735
|
+
# query parameters
|
|
1736
|
+
query_params = opts[:query_params] || {}
|
|
1737
|
+
|
|
1738
|
+
# header parameters
|
|
1739
|
+
header_params = opts[:header_params] || {}
|
|
1740
|
+
# HTTP header 'Accept' (if needed)
|
|
1741
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
1742
|
+
|
|
1743
|
+
# form parameters
|
|
1744
|
+
form_params = opts[:form_params] || {}
|
|
1745
|
+
|
|
1746
|
+
# http body (model)
|
|
1747
|
+
post_body = opts[:body]
|
|
1748
|
+
|
|
1749
|
+
# return_type
|
|
1750
|
+
return_type = opts[:return_type] || 'Array<PhonePlanDto>'
|
|
1751
|
+
|
|
1752
|
+
# auth_names
|
|
1753
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
1754
|
+
|
|
1755
|
+
new_options = opts.merge(
|
|
1756
|
+
:header_params => header_params,
|
|
1757
|
+
:query_params => query_params,
|
|
1758
|
+
:form_params => form_params,
|
|
1759
|
+
:body => post_body,
|
|
1760
|
+
:auth_names => auth_names,
|
|
1761
|
+
:return_type => return_type
|
|
1762
|
+
)
|
|
1763
|
+
|
|
1764
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1765
|
+
if @api_client.config.debugging
|
|
1766
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1767
|
+
end
|
|
1768
|
+
return data, status_code, headers
|
|
1769
|
+
end
|
|
1770
|
+
|
|
1771
|
+
# Get phone plans availability
|
|
1772
|
+
# @param [Hash] opts the optional parameters
|
|
1773
|
+
# @return [PhonePlanAvailability]
|
|
1774
|
+
def get_phone_plans_availability(opts = {})
|
|
1775
|
+
data, _status_code, _headers = get_phone_plans_availability_with_http_info(opts)
|
|
1776
|
+
data
|
|
1777
|
+
end
|
|
1778
|
+
|
|
1779
|
+
# Get phone plans availability
|
|
1780
|
+
# @param [Hash] opts the optional parameters
|
|
1781
|
+
# @return [Array<(PhonePlanAvailability, Integer, Hash)>] PhonePlanAvailability data, response status code and response headers
|
|
1782
|
+
def get_phone_plans_availability_with_http_info(opts = {})
|
|
1783
|
+
if @api_client.config.debugging
|
|
1784
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_plans_availability ...'
|
|
1785
|
+
end
|
|
1786
|
+
# resource path
|
|
1787
|
+
local_var_path = '/phone/plans/availability'
|
|
1788
|
+
|
|
1789
|
+
# query parameters
|
|
1790
|
+
query_params = opts[:query_params] || {}
|
|
1791
|
+
|
|
1792
|
+
# header parameters
|
|
1793
|
+
header_params = opts[:header_params] || {}
|
|
1794
|
+
# HTTP header 'Accept' (if needed)
|
|
1795
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
1796
|
+
|
|
1797
|
+
# form parameters
|
|
1798
|
+
form_params = opts[:form_params] || {}
|
|
1799
|
+
|
|
1800
|
+
# http body (model)
|
|
1801
|
+
post_body = opts[:body]
|
|
1802
|
+
|
|
1803
|
+
# return_type
|
|
1804
|
+
return_type = opts[:return_type] || 'PhonePlanAvailability'
|
|
1805
|
+
|
|
1806
|
+
# auth_names
|
|
1807
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
1808
|
+
|
|
1809
|
+
new_options = opts.merge(
|
|
1810
|
+
:header_params => header_params,
|
|
1811
|
+
:query_params => query_params,
|
|
1812
|
+
:form_params => form_params,
|
|
1813
|
+
:body => post_body,
|
|
1814
|
+
:auth_names => auth_names,
|
|
1815
|
+
:return_type => return_type
|
|
1816
|
+
)
|
|
1817
|
+
|
|
1818
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1819
|
+
if @api_client.config.debugging
|
|
1820
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_plans_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1821
|
+
end
|
|
1822
|
+
return data, status_code, headers
|
|
1823
|
+
end
|
|
1824
|
+
|
|
1825
|
+
# Get phone pool
|
|
1826
|
+
# Get phone pool details by ID
|
|
1827
|
+
# @param pool_id [String]
|
|
1828
|
+
# @param [Hash] opts the optional parameters
|
|
1829
|
+
# @return [PhonePoolDetailDto]
|
|
1830
|
+
def get_phone_pool(pool_id, opts = {})
|
|
1831
|
+
data, _status_code, _headers = get_phone_pool_with_http_info(pool_id, opts)
|
|
1832
|
+
data
|
|
1833
|
+
end
|
|
1834
|
+
|
|
1835
|
+
# Get phone pool
|
|
1836
|
+
# Get phone pool details by ID
|
|
1837
|
+
# @param pool_id [String]
|
|
1838
|
+
# @param [Hash] opts the optional parameters
|
|
1839
|
+
# @return [Array<(PhonePoolDetailDto, Integer, Hash)>] PhonePoolDetailDto data, response status code and response headers
|
|
1840
|
+
def get_phone_pool_with_http_info(pool_id, opts = {})
|
|
1841
|
+
if @api_client.config.debugging
|
|
1842
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_pool ...'
|
|
1843
|
+
end
|
|
1844
|
+
# verify the required parameter 'pool_id' is set
|
|
1845
|
+
if @api_client.config.client_side_validation && pool_id.nil?
|
|
1846
|
+
fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.get_phone_pool"
|
|
1847
|
+
end
|
|
1848
|
+
# resource path
|
|
1849
|
+
local_var_path = '/phone/pools/{poolId}'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s))
|
|
1850
|
+
|
|
1851
|
+
# query parameters
|
|
1852
|
+
query_params = opts[:query_params] || {}
|
|
1853
|
+
|
|
1854
|
+
# header parameters
|
|
1855
|
+
header_params = opts[:header_params] || {}
|
|
1856
|
+
# HTTP header 'Accept' (if needed)
|
|
1857
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
1858
|
+
|
|
1859
|
+
# form parameters
|
|
1860
|
+
form_params = opts[:form_params] || {}
|
|
1861
|
+
|
|
1862
|
+
# http body (model)
|
|
1863
|
+
post_body = opts[:body]
|
|
1864
|
+
|
|
1865
|
+
# return_type
|
|
1866
|
+
return_type = opts[:return_type] || 'PhonePoolDetailDto'
|
|
1867
|
+
|
|
1868
|
+
# auth_names
|
|
1869
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
1870
|
+
|
|
1871
|
+
new_options = opts.merge(
|
|
1872
|
+
:header_params => header_params,
|
|
1873
|
+
:query_params => query_params,
|
|
1874
|
+
:form_params => form_params,
|
|
1875
|
+
:body => post_body,
|
|
1876
|
+
:auth_names => auth_names,
|
|
1877
|
+
:return_type => return_type
|
|
1878
|
+
)
|
|
1879
|
+
|
|
1880
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1881
|
+
if @api_client.config.debugging
|
|
1882
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1883
|
+
end
|
|
1884
|
+
return data, status_code, headers
|
|
1885
|
+
end
|
|
1886
|
+
|
|
1887
|
+
# Get phone pool by name
|
|
1888
|
+
# Get phone pool details by name
|
|
1889
|
+
# @param name [String]
|
|
1890
|
+
# @param [Hash] opts the optional parameters
|
|
1891
|
+
# @return [PhonePoolDetailDto]
|
|
1892
|
+
def get_phone_pool_by_name(name, opts = {})
|
|
1893
|
+
data, _status_code, _headers = get_phone_pool_by_name_with_http_info(name, opts)
|
|
1894
|
+
data
|
|
1895
|
+
end
|
|
1896
|
+
|
|
1897
|
+
# Get phone pool by name
|
|
1898
|
+
# Get phone pool details by name
|
|
1899
|
+
# @param name [String]
|
|
1900
|
+
# @param [Hash] opts the optional parameters
|
|
1901
|
+
# @return [Array<(PhonePoolDetailDto, Integer, Hash)>] PhonePoolDetailDto data, response status code and response headers
|
|
1902
|
+
def get_phone_pool_by_name_with_http_info(name, opts = {})
|
|
1903
|
+
if @api_client.config.debugging
|
|
1904
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_pool_by_name ...'
|
|
1905
|
+
end
|
|
1906
|
+
# verify the required parameter 'name' is set
|
|
1907
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
1908
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling PhoneControllerApi.get_phone_pool_by_name"
|
|
1909
|
+
end
|
|
1910
|
+
# resource path
|
|
1911
|
+
local_var_path = '/phone/pools/by-name'
|
|
1912
|
+
|
|
1913
|
+
# query parameters
|
|
1914
|
+
query_params = opts[:query_params] || {}
|
|
1915
|
+
query_params[:'name'] = name
|
|
1916
|
+
|
|
1917
|
+
# header parameters
|
|
1918
|
+
header_params = opts[:header_params] || {}
|
|
1919
|
+
# HTTP header 'Accept' (if needed)
|
|
1920
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
1921
|
+
|
|
1922
|
+
# form parameters
|
|
1923
|
+
form_params = opts[:form_params] || {}
|
|
1924
|
+
|
|
1925
|
+
# http body (model)
|
|
1926
|
+
post_body = opts[:body]
|
|
1927
|
+
|
|
1928
|
+
# return_type
|
|
1929
|
+
return_type = opts[:return_type] || 'PhonePoolDetailDto'
|
|
1930
|
+
|
|
1931
|
+
# auth_names
|
|
1932
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
1933
|
+
|
|
1934
|
+
new_options = opts.merge(
|
|
1935
|
+
:header_params => header_params,
|
|
1936
|
+
:query_params => query_params,
|
|
1937
|
+
:form_params => form_params,
|
|
1938
|
+
:body => post_body,
|
|
1939
|
+
:auth_names => auth_names,
|
|
1940
|
+
:return_type => return_type
|
|
1941
|
+
)
|
|
1942
|
+
|
|
1943
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1944
|
+
if @api_client.config.debugging
|
|
1945
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_pool_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1946
|
+
end
|
|
1947
|
+
return data, status_code, headers
|
|
1948
|
+
end
|
|
1949
|
+
|
|
1950
|
+
# Get phone pools
|
|
1951
|
+
# List phone pools for the authenticated user
|
|
1952
|
+
# @param [Hash] opts the optional parameters
|
|
1953
|
+
# @return [Array<PhonePoolDto>]
|
|
1954
|
+
def get_phone_pools(opts = {})
|
|
1955
|
+
data, _status_code, _headers = get_phone_pools_with_http_info(opts)
|
|
1956
|
+
data
|
|
1957
|
+
end
|
|
1958
|
+
|
|
1959
|
+
# Get phone pools
|
|
1960
|
+
# List phone pools for the authenticated user
|
|
1961
|
+
# @param [Hash] opts the optional parameters
|
|
1962
|
+
# @return [Array<(Array<PhonePoolDto>, Integer, Hash)>] Array<PhonePoolDto> data, response status code and response headers
|
|
1963
|
+
def get_phone_pools_with_http_info(opts = {})
|
|
1964
|
+
if @api_client.config.debugging
|
|
1965
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_pools ...'
|
|
1966
|
+
end
|
|
1967
|
+
# resource path
|
|
1968
|
+
local_var_path = '/phone/pools'
|
|
1969
|
+
|
|
1970
|
+
# query parameters
|
|
1971
|
+
query_params = opts[:query_params] || {}
|
|
1972
|
+
|
|
1973
|
+
# header parameters
|
|
1974
|
+
header_params = opts[:header_params] || {}
|
|
1975
|
+
# HTTP header 'Accept' (if needed)
|
|
1976
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
1977
|
+
|
|
1978
|
+
# form parameters
|
|
1979
|
+
form_params = opts[:form_params] || {}
|
|
1980
|
+
|
|
1981
|
+
# http body (model)
|
|
1982
|
+
post_body = opts[:body]
|
|
1983
|
+
|
|
1984
|
+
# return_type
|
|
1985
|
+
return_type = opts[:return_type] || 'Array<PhonePoolDto>'
|
|
1986
|
+
|
|
1987
|
+
# auth_names
|
|
1988
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
1989
|
+
|
|
1990
|
+
new_options = opts.merge(
|
|
1991
|
+
:header_params => header_params,
|
|
1992
|
+
:query_params => query_params,
|
|
1993
|
+
:form_params => form_params,
|
|
1994
|
+
:body => post_body,
|
|
1995
|
+
:auth_names => auth_names,
|
|
1996
|
+
:return_type => return_type
|
|
1997
|
+
)
|
|
1998
|
+
|
|
1999
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2000
|
+
if @api_client.config.debugging
|
|
2001
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_pools\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2002
|
+
end
|
|
2003
|
+
return data, status_code, headers
|
|
2004
|
+
end
|
|
2005
|
+
|
|
2006
|
+
# Get phone provisioning capabilities
|
|
2007
|
+
# Get supported provider-country variant capabilities for advanced provisioning
|
|
2008
|
+
# @param phone_country [String]
|
|
2009
|
+
# @param [Hash] opts the optional parameters
|
|
2010
|
+
# @option opts [String] :provider_label
|
|
2011
|
+
# @return [PhoneProviderCapabilitiesResult]
|
|
2012
|
+
def get_phone_provisioning_capabilities(phone_country, opts = {})
|
|
2013
|
+
data, _status_code, _headers = get_phone_provisioning_capabilities_with_http_info(phone_country, opts)
|
|
2014
|
+
data
|
|
2015
|
+
end
|
|
2016
|
+
|
|
2017
|
+
# Get phone provisioning capabilities
|
|
2018
|
+
# Get supported provider-country variant capabilities for advanced provisioning
|
|
2019
|
+
# @param phone_country [String]
|
|
2020
|
+
# @param [Hash] opts the optional parameters
|
|
2021
|
+
# @option opts [String] :provider_label
|
|
2022
|
+
# @return [Array<(PhoneProviderCapabilitiesResult, Integer, Hash)>] PhoneProviderCapabilitiesResult data, response status code and response headers
|
|
2023
|
+
def get_phone_provisioning_capabilities_with_http_info(phone_country, opts = {})
|
|
2024
|
+
if @api_client.config.debugging
|
|
2025
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_provisioning_capabilities ...'
|
|
2026
|
+
end
|
|
2027
|
+
# verify the required parameter 'phone_country' is set
|
|
2028
|
+
if @api_client.config.client_side_validation && phone_country.nil?
|
|
2029
|
+
fail ArgumentError, "Missing the required parameter 'phone_country' when calling PhoneControllerApi.get_phone_provisioning_capabilities"
|
|
2030
|
+
end
|
|
2031
|
+
# verify enum value
|
|
2032
|
+
allowable_values = ["US", "GB", "AU", "CA", "EE", "HK", "PL", "PT", "NL", "IL", "FI", "SE"]
|
|
2033
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(phone_country)
|
|
2034
|
+
fail ArgumentError, "invalid value for \"phone_country\", must be one of #{allowable_values}"
|
|
2035
|
+
end
|
|
2036
|
+
# resource path
|
|
2037
|
+
local_var_path = '/phone/provisioning/capabilities'
|
|
2038
|
+
|
|
2039
|
+
# query parameters
|
|
2040
|
+
query_params = opts[:query_params] || {}
|
|
2041
|
+
query_params[:'phoneCountry'] = phone_country
|
|
2042
|
+
query_params[:'providerLabel'] = opts[:'provider_label'] if !opts[:'provider_label'].nil?
|
|
2043
|
+
|
|
2044
|
+
# header parameters
|
|
2045
|
+
header_params = opts[:header_params] || {}
|
|
2046
|
+
# HTTP header 'Accept' (if needed)
|
|
2047
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
2048
|
+
|
|
2049
|
+
# form parameters
|
|
2050
|
+
form_params = opts[:form_params] || {}
|
|
2051
|
+
|
|
2052
|
+
# http body (model)
|
|
2053
|
+
post_body = opts[:body]
|
|
2054
|
+
|
|
2055
|
+
# return_type
|
|
2056
|
+
return_type = opts[:return_type] || 'PhoneProviderCapabilitiesResult'
|
|
2057
|
+
|
|
2058
|
+
# auth_names
|
|
2059
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
2060
|
+
|
|
2061
|
+
new_options = opts.merge(
|
|
2062
|
+
:header_params => header_params,
|
|
2063
|
+
:query_params => query_params,
|
|
2064
|
+
:form_params => form_params,
|
|
2065
|
+
:body => post_body,
|
|
2066
|
+
:auth_names => auth_names,
|
|
2067
|
+
:return_type => return_type
|
|
2068
|
+
)
|
|
2069
|
+
|
|
2070
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2071
|
+
if @api_client.config.debugging
|
|
2072
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_provisioning_capabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2073
|
+
end
|
|
2074
|
+
return data, status_code, headers
|
|
2075
|
+
end
|
|
2076
|
+
|
|
2077
|
+
# Get phone provisioning job
|
|
2078
|
+
# Get advanced phone provisioning job status
|
|
2079
|
+
# @param job_id [String]
|
|
2080
|
+
# @param [Hash] opts the optional parameters
|
|
2081
|
+
# @return [PhoneProvisioningJobDto]
|
|
2082
|
+
def get_phone_provisioning_job(job_id, opts = {})
|
|
2083
|
+
data, _status_code, _headers = get_phone_provisioning_job_with_http_info(job_id, opts)
|
|
2084
|
+
data
|
|
2085
|
+
end
|
|
2086
|
+
|
|
2087
|
+
# Get phone provisioning job
|
|
2088
|
+
# Get advanced phone provisioning job status
|
|
2089
|
+
# @param job_id [String]
|
|
1111
2090
|
# @param [Hash] opts the optional parameters
|
|
1112
|
-
# @
|
|
1113
|
-
|
|
1114
|
-
# @option opts [Integer] :size Optional page size for list pagination
|
|
1115
|
-
# @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
|
|
1118
|
-
# @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 = {})
|
|
2091
|
+
# @return [Array<(PhoneProvisioningJobDto, Integer, Hash)>] PhoneProvisioningJobDto data, response status code and response headers
|
|
2092
|
+
def get_phone_provisioning_job_with_http_info(job_id, opts = {})
|
|
1123
2093
|
if @api_client.config.debugging
|
|
1124
|
-
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.
|
|
1125
|
-
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}"
|
|
2094
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_provisioning_job ...'
|
|
1129
2095
|
end
|
|
1130
|
-
|
|
1131
|
-
if @api_client.config.client_side_validation &&
|
|
1132
|
-
fail ArgumentError, "
|
|
2096
|
+
# verify the required parameter 'job_id' is set
|
|
2097
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
|
2098
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling PhoneControllerApi.get_phone_provisioning_job"
|
|
1133
2099
|
end
|
|
1134
2100
|
# resource path
|
|
1135
|
-
local_var_path = '/phone/
|
|
2101
|
+
local_var_path = '/phone/provisioning/jobs/{jobId}'.sub('{' + 'jobId' + '}', CGI.escape(job_id.to_s))
|
|
1136
2102
|
|
|
1137
2103
|
# query parameters
|
|
1138
2104
|
query_params = opts[:query_params] || {}
|
|
1139
|
-
query_params[:'phoneCountry'] = opts[:'phone_country'] if !opts[:'phone_country'].nil?
|
|
1140
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1141
|
-
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
|
1142
|
-
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1143
|
-
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
|
1144
|
-
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
1145
|
-
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
2105
|
|
|
1149
2106
|
# header parameters
|
|
1150
2107
|
header_params = opts[:header_params] || {}
|
|
@@ -1158,7 +2115,7 @@ module MailSlurpClient
|
|
|
1158
2115
|
post_body = opts[:body]
|
|
1159
2116
|
|
|
1160
2117
|
# return_type
|
|
1161
|
-
return_type = opts[:return_type] || '
|
|
2118
|
+
return_type = opts[:return_type] || 'PhoneProvisioningJobDto'
|
|
1162
2119
|
|
|
1163
2120
|
# auth_names
|
|
1164
2121
|
auth_names = opts[:auth_names] || ['API_KEY']
|
|
@@ -1174,30 +2131,36 @@ module MailSlurpClient
|
|
|
1174
2131
|
|
|
1175
2132
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1176
2133
|
if @api_client.config.debugging
|
|
1177
|
-
@api_client.config.logger.debug "API called: PhoneControllerApi#
|
|
2134
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_provisioning_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1178
2135
|
end
|
|
1179
2136
|
return data, status_code, headers
|
|
1180
2137
|
end
|
|
1181
2138
|
|
|
1182
|
-
# Get
|
|
1183
|
-
# Get
|
|
2139
|
+
# Get SMS prepaid credit
|
|
2140
|
+
# Get a specific SMS prepaid credit balance for the authenticated account
|
|
2141
|
+
# @param credit_id [String]
|
|
1184
2142
|
# @param [Hash] opts the optional parameters
|
|
1185
|
-
# @return [
|
|
1186
|
-
def
|
|
1187
|
-
data, _status_code, _headers =
|
|
2143
|
+
# @return [PhoneSmsPrepaidCreditDto]
|
|
2144
|
+
def get_phone_sms_prepaid_credit(credit_id, opts = {})
|
|
2145
|
+
data, _status_code, _headers = get_phone_sms_prepaid_credit_with_http_info(credit_id, opts)
|
|
1188
2146
|
data
|
|
1189
2147
|
end
|
|
1190
2148
|
|
|
1191
|
-
# Get
|
|
1192
|
-
# Get
|
|
2149
|
+
# Get SMS prepaid credit
|
|
2150
|
+
# Get a specific SMS prepaid credit balance for the authenticated account
|
|
2151
|
+
# @param credit_id [String]
|
|
1193
2152
|
# @param [Hash] opts the optional parameters
|
|
1194
|
-
# @return [Array<(
|
|
1195
|
-
def
|
|
2153
|
+
# @return [Array<(PhoneSmsPrepaidCreditDto, Integer, Hash)>] PhoneSmsPrepaidCreditDto data, response status code and response headers
|
|
2154
|
+
def get_phone_sms_prepaid_credit_with_http_info(credit_id, opts = {})
|
|
1196
2155
|
if @api_client.config.debugging
|
|
1197
|
-
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.
|
|
2156
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_sms_prepaid_credit ...'
|
|
2157
|
+
end
|
|
2158
|
+
# verify the required parameter 'credit_id' is set
|
|
2159
|
+
if @api_client.config.client_side_validation && credit_id.nil?
|
|
2160
|
+
fail ArgumentError, "Missing the required parameter 'credit_id' when calling PhoneControllerApi.get_phone_sms_prepaid_credit"
|
|
1198
2161
|
end
|
|
1199
2162
|
# resource path
|
|
1200
|
-
local_var_path = '/phone/
|
|
2163
|
+
local_var_path = '/phone/sms-prepaid-credits/{creditId}'.sub('{' + 'creditId' + '}', CGI.escape(credit_id.to_s))
|
|
1201
2164
|
|
|
1202
2165
|
# query parameters
|
|
1203
2166
|
query_params = opts[:query_params] || {}
|
|
@@ -1214,7 +2177,7 @@ module MailSlurpClient
|
|
|
1214
2177
|
post_body = opts[:body]
|
|
1215
2178
|
|
|
1216
2179
|
# return_type
|
|
1217
|
-
return_type = opts[:return_type] || '
|
|
2180
|
+
return_type = opts[:return_type] || 'PhoneSmsPrepaidCreditDto'
|
|
1218
2181
|
|
|
1219
2182
|
# auth_names
|
|
1220
2183
|
auth_names = opts[:auth_names] || ['API_KEY']
|
|
@@ -1230,28 +2193,30 @@ module MailSlurpClient
|
|
|
1230
2193
|
|
|
1231
2194
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1232
2195
|
if @api_client.config.debugging
|
|
1233
|
-
@api_client.config.logger.debug "API called: PhoneControllerApi#
|
|
2196
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_sms_prepaid_credit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1234
2197
|
end
|
|
1235
2198
|
return data, status_code, headers
|
|
1236
2199
|
end
|
|
1237
2200
|
|
|
1238
|
-
# Get
|
|
2201
|
+
# Get SMS prepaid credits
|
|
2202
|
+
# List SMS prepaid credits for the authenticated account
|
|
1239
2203
|
# @param [Hash] opts the optional parameters
|
|
1240
|
-
# @return [
|
|
1241
|
-
def
|
|
1242
|
-
data, _status_code, _headers =
|
|
2204
|
+
# @return [PhoneSmsPrepaidCreditsDto]
|
|
2205
|
+
def get_phone_sms_prepaid_credits(opts = {})
|
|
2206
|
+
data, _status_code, _headers = get_phone_sms_prepaid_credits_with_http_info(opts)
|
|
1243
2207
|
data
|
|
1244
2208
|
end
|
|
1245
2209
|
|
|
1246
|
-
# Get
|
|
2210
|
+
# Get SMS prepaid credits
|
|
2211
|
+
# List SMS prepaid credits for the authenticated account
|
|
1247
2212
|
# @param [Hash] opts the optional parameters
|
|
1248
|
-
# @return [Array<(
|
|
1249
|
-
def
|
|
2213
|
+
# @return [Array<(PhoneSmsPrepaidCreditsDto, Integer, Hash)>] PhoneSmsPrepaidCreditsDto data, response status code and response headers
|
|
2214
|
+
def get_phone_sms_prepaid_credits_with_http_info(opts = {})
|
|
1250
2215
|
if @api_client.config.debugging
|
|
1251
|
-
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.
|
|
2216
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_sms_prepaid_credits ...'
|
|
1252
2217
|
end
|
|
1253
2218
|
# resource path
|
|
1254
|
-
local_var_path = '/phone/
|
|
2219
|
+
local_var_path = '/phone/sms-prepaid-credits'
|
|
1255
2220
|
|
|
1256
2221
|
# query parameters
|
|
1257
2222
|
query_params = opts[:query_params] || {}
|
|
@@ -1268,7 +2233,7 @@ module MailSlurpClient
|
|
|
1268
2233
|
post_body = opts[:body]
|
|
1269
2234
|
|
|
1270
2235
|
# return_type
|
|
1271
|
-
return_type = opts[:return_type] || '
|
|
2236
|
+
return_type = opts[:return_type] || 'PhoneSmsPrepaidCreditsDto'
|
|
1272
2237
|
|
|
1273
2238
|
# auth_names
|
|
1274
2239
|
auth_names = opts[:auth_names] || ['API_KEY']
|
|
@@ -1284,7 +2249,7 @@ module MailSlurpClient
|
|
|
1284
2249
|
|
|
1285
2250
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1286
2251
|
if @api_client.config.debugging
|
|
1287
|
-
@api_client.config.logger.debug "API called: PhoneControllerApi#
|
|
2252
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_sms_prepaid_credits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1288
2253
|
end
|
|
1289
2254
|
return data, status_code, headers
|
|
1290
2255
|
end
|
|
@@ -1589,6 +2554,202 @@ module MailSlurpClient
|
|
|
1589
2554
|
return data, status_code, headers
|
|
1590
2555
|
end
|
|
1591
2556
|
|
|
2557
|
+
# Release phone pool lease
|
|
2558
|
+
# Release an active phone pool lease
|
|
2559
|
+
# @param pool_id [String]
|
|
2560
|
+
# @param lease_id [String]
|
|
2561
|
+
# @param [Hash] opts the optional parameters
|
|
2562
|
+
# @return [nil]
|
|
2563
|
+
def release_phone_pool_lease(pool_id, lease_id, opts = {})
|
|
2564
|
+
release_phone_pool_lease_with_http_info(pool_id, lease_id, opts)
|
|
2565
|
+
nil
|
|
2566
|
+
end
|
|
2567
|
+
|
|
2568
|
+
# Release phone pool lease
|
|
2569
|
+
# Release an active phone pool lease
|
|
2570
|
+
# @param pool_id [String]
|
|
2571
|
+
# @param lease_id [String]
|
|
2572
|
+
# @param [Hash] opts the optional parameters
|
|
2573
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2574
|
+
def release_phone_pool_lease_with_http_info(pool_id, lease_id, opts = {})
|
|
2575
|
+
if @api_client.config.debugging
|
|
2576
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.release_phone_pool_lease ...'
|
|
2577
|
+
end
|
|
2578
|
+
# verify the required parameter 'pool_id' is set
|
|
2579
|
+
if @api_client.config.client_side_validation && pool_id.nil?
|
|
2580
|
+
fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.release_phone_pool_lease"
|
|
2581
|
+
end
|
|
2582
|
+
# verify the required parameter 'lease_id' is set
|
|
2583
|
+
if @api_client.config.client_side_validation && lease_id.nil?
|
|
2584
|
+
fail ArgumentError, "Missing the required parameter 'lease_id' when calling PhoneControllerApi.release_phone_pool_lease"
|
|
2585
|
+
end
|
|
2586
|
+
# resource path
|
|
2587
|
+
local_var_path = '/phone/pools/{poolId}/leases/{leaseId}'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s)).sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))
|
|
2588
|
+
|
|
2589
|
+
# query parameters
|
|
2590
|
+
query_params = opts[:query_params] || {}
|
|
2591
|
+
|
|
2592
|
+
# header parameters
|
|
2593
|
+
header_params = opts[:header_params] || {}
|
|
2594
|
+
|
|
2595
|
+
# form parameters
|
|
2596
|
+
form_params = opts[:form_params] || {}
|
|
2597
|
+
|
|
2598
|
+
# http body (model)
|
|
2599
|
+
post_body = opts[:body]
|
|
2600
|
+
|
|
2601
|
+
# return_type
|
|
2602
|
+
return_type = opts[:return_type]
|
|
2603
|
+
|
|
2604
|
+
# auth_names
|
|
2605
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
2606
|
+
|
|
2607
|
+
new_options = opts.merge(
|
|
2608
|
+
:header_params => header_params,
|
|
2609
|
+
:query_params => query_params,
|
|
2610
|
+
:form_params => form_params,
|
|
2611
|
+
:body => post_body,
|
|
2612
|
+
:auth_names => auth_names,
|
|
2613
|
+
:return_type => return_type
|
|
2614
|
+
)
|
|
2615
|
+
|
|
2616
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
2617
|
+
if @api_client.config.debugging
|
|
2618
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#release_phone_pool_lease\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2619
|
+
end
|
|
2620
|
+
return data, status_code, headers
|
|
2621
|
+
end
|
|
2622
|
+
|
|
2623
|
+
# Remove phone number from phone pool
|
|
2624
|
+
# Remove a phone number from a pool. If the number is leased from this pool the lease is released.
|
|
2625
|
+
# @param pool_id [String]
|
|
2626
|
+
# @param phone_number_id [String]
|
|
2627
|
+
# @param [Hash] opts the optional parameters
|
|
2628
|
+
# @return [nil]
|
|
2629
|
+
def remove_phone_number_from_phone_pool(pool_id, phone_number_id, opts = {})
|
|
2630
|
+
remove_phone_number_from_phone_pool_with_http_info(pool_id, phone_number_id, opts)
|
|
2631
|
+
nil
|
|
2632
|
+
end
|
|
2633
|
+
|
|
2634
|
+
# Remove phone number from phone pool
|
|
2635
|
+
# Remove a phone number from a pool. If the number is leased from this pool the lease is released.
|
|
2636
|
+
# @param pool_id [String]
|
|
2637
|
+
# @param phone_number_id [String]
|
|
2638
|
+
# @param [Hash] opts the optional parameters
|
|
2639
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2640
|
+
def remove_phone_number_from_phone_pool_with_http_info(pool_id, phone_number_id, opts = {})
|
|
2641
|
+
if @api_client.config.debugging
|
|
2642
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.remove_phone_number_from_phone_pool ...'
|
|
2643
|
+
end
|
|
2644
|
+
# verify the required parameter 'pool_id' is set
|
|
2645
|
+
if @api_client.config.client_side_validation && pool_id.nil?
|
|
2646
|
+
fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.remove_phone_number_from_phone_pool"
|
|
2647
|
+
end
|
|
2648
|
+
# verify the required parameter 'phone_number_id' is set
|
|
2649
|
+
if @api_client.config.client_side_validation && phone_number_id.nil?
|
|
2650
|
+
fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.remove_phone_number_from_phone_pool"
|
|
2651
|
+
end
|
|
2652
|
+
# resource path
|
|
2653
|
+
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))
|
|
2654
|
+
|
|
2655
|
+
# query parameters
|
|
2656
|
+
query_params = opts[:query_params] || {}
|
|
2657
|
+
|
|
2658
|
+
# header parameters
|
|
2659
|
+
header_params = opts[:header_params] || {}
|
|
2660
|
+
|
|
2661
|
+
# form parameters
|
|
2662
|
+
form_params = opts[:form_params] || {}
|
|
2663
|
+
|
|
2664
|
+
# http body (model)
|
|
2665
|
+
post_body = opts[:body]
|
|
2666
|
+
|
|
2667
|
+
# return_type
|
|
2668
|
+
return_type = opts[:return_type]
|
|
2669
|
+
|
|
2670
|
+
# auth_names
|
|
2671
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
2672
|
+
|
|
2673
|
+
new_options = opts.merge(
|
|
2674
|
+
:header_params => header_params,
|
|
2675
|
+
:query_params => query_params,
|
|
2676
|
+
:form_params => form_params,
|
|
2677
|
+
:body => post_body,
|
|
2678
|
+
:auth_names => auth_names,
|
|
2679
|
+
:return_type => return_type
|
|
2680
|
+
)
|
|
2681
|
+
|
|
2682
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
2683
|
+
if @api_client.config.debugging
|
|
2684
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#remove_phone_number_from_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2685
|
+
end
|
|
2686
|
+
return data, status_code, headers
|
|
2687
|
+
end
|
|
2688
|
+
|
|
2689
|
+
# Search available phone numbers
|
|
2690
|
+
# Search available numbers for advanced provisioning
|
|
2691
|
+
# @param search_available_phone_numbers_options [SearchAvailablePhoneNumbersOptions]
|
|
2692
|
+
# @param [Hash] opts the optional parameters
|
|
2693
|
+
# @return [AvailablePhoneNumbersResult]
|
|
2694
|
+
def search_available_phone_numbers(search_available_phone_numbers_options, opts = {})
|
|
2695
|
+
data, _status_code, _headers = search_available_phone_numbers_with_http_info(search_available_phone_numbers_options, opts)
|
|
2696
|
+
data
|
|
2697
|
+
end
|
|
2698
|
+
|
|
2699
|
+
# Search available phone numbers
|
|
2700
|
+
# Search available numbers for advanced provisioning
|
|
2701
|
+
# @param search_available_phone_numbers_options [SearchAvailablePhoneNumbersOptions]
|
|
2702
|
+
# @param [Hash] opts the optional parameters
|
|
2703
|
+
# @return [Array<(AvailablePhoneNumbersResult, Integer, Hash)>] AvailablePhoneNumbersResult data, response status code and response headers
|
|
2704
|
+
def search_available_phone_numbers_with_http_info(search_available_phone_numbers_options, opts = {})
|
|
2705
|
+
if @api_client.config.debugging
|
|
2706
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.search_available_phone_numbers ...'
|
|
2707
|
+
end
|
|
2708
|
+
# verify the required parameter 'search_available_phone_numbers_options' is set
|
|
2709
|
+
if @api_client.config.client_side_validation && search_available_phone_numbers_options.nil?
|
|
2710
|
+
fail ArgumentError, "Missing the required parameter 'search_available_phone_numbers_options' when calling PhoneControllerApi.search_available_phone_numbers"
|
|
2711
|
+
end
|
|
2712
|
+
# resource path
|
|
2713
|
+
local_var_path = '/phone/provisioning/search'
|
|
2714
|
+
|
|
2715
|
+
# query parameters
|
|
2716
|
+
query_params = opts[:query_params] || {}
|
|
2717
|
+
|
|
2718
|
+
# header parameters
|
|
2719
|
+
header_params = opts[:header_params] || {}
|
|
2720
|
+
# HTTP header 'Accept' (if needed)
|
|
2721
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
2722
|
+
# HTTP header 'Content-Type'
|
|
2723
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
2724
|
+
|
|
2725
|
+
# form parameters
|
|
2726
|
+
form_params = opts[:form_params] || {}
|
|
2727
|
+
|
|
2728
|
+
# http body (model)
|
|
2729
|
+
post_body = opts[:body] || @api_client.object_to_http_body(search_available_phone_numbers_options)
|
|
2730
|
+
|
|
2731
|
+
# return_type
|
|
2732
|
+
return_type = opts[:return_type] || 'AvailablePhoneNumbersResult'
|
|
2733
|
+
|
|
2734
|
+
# auth_names
|
|
2735
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
2736
|
+
|
|
2737
|
+
new_options = opts.merge(
|
|
2738
|
+
:header_params => header_params,
|
|
2739
|
+
:query_params => query_params,
|
|
2740
|
+
:form_params => form_params,
|
|
2741
|
+
:body => post_body,
|
|
2742
|
+
:auth_names => auth_names,
|
|
2743
|
+
:return_type => return_type
|
|
2744
|
+
)
|
|
2745
|
+
|
|
2746
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2747
|
+
if @api_client.config.debugging
|
|
2748
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#search_available_phone_numbers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2749
|
+
end
|
|
2750
|
+
return data, status_code, headers
|
|
2751
|
+
end
|
|
2752
|
+
|
|
1592
2753
|
# Send TXT message from a phone number
|
|
1593
2754
|
# Send SMS from a phone number
|
|
1594
2755
|
# @param phone_number_id [String]
|
|
@@ -1933,6 +3094,76 @@ module MailSlurpClient
|
|
|
1933
3094
|
return data, status_code, headers
|
|
1934
3095
|
end
|
|
1935
3096
|
|
|
3097
|
+
# Update phone pool
|
|
3098
|
+
# Update phone pool metadata such as name or description
|
|
3099
|
+
# @param pool_id [String]
|
|
3100
|
+
# @param update_phone_pool_options [UpdatePhonePoolOptions]
|
|
3101
|
+
# @param [Hash] opts the optional parameters
|
|
3102
|
+
# @return [PhonePoolDetailDto]
|
|
3103
|
+
def update_phone_pool(pool_id, update_phone_pool_options, opts = {})
|
|
3104
|
+
data, _status_code, _headers = update_phone_pool_with_http_info(pool_id, update_phone_pool_options, opts)
|
|
3105
|
+
data
|
|
3106
|
+
end
|
|
3107
|
+
|
|
3108
|
+
# Update phone pool
|
|
3109
|
+
# Update phone pool metadata such as name or description
|
|
3110
|
+
# @param pool_id [String]
|
|
3111
|
+
# @param update_phone_pool_options [UpdatePhonePoolOptions]
|
|
3112
|
+
# @param [Hash] opts the optional parameters
|
|
3113
|
+
# @return [Array<(PhonePoolDetailDto, Integer, Hash)>] PhonePoolDetailDto data, response status code and response headers
|
|
3114
|
+
def update_phone_pool_with_http_info(pool_id, update_phone_pool_options, opts = {})
|
|
3115
|
+
if @api_client.config.debugging
|
|
3116
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.update_phone_pool ...'
|
|
3117
|
+
end
|
|
3118
|
+
# verify the required parameter 'pool_id' is set
|
|
3119
|
+
if @api_client.config.client_side_validation && pool_id.nil?
|
|
3120
|
+
fail ArgumentError, "Missing the required parameter 'pool_id' when calling PhoneControllerApi.update_phone_pool"
|
|
3121
|
+
end
|
|
3122
|
+
# verify the required parameter 'update_phone_pool_options' is set
|
|
3123
|
+
if @api_client.config.client_side_validation && update_phone_pool_options.nil?
|
|
3124
|
+
fail ArgumentError, "Missing the required parameter 'update_phone_pool_options' when calling PhoneControllerApi.update_phone_pool"
|
|
3125
|
+
end
|
|
3126
|
+
# resource path
|
|
3127
|
+
local_var_path = '/phone/pools/{poolId}'.sub('{' + 'poolId' + '}', CGI.escape(pool_id.to_s))
|
|
3128
|
+
|
|
3129
|
+
# query parameters
|
|
3130
|
+
query_params = opts[:query_params] || {}
|
|
3131
|
+
|
|
3132
|
+
# header parameters
|
|
3133
|
+
header_params = opts[:header_params] || {}
|
|
3134
|
+
# HTTP header 'Accept' (if needed)
|
|
3135
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
3136
|
+
# HTTP header 'Content-Type'
|
|
3137
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
3138
|
+
|
|
3139
|
+
# form parameters
|
|
3140
|
+
form_params = opts[:form_params] || {}
|
|
3141
|
+
|
|
3142
|
+
# http body (model)
|
|
3143
|
+
post_body = opts[:body] || @api_client.object_to_http_body(update_phone_pool_options)
|
|
3144
|
+
|
|
3145
|
+
# return_type
|
|
3146
|
+
return_type = opts[:return_type] || 'PhonePoolDetailDto'
|
|
3147
|
+
|
|
3148
|
+
# auth_names
|
|
3149
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
3150
|
+
|
|
3151
|
+
new_options = opts.merge(
|
|
3152
|
+
:header_params => header_params,
|
|
3153
|
+
:query_params => query_params,
|
|
3154
|
+
:form_params => form_params,
|
|
3155
|
+
:body => post_body,
|
|
3156
|
+
:auth_names => auth_names,
|
|
3157
|
+
:return_type => return_type
|
|
3158
|
+
)
|
|
3159
|
+
|
|
3160
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3161
|
+
if @api_client.config.debugging
|
|
3162
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#update_phone_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3163
|
+
end
|
|
3164
|
+
return data, status_code, headers
|
|
3165
|
+
end
|
|
3166
|
+
|
|
1936
3167
|
# Verify validity of a phone number
|
|
1937
3168
|
# Validate a phone number
|
|
1938
3169
|
# @param validate_phone_number_options [ValidatePhoneNumberOptions]
|