mailslurp_client 17.3.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.
- checksums.yaml +4 -4
- data/lib/mailslurp_client/api/attachment_controller_api.rb +5 -5
- data/lib/mailslurp_client/api/email_controller_api.rb +2 -2
- data/lib/mailslurp_client/api/email_verification_controller_api.rb +64 -0
- data/lib/mailslurp_client/api/inbox_controller_api.rb +229 -0
- data/lib/mailslurp_client/api/phone_controller_api.rb +334 -0
- data/lib/mailslurp_client/models/abstract_webhook_payload.rb +13 -13
- data/lib/mailslurp_client/models/alias_projection.rb +29 -29
- data/lib/mailslurp_client/models/alias_thread_projection.rb +16 -16
- data/lib/mailslurp_client/models/attachment_projection.rb +29 -29
- data/lib/mailslurp_client/models/bounce_recipient_projection.rb +15 -15
- data/lib/mailslurp_client/models/connector_event_projection.rb +30 -30
- data/lib/mailslurp_client/models/connector_projection.rb +10 -10
- data/lib/mailslurp_client/models/contact_projection.rb +15 -15
- data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +58 -29
- data/lib/mailslurp_client/models/create_inbox_replier_options.rb +39 -33
- data/lib/mailslurp_client/models/create_phone_number_options.rb +37 -4
- data/lib/mailslurp_client/models/email_intelligence_list_result.rb +285 -0
- data/lib/mailslurp_client/models/email_intelligence_options.rb +308 -0
- data/lib/mailslurp_client/models/email_intelligence_result_dto.rb +256 -0
- data/lib/mailslurp_client/models/email_intelligence_score_breakdown_dto.rb +296 -0
- data/lib/mailslurp_client/models/email_intelligence_signals_dto.rb +352 -0
- data/lib/mailslurp_client/models/email_intelligence_tests_options.rb +253 -0
- data/lib/mailslurp_client/models/email_thread_projection.rb +16 -16
- data/lib/mailslurp_client/models/entity_favourite_item_projection.rb +13 -13
- data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +15 -15
- data/lib/mailslurp_client/models/extract_attachment_text_options.rb +1 -1
- data/lib/mailslurp_client/models/extract_attachment_text_result.rb +1 -1
- data/lib/mailslurp_client/models/group_projection.rb +14 -14
- data/lib/mailslurp_client/models/guest_portal_user_projection.rb +24 -24
- data/lib/mailslurp_client/models/import_email_options.rb +269 -0
- data/lib/mailslurp_client/models/inbox_automation_match_option.rb +308 -0
- data/lib/mailslurp_client/models/inbox_automation_match_options.rb +273 -0
- data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +65 -17
- data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +16 -16
- data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +17 -9
- data/lib/mailslurp_client/models/inbox_replier_dto.rb +41 -16
- data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +16 -16
- data/lib/mailslurp_client/models/inline_object.rb +12 -58
- data/lib/mailslurp_client/models/inline_object1.rb +58 -12
- data/lib/mailslurp_client/models/inline_object2.rb +211 -0
- data/lib/mailslurp_client/models/opt_in_identity_projection.rb +18 -18
- data/lib/mailslurp_client/models/page_ai_transform_mapping_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_ai_transform_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_alias.rb +24 -24
- data/lib/mailslurp_client/models/page_alias_thread_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_attachment_entity.rb +24 -24
- data/lib/mailslurp_client/models/page_bounced_email.rb +24 -24
- data/lib/mailslurp_client/models/page_bounced_recipients.rb +24 -24
- data/lib/mailslurp_client/models/page_complaint.rb +24 -24
- data/lib/mailslurp_client/models/page_connector.rb +24 -24
- data/lib/mailslurp_client/models/page_connector_events.rb +24 -24
- data/lib/mailslurp_client/models/page_contact_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_delivery_status.rb +24 -24
- data/lib/mailslurp_client/models/page_device_preview_run_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_email_preview.rb +24 -24
- data/lib/mailslurp_client/models/page_email_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_email_thread_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_email_validation_request.rb +24 -24
- data/lib/mailslurp_client/models/page_entity_automation_items.rb +24 -24
- data/lib/mailslurp_client/models/page_entity_event_items.rb +24 -24
- data/lib/mailslurp_client/models/page_entity_favourite_items.rb +24 -24
- data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_group_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_guest_portal_users.rb +24 -24
- data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +24 -24
- data/lib/mailslurp_client/models/page_inbox_forwarder_events.rb +24 -24
- data/lib/mailslurp_client/models/page_inbox_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_inbox_replier_dto.rb +24 -24
- data/lib/mailslurp_client/models/page_inbox_replier_events.rb +24 -24
- data/lib/mailslurp_client/models/page_inbox_tags.rb +24 -24
- data/lib/mailslurp_client/models/page_list_unsubscribe_recipients.rb +24 -24
- data/lib/mailslurp_client/models/page_missed_email_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_missed_sms_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_opt_in_identity_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_phone_message_thread_item_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_phone_message_thread_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_phone_number_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_phone_number_release_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_plus_address_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_reputation_items.rb +24 -24
- data/lib/mailslurp_client/models/page_ruleset_dto.rb +24 -24
- data/lib/mailslurp_client/models/page_scheduled_jobs.rb +24 -24
- data/lib/mailslurp_client/models/page_sent_email_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_sent_sms_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_sms_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_template_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_webhook_endpoint_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_webhook_projection.rb +24 -24
- data/lib/mailslurp_client/models/page_webhook_result.rb +24 -24
- data/lib/mailslurp_client/models/pageable_object.rb +13 -13
- data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +15 -15
- data/lib/mailslurp_client/models/phone_number_dto.rb +17 -1
- data/lib/mailslurp_client/models/phone_number_tags_options.rb +213 -0
- data/lib/mailslurp_client/models/plus_address_projection.rb +15 -15
- data/lib/mailslurp_client/models/reputation_item_projection.rb +13 -13
- data/lib/mailslurp_client/models/template_projection.rb +15 -15
- data/lib/mailslurp_client/models/update_inbox_replier_options.rb +39 -33
- data/lib/mailslurp_client/models/webhook_projection.rb +15 -15
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +11 -0
- metadata +13 -2
|
@@ -151,6 +151,76 @@ module MailSlurpClient
|
|
|
151
151
|
return data, status_code, headers
|
|
152
152
|
end
|
|
153
153
|
|
|
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]
|
|
158
|
+
# @param [Hash] opts the optional parameters
|
|
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
|
|
163
|
+
end
|
|
164
|
+
|
|
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]
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
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 = {})
|
|
172
|
+
if @api_client.config.debugging
|
|
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"
|
|
182
|
+
end
|
|
183
|
+
# resource path
|
|
184
|
+
local_var_path = '/phone/numbers/{phoneNumberId}/tags'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_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(phone_number_tags_options)
|
|
201
|
+
|
|
202
|
+
# return_type
|
|
203
|
+
return_type = opts[:return_type] || 'PhoneNumberDto'
|
|
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_number_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
220
|
+
end
|
|
221
|
+
return data, status_code, headers
|
|
222
|
+
end
|
|
223
|
+
|
|
154
224
|
# Add phone numbers to phone pool
|
|
155
225
|
# Add one or more owned phone numbers to a pool
|
|
156
226
|
# @param pool_id [String]
|
|
@@ -1606,6 +1676,68 @@ module MailSlurpClient
|
|
|
1606
1676
|
return data, status_code, headers
|
|
1607
1677
|
end
|
|
1608
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
|
+
|
|
1609
1741
|
# Get phone numbers
|
|
1610
1742
|
# List phone numbers for account
|
|
1611
1743
|
# @param [Hash] opts the optional parameters
|
|
@@ -1621,6 +1753,7 @@ module MailSlurpClient
|
|
|
1621
1753
|
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
|
1622
1754
|
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
|
1623
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
|
|
1624
1757
|
# @option opts [Array<String>] :include Optional phoneIds to include in result
|
|
1625
1758
|
# @option opts [Boolean] :favourite Optionally filter results for favourites only (default to false)
|
|
1626
1759
|
# @return [PagePhoneNumberProjection]
|
|
@@ -1644,6 +1777,7 @@ module MailSlurpClient
|
|
|
1644
1777
|
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
|
1645
1778
|
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
|
1646
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
|
|
1647
1781
|
# @option opts [Array<String>] :include Optional phoneIds to include in result
|
|
1648
1782
|
# @option opts [Boolean] :favourite Optionally filter results for favourites only
|
|
1649
1783
|
# @return [Array<(PagePhoneNumberProjection, Integer, Hash)>] PagePhoneNumberProjection data, response status code and response headers
|
|
@@ -1676,6 +1810,7 @@ module MailSlurpClient
|
|
|
1676
1810
|
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
|
1677
1811
|
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
1678
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?
|
|
1679
1814
|
query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if !opts[:'include'].nil?
|
|
1680
1815
|
query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
|
|
1681
1816
|
|
|
@@ -2310,6 +2445,65 @@ module MailSlurpClient
|
|
|
2310
2445
|
return data, status_code, headers
|
|
2311
2446
|
end
|
|
2312
2447
|
|
|
2448
|
+
# Get phone tags
|
|
2449
|
+
# List all unique tags used by your phone numbers
|
|
2450
|
+
# @param [Hash] opts the optional parameters
|
|
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)
|
|
2455
|
+
data
|
|
2456
|
+
end
|
|
2457
|
+
|
|
2458
|
+
# Get phone tags
|
|
2459
|
+
# List all unique tags used by your phone numbers
|
|
2460
|
+
# @param [Hash] opts the optional parameters
|
|
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 = {})
|
|
2464
|
+
if @api_client.config.debugging
|
|
2465
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_tags ...'
|
|
2466
|
+
end
|
|
2467
|
+
# resource path
|
|
2468
|
+
local_var_path = '/phone/tags'
|
|
2469
|
+
|
|
2470
|
+
# query parameters
|
|
2471
|
+
query_params = opts[:query_params] || {}
|
|
2472
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
2473
|
+
|
|
2474
|
+
# header parameters
|
|
2475
|
+
header_params = opts[:header_params] || {}
|
|
2476
|
+
# HTTP header 'Accept' (if needed)
|
|
2477
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
2478
|
+
|
|
2479
|
+
# form parameters
|
|
2480
|
+
form_params = opts[:form_params] || {}
|
|
2481
|
+
|
|
2482
|
+
# http body (model)
|
|
2483
|
+
post_body = opts[:body]
|
|
2484
|
+
|
|
2485
|
+
# return_type
|
|
2486
|
+
return_type = opts[:return_type] || 'Array<String>'
|
|
2487
|
+
|
|
2488
|
+
# auth_names
|
|
2489
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
2490
|
+
|
|
2491
|
+
new_options = opts.merge(
|
|
2492
|
+
:header_params => header_params,
|
|
2493
|
+
:query_params => query_params,
|
|
2494
|
+
:form_params => form_params,
|
|
2495
|
+
:body => post_body,
|
|
2496
|
+
:auth_names => auth_names,
|
|
2497
|
+
:return_type => return_type
|
|
2498
|
+
)
|
|
2499
|
+
|
|
2500
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2501
|
+
if @api_client.config.debugging
|
|
2502
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#get_phone_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2503
|
+
end
|
|
2504
|
+
return data, status_code, headers
|
|
2505
|
+
end
|
|
2506
|
+
|
|
2313
2507
|
# List sent TXT messages for a phone number
|
|
2314
2508
|
# Get sent SMS messages for a phone number
|
|
2315
2509
|
# @param phone_number_id [String]
|
|
@@ -2686,6 +2880,76 @@ module MailSlurpClient
|
|
|
2686
2880
|
return data, status_code, headers
|
|
2687
2881
|
end
|
|
2688
2882
|
|
|
2883
|
+
# Remove phone number tags
|
|
2884
|
+
# Remove one or more tags from a phone number
|
|
2885
|
+
# @param phone_number_id [String]
|
|
2886
|
+
# @param phone_number_tags_options [PhoneNumberTagsOptions]
|
|
2887
|
+
# @param [Hash] opts the optional parameters
|
|
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)
|
|
2891
|
+
data
|
|
2892
|
+
end
|
|
2893
|
+
|
|
2894
|
+
# Remove phone number tags
|
|
2895
|
+
# Remove one or more tags from a phone number
|
|
2896
|
+
# @param phone_number_id [String]
|
|
2897
|
+
# @param phone_number_tags_options [PhoneNumberTagsOptions]
|
|
2898
|
+
# @param [Hash] opts the optional parameters
|
|
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 = {})
|
|
2901
|
+
if @api_client.config.debugging
|
|
2902
|
+
@api_client.config.logger.debug 'Calling API: PhoneControllerApi.remove_phone_number_tags ...'
|
|
2903
|
+
end
|
|
2904
|
+
# verify the required parameter 'phone_number_id' is set
|
|
2905
|
+
if @api_client.config.client_side_validation && phone_number_id.nil?
|
|
2906
|
+
fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.remove_phone_number_tags"
|
|
2907
|
+
end
|
|
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"
|
|
2911
|
+
end
|
|
2912
|
+
# resource path
|
|
2913
|
+
local_var_path = '/phone/numbers/{phoneNumberId}/tags'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
|
|
2914
|
+
|
|
2915
|
+
# query parameters
|
|
2916
|
+
query_params = opts[:query_params] || {}
|
|
2917
|
+
|
|
2918
|
+
# header parameters
|
|
2919
|
+
header_params = opts[:header_params] || {}
|
|
2920
|
+
# HTTP header 'Accept' (if needed)
|
|
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'])
|
|
2924
|
+
|
|
2925
|
+
# form parameters
|
|
2926
|
+
form_params = opts[:form_params] || {}
|
|
2927
|
+
|
|
2928
|
+
# http body (model)
|
|
2929
|
+
post_body = opts[:body] || @api_client.object_to_http_body(phone_number_tags_options)
|
|
2930
|
+
|
|
2931
|
+
# return_type
|
|
2932
|
+
return_type = opts[:return_type] || 'PhoneNumberDto'
|
|
2933
|
+
|
|
2934
|
+
# auth_names
|
|
2935
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
|
2936
|
+
|
|
2937
|
+
new_options = opts.merge(
|
|
2938
|
+
:header_params => header_params,
|
|
2939
|
+
:query_params => query_params,
|
|
2940
|
+
:form_params => form_params,
|
|
2941
|
+
:body => post_body,
|
|
2942
|
+
:auth_names => auth_names,
|
|
2943
|
+
:return_type => return_type
|
|
2944
|
+
)
|
|
2945
|
+
|
|
2946
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
2947
|
+
if @api_client.config.debugging
|
|
2948
|
+
@api_client.config.logger.debug "API called: PhoneControllerApi#remove_phone_number_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2949
|
+
end
|
|
2950
|
+
return data, status_code, headers
|
|
2951
|
+
end
|
|
2952
|
+
|
|
2689
2953
|
# Search available phone numbers
|
|
2690
2954
|
# Search available numbers for advanced provisioning
|
|
2691
2955
|
# @param search_available_phone_numbers_options [SearchAvailablePhoneNumbersOptions]
|
|
@@ -2953,6 +3217,76 @@ module MailSlurpClient
|
|
|
2953
3217
|
return data, status_code, headers
|
|
2954
3218
|
end
|
|
2955
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
|
+
|
|
2956
3290
|
# Test sending an SMS to a number
|
|
2957
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/
|
|
2958
3292
|
# @param phone_number_id [String]
|
|
@@ -15,14 +15,14 @@ require 'date'
|
|
|
15
15
|
module MailSlurpClient
|
|
16
16
|
# Abstract webhook payload. Use the correct payload type for your webhook event type in order to access all the specific properties for that event. See the `NEW_EMAIL`,`NEW_CONTACT`, `NEW_ATTACHMENT` and `EMAIL_OPENED` payloads for the properties available for those events.
|
|
17
17
|
class AbstractWebhookPayload
|
|
18
|
+
attr_accessor :webhook_name
|
|
19
|
+
|
|
18
20
|
attr_accessor :event_name
|
|
19
21
|
|
|
20
22
|
attr_accessor :webhook_id
|
|
21
23
|
|
|
22
24
|
attr_accessor :message_id
|
|
23
25
|
|
|
24
|
-
attr_accessor :webhook_name
|
|
25
|
-
|
|
26
26
|
class EnumAttributeValidator
|
|
27
27
|
attr_reader :datatype
|
|
28
28
|
attr_reader :allowable_values
|
|
@@ -48,20 +48,20 @@ module MailSlurpClient
|
|
|
48
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
49
|
def self.attribute_map
|
|
50
50
|
{
|
|
51
|
+
:'webhook_name' => :'webhookName',
|
|
51
52
|
:'event_name' => :'eventName',
|
|
52
53
|
:'webhook_id' => :'webhookId',
|
|
53
|
-
:'message_id' => :'messageId'
|
|
54
|
-
:'webhook_name' => :'webhookName'
|
|
54
|
+
:'message_id' => :'messageId'
|
|
55
55
|
}
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
# Attribute type mapping.
|
|
59
59
|
def self.openapi_types
|
|
60
60
|
{
|
|
61
|
+
:'webhook_name' => :'String',
|
|
61
62
|
:'event_name' => :'String',
|
|
62
63
|
:'webhook_id' => :'String',
|
|
63
|
-
:'message_id' => :'String'
|
|
64
|
-
:'webhook_name' => :'String'
|
|
64
|
+
:'message_id' => :'String'
|
|
65
65
|
}
|
|
66
66
|
end
|
|
67
67
|
|
|
@@ -86,6 +86,10 @@ module MailSlurpClient
|
|
|
86
86
|
h[k.to_sym] = v
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
if attributes.key?(:'webhook_name')
|
|
90
|
+
self.webhook_name = attributes[:'webhook_name']
|
|
91
|
+
end
|
|
92
|
+
|
|
89
93
|
if attributes.key?(:'event_name')
|
|
90
94
|
self.event_name = attributes[:'event_name']
|
|
91
95
|
end
|
|
@@ -97,10 +101,6 @@ module MailSlurpClient
|
|
|
97
101
|
if attributes.key?(:'message_id')
|
|
98
102
|
self.message_id = attributes[:'message_id']
|
|
99
103
|
end
|
|
100
|
-
|
|
101
|
-
if attributes.key?(:'webhook_name')
|
|
102
|
-
self.webhook_name = attributes[:'webhook_name']
|
|
103
|
-
end
|
|
104
104
|
end
|
|
105
105
|
|
|
106
106
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -148,10 +148,10 @@ module MailSlurpClient
|
|
|
148
148
|
def ==(o)
|
|
149
149
|
return true if self.equal?(o)
|
|
150
150
|
self.class == o.class &&
|
|
151
|
+
webhook_name == o.webhook_name &&
|
|
151
152
|
event_name == o.event_name &&
|
|
152
153
|
webhook_id == o.webhook_id &&
|
|
153
|
-
message_id == o.message_id
|
|
154
|
-
webhook_name == o.webhook_name
|
|
154
|
+
message_id == o.message_id
|
|
155
155
|
end
|
|
156
156
|
|
|
157
157
|
# @see the `==` method
|
|
@@ -163,7 +163,7 @@ module MailSlurpClient
|
|
|
163
163
|
# Calculates hash code according to all attributes.
|
|
164
164
|
# @return [Integer] Hash code
|
|
165
165
|
def hash
|
|
166
|
-
[event_name, webhook_id, message_id
|
|
166
|
+
[webhook_name, event_name, webhook_id, message_id].hash
|
|
167
167
|
end
|
|
168
168
|
|
|
169
169
|
# Builds the object from hash
|
|
@@ -19,16 +19,16 @@ module MailSlurpClient
|
|
|
19
19
|
|
|
20
20
|
attr_accessor :id
|
|
21
21
|
|
|
22
|
-
attr_accessor :email_address
|
|
23
|
-
|
|
24
22
|
attr_accessor :user_id
|
|
25
23
|
|
|
26
|
-
attr_accessor :
|
|
24
|
+
attr_accessor :email_address
|
|
27
25
|
|
|
28
|
-
attr_accessor :
|
|
26
|
+
attr_accessor :inbox_id
|
|
29
27
|
|
|
30
28
|
attr_accessor :updated_at
|
|
31
29
|
|
|
30
|
+
attr_accessor :created_at
|
|
31
|
+
|
|
32
32
|
attr_accessor :use_threads
|
|
33
33
|
|
|
34
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -36,11 +36,11 @@ module MailSlurpClient
|
|
|
36
36
|
{
|
|
37
37
|
:'name' => :'name',
|
|
38
38
|
:'id' => :'id',
|
|
39
|
-
:'email_address' => :'emailAddress',
|
|
40
39
|
:'user_id' => :'userId',
|
|
40
|
+
:'email_address' => :'emailAddress',
|
|
41
41
|
:'inbox_id' => :'inboxId',
|
|
42
|
-
:'created_at' => :'createdAt',
|
|
43
42
|
:'updated_at' => :'updatedAt',
|
|
43
|
+
:'created_at' => :'createdAt',
|
|
44
44
|
:'use_threads' => :'useThreads'
|
|
45
45
|
}
|
|
46
46
|
end
|
|
@@ -50,11 +50,11 @@ module MailSlurpClient
|
|
|
50
50
|
{
|
|
51
51
|
:'name' => :'String',
|
|
52
52
|
:'id' => :'String',
|
|
53
|
-
:'email_address' => :'String',
|
|
54
53
|
:'user_id' => :'String',
|
|
54
|
+
:'email_address' => :'String',
|
|
55
55
|
:'inbox_id' => :'String',
|
|
56
|
-
:'created_at' => :'DateTime',
|
|
57
56
|
:'updated_at' => :'DateTime',
|
|
57
|
+
:'created_at' => :'DateTime',
|
|
58
58
|
:'use_threads' => :'Boolean'
|
|
59
59
|
}
|
|
60
60
|
end
|
|
@@ -88,26 +88,26 @@ module MailSlurpClient
|
|
|
88
88
|
self.id = attributes[:'id']
|
|
89
89
|
end
|
|
90
90
|
|
|
91
|
-
if attributes.key?(:'email_address')
|
|
92
|
-
self.email_address = attributes[:'email_address']
|
|
93
|
-
end
|
|
94
|
-
|
|
95
91
|
if attributes.key?(:'user_id')
|
|
96
92
|
self.user_id = attributes[:'user_id']
|
|
97
93
|
end
|
|
98
94
|
|
|
99
|
-
if attributes.key?(:'
|
|
100
|
-
self.
|
|
95
|
+
if attributes.key?(:'email_address')
|
|
96
|
+
self.email_address = attributes[:'email_address']
|
|
101
97
|
end
|
|
102
98
|
|
|
103
|
-
if attributes.key?(:'
|
|
104
|
-
self.
|
|
99
|
+
if attributes.key?(:'inbox_id')
|
|
100
|
+
self.inbox_id = attributes[:'inbox_id']
|
|
105
101
|
end
|
|
106
102
|
|
|
107
103
|
if attributes.key?(:'updated_at')
|
|
108
104
|
self.updated_at = attributes[:'updated_at']
|
|
109
105
|
end
|
|
110
106
|
|
|
107
|
+
if attributes.key?(:'created_at')
|
|
108
|
+
self.created_at = attributes[:'created_at']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
111
|
if attributes.key?(:'use_threads')
|
|
112
112
|
self.use_threads = attributes[:'use_threads']
|
|
113
113
|
end
|
|
@@ -121,26 +121,26 @@ module MailSlurpClient
|
|
|
121
121
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
-
if @email_address.nil?
|
|
125
|
-
invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
|
|
126
|
-
end
|
|
127
|
-
|
|
128
124
|
if @user_id.nil?
|
|
129
125
|
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
|
130
126
|
end
|
|
131
127
|
|
|
132
|
-
if @
|
|
133
|
-
invalid_properties.push('invalid value for "
|
|
128
|
+
if @email_address.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
|
|
134
130
|
end
|
|
135
131
|
|
|
136
|
-
if @
|
|
137
|
-
invalid_properties.push('invalid value for "
|
|
132
|
+
if @inbox_id.nil?
|
|
133
|
+
invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
|
|
138
134
|
end
|
|
139
135
|
|
|
140
136
|
if @updated_at.nil?
|
|
141
137
|
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
142
138
|
end
|
|
143
139
|
|
|
140
|
+
if @created_at.nil?
|
|
141
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
142
|
+
end
|
|
143
|
+
|
|
144
144
|
invalid_properties
|
|
145
145
|
end
|
|
146
146
|
|
|
@@ -148,11 +148,11 @@ module MailSlurpClient
|
|
|
148
148
|
# @return true if the model is valid
|
|
149
149
|
def valid?
|
|
150
150
|
return false if @id.nil?
|
|
151
|
-
return false if @email_address.nil?
|
|
152
151
|
return false if @user_id.nil?
|
|
152
|
+
return false if @email_address.nil?
|
|
153
153
|
return false if @inbox_id.nil?
|
|
154
|
-
return false if @created_at.nil?
|
|
155
154
|
return false if @updated_at.nil?
|
|
155
|
+
return false if @created_at.nil?
|
|
156
156
|
true
|
|
157
157
|
end
|
|
158
158
|
|
|
@@ -163,11 +163,11 @@ module MailSlurpClient
|
|
|
163
163
|
self.class == o.class &&
|
|
164
164
|
name == o.name &&
|
|
165
165
|
id == o.id &&
|
|
166
|
-
email_address == o.email_address &&
|
|
167
166
|
user_id == o.user_id &&
|
|
167
|
+
email_address == o.email_address &&
|
|
168
168
|
inbox_id == o.inbox_id &&
|
|
169
|
-
created_at == o.created_at &&
|
|
170
169
|
updated_at == o.updated_at &&
|
|
170
|
+
created_at == o.created_at &&
|
|
171
171
|
use_threads == o.use_threads
|
|
172
172
|
end
|
|
173
173
|
|
|
@@ -180,7 +180,7 @@ module MailSlurpClient
|
|
|
180
180
|
# Calculates hash code according to all attributes.
|
|
181
181
|
# @return [Integer] Hash code
|
|
182
182
|
def hash
|
|
183
|
-
[name, id,
|
|
183
|
+
[name, id, user_id, email_address, inbox_id, updated_at, created_at, use_threads].hash
|
|
184
184
|
end
|
|
185
185
|
|
|
186
186
|
# Builds the object from hash
|