mailslurp_client 5.0.0 → 7.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/README.md +127 -40
  4. data/docs/AttachmentControllerApi.md +124 -0
  5. data/docs/AttachmentMetaData.md +23 -0
  6. data/docs/BasicAuthOptions.md +10 -0
  7. data/docs/BulkActionsControllerApi.md +165 -0
  8. data/docs/BulkSendEmailOptions.md +11 -1
  9. data/docs/CommonActionsControllerApi.md +167 -0
  10. data/docs/ContactControllerApi.md +274 -0
  11. data/docs/ContactDto.md +31 -0
  12. data/docs/ContactProjection.md +27 -0
  13. data/docs/CreateContactOptions.md +31 -0
  14. data/docs/CreateDomainOptions.md +17 -0
  15. data/docs/CreateGroupOptions.md +19 -0
  16. data/docs/CreateTemplateOptions.md +19 -0
  17. data/docs/CreateWebhookOptions.md +13 -2
  18. data/docs/DomainControllerApi.md +223 -0
  19. data/docs/DomainDto.md +29 -0
  20. data/docs/DomainPreview.md +21 -0
  21. data/docs/Email.md +40 -15
  22. data/docs/EmailAnalysis.md +18 -5
  23. data/docs/EmailControllerApi.md +740 -0
  24. data/docs/EmailPreview.md +24 -6
  25. data/docs/EmailProjection.md +33 -0
  26. data/docs/ForwardEmailOptions.md +12 -0
  27. data/docs/GroupContactsDto.md +19 -0
  28. data/docs/GroupControllerApi.md +437 -0
  29. data/docs/GroupDto.md +23 -0
  30. data/docs/GroupProjection.md +23 -0
  31. data/docs/HTMLValidationResult.md +21 -0
  32. data/docs/Inbox.md +26 -4
  33. data/docs/InboxControllerApi.md +652 -0
  34. data/docs/InboxProjection.md +29 -0
  35. data/docs/JsonNode.md +59 -0
  36. data/docs/MatchOption.md +13 -2
  37. data/docs/MatchOptions.md +9 -0
  38. data/docs/PageContactProjection.md +37 -0
  39. data/docs/PageEmailPreview.md +37 -0
  40. data/docs/PageEmailProjection.md +37 -0
  41. data/docs/PageGroupProjection.md +37 -0
  42. data/docs/PageInboxProjection.md +37 -0
  43. data/docs/PageTemplateProjection.md +37 -0
  44. data/docs/PageWebhookProjection.md +37 -0
  45. data/docs/Pageable.md +27 -0
  46. data/docs/RawEmailJson.md +17 -0
  47. data/docs/SendEmailOptions.md +33 -6
  48. data/docs/SetInboxFavouritedOptions.md +17 -0
  49. data/docs/Sort.md +21 -0
  50. data/docs/TemplateControllerApi.md +274 -0
  51. data/docs/TemplateDto.md +25 -0
  52. data/docs/TemplateProjection.md +25 -0
  53. data/docs/TemplateVariable.md +19 -0
  54. data/docs/UnreadCount.md +17 -0
  55. data/docs/UpdateGroupContacts.md +17 -0
  56. data/docs/UpdateInboxOptions.md +25 -0
  57. data/docs/UploadAttachmentOptions.md +12 -1
  58. data/docs/ValidationDto.md +19 -0
  59. data/docs/ValidationMessage.md +19 -0
  60. data/docs/WaitForConditions.md +29 -0
  61. data/docs/WaitForControllerApi.md +317 -0
  62. data/docs/WebhookControllerApi.md +339 -0
  63. data/docs/WebhookDto.md +33 -0
  64. data/docs/WebhookProjection.md +27 -0
  65. data/docs/WebhookTestRequest.md +23 -0
  66. data/docs/WebhookTestResponse.md +19 -0
  67. data/docs/WebhookTestResult.md +21 -0
  68. data/git_push.sh +10 -7
  69. data/lib/mailslurp_client.rb +56 -7
  70. data/lib/mailslurp_client/api/attachment_controller_api.rb +157 -0
  71. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +203 -0
  72. data/lib/mailslurp_client/api/common_actions_controller_api.rb +201 -0
  73. data/lib/mailslurp_client/api/contact_controller_api.rb +323 -0
  74. data/lib/mailslurp_client/api/domain_controller_api.rb +264 -0
  75. data/lib/mailslurp_client/api/email_controller_api.rb +852 -0
  76. data/lib/mailslurp_client/api/group_controller_api.rb +519 -0
  77. data/lib/mailslurp_client/api/inbox_controller_api.rb +763 -0
  78. data/lib/mailslurp_client/api/template_controller_api.rb +323 -0
  79. data/lib/mailslurp_client/api/wait_for_controller_api.rb +359 -0
  80. data/lib/mailslurp_client/api/webhook_controller_api.rb +405 -0
  81. data/lib/mailslurp_client/api_client.rb +36 -39
  82. data/lib/mailslurp_client/api_error.rb +23 -4
  83. data/lib/mailslurp_client/configuration.rb +8 -11
  84. data/lib/mailslurp_client/models/attachment_meta_data.rb +253 -0
  85. data/lib/mailslurp_client/models/basic_auth_options.rb +39 -15
  86. data/lib/mailslurp_client/models/bulk_send_email_options.rb +42 -19
  87. data/lib/mailslurp_client/models/contact_dto.rb +288 -0
  88. data/lib/mailslurp_client/models/contact_projection.rb +261 -0
  89. data/lib/mailslurp_client/models/create_contact_options.rb +277 -0
  90. data/lib/mailslurp_client/models/create_domain_options.rb +208 -0
  91. data/lib/mailslurp_client/models/create_group_options.rb +220 -0
  92. data/lib/mailslurp_client/models/create_template_options.rb +225 -0
  93. data/lib/mailslurp_client/models/create_webhook_options.rb +54 -29
  94. data/lib/mailslurp_client/models/domain_dto.rb +296 -0
  95. data/lib/mailslurp_client/models/domain_preview.rb +240 -0
  96. data/lib/mailslurp_client/models/email.rb +86 -78
  97. data/lib/mailslurp_client/models/email_analysis.rb +46 -48
  98. data/lib/mailslurp_client/models/email_preview.rb +77 -41
  99. data/lib/mailslurp_client/models/email_projection.rb +306 -0
  100. data/lib/mailslurp_client/models/forward_email_options.rb +40 -17
  101. data/lib/mailslurp_client/models/group_contacts_dto.rb +227 -0
  102. data/lib/mailslurp_client/models/{webhook.rb → group_dto.rb} +60 -54
  103. data/lib/mailslurp_client/models/group_projection.rb +248 -0
  104. data/lib/mailslurp_client/models/html_validation_result.rb +243 -0
  105. data/lib/mailslurp_client/models/inbox.rb +104 -26
  106. data/lib/mailslurp_client/models/inbox_projection.rb +272 -0
  107. data/lib/mailslurp_client/models/json_node.rb +429 -0
  108. data/lib/mailslurp_client/models/match_option.rb +48 -24
  109. data/lib/mailslurp_client/models/match_options.rb +37 -14
  110. data/lib/mailslurp_client/models/page_contact_projection.rb +298 -0
  111. data/lib/mailslurp_client/models/page_email_preview.rb +298 -0
  112. data/lib/mailslurp_client/models/page_email_projection.rb +298 -0
  113. data/lib/mailslurp_client/models/page_group_projection.rb +298 -0
  114. data/lib/mailslurp_client/models/page_inbox_projection.rb +298 -0
  115. data/lib/mailslurp_client/models/page_template_projection.rb +298 -0
  116. data/lib/mailslurp_client/models/page_webhook_projection.rb +298 -0
  117. data/lib/mailslurp_client/models/pageable.rb +251 -0
  118. data/lib/mailslurp_client/models/raw_email_json.rb +211 -0
  119. data/lib/mailslurp_client/models/send_email_options.rb +141 -46
  120. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +208 -0
  121. data/lib/mailslurp_client/models/sort.rb +224 -0
  122. data/lib/mailslurp_client/models/template_dto.rb +269 -0
  123. data/lib/mailslurp_client/models/template_projection.rb +269 -0
  124. data/lib/mailslurp_client/models/template_variable.rb +259 -0
  125. data/lib/mailslurp_client/models/unread_count.rb +211 -0
  126. data/lib/mailslurp_client/models/update_group_contacts.rb +213 -0
  127. data/lib/mailslurp_client/models/update_inbox_options.rb +250 -0
  128. data/lib/mailslurp_client/models/upload_attachment_options.rb +43 -20
  129. data/lib/mailslurp_client/models/validation_dto.rb +225 -0
  130. data/lib/mailslurp_client/models/validation_message.rb +220 -0
  131. data/lib/mailslurp_client/models/wait_for_conditions.rb +315 -0
  132. data/lib/mailslurp_client/models/webhook_dto.rb +326 -0
  133. data/lib/mailslurp_client/models/webhook_projection.rb +277 -0
  134. data/lib/mailslurp_client/models/webhook_test_request.rb +284 -0
  135. data/lib/mailslurp_client/models/webhook_test_response.rb +215 -0
  136. data/lib/mailslurp_client/models/webhook_test_result.rb +235 -0
  137. data/lib/mailslurp_client/version.rb +5 -5
  138. data/mailslurp_client.gemspec +4 -10
  139. data/spec/api/attachment_controller_api_spec.rb +61 -0
  140. data/spec/api/bulk_actions_controller_api_spec.rb +68 -0
  141. data/spec/api/common_actions_controller_api_spec.rb +129 -0
  142. data/spec/api/contact_controller_api_spec.rb +91 -0
  143. data/spec/api/domain_controller_api_spec.rb +82 -0
  144. data/spec/api/email_controller_api_spec.rb +162 -0
  145. data/spec/api/group_controller_api_spec.rb +126 -0
  146. data/spec/api/inbox_controller_api_spec.rb +172 -0
  147. data/spec/api/template_controller_api_spec.rb +91 -0
  148. data/spec/api/wait_for_controller_api_spec.rb +107 -0
  149. data/spec/api/webhook_controller_api_spec.rb +107 -0
  150. data/spec/api_client_spec.rb +5 -5
  151. data/spec/configuration_spec.rb +4 -4
  152. data/spec/models/attachment_meta_data_spec.rb +59 -0
  153. data/spec/models/basic_auth_options_spec.rb +4 -4
  154. data/spec/models/bulk_send_email_options_spec.rb +4 -4
  155. data/spec/models/contact_dto_spec.rb +83 -0
  156. data/spec/models/contact_projection_spec.rb +71 -0
  157. data/spec/models/create_contact_options_spec.rb +83 -0
  158. data/spec/models/create_domain_options_spec.rb +41 -0
  159. data/spec/models/create_group_options_spec.rb +47 -0
  160. data/spec/models/create_template_options_spec.rb +47 -0
  161. data/spec/models/create_webhook_options_spec.rb +6 -6
  162. data/spec/models/domain_dto_spec.rb +77 -0
  163. data/spec/models/domain_preview_spec.rb +53 -0
  164. data/spec/models/email_analysis_spec.rb +4 -4
  165. data/spec/models/email_preview_spec.rb +41 -5
  166. data/spec/models/email_projection_spec.rb +89 -0
  167. data/spec/models/email_spec.rb +17 -5
  168. data/spec/models/forward_email_options_spec.rb +4 -4
  169. data/spec/models/group_contacts_dto_spec.rb +47 -0
  170. data/spec/models/group_dto_spec.rb +59 -0
  171. data/spec/models/group_projection_spec.rb +59 -0
  172. data/spec/models/html_validation_result_spec.rb +53 -0
  173. data/spec/models/inbox_projection_spec.rb +77 -0
  174. data/spec/models/inbox_spec.rb +35 -5
  175. data/spec/models/json_node_spec.rb +171 -0
  176. data/spec/models/match_option_spec.rb +4 -4
  177. data/spec/models/match_options_spec.rb +4 -4
  178. data/spec/models/page_contact_projection_spec.rb +101 -0
  179. data/spec/models/page_email_preview_spec.rb +101 -0
  180. data/spec/models/page_email_projection_spec.rb +101 -0
  181. data/spec/models/page_group_projection_spec.rb +101 -0
  182. data/spec/models/page_inbox_projection_spec.rb +101 -0
  183. data/spec/models/page_template_projection_spec.rb +101 -0
  184. data/spec/models/page_webhook_projection_spec.rb +101 -0
  185. data/spec/models/pageable_spec.rb +71 -0
  186. data/spec/models/raw_email_json_spec.rb +41 -0
  187. data/spec/models/send_email_options_spec.rb +45 -5
  188. data/spec/models/set_inbox_favourited_options_spec.rb +41 -0
  189. data/spec/models/sort_spec.rb +53 -0
  190. data/spec/models/template_dto_spec.rb +65 -0
  191. data/spec/models/template_projection_spec.rb +65 -0
  192. data/spec/models/template_variable_spec.rb +51 -0
  193. data/spec/models/unread_count_spec.rb +41 -0
  194. data/spec/models/update_group_contacts_spec.rb +41 -0
  195. data/spec/models/{webhook_spec.rb → update_inbox_options_spec.rb} +14 -20
  196. data/spec/models/upload_attachment_options_spec.rb +4 -4
  197. data/spec/models/validation_dto_spec.rb +47 -0
  198. data/spec/models/validation_message_spec.rb +47 -0
  199. data/spec/models/wait_for_conditions_spec.rb +85 -0
  200. data/spec/models/webhook_dto_spec.rb +93 -0
  201. data/spec/models/webhook_projection_spec.rb +71 -0
  202. data/spec/models/webhook_test_request_spec.rb +63 -0
  203. data/spec/models/webhook_test_response_spec.rb +47 -0
  204. data/spec/models/webhook_test_result_spec.rb +53 -0
  205. data/spec/spec_helper.rb +4 -4
  206. metadata +223 -149
  207. data/Gemfile.lock +0 -79
  208. data/docs/CommonOperationsApi.md +0 -499
  209. data/docs/ExtraOperationsApi.md +0 -1021
  210. data/docs/Webhook.md +0 -13
  211. data/lib/mailslurp_client/api/common_operations_api.rb +0 -502
  212. data/lib/mailslurp_client/api/extra_operations_api.rb +0 -1054
  213. data/spec/api/common_operations_api_spec.rb +0 -95
  214. data/spec/api/extra_operations_api_spec.rb +0 -231
