mailslurp_client 12.6.0 → 12.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailslurp_client.rb +8 -0
- data/lib/mailslurp_client/api/email_controller_api.rb +7 -5
- data/lib/mailslurp_client/api/inbox_controller_api.rb +96 -14
- data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +548 -0
- data/lib/mailslurp_client/api/missed_email_controller_api.rb +10 -16
- data/lib/mailslurp_client/api/sent_emails_controller_api.rb +150 -4
- data/lib/mailslurp_client/api/tracking_controller_api.rb +5 -2
- data/lib/mailslurp_client/api/webhook_controller_api.rb +55 -1
- data/lib/mailslurp_client/models/abstract_webhook_payload.rb +3 -3
- data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +275 -0
- data/lib/mailslurp_client/models/create_webhook_options.rb +3 -3
- data/lib/mailslurp_client/models/domain_preview.rb +66 -4
- data/lib/mailslurp_client/models/email.rb +11 -1
- data/lib/mailslurp_client/models/email_projection.rb +10 -1
- data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +317 -0
- data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +211 -0
- data/lib/mailslurp_client/models/inbox_forwarder_test_result.rb +227 -0
- data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +299 -0
- data/lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb +225 -0
- data/lib/mailslurp_client/models/tracking_pixel_dto.rb +42 -1
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +37 -1
- data/lib/mailslurp_client/models/webhook_dto.rb +2 -2
- data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +322 -0
- data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_projection.rb +44 -1
- data/lib/mailslurp_client/models/webhook_result_entity.rb +24 -3
- data/lib/mailslurp_client/version.rb +1 -1
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b30658f0733495cbe14304739a5e4d473c9fd1879fe04e77a1de08bebe1ebda
|
4
|
+
data.tar.gz: 36cbfd25f86f748c889e165a9f75d2ce4963d1a6321301893cc12a169529d533
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6e6578ddedee45fe6d211f754fcc382d4794e5fff8155c371159a73b685a911bd920def06aac75f36d3520b462dbcf29f26e5dac2c7b2897e340130804989e9
|
7
|
+
data.tar.gz: fccc3baccf13a1dc499b99f775110bd1cb40668fd89584f1bd00284ce7f2869bad7976f1b8660ce48b4ec050546b5a3fa7ac601e7eaf124a60b43e490dd9d960
|
data/lib/mailslurp_client.rb
CHANGED
@@ -33,6 +33,7 @@ require 'mailslurp_client/models/create_contact_options'
|
|
33
33
|
require 'mailslurp_client/models/create_domain_options'
|
34
34
|
require 'mailslurp_client/models/create_group_options'
|
35
35
|
require 'mailslurp_client/models/create_inbox_dto'
|
36
|
+
require 'mailslurp_client/models/create_inbox_forwarder_options'
|
36
37
|
require 'mailslurp_client/models/create_inbox_ruleset_options'
|
37
38
|
require 'mailslurp_client/models/create_template_options'
|
38
39
|
require 'mailslurp_client/models/create_tracking_pixel_options'
|
@@ -65,6 +66,9 @@ require 'mailslurp_client/models/group_projection'
|
|
65
66
|
require 'mailslurp_client/models/html_validation_result'
|
66
67
|
require 'mailslurp_client/models/ip_address_result'
|
67
68
|
require 'mailslurp_client/models/inbox'
|
69
|
+
require 'mailslurp_client/models/inbox_forwarder_dto'
|
70
|
+
require 'mailslurp_client/models/inbox_forwarder_test_options'
|
71
|
+
require 'mailslurp_client/models/inbox_forwarder_test_result'
|
68
72
|
require 'mailslurp_client/models/inbox_projection'
|
69
73
|
require 'mailslurp_client/models/inbox_ruleset_dto'
|
70
74
|
require 'mailslurp_client/models/inbox_ruleset_test_options'
|
@@ -83,6 +87,7 @@ require 'mailslurp_client/models/page_email_preview'
|
|
83
87
|
require 'mailslurp_client/models/page_email_projection'
|
84
88
|
require 'mailslurp_client/models/page_expired_inbox_record_projection'
|
85
89
|
require 'mailslurp_client/models/page_group_projection'
|
90
|
+
require 'mailslurp_client/models/page_inbox_forwarder_dto'
|
86
91
|
require 'mailslurp_client/models/page_inbox_projection'
|
87
92
|
require 'mailslurp_client/models/page_inbox_ruleset_dto'
|
88
93
|
require 'mailslurp_client/models/page_missed_email_projection'
|
@@ -106,6 +111,7 @@ require 'mailslurp_client/models/sort'
|
|
106
111
|
require 'mailslurp_client/models/template_dto'
|
107
112
|
require 'mailslurp_client/models/template_projection'
|
108
113
|
require 'mailslurp_client/models/template_variable'
|
114
|
+
require 'mailslurp_client/models/test_new_inbox_forwarder_options'
|
109
115
|
require 'mailslurp_client/models/test_new_inbox_ruleset_options'
|
110
116
|
require 'mailslurp_client/models/thread_projection'
|
111
117
|
require 'mailslurp_client/models/tracking_pixel_dto'
|
@@ -121,6 +127,7 @@ require 'mailslurp_client/models/validation_message'
|
|
121
127
|
require 'mailslurp_client/models/verify_email_address_options'
|
122
128
|
require 'mailslurp_client/models/wait_for_conditions'
|
123
129
|
require 'mailslurp_client/models/webhook_dto'
|
130
|
+
require 'mailslurp_client/models/webhook_email_opened_payload'
|
124
131
|
require 'mailslurp_client/models/webhook_new_attachment_payload'
|
125
132
|
require 'mailslurp_client/models/webhook_new_contact_payload'
|
126
133
|
require 'mailslurp_client/models/webhook_new_email_payload'
|
@@ -143,6 +150,7 @@ require 'mailslurp_client/api/export_controller_api'
|
|
143
150
|
require 'mailslurp_client/api/form_controller_api'
|
144
151
|
require 'mailslurp_client/api/group_controller_api'
|
145
152
|
require 'mailslurp_client/api/inbox_controller_api'
|
153
|
+
require 'mailslurp_client/api/inbox_forwarder_controller_api'
|
146
154
|
require 'mailslurp_client/api/inbox_ruleset_controller_api'
|
147
155
|
require 'mailslurp_client/api/mail_server_controller_api'
|
148
156
|
require 'mailslurp_client/api/missed_email_controller_api'
|
@@ -401,10 +401,10 @@ module MailSlurpClient
|
|
401
401
|
# @param email_id [String] ID of email
|
402
402
|
# @param forward_email_options [ForwardEmailOptions] forwardEmailOptions
|
403
403
|
# @param [Hash] opts the optional parameters
|
404
|
-
# @return [
|
404
|
+
# @return [SentEmailDto]
|
405
405
|
def forward_email(email_id, forward_email_options, opts = {})
|
406
|
-
forward_email_with_http_info(email_id, forward_email_options, opts)
|
407
|
-
|
406
|
+
data, _status_code, _headers = forward_email_with_http_info(email_id, forward_email_options, opts)
|
407
|
+
data
|
408
408
|
end
|
409
409
|
|
410
410
|
# Forward email to recipients
|
@@ -412,7 +412,7 @@ module MailSlurpClient
|
|
412
412
|
# @param email_id [String] ID of email
|
413
413
|
# @param forward_email_options [ForwardEmailOptions] forwardEmailOptions
|
414
414
|
# @param [Hash] opts the optional parameters
|
415
|
-
# @return [Array<(
|
415
|
+
# @return [Array<(SentEmailDto, Integer, Hash)>] SentEmailDto data, response status code and response headers
|
416
416
|
def forward_email_with_http_info(email_id, forward_email_options, opts = {})
|
417
417
|
if @api_client.config.debugging
|
418
418
|
@api_client.config.logger.debug 'Calling API: EmailControllerApi.forward_email ...'
|
@@ -433,6 +433,8 @@ module MailSlurpClient
|
|
433
433
|
|
434
434
|
# header parameters
|
435
435
|
header_params = opts[:header_params] || {}
|
436
|
+
# HTTP header 'Accept' (if needed)
|
437
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
436
438
|
# HTTP header 'Content-Type'
|
437
439
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
438
440
|
|
@@ -443,7 +445,7 @@ module MailSlurpClient
|
|
443
445
|
post_body = opts[:body] || @api_client.object_to_http_body(forward_email_options)
|
444
446
|
|
445
447
|
# return_type
|
446
|
-
return_type = opts[:return_type]
|
448
|
+
return_type = opts[:return_type] || 'SentEmailDto'
|
447
449
|
|
448
450
|
# auth_names
|
449
451
|
auth_names = opts[:auth_names] || ['API_KEY']
|
@@ -114,10 +114,10 @@ module MailSlurpClient
|
|
114
114
|
# @param inbox_id [String] inboxId
|
115
115
|
# @param create_inbox_ruleset_options [CreateInboxRulesetOptions] createInboxRulesetOptions
|
116
116
|
# @param [Hash] opts the optional parameters
|
117
|
-
# @return [
|
117
|
+
# @return [InboxRulesetDto]
|
118
118
|
def create_inbox_ruleset(inbox_id, create_inbox_ruleset_options, opts = {})
|
119
|
-
create_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, opts)
|
120
|
-
|
119
|
+
data, _status_code, _headers = create_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, opts)
|
120
|
+
data
|
121
121
|
end
|
122
122
|
|
123
123
|
# Create an inbox ruleset
|
@@ -125,7 +125,7 @@ module MailSlurpClient
|
|
125
125
|
# @param inbox_id [String] inboxId
|
126
126
|
# @param create_inbox_ruleset_options [CreateInboxRulesetOptions] createInboxRulesetOptions
|
127
127
|
# @param [Hash] opts the optional parameters
|
128
|
-
# @return [Array<(
|
128
|
+
# @return [Array<(InboxRulesetDto, Integer, Hash)>] InboxRulesetDto data, response status code and response headers
|
129
129
|
def create_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, opts = {})
|
130
130
|
if @api_client.config.debugging
|
131
131
|
@api_client.config.logger.debug 'Calling API: InboxControllerApi.create_inbox_ruleset ...'
|
@@ -146,6 +146,8 @@ module MailSlurpClient
|
|
146
146
|
|
147
147
|
# header parameters
|
148
148
|
header_params = opts[:header_params] || {}
|
149
|
+
# HTTP header 'Accept' (if needed)
|
150
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
149
151
|
# HTTP header 'Content-Type'
|
150
152
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
151
153
|
|
@@ -156,7 +158,7 @@ module MailSlurpClient
|
|
156
158
|
post_body = opts[:body] || @api_client.object_to_http_body(create_inbox_ruleset_options)
|
157
159
|
|
158
160
|
# return_type
|
159
|
-
return_type = opts[:return_type]
|
161
|
+
return_type = opts[:return_type] || 'InboxRulesetDto'
|
160
162
|
|
161
163
|
# auth_names
|
162
164
|
auth_names = opts[:auth_names] || ['API_KEY']
|
@@ -845,8 +847,8 @@ module MailSlurpClient
|
|
845
847
|
return data, status_code, headers
|
846
848
|
end
|
847
849
|
|
848
|
-
# List Inboxes and email
|
849
|
-
# List the inboxes you have created. Note use of the more advanced `getAllEmails` is recommended
|
850
|
+
# List Inboxes and email addresses
|
851
|
+
# List the inboxes you have created. Note use of the more advanced `getAllEmails` is recommended and allows paginated access using a limit and sort parameter.
|
850
852
|
# @param [Hash] opts the optional parameters
|
851
853
|
# @option opts [Integer] :size Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (default to 100)
|
852
854
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
@@ -856,8 +858,8 @@ module MailSlurpClient
|
|
856
858
|
data
|
857
859
|
end
|
858
860
|
|
859
|
-
# List Inboxes and email
|
860
|
-
# List the inboxes you have created. Note use of the more advanced `getAllEmails` is recommended
|
861
|
+
# List Inboxes and email addresses
|
862
|
+
# List the inboxes you have created. Note use of the more advanced `getAllEmails` is recommended and allows paginated access using a limit and sort parameter.
|
861
863
|
# @param [Hash] opts the optional parameters
|
862
864
|
# @option opts [Integer] :size Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries.
|
863
865
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
@@ -991,10 +993,10 @@ module MailSlurpClient
|
|
991
993
|
# @option opts [String] :search_filter Optional search filter
|
992
994
|
# @option opts [Integer] :size Optional page size in inbox ruleset list pagination (default to 20)
|
993
995
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
994
|
-
# @return [
|
996
|
+
# @return [PageInboxRulesetDto]
|
995
997
|
def list_inbox_rulesets(inbox_id, opts = {})
|
996
|
-
list_inbox_rulesets_with_http_info(inbox_id, opts)
|
997
|
-
|
998
|
+
data, _status_code, _headers = list_inbox_rulesets_with_http_info(inbox_id, opts)
|
999
|
+
data
|
998
1000
|
end
|
999
1001
|
|
1000
1002
|
# List inbox rulesets
|
@@ -1005,7 +1007,7 @@ module MailSlurpClient
|
|
1005
1007
|
# @option opts [String] :search_filter Optional search filter
|
1006
1008
|
# @option opts [Integer] :size Optional page size in inbox ruleset list pagination
|
1007
1009
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
1008
|
-
# @return [Array<(
|
1010
|
+
# @return [Array<(PageInboxRulesetDto, Integer, Hash)>] PageInboxRulesetDto data, response status code and response headers
|
1009
1011
|
def list_inbox_rulesets_with_http_info(inbox_id, opts = {})
|
1010
1012
|
if @api_client.config.debugging
|
1011
1013
|
@api_client.config.logger.debug 'Calling API: InboxControllerApi.list_inbox_rulesets ...'
|
@@ -1030,6 +1032,8 @@ module MailSlurpClient
|
|
1030
1032
|
|
1031
1033
|
# header parameters
|
1032
1034
|
header_params = opts[:header_params] || {}
|
1035
|
+
# HTTP header 'Accept' (if needed)
|
1036
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1033
1037
|
|
1034
1038
|
# form parameters
|
1035
1039
|
form_params = opts[:form_params] || {}
|
@@ -1038,7 +1042,7 @@ module MailSlurpClient
|
|
1038
1042
|
post_body = opts[:body]
|
1039
1043
|
|
1040
1044
|
# return_type
|
1041
|
-
return_type = opts[:return_type]
|
1045
|
+
return_type = opts[:return_type] || 'PageInboxRulesetDto'
|
1042
1046
|
|
1043
1047
|
# auth_names
|
1044
1048
|
auth_names = opts[:auth_names] || ['API_KEY']
|
@@ -1059,6 +1063,84 @@ module MailSlurpClient
|
|
1059
1063
|
return data, status_code, headers
|
1060
1064
|
end
|
1061
1065
|
|
1066
|
+
# List inbox tracking pixels
|
1067
|
+
# List all tracking pixels sent from an inbox
|
1068
|
+
# @param inbox_id [String] inboxId
|
1069
|
+
# @param [Hash] opts the optional parameters
|
1070
|
+
# @option opts [Integer] :page Optional page index in inbox tracking pixel list pagination (default to 0)
|
1071
|
+
# @option opts [String] :search_filter Optional search filter
|
1072
|
+
# @option opts [Integer] :size Optional page size in inbox tracking pixel list pagination (default to 20)
|
1073
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
1074
|
+
# @return [PageTrackingPixelProjection]
|
1075
|
+
def list_inbox_tracking_pixels(inbox_id, opts = {})
|
1076
|
+
data, _status_code, _headers = list_inbox_tracking_pixels_with_http_info(inbox_id, opts)
|
1077
|
+
data
|
1078
|
+
end
|
1079
|
+
|
1080
|
+
# List inbox tracking pixels
|
1081
|
+
# List all tracking pixels sent from an inbox
|
1082
|
+
# @param inbox_id [String] inboxId
|
1083
|
+
# @param [Hash] opts the optional parameters
|
1084
|
+
# @option opts [Integer] :page Optional page index in inbox tracking pixel list pagination
|
1085
|
+
# @option opts [String] :search_filter Optional search filter
|
1086
|
+
# @option opts [Integer] :size Optional page size in inbox tracking pixel list pagination
|
1087
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
1088
|
+
# @return [Array<(PageTrackingPixelProjection, Integer, Hash)>] PageTrackingPixelProjection data, response status code and response headers
|
1089
|
+
def list_inbox_tracking_pixels_with_http_info(inbox_id, opts = {})
|
1090
|
+
if @api_client.config.debugging
|
1091
|
+
@api_client.config.logger.debug 'Calling API: InboxControllerApi.list_inbox_tracking_pixels ...'
|
1092
|
+
end
|
1093
|
+
# verify the required parameter 'inbox_id' is set
|
1094
|
+
if @api_client.config.client_side_validation && inbox_id.nil?
|
1095
|
+
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.list_inbox_tracking_pixels"
|
1096
|
+
end
|
1097
|
+
allowable_values = ["ASC", "DESC"]
|
1098
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
1099
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
1100
|
+
end
|
1101
|
+
# resource path
|
1102
|
+
local_var_path = '/inboxes/{inboxId}/tracking-pixels'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
|
1103
|
+
|
1104
|
+
# query parameters
|
1105
|
+
query_params = opts[:query_params] || {}
|
1106
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1107
|
+
query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
|
1108
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
1109
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
1110
|
+
|
1111
|
+
# header parameters
|
1112
|
+
header_params = opts[:header_params] || {}
|
1113
|
+
# HTTP header 'Accept' (if needed)
|
1114
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1115
|
+
|
1116
|
+
# form parameters
|
1117
|
+
form_params = opts[:form_params] || {}
|
1118
|
+
|
1119
|
+
# http body (model)
|
1120
|
+
post_body = opts[:body]
|
1121
|
+
|
1122
|
+
# return_type
|
1123
|
+
return_type = opts[:return_type] || 'PageTrackingPixelProjection'
|
1124
|
+
|
1125
|
+
# auth_names
|
1126
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
1127
|
+
|
1128
|
+
new_options = opts.merge(
|
1129
|
+
:header_params => header_params,
|
1130
|
+
:query_params => query_params,
|
1131
|
+
:form_params => form_params,
|
1132
|
+
:body => post_body,
|
1133
|
+
:auth_names => auth_names,
|
1134
|
+
:return_type => return_type
|
1135
|
+
)
|
1136
|
+
|
1137
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1138
|
+
if @api_client.config.debugging
|
1139
|
+
@api_client.config.logger.debug "API called: InboxControllerApi#list_inbox_tracking_pixels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1140
|
+
end
|
1141
|
+
return data, status_code, headers
|
1142
|
+
end
|
1143
|
+
|
1062
1144
|
# Send Email
|
1063
1145
|
# Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`.
|
1064
1146
|
# @param inbox_id [String] ID of the inbox you want to send the email from
|
@@ -0,0 +1,548 @@
|
|
1
|
+
=begin
|
2
|
+
#MailSlurp API
|
3
|
+
|
4
|
+
#MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 6.5.2
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module MailSlurpClient
|
16
|
+
class InboxForwarderControllerApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create an inbox forwarder
|
23
|
+
# Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
|
24
|
+
# @param create_inbox_forwarder_options [CreateInboxForwarderOptions] createInboxForwarderOptions
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :inbox_id Inbox id to attach forwarder to
|
27
|
+
# @return [InboxForwarderDto]
|
28
|
+
def create_new_inbox_forwarder(create_inbox_forwarder_options, opts = {})
|
29
|
+
data, _status_code, _headers = create_new_inbox_forwarder_with_http_info(create_inbox_forwarder_options, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create an inbox forwarder
|
34
|
+
# Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
|
35
|
+
# @param create_inbox_forwarder_options [CreateInboxForwarderOptions] createInboxForwarderOptions
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [String] :inbox_id Inbox id to attach forwarder to
|
38
|
+
# @return [Array<(InboxForwarderDto, Integer, Hash)>] InboxForwarderDto data, response status code and response headers
|
39
|
+
def create_new_inbox_forwarder_with_http_info(create_inbox_forwarder_options, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.create_new_inbox_forwarder ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'create_inbox_forwarder_options' is set
|
44
|
+
if @api_client.config.client_side_validation && create_inbox_forwarder_options.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'create_inbox_forwarder_options' when calling InboxForwarderControllerApi.create_new_inbox_forwarder"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/forwarders'
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = opts[:query_params] || {}
|
52
|
+
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
53
|
+
|
54
|
+
# header parameters
|
55
|
+
header_params = opts[:header_params] || {}
|
56
|
+
# HTTP header 'Accept' (if needed)
|
57
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
58
|
+
# HTTP header 'Content-Type'
|
59
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = opts[:form_params] || {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = opts[:body] || @api_client.object_to_http_body(create_inbox_forwarder_options)
|
66
|
+
|
67
|
+
# return_type
|
68
|
+
return_type = opts[:return_type] || 'InboxForwarderDto'
|
69
|
+
|
70
|
+
# auth_names
|
71
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
72
|
+
|
73
|
+
new_options = opts.merge(
|
74
|
+
:header_params => header_params,
|
75
|
+
:query_params => query_params,
|
76
|
+
:form_params => form_params,
|
77
|
+
:body => post_body,
|
78
|
+
:auth_names => auth_names,
|
79
|
+
:return_type => return_type
|
80
|
+
)
|
81
|
+
|
82
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
83
|
+
if @api_client.config.debugging
|
84
|
+
@api_client.config.logger.debug "API called: InboxForwarderControllerApi#create_new_inbox_forwarder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
return data, status_code, headers
|
87
|
+
end
|
88
|
+
|
89
|
+
# Delete an inbox forwarder
|
90
|
+
# Delete inbox forwarder
|
91
|
+
# @param id [String] ID of inbox forwarder
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @return [nil]
|
94
|
+
def delete_inbox_forwarder(id, opts = {})
|
95
|
+
delete_inbox_forwarder_with_http_info(id, opts)
|
96
|
+
nil
|
97
|
+
end
|
98
|
+
|
99
|
+
# Delete an inbox forwarder
|
100
|
+
# Delete inbox forwarder
|
101
|
+
# @param id [String] ID of inbox forwarder
|
102
|
+
# @param [Hash] opts the optional parameters
|
103
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
104
|
+
def delete_inbox_forwarder_with_http_info(id, opts = {})
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.delete_inbox_forwarder ...'
|
107
|
+
end
|
108
|
+
# verify the required parameter 'id' is set
|
109
|
+
if @api_client.config.client_side_validation && id.nil?
|
110
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling InboxForwarderControllerApi.delete_inbox_forwarder"
|
111
|
+
end
|
112
|
+
# resource path
|
113
|
+
local_var_path = '/forwarders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
114
|
+
|
115
|
+
# query parameters
|
116
|
+
query_params = opts[:query_params] || {}
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = opts[:header_params] || {}
|
120
|
+
|
121
|
+
# form parameters
|
122
|
+
form_params = opts[:form_params] || {}
|
123
|
+
|
124
|
+
# http body (model)
|
125
|
+
post_body = opts[:body]
|
126
|
+
|
127
|
+
# return_type
|
128
|
+
return_type = opts[:return_type]
|
129
|
+
|
130
|
+
# auth_names
|
131
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
132
|
+
|
133
|
+
new_options = opts.merge(
|
134
|
+
:header_params => header_params,
|
135
|
+
:query_params => query_params,
|
136
|
+
:form_params => form_params,
|
137
|
+
:body => post_body,
|
138
|
+
:auth_names => auth_names,
|
139
|
+
:return_type => return_type
|
140
|
+
)
|
141
|
+
|
142
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
143
|
+
if @api_client.config.debugging
|
144
|
+
@api_client.config.logger.debug "API called: InboxForwarderControllerApi#delete_inbox_forwarder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
145
|
+
end
|
146
|
+
return data, status_code, headers
|
147
|
+
end
|
148
|
+
|
149
|
+
# Delete inbox forwarders
|
150
|
+
# Delete inbox forwarders. Accepts optional inboxId filter.
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @option opts [String] :inbox_id Optional inbox id to attach forwarder to
|
153
|
+
# @return [nil]
|
154
|
+
def delete_inbox_forwarders(opts = {})
|
155
|
+
delete_inbox_forwarders_with_http_info(opts)
|
156
|
+
nil
|
157
|
+
end
|
158
|
+
|
159
|
+
# Delete inbox forwarders
|
160
|
+
# Delete inbox forwarders. Accepts optional inboxId filter.
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @option opts [String] :inbox_id Optional inbox id to attach forwarder to
|
163
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
164
|
+
def delete_inbox_forwarders_with_http_info(opts = {})
|
165
|
+
if @api_client.config.debugging
|
166
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.delete_inbox_forwarders ...'
|
167
|
+
end
|
168
|
+
# resource path
|
169
|
+
local_var_path = '/forwarders'
|
170
|
+
|
171
|
+
# query parameters
|
172
|
+
query_params = opts[:query_params] || {}
|
173
|
+
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
174
|
+
|
175
|
+
# header parameters
|
176
|
+
header_params = opts[:header_params] || {}
|
177
|
+
|
178
|
+
# form parameters
|
179
|
+
form_params = opts[:form_params] || {}
|
180
|
+
|
181
|
+
# http body (model)
|
182
|
+
post_body = opts[:body]
|
183
|
+
|
184
|
+
# return_type
|
185
|
+
return_type = opts[:return_type]
|
186
|
+
|
187
|
+
# auth_names
|
188
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
189
|
+
|
190
|
+
new_options = opts.merge(
|
191
|
+
:header_params => header_params,
|
192
|
+
:query_params => query_params,
|
193
|
+
:form_params => form_params,
|
194
|
+
:body => post_body,
|
195
|
+
:auth_names => auth_names,
|
196
|
+
:return_type => return_type
|
197
|
+
)
|
198
|
+
|
199
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
200
|
+
if @api_client.config.debugging
|
201
|
+
@api_client.config.logger.debug "API called: InboxForwarderControllerApi#delete_inbox_forwarders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
202
|
+
end
|
203
|
+
return data, status_code, headers
|
204
|
+
end
|
205
|
+
|
206
|
+
# Get an inbox forwarder
|
207
|
+
# Get inbox ruleset
|
208
|
+
# @param id [String] ID of inbox forwarder
|
209
|
+
# @param [Hash] opts the optional parameters
|
210
|
+
# @return [InboxForwarderDto]
|
211
|
+
def get_inbox_forwarder(id, opts = {})
|
212
|
+
data, _status_code, _headers = get_inbox_forwarder_with_http_info(id, opts)
|
213
|
+
data
|
214
|
+
end
|
215
|
+
|
216
|
+
# Get an inbox forwarder
|
217
|
+
# Get inbox ruleset
|
218
|
+
# @param id [String] ID of inbox forwarder
|
219
|
+
# @param [Hash] opts the optional parameters
|
220
|
+
# @return [Array<(InboxForwarderDto, Integer, Hash)>] InboxForwarderDto data, response status code and response headers
|
221
|
+
def get_inbox_forwarder_with_http_info(id, opts = {})
|
222
|
+
if @api_client.config.debugging
|
223
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.get_inbox_forwarder ...'
|
224
|
+
end
|
225
|
+
# verify the required parameter 'id' is set
|
226
|
+
if @api_client.config.client_side_validation && id.nil?
|
227
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling InboxForwarderControllerApi.get_inbox_forwarder"
|
228
|
+
end
|
229
|
+
# resource path
|
230
|
+
local_var_path = '/forwarders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
231
|
+
|
232
|
+
# query parameters
|
233
|
+
query_params = opts[:query_params] || {}
|
234
|
+
|
235
|
+
# header parameters
|
236
|
+
header_params = opts[:header_params] || {}
|
237
|
+
# HTTP header 'Accept' (if needed)
|
238
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
239
|
+
|
240
|
+
# form parameters
|
241
|
+
form_params = opts[:form_params] || {}
|
242
|
+
|
243
|
+
# http body (model)
|
244
|
+
post_body = opts[:body]
|
245
|
+
|
246
|
+
# return_type
|
247
|
+
return_type = opts[:return_type] || 'InboxForwarderDto'
|
248
|
+
|
249
|
+
# auth_names
|
250
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
251
|
+
|
252
|
+
new_options = opts.merge(
|
253
|
+
:header_params => header_params,
|
254
|
+
:query_params => query_params,
|
255
|
+
:form_params => form_params,
|
256
|
+
:body => post_body,
|
257
|
+
:auth_names => auth_names,
|
258
|
+
:return_type => return_type
|
259
|
+
)
|
260
|
+
|
261
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug "API called: InboxForwarderControllerApi#get_inbox_forwarder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
264
|
+
end
|
265
|
+
return data, status_code, headers
|
266
|
+
end
|
267
|
+
|
268
|
+
# List inbox forwarders
|
269
|
+
# List all forwarders attached to an inbox
|
270
|
+
# @param [Hash] opts the optional parameters
|
271
|
+
# @option opts [String] :inbox_id Optional inbox id to get forwarders from
|
272
|
+
# @option opts [Integer] :page Optional page index in inbox forwarder list pagination (default to 0)
|
273
|
+
# @option opts [String] :search_filter Optional search filter
|
274
|
+
# @option opts [Integer] :size Optional page size in inbox forwarder list pagination (default to 20)
|
275
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
276
|
+
# @return [PageInboxForwarderDto]
|
277
|
+
def get_inbox_forwarders(opts = {})
|
278
|
+
data, _status_code, _headers = get_inbox_forwarders_with_http_info(opts)
|
279
|
+
data
|
280
|
+
end
|
281
|
+
|
282
|
+
# List inbox forwarders
|
283
|
+
# List all forwarders attached to an inbox
|
284
|
+
# @param [Hash] opts the optional parameters
|
285
|
+
# @option opts [String] :inbox_id Optional inbox id to get forwarders from
|
286
|
+
# @option opts [Integer] :page Optional page index in inbox forwarder list pagination
|
287
|
+
# @option opts [String] :search_filter Optional search filter
|
288
|
+
# @option opts [Integer] :size Optional page size in inbox forwarder list pagination
|
289
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
290
|
+
# @return [Array<(PageInboxForwarderDto, Integer, Hash)>] PageInboxForwarderDto data, response status code and response headers
|
291
|
+
def get_inbox_forwarders_with_http_info(opts = {})
|
292
|
+
if @api_client.config.debugging
|
293
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.get_inbox_forwarders ...'
|
294
|
+
end
|
295
|
+
allowable_values = ["ASC", "DESC"]
|
296
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
297
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
298
|
+
end
|
299
|
+
# resource path
|
300
|
+
local_var_path = '/forwarders'
|
301
|
+
|
302
|
+
# query parameters
|
303
|
+
query_params = opts[:query_params] || {}
|
304
|
+
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
305
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
306
|
+
query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
|
307
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
308
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
309
|
+
|
310
|
+
# header parameters
|
311
|
+
header_params = opts[:header_params] || {}
|
312
|
+
# HTTP header 'Accept' (if needed)
|
313
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
314
|
+
|
315
|
+
# form parameters
|
316
|
+
form_params = opts[:form_params] || {}
|
317
|
+
|
318
|
+
# http body (model)
|
319
|
+
post_body = opts[:body]
|
320
|
+
|
321
|
+
# return_type
|
322
|
+
return_type = opts[:return_type] || 'PageInboxForwarderDto'
|
323
|
+
|
324
|
+
# auth_names
|
325
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
326
|
+
|
327
|
+
new_options = opts.merge(
|
328
|
+
:header_params => header_params,
|
329
|
+
:query_params => query_params,
|
330
|
+
:form_params => form_params,
|
331
|
+
:body => post_body,
|
332
|
+
:auth_names => auth_names,
|
333
|
+
:return_type => return_type
|
334
|
+
)
|
335
|
+
|
336
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
337
|
+
if @api_client.config.debugging
|
338
|
+
@api_client.config.logger.debug "API called: InboxForwarderControllerApi#get_inbox_forwarders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
339
|
+
end
|
340
|
+
return data, status_code, headers
|
341
|
+
end
|
342
|
+
|
343
|
+
# Test an inbox forwarder
|
344
|
+
# Test an inbox forwarder
|
345
|
+
# @param id [String] ID of inbox forwarder
|
346
|
+
# @param inbox_forwarder_test_options [InboxForwarderTestOptions] inboxForwarderTestOptions
|
347
|
+
# @param [Hash] opts the optional parameters
|
348
|
+
# @return [InboxForwarderTestResult]
|
349
|
+
def test_inbox_forwarder(id, inbox_forwarder_test_options, opts = {})
|
350
|
+
data, _status_code, _headers = test_inbox_forwarder_with_http_info(id, inbox_forwarder_test_options, opts)
|
351
|
+
data
|
352
|
+
end
|
353
|
+
|
354
|
+
# Test an inbox forwarder
|
355
|
+
# Test an inbox forwarder
|
356
|
+
# @param id [String] ID of inbox forwarder
|
357
|
+
# @param inbox_forwarder_test_options [InboxForwarderTestOptions] inboxForwarderTestOptions
|
358
|
+
# @param [Hash] opts the optional parameters
|
359
|
+
# @return [Array<(InboxForwarderTestResult, Integer, Hash)>] InboxForwarderTestResult data, response status code and response headers
|
360
|
+
def test_inbox_forwarder_with_http_info(id, inbox_forwarder_test_options, opts = {})
|
361
|
+
if @api_client.config.debugging
|
362
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.test_inbox_forwarder ...'
|
363
|
+
end
|
364
|
+
# verify the required parameter 'id' is set
|
365
|
+
if @api_client.config.client_side_validation && id.nil?
|
366
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling InboxForwarderControllerApi.test_inbox_forwarder"
|
367
|
+
end
|
368
|
+
# verify the required parameter 'inbox_forwarder_test_options' is set
|
369
|
+
if @api_client.config.client_side_validation && inbox_forwarder_test_options.nil?
|
370
|
+
fail ArgumentError, "Missing the required parameter 'inbox_forwarder_test_options' when calling InboxForwarderControllerApi.test_inbox_forwarder"
|
371
|
+
end
|
372
|
+
# resource path
|
373
|
+
local_var_path = '/forwarders/{id}/test'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
374
|
+
|
375
|
+
# query parameters
|
376
|
+
query_params = opts[:query_params] || {}
|
377
|
+
|
378
|
+
# header parameters
|
379
|
+
header_params = opts[:header_params] || {}
|
380
|
+
# HTTP header 'Accept' (if needed)
|
381
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
382
|
+
# HTTP header 'Content-Type'
|
383
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
384
|
+
|
385
|
+
# form parameters
|
386
|
+
form_params = opts[:form_params] || {}
|
387
|
+
|
388
|
+
# http body (model)
|
389
|
+
post_body = opts[:body] || @api_client.object_to_http_body(inbox_forwarder_test_options)
|
390
|
+
|
391
|
+
# return_type
|
392
|
+
return_type = opts[:return_type] || 'InboxForwarderTestResult'
|
393
|
+
|
394
|
+
# auth_names
|
395
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
396
|
+
|
397
|
+
new_options = opts.merge(
|
398
|
+
:header_params => header_params,
|
399
|
+
:query_params => query_params,
|
400
|
+
:form_params => form_params,
|
401
|
+
:body => post_body,
|
402
|
+
:auth_names => auth_names,
|
403
|
+
:return_type => return_type
|
404
|
+
)
|
405
|
+
|
406
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
407
|
+
if @api_client.config.debugging
|
408
|
+
@api_client.config.logger.debug "API called: InboxForwarderControllerApi#test_inbox_forwarder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
409
|
+
end
|
410
|
+
return data, status_code, headers
|
411
|
+
end
|
412
|
+
|
413
|
+
# Test inbox forwarders for inbox
|
414
|
+
# Test inbox forwarders for inbox
|
415
|
+
# @param inbox_id [String] ID of inbox
|
416
|
+
# @param inbox_forwarder_test_options [InboxForwarderTestOptions] inboxForwarderTestOptions
|
417
|
+
# @param [Hash] opts the optional parameters
|
418
|
+
# @return [InboxForwarderTestResult]
|
419
|
+
def test_inbox_forwarders_for_inbox(inbox_id, inbox_forwarder_test_options, opts = {})
|
420
|
+
data, _status_code, _headers = test_inbox_forwarders_for_inbox_with_http_info(inbox_id, inbox_forwarder_test_options, opts)
|
421
|
+
data
|
422
|
+
end
|
423
|
+
|
424
|
+
# Test inbox forwarders for inbox
|
425
|
+
# Test inbox forwarders for inbox
|
426
|
+
# @param inbox_id [String] ID of inbox
|
427
|
+
# @param inbox_forwarder_test_options [InboxForwarderTestOptions] inboxForwarderTestOptions
|
428
|
+
# @param [Hash] opts the optional parameters
|
429
|
+
# @return [Array<(InboxForwarderTestResult, Integer, Hash)>] InboxForwarderTestResult data, response status code and response headers
|
430
|
+
def test_inbox_forwarders_for_inbox_with_http_info(inbox_id, inbox_forwarder_test_options, opts = {})
|
431
|
+
if @api_client.config.debugging
|
432
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.test_inbox_forwarders_for_inbox ...'
|
433
|
+
end
|
434
|
+
# verify the required parameter 'inbox_id' is set
|
435
|
+
if @api_client.config.client_side_validation && inbox_id.nil?
|
436
|
+
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxForwarderControllerApi.test_inbox_forwarders_for_inbox"
|
437
|
+
end
|
438
|
+
# verify the required parameter 'inbox_forwarder_test_options' is set
|
439
|
+
if @api_client.config.client_side_validation && inbox_forwarder_test_options.nil?
|
440
|
+
fail ArgumentError, "Missing the required parameter 'inbox_forwarder_test_options' when calling InboxForwarderControllerApi.test_inbox_forwarders_for_inbox"
|
441
|
+
end
|
442
|
+
# resource path
|
443
|
+
local_var_path = '/forwarders'
|
444
|
+
|
445
|
+
# query parameters
|
446
|
+
query_params = opts[:query_params] || {}
|
447
|
+
query_params[:'inboxId'] = inbox_id
|
448
|
+
|
449
|
+
# header parameters
|
450
|
+
header_params = opts[:header_params] || {}
|
451
|
+
# HTTP header 'Accept' (if needed)
|
452
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
453
|
+
# HTTP header 'Content-Type'
|
454
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
455
|
+
|
456
|
+
# form parameters
|
457
|
+
form_params = opts[:form_params] || {}
|
458
|
+
|
459
|
+
# http body (model)
|
460
|
+
post_body = opts[:body] || @api_client.object_to_http_body(inbox_forwarder_test_options)
|
461
|
+
|
462
|
+
# return_type
|
463
|
+
return_type = opts[:return_type] || 'InboxForwarderTestResult'
|
464
|
+
|
465
|
+
# auth_names
|
466
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
467
|
+
|
468
|
+
new_options = opts.merge(
|
469
|
+
:header_params => header_params,
|
470
|
+
:query_params => query_params,
|
471
|
+
:form_params => form_params,
|
472
|
+
:body => post_body,
|
473
|
+
:auth_names => auth_names,
|
474
|
+
:return_type => return_type
|
475
|
+
)
|
476
|
+
|
477
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
478
|
+
if @api_client.config.debugging
|
479
|
+
@api_client.config.logger.debug "API called: InboxForwarderControllerApi#test_inbox_forwarders_for_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
480
|
+
end
|
481
|
+
return data, status_code, headers
|
482
|
+
end
|
483
|
+
|
484
|
+
# Test new inbox forwarder
|
485
|
+
# Test new inbox forwarder
|
486
|
+
# @param test_new_inbox_forwarder_options [TestNewInboxForwarderOptions] testNewInboxForwarderOptions
|
487
|
+
# @param [Hash] opts the optional parameters
|
488
|
+
# @return [InboxForwarderTestResult]
|
489
|
+
def test_new_inbox_forwarder(test_new_inbox_forwarder_options, opts = {})
|
490
|
+
data, _status_code, _headers = test_new_inbox_forwarder_with_http_info(test_new_inbox_forwarder_options, opts)
|
491
|
+
data
|
492
|
+
end
|
493
|
+
|
494
|
+
# Test new inbox forwarder
|
495
|
+
# Test new inbox forwarder
|
496
|
+
# @param test_new_inbox_forwarder_options [TestNewInboxForwarderOptions] testNewInboxForwarderOptions
|
497
|
+
# @param [Hash] opts the optional parameters
|
498
|
+
# @return [Array<(InboxForwarderTestResult, Integer, Hash)>] InboxForwarderTestResult data, response status code and response headers
|
499
|
+
def test_new_inbox_forwarder_with_http_info(test_new_inbox_forwarder_options, opts = {})
|
500
|
+
if @api_client.config.debugging
|
501
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.test_new_inbox_forwarder ...'
|
502
|
+
end
|
503
|
+
# verify the required parameter 'test_new_inbox_forwarder_options' is set
|
504
|
+
if @api_client.config.client_side_validation && test_new_inbox_forwarder_options.nil?
|
505
|
+
fail ArgumentError, "Missing the required parameter 'test_new_inbox_forwarder_options' when calling InboxForwarderControllerApi.test_new_inbox_forwarder"
|
506
|
+
end
|
507
|
+
# resource path
|
508
|
+
local_var_path = '/forwarders'
|
509
|
+
|
510
|
+
# query parameters
|
511
|
+
query_params = opts[:query_params] || {}
|
512
|
+
|
513
|
+
# header parameters
|
514
|
+
header_params = opts[:header_params] || {}
|
515
|
+
# HTTP header 'Accept' (if needed)
|
516
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
517
|
+
# HTTP header 'Content-Type'
|
518
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
519
|
+
|
520
|
+
# form parameters
|
521
|
+
form_params = opts[:form_params] || {}
|
522
|
+
|
523
|
+
# http body (model)
|
524
|
+
post_body = opts[:body] || @api_client.object_to_http_body(test_new_inbox_forwarder_options)
|
525
|
+
|
526
|
+
# return_type
|
527
|
+
return_type = opts[:return_type] || 'InboxForwarderTestResult'
|
528
|
+
|
529
|
+
# auth_names
|
530
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
531
|
+
|
532
|
+
new_options = opts.merge(
|
533
|
+
:header_params => header_params,
|
534
|
+
:query_params => query_params,
|
535
|
+
:form_params => form_params,
|
536
|
+
:body => post_body,
|
537
|
+
:auth_names => auth_names,
|
538
|
+
:return_type => return_type
|
539
|
+
)
|
540
|
+
|
541
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
542
|
+
if @api_client.config.debugging
|
543
|
+
@api_client.config.logger.debug "API called: InboxForwarderControllerApi#test_new_inbox_forwarder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
544
|
+
end
|
545
|
+
return data, status_code, headers
|
546
|
+
end
|
547
|
+
end
|
548
|
+
end
|