data/docs/Webhook.md DELETED
@@ -1,13 +0,0 @@
1
- # MailSlurpClient::Webhook
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **basic_auth** | **BOOLEAN** | Does Webhook expect basic authentication | [optional]
7
- **created_at** | **DateTime** | |
8
- **id** | **String** | ID of the Webhook | [optional]
9
- **inbox_id** | **String** | The inbox that the Webhook will be triggered by | [optional]
10
- **name** | **String** | | [optional]
11
- **updated_at** | **DateTime** | |
12
-
13
-
@@ -1,502 +0,0 @@
1
- =begin
2
- #MailSlurp API
3
-
4
- #For documentation see [developer guide](https://www.mailslurp.com/developers). [Create an account](https://app.mailslurp.com) in the MailSlurp Dashboard to [view your API Key](https://app). For all bugs, feature requests, or help please [see support](https://www.mailslurp.com/support/).
5
-
6
- OpenAPI spec version: 0.0.1-alpha
7
- Contact: contact@mailslurp.dev
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.4
10
-
11
- =end
12
-
13
- require 'uri'
14
-
15
- module MailSlurpClient
16
- class CommonOperationsApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Create new email address
23
- # Returns an Inbox with an `id` and an `emailAddress`
24
- # @param [Hash] opts the optional parameters
25
- # @return [Inbox]
26
- def create_new_email_address(opts = {})
27
- data, _status_code, _headers = create_new_email_address_with_http_info(opts)
28
- data
29
- end
30
-
31
- # Create new email address
32
- # Returns an Inbox with an `id` and an `emailAddress`
33
- # @param [Hash] opts the optional parameters
34
- # @return [Array<(Inbox, Fixnum, Hash)>] Inbox data, response status code and response headers
35
- def create_new_email_address_with_http_info(opts = {})
36
- if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.create_new_email_address ...'
38
- end
39
- # resource path
40
- local_var_path = '/newEmailAddress'
41
-
42
- # query parameters
43
- query_params = {}
44
-
45
- # header parameters
46
- header_params = {}
47
- # HTTP header 'Accept' (if needed)
48
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
-
50
- # form parameters
51
- form_params = {}
52
-
53
- # http body (model)
54
- post_body = nil
55
- auth_names = ['API_KEY']
56
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
57
- :header_params => header_params,
58
- :query_params => query_params,
59
- :form_params => form_params,
60
- :body => post_body,
61
- :auth_names => auth_names,
62
- :return_type => 'Inbox')
63
- if @api_client.config.debugging
64
- @api_client.config.logger.debug "API called: CommonOperationsApi#create_new_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
65
- end
66
- return data, status_code, headers
67
- end
68
-
69
- # Delete an email
70
- # Deletes an email
71
- # @param email_id emailId
72
- # @param [Hash] opts the optional parameters
73
- # @return [nil]
74
- def delete_email(email_id, opts = {})
75
- delete_email_with_http_info(email_id, opts)
76
- nil
77
- end
78
-
79
- # Delete an email
80
- # Deletes an email
81
- # @param email_id emailId
82
- # @param [Hash] opts the optional parameters
83
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
84
- def delete_email_with_http_info(email_id, opts = {})
85
- if @api_client.config.debugging
86
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.delete_email ...'
87
- end
88
- # verify the required parameter 'email_id' is set
89
- if @api_client.config.client_side_validation && email_id.nil?
90
- fail ArgumentError, "Missing the required parameter 'email_id' when calling CommonOperationsApi.delete_email"
91
- end
92
- # resource path
93
- local_var_path = '/deleteEmail'
94
-
95
- # query parameters
96
- query_params = {}
97
- query_params[:'emailId'] = email_id
98
-
99
- # header parameters
100
- header_params = {}
101
-
102
- # form parameters
103
- form_params = {}
104
-
105
- # http body (model)
106
- post_body = nil
107
- auth_names = ['API_KEY']
108
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
109
- :header_params => header_params,
110
- :query_params => query_params,
111
- :form_params => form_params,
112
- :body => post_body,
113
- :auth_names => auth_names)
114
- if @api_client.config.debugging
115
- @api_client.config.logger.debug "API called: CommonOperationsApi#delete_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
116
- end
117
- return data, status_code, headers
118
- end
119
-
120
- # Delete email address and its emails
121
- # Deletes an inbox
122
- # @param inbox_id inboxId
123
- # @param [Hash] opts the optional parameters
124
- # @return [nil]
125
- def delete_email_address(inbox_id, opts = {})
126
- delete_email_address_with_http_info(inbox_id, opts)
127
- nil
128
- end
129
-
130
- # Delete email address and its emails
131
- # Deletes an inbox
132
- # @param inbox_id inboxId
133
- # @param [Hash] opts the optional parameters
134
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
135
- def delete_email_address_with_http_info(inbox_id, opts = {})
136
- if @api_client.config.debugging
137
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.delete_email_address ...'
138
- end
139
- # verify the required parameter 'inbox_id' is set
140
- if @api_client.config.client_side_validation && inbox_id.nil?
141
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling CommonOperationsApi.delete_email_address"
142
- end
143
- # resource path
144
- local_var_path = '/deleteEmailAddress'
145
-
146
- # query parameters
147
- query_params = {}
148
- query_params[:'inboxId'] = inbox_id
149
-
150
- # header parameters
151
- header_params = {}
152
-
153
- # form parameters
154
- form_params = {}
155
-
156
- # http body (model)
157
- post_body = nil
158
- auth_names = ['API_KEY']
159
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
160
- :header_params => header_params,
161
- :query_params => query_params,
162
- :form_params => form_params,
163
- :body => post_body,
164
- :auth_names => auth_names)
165
- if @api_client.config.debugging
166
- @api_client.config.logger.debug "API called: CommonOperationsApi#delete_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
167
- end
168
- return data, status_code, headers
169
- end
170
-
171
- # Delete all emails in an inbox
172
- # Deletes all emails
173
- # @param inbox_id inboxId
174
- # @param [Hash] opts the optional parameters
175
- # @return [nil]
176
- def empty_inbox(inbox_id, opts = {})
177
- empty_inbox_with_http_info(inbox_id, opts)
178
- nil
179
- end
180
-
181
- # Delete all emails in an inbox
182
- # Deletes all emails
183
- # @param inbox_id inboxId
184
- # @param [Hash] opts the optional parameters
185
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
186
- def empty_inbox_with_http_info(inbox_id, opts = {})
187
- if @api_client.config.debugging
188
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.empty_inbox ...'
189
- end
190
- # verify the required parameter 'inbox_id' is set
191
- if @api_client.config.client_side_validation && inbox_id.nil?
192
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling CommonOperationsApi.empty_inbox"
193
- end
194
- # resource path
195
- local_var_path = '/emptyInbox'
196
-
197
- # query parameters
198
- query_params = {}
199
- query_params[:'inboxId'] = inbox_id
200
-
201
- # header parameters
202
- header_params = {}
203
-
204
- # form parameters
205
- form_params = {}
206
-
207
- # http body (model)
208
- post_body = nil
209
- auth_names = ['API_KEY']
210
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
211
- :header_params => header_params,
212
- :query_params => query_params,
213
- :form_params => form_params,
214
- :body => post_body,
215
- :auth_names => auth_names)
216
- if @api_client.config.debugging
217
- @api_client.config.logger.debug "API called: CommonOperationsApi#empty_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
- end
219
- return data, status_code, headers
220
- end
221
-
222
- # Send an email from a random email address
223
- # To specify an email address first create an inbox and use that with the other send email methods
224
- # @param send_email_options sendEmailOptions
225
- # @param [Hash] opts the optional parameters
226
- # @return [nil]
227
- def send_email_simple(send_email_options, opts = {})
228
- send_email_simple_with_http_info(send_email_options, opts)
229
- nil
230
- end
231
-
232
- # Send an email from a random email address
233
- # To specify an email address first create an inbox and use that with the other send email methods
234
- # @param send_email_options sendEmailOptions
235
- # @param [Hash] opts the optional parameters
236
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
237
- def send_email_simple_with_http_info(send_email_options, opts = {})
238
- if @api_client.config.debugging
239
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.send_email_simple ...'
240
- end
241
- # verify the required parameter 'send_email_options' is set
242
- if @api_client.config.client_side_validation && send_email_options.nil?
243
- fail ArgumentError, "Missing the required parameter 'send_email_options' when calling CommonOperationsApi.send_email_simple"
244
- end
245
- # resource path
246
- local_var_path = '/sendEmail'
247
-
248
- # query parameters
249
- query_params = {}
250
-
251
- # header parameters
252
- header_params = {}
253
- # HTTP header 'Content-Type'
254
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
255
-
256
- # form parameters
257
- form_params = {}
258
-
259
- # http body (model)
260
- post_body = @api_client.object_to_http_body(send_email_options)
261
- auth_names = ['API_KEY']
262
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
263
- :header_params => header_params,
264
- :query_params => query_params,
265
- :form_params => form_params,
266
- :body => post_body,
267
- :auth_names => auth_names)
268
- if @api_client.config.debugging
269
- @api_client.config.logger.debug "API called: CommonOperationsApi#send_email_simple\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
270
- end
271
- return data, status_code, headers
272
- end
273
-
274
- # Wait for and return count number of emails
275
- # Will only wait if count is greater that the found emails in given inbox.If you need to wait for an email for a non-empty inbox see the other receive methods.
276
- # @param [Hash] opts the optional parameters
277
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
278
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
279
- # @option opts [Integer] :timeout Max milliseconds to wait
280
- # @return [Array<EmailPreview>]
281
- def wait_for_email_count(opts = {})
282
- data, _status_code, _headers = wait_for_email_count_with_http_info(opts)
283
- data
284
- end
285
-
286
- # Wait for and return count number of emails
287
- # Will only wait if count is greater that the found emails in given inbox.If you need to wait for an email for a non-empty inbox see the other receive methods.
288
- # @param [Hash] opts the optional parameters
289
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
290
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
291
- # @option opts [Integer] :timeout Max milliseconds to wait
292
- # @return [Array<(Array<EmailPreview>, Fixnum, Hash)>] Array<EmailPreview> data, response status code and response headers
293
- def wait_for_email_count_with_http_info(opts = {})
294
- if @api_client.config.debugging
295
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.wait_for_email_count ...'
296
- end
297
- # resource path
298
- local_var_path = '/waitForEmailCount'
299
-
300
- # query parameters
301
- query_params = {}
302
- query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
303
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
304
- query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
305
-
306
- # header parameters
307
- header_params = {}
308
- # HTTP header 'Accept' (if needed)
309
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
310
-
311
- # form parameters
312
- form_params = {}
313
-
314
- # http body (model)
315
- post_body = nil
316
- auth_names = ['API_KEY']
317
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
318
- :header_params => header_params,
319
- :query_params => query_params,
320
- :form_params => form_params,
321
- :body => post_body,
322
- :auth_names => auth_names,
323
- :return_type => 'Array<EmailPreview>')
324
- if @api_client.config.debugging
325
- @api_client.config.logger.debug "API called: CommonOperationsApi#wait_for_email_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
326
- end
327
- return data, status_code, headers
328
- end
329
-
330
- # Fetch inbox's latest email or if empty wait for email to arrive
331
- # Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox see the other receive methods.
332
- # @param [Hash] opts the optional parameters
333
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
334
- # @option opts [Integer] :timeout Max milliseconds to wait
335
- # @return [Email]
336
- def wait_for_latest_email(opts = {})
337
- data, _status_code, _headers = wait_for_latest_email_with_http_info(opts)
338
- data
339
- end
340
-
341
- # Fetch inbox&#39;s latest email or if empty wait for email to arrive
342
- # Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox see the other receive methods.
343
- # @param [Hash] opts the optional parameters
344
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
345
- # @option opts [Integer] :timeout Max milliseconds to wait
346
- # @return [Array<(Email, Fixnum, Hash)>] Email data, response status code and response headers
347
- def wait_for_latest_email_with_http_info(opts = {})
348
- if @api_client.config.debugging
349
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.wait_for_latest_email ...'
350
- end
351
- # resource path
352
- local_var_path = '/waitForLatestEmail'
353
-
354
- # query parameters
355
- query_params = {}
356
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
357
- query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
358
-
359
- # header parameters
360
- header_params = {}
361
- # HTTP header 'Accept' (if needed)
362
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
363
-
364
- # form parameters
365
- form_params = {}
366
-
367
- # http body (model)
368
- post_body = nil
369
- auth_names = ['API_KEY']
370
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
371
- :header_params => header_params,
372
- :query_params => query_params,
373
- :form_params => form_params,
374
- :body => post_body,
375
- :auth_names => auth_names,
376
- :return_type => 'Email')
377
- if @api_client.config.debugging
378
- @api_client.config.logger.debug "API called: CommonOperationsApi#wait_for_latest_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
379
- end
380
- return data, status_code, headers
381
- end
382
-
383
- # Wait or return list of emails that match simple matching patterns
384
- # Results must also meet provided count. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM.
385
- # @param match_options matchOptions
386
- # @param [Hash] opts the optional parameters
387
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
388
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
389
- # @option opts [Integer] :timeout Max milliseconds to wait
390
- # @return [Array<EmailPreview>]
391
- def wait_for_matching_email(match_options, opts = {})
392
- data, _status_code, _headers = wait_for_matching_email_with_http_info(match_options, opts)
393
- data
394
- end
395
-
396
- # Wait or return list of emails that match simple matching patterns
397
- # Results must also meet provided count. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM.
398
- # @param match_options matchOptions
399
- # @param [Hash] opts the optional parameters
400
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
401
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
402
- # @option opts [Integer] :timeout Max milliseconds to wait
403
- # @return [Array<(Array<EmailPreview>, Fixnum, Hash)>] Array<EmailPreview> data, response status code and response headers
404
- def wait_for_matching_email_with_http_info(match_options, opts = {})
405
- if @api_client.config.debugging
406
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.wait_for_matching_email ...'
407
- end
408
- # verify the required parameter 'match_options' is set
409
- if @api_client.config.client_side_validation && match_options.nil?
410
- fail ArgumentError, "Missing the required parameter 'match_options' when calling CommonOperationsApi.wait_for_matching_email"
411
- end
412
- # resource path
413
- local_var_path = '/waitForMatchingEmails'
414
-
415
- # query parameters
416
- query_params = {}
417
- query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
418
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
419
- query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
420
-
421
- # header parameters
422
- header_params = {}
423
- # HTTP header 'Accept' (if needed)
424
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
425
- # HTTP header 'Content-Type'
426
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
427
-
428
- # form parameters
429
- form_params = {}
430
-
431
- # http body (model)
432
- post_body = @api_client.object_to_http_body(match_options)
433
- auth_names = ['API_KEY']
434
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
435
- :header_params => header_params,
436
- :query_params => query_params,
437
- :form_params => form_params,
438
- :body => post_body,
439
- :auth_names => auth_names,
440
- :return_type => 'Array<EmailPreview>')
441
- if @api_client.config.debugging
442
- @api_client.config.logger.debug "API called: CommonOperationsApi#wait_for_matching_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
443
- end
444
- return data, status_code, headers
445
- end
446
-
447
- # Wait for or fetch the email with a given index in the inbox specified
448
- # @param [Hash] opts the optional parameters
449
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
450
- # @option opts [Integer] :index Zero based index of the email to wait for
451
- # @option opts [Integer] :timeout Max milliseconds to wait
452
- # @return [Email]
453
- def wait_for_nth_email(opts = {})
454
- data, _status_code, _headers = wait_for_nth_email_with_http_info(opts)
455
- data
456
- end
457
-
458
- # Wait for or fetch the email with a given index in the inbox specified
459
- # @param [Hash] opts the optional parameters
460
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
461
- # @option opts [Integer] :index Zero based index of the email to wait for
462
- # @option opts [Integer] :timeout Max milliseconds to wait
463
- # @return [Array<(Email, Fixnum, Hash)>] Email data, response status code and response headers
464
- def wait_for_nth_email_with_http_info(opts = {})
465
- if @api_client.config.debugging
466
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.wait_for_nth_email ...'
467
- end
468
- # resource path
469
- local_var_path = '/waitForNthEmail'
470
-
471
- # query parameters
472
- query_params = {}
473
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
474
- query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
475
- query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
476
-
477
- # header parameters
478
- header_params = {}
479
- # HTTP header 'Accept' (if needed)
480
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
481
-
482
- # form parameters
483
- form_params = {}
484
-
485
- # http body (model)
486
- post_body = nil
487
- auth_names = ['API_KEY']
488
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
489
- :header_params => header_params,
490
- :query_params => query_params,
491
- :form_params => form_params,
492
- :body => post_body,
493
- :auth_names => auth_names,
494
- :return_type => 'Email')
495
- if @api_client.config.debugging
496
- @api_client.config.logger.debug "API called: CommonOperationsApi#wait_for_nth_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
497
- end
498
- return data, status_code, headers
499
- end
500
-
501
- end
502
- end