mailslurp_client 7.0.7 → 8.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (208) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client.rb +19 -3
  3. metadata +14 -345
  4. data/Gemfile +0 -9
  5. data/LICENSE +0 -22
  6. data/README.md +0 -226
  7. data/Rakefile +0 -10
  8. data/docs/AttachmentControllerApi.md +0 -124
  9. data/docs/AttachmentMetaData.md +0 -23
  10. data/docs/BasicAuthOptions.md +0 -19
  11. data/docs/BulkActionsControllerApi.md +0 -165
  12. data/docs/BulkSendEmailOptions.md +0 -19
  13. data/docs/CommonActionsControllerApi.md +0 -167
  14. data/docs/ContactControllerApi.md +0 -274
  15. data/docs/ContactDto.md +0 -31
  16. data/docs/ContactProjection.md +0 -27
  17. data/docs/CreateContactOptions.md +0 -31
  18. data/docs/CreateDomainOptions.md +0 -17
  19. data/docs/CreateGroupOptions.md +0 -19
  20. data/docs/CreateTemplateOptions.md +0 -19
  21. data/docs/CreateWebhookOptions.md +0 -21
  22. data/docs/DomainControllerApi.md +0 -223
  23. data/docs/DomainDto.md +0 -29
  24. data/docs/DomainPreview.md +0 -21
  25. data/docs/Email.md +0 -49
  26. data/docs/EmailAnalysis.md +0 -25
  27. data/docs/EmailControllerApi.md +0 -740
  28. data/docs/EmailPreview.md +0 -31
  29. data/docs/EmailProjection.md +0 -33
  30. data/docs/ForwardEmailOptions.md +0 -23
  31. data/docs/GroupContactsDto.md +0 -19
  32. data/docs/GroupControllerApi.md +0 -437
  33. data/docs/GroupDto.md +0 -23
  34. data/docs/GroupProjection.md +0 -23
  35. data/docs/HTMLValidationResult.md +0 -21
  36. data/docs/Inbox.md +0 -33
  37. data/docs/InboxControllerApi.md +0 -652
  38. data/docs/InboxProjection.md +0 -29
  39. data/docs/JsonNode.md +0 -59
  40. data/docs/MatchOption.md +0 -21
  41. data/docs/MatchOptions.md +0 -17
  42. data/docs/PageContactProjection.md +0 -37
  43. data/docs/PageEmailPreview.md +0 -37
  44. data/docs/PageEmailProjection.md +0 -37
  45. data/docs/PageGroupProjection.md +0 -37
  46. data/docs/PageInboxProjection.md +0 -37
  47. data/docs/PageTemplateProjection.md +0 -37
  48. data/docs/PageWebhookProjection.md +0 -37
  49. data/docs/Pageable.md +0 -27
  50. data/docs/RawEmailJson.md +0 -17
  51. data/docs/SendEmailOptions.md +0 -45
  52. data/docs/SetInboxFavouritedOptions.md +0 -17
  53. data/docs/Sort.md +0 -21
  54. data/docs/TemplateControllerApi.md +0 -274
  55. data/docs/TemplateDto.md +0 -25
  56. data/docs/TemplateProjection.md +0 -25
  57. data/docs/TemplateVariable.md +0 -19
  58. data/docs/UnreadCount.md +0 -17
  59. data/docs/UpdateGroupContacts.md +0 -17
  60. data/docs/UpdateInboxOptions.md +0 -25
  61. data/docs/UploadAttachmentOptions.md +0 -21
  62. data/docs/ValidationDto.md +0 -19
  63. data/docs/ValidationMessage.md +0 -19
  64. data/docs/WaitForConditions.md +0 -29
  65. data/docs/WaitForControllerApi.md +0 -317
  66. data/docs/WebhookControllerApi.md +0 -339
  67. data/docs/WebhookDto.md +0 -33
  68. data/docs/WebhookProjection.md +0 -27
  69. data/docs/WebhookTestRequest.md +0 -23
  70. data/docs/WebhookTestResponse.md +0 -19
  71. data/docs/WebhookTestResult.md +0 -21
  72. data/git_push.sh +0 -58
  73. data/lib/mailslurp_client/api/attachment_controller_api.rb +0 -157
  74. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +0 -203
  75. data/lib/mailslurp_client/api/common_actions_controller_api.rb +0 -201
  76. data/lib/mailslurp_client/api/contact_controller_api.rb +0 -323
  77. data/lib/mailslurp_client/api/domain_controller_api.rb +0 -264
  78. data/lib/mailslurp_client/api/email_controller_api.rb +0 -852
  79. data/lib/mailslurp_client/api/group_controller_api.rb +0 -519
  80. data/lib/mailslurp_client/api/inbox_controller_api.rb +0 -763
  81. data/lib/mailslurp_client/api/template_controller_api.rb +0 -323
  82. data/lib/mailslurp_client/api/wait_for_controller_api.rb +0 -359
  83. data/lib/mailslurp_client/api/webhook_controller_api.rb +0 -405
  84. data/lib/mailslurp_client/api_client.rb +0 -386
  85. data/lib/mailslurp_client/api_error.rb +0 -57
  86. data/lib/mailslurp_client/configuration.rb +0 -248
  87. data/lib/mailslurp_client/models/attachment_meta_data.rb +0 -253
  88. data/lib/mailslurp_client/models/basic_auth_options.rb +0 -226
  89. data/lib/mailslurp_client/models/bulk_send_email_options.rb +0 -224
  90. data/lib/mailslurp_client/models/contact_dto.rb +0 -288
  91. data/lib/mailslurp_client/models/contact_projection.rb +0 -261
  92. data/lib/mailslurp_client/models/create_contact_options.rb +0 -277
  93. data/lib/mailslurp_client/models/create_domain_options.rb +0 -208
  94. data/lib/mailslurp_client/models/create_group_options.rb +0 -220
  95. data/lib/mailslurp_client/models/create_template_options.rb +0 -225
  96. data/lib/mailslurp_client/models/create_webhook_options.rb +0 -227
  97. data/lib/mailslurp_client/models/domain_dto.rb +0 -296
  98. data/lib/mailslurp_client/models/domain_preview.rb +0 -240
  99. data/lib/mailslurp_client/models/email.rb +0 -376
  100. data/lib/mailslurp_client/models/email_analysis.rb +0 -243
  101. data/lib/mailslurp_client/models/email_preview.rb +0 -286
  102. data/lib/mailslurp_client/models/email_projection.rb +0 -306
  103. data/lib/mailslurp_client/models/forward_email_options.rb +0 -245
  104. data/lib/mailslurp_client/models/group_contacts_dto.rb +0 -227
  105. data/lib/mailslurp_client/models/group_dto.rb +0 -248
  106. data/lib/mailslurp_client/models/group_projection.rb +0 -248
  107. data/lib/mailslurp_client/models/html_validation_result.rb +0 -243
  108. data/lib/mailslurp_client/models/inbox.rb +0 -290
  109. data/lib/mailslurp_client/models/inbox_projection.rb +0 -272
  110. data/lib/mailslurp_client/models/json_node.rb +0 -429
  111. data/lib/mailslurp_client/models/match_option.rb +0 -274
  112. data/lib/mailslurp_client/models/match_options.rb +0 -210
  113. data/lib/mailslurp_client/models/page_contact_projection.rb +0 -298
  114. data/lib/mailslurp_client/models/page_email_preview.rb +0 -298
  115. data/lib/mailslurp_client/models/page_email_projection.rb +0 -298
  116. data/lib/mailslurp_client/models/page_group_projection.rb +0 -298
  117. data/lib/mailslurp_client/models/page_inbox_projection.rb +0 -298
  118. data/lib/mailslurp_client/models/page_template_projection.rb +0 -298
  119. data/lib/mailslurp_client/models/page_webhook_projection.rb +0 -298
  120. data/lib/mailslurp_client/models/pageable.rb +0 -251
  121. data/lib/mailslurp_client/models/raw_email_json.rb +0 -211
  122. data/lib/mailslurp_client/models/send_email_options.rb +0 -392
  123. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +0 -208
  124. data/lib/mailslurp_client/models/sort.rb +0 -224
  125. data/lib/mailslurp_client/models/template_dto.rb +0 -269
  126. data/lib/mailslurp_client/models/template_projection.rb +0 -269
  127. data/lib/mailslurp_client/models/template_variable.rb +0 -259
  128. data/lib/mailslurp_client/models/unread_count.rb +0 -211
  129. data/lib/mailslurp_client/models/update_group_contacts.rb +0 -213
  130. data/lib/mailslurp_client/models/update_inbox_options.rb +0 -250
  131. data/lib/mailslurp_client/models/upload_attachment_options.rb +0 -228
  132. data/lib/mailslurp_client/models/validation_dto.rb +0 -225
  133. data/lib/mailslurp_client/models/validation_message.rb +0 -220
  134. data/lib/mailslurp_client/models/wait_for_conditions.rb +0 -315
  135. data/lib/mailslurp_client/models/webhook_dto.rb +0 -326
  136. data/lib/mailslurp_client/models/webhook_projection.rb +0 -277
  137. data/lib/mailslurp_client/models/webhook_test_request.rb +0 -284
  138. data/lib/mailslurp_client/models/webhook_test_response.rb +0 -215
  139. data/lib/mailslurp_client/models/webhook_test_result.rb +0 -235
  140. data/lib/mailslurp_client/version.rb +0 -15
  141. data/mailslurp_client.gemspec +0 -39
  142. data/spec/api/attachment_controller_api_spec.rb +0 -61
  143. data/spec/api/bulk_actions_controller_api_spec.rb +0 -68
  144. data/spec/api/common_actions_controller_api_spec.rb +0 -129
  145. data/spec/api/contact_controller_api_spec.rb +0 -91
  146. data/spec/api/domain_controller_api_spec.rb +0 -82
  147. data/spec/api/email_controller_api_spec.rb +0 -162
  148. data/spec/api/group_controller_api_spec.rb +0 -126
  149. data/spec/api/inbox_controller_api_spec.rb +0 -172
  150. data/spec/api/template_controller_api_spec.rb +0 -91
  151. data/spec/api/wait_for_controller_api_spec.rb +0 -107
  152. data/spec/api/webhook_controller_api_spec.rb +0 -107
  153. data/spec/api_client_spec.rb +0 -226
  154. data/spec/configuration_spec.rb +0 -42
  155. data/spec/models/attachment_meta_data_spec.rb +0 -59
  156. data/spec/models/basic_auth_options_spec.rb +0 -47
  157. data/spec/models/bulk_send_email_options_spec.rb +0 -47
  158. data/spec/models/contact_dto_spec.rb +0 -83
  159. data/spec/models/contact_projection_spec.rb +0 -71
  160. data/spec/models/create_contact_options_spec.rb +0 -83
  161. data/spec/models/create_domain_options_spec.rb +0 -41
  162. data/spec/models/create_group_options_spec.rb +0 -47
  163. data/spec/models/create_template_options_spec.rb +0 -47
  164. data/spec/models/create_webhook_options_spec.rb +0 -53
  165. data/spec/models/domain_dto_spec.rb +0 -77
  166. data/spec/models/domain_preview_spec.rb +0 -53
  167. data/spec/models/email_analysis_spec.rb +0 -65
  168. data/spec/models/email_preview_spec.rb +0 -83
  169. data/spec/models/email_projection_spec.rb +0 -89
  170. data/spec/models/email_spec.rb +0 -137
  171. data/spec/models/forward_email_options_spec.rb +0 -59
  172. data/spec/models/group_contacts_dto_spec.rb +0 -47
  173. data/spec/models/group_dto_spec.rb +0 -59
  174. data/spec/models/group_projection_spec.rb +0 -59
  175. data/spec/models/html_validation_result_spec.rb +0 -53
  176. data/spec/models/inbox_projection_spec.rb +0 -77
  177. data/spec/models/inbox_spec.rb +0 -89
  178. data/spec/models/json_node_spec.rb +0 -171
  179. data/spec/models/match_option_spec.rb +0 -61
  180. data/spec/models/match_options_spec.rb +0 -41
  181. data/spec/models/page_contact_projection_spec.rb +0 -101
  182. data/spec/models/page_email_preview_spec.rb +0 -101
  183. data/spec/models/page_email_projection_spec.rb +0 -101
  184. data/spec/models/page_group_projection_spec.rb +0 -101
  185. data/spec/models/page_inbox_projection_spec.rb +0 -101
  186. data/spec/models/page_template_projection_spec.rb +0 -101
  187. data/spec/models/page_webhook_projection_spec.rb +0 -101
  188. data/spec/models/pageable_spec.rb +0 -71
  189. data/spec/models/raw_email_json_spec.rb +0 -41
  190. data/spec/models/send_email_options_spec.rb +0 -129
  191. data/spec/models/set_inbox_favourited_options_spec.rb +0 -41
  192. data/spec/models/sort_spec.rb +0 -53
  193. data/spec/models/template_dto_spec.rb +0 -65
  194. data/spec/models/template_projection_spec.rb +0 -65
  195. data/spec/models/template_variable_spec.rb +0 -51
  196. data/spec/models/unread_count_spec.rb +0 -41
  197. data/spec/models/update_group_contacts_spec.rb +0 -41
  198. data/spec/models/update_inbox_options_spec.rb +0 -65
  199. data/spec/models/upload_attachment_options_spec.rb +0 -53
  200. data/spec/models/validation_dto_spec.rb +0 -47
  201. data/spec/models/validation_message_spec.rb +0 -47
  202. data/spec/models/wait_for_conditions_spec.rb +0 -85
  203. data/spec/models/webhook_dto_spec.rb +0 -93
  204. data/spec/models/webhook_projection_spec.rb +0 -71
  205. data/spec/models/webhook_test_request_spec.rb +0 -63
  206. data/spec/models/webhook_test_response_spec.rb +0 -47
  207. data/spec/models/webhook_test_result_spec.rb +0 -53
  208. data/spec/spec_helper.rb +0 -111
@@ -1,323 +0,0 @@
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: 67c9a1eda264be4cfe0bb2c76151f0aadf0862bc
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module MailSlurpClient
16
- class TemplateControllerApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Create a Template
23
- # @param create_template_options [CreateTemplateOptions] createTemplateOptions
24
- # @param [Hash] opts the optional parameters
25
- # @return [TemplateDto]
26
- def create_template(create_template_options, opts = {})
27
- data, _status_code, _headers = create_template_with_http_info(create_template_options, opts)
28
- data
29
- end
30
-
31
- # Create a Template
32
- # @param create_template_options [CreateTemplateOptions] createTemplateOptions
33
- # @param [Hash] opts the optional parameters
34
- # @return [Array<(TemplateDto, Integer, Hash)>] TemplateDto data, response status code and response headers
35
- def create_template_with_http_info(create_template_options, opts = {})
36
- if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: TemplateControllerApi.create_template ...'
38
- end
39
- # verify the required parameter 'create_template_options' is set
40
- if @api_client.config.client_side_validation && create_template_options.nil?
41
- fail ArgumentError, "Missing the required parameter 'create_template_options' when calling TemplateControllerApi.create_template"
42
- end
43
- # resource path
44
- local_var_path = '/templates'
45
-
46
- # query parameters
47
- query_params = opts[:query_params] || {}
48
-
49
- # header parameters
50
- header_params = opts[:header_params] || {}
51
- # HTTP header 'Accept' (if needed)
52
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
- # HTTP header 'Content-Type'
54
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
55
-
56
- # form parameters
57
- form_params = opts[:form_params] || {}
58
-
59
- # http body (model)
60
- post_body = opts[:body] || @api_client.object_to_http_body(create_template_options)
61
-
62
- # return_type
63
- return_type = opts[:return_type] || 'TemplateDto'
64
-
65
- # auth_names
66
- auth_names = opts[:auth_names] || ['API_KEY']
67
-
68
- new_options = opts.merge(
69
- :header_params => header_params,
70
- :query_params => query_params,
71
- :form_params => form_params,
72
- :body => post_body,
73
- :auth_names => auth_names,
74
- :return_type => return_type
75
- )
76
-
77
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
78
- if @api_client.config.debugging
79
- @api_client.config.logger.debug "API called: TemplateControllerApi#create_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
- end
81
- return data, status_code, headers
82
- end
83
-
84
- # Delete Template
85
- # @param template_id [String] TemplateId
86
- # @param [Hash] opts the optional parameters
87
- # @return [nil]
88
- def delete_template(template_id, opts = {})
89
- delete_template_with_http_info(template_id, opts)
90
- nil
91
- end
92
-
93
- # Delete Template
94
- # @param template_id [String] TemplateId
95
- # @param [Hash] opts the optional parameters
96
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
97
- def delete_template_with_http_info(template_id, opts = {})
98
- if @api_client.config.debugging
99
- @api_client.config.logger.debug 'Calling API: TemplateControllerApi.delete_template ...'
100
- end
101
- # verify the required parameter 'template_id' is set
102
- if @api_client.config.client_side_validation && template_id.nil?
103
- fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplateControllerApi.delete_template"
104
- end
105
- # resource path
106
- local_var_path = '/templates/{TemplateId}'.sub('{' + 'TemplateId' + '}', CGI.escape(template_id.to_s))
107
-
108
- # query parameters
109
- query_params = opts[:query_params] || {}
110
-
111
- # header parameters
112
- header_params = opts[:header_params] || {}
113
-
114
- # form parameters
115
- form_params = opts[:form_params] || {}
116
-
117
- # http body (model)
118
- post_body = opts[:body]
119
-
120
- # return_type
121
- return_type = opts[:return_type]
122
-
123
- # auth_names
124
- auth_names = opts[:auth_names] || ['API_KEY']
125
-
126
- new_options = opts.merge(
127
- :header_params => header_params,
128
- :query_params => query_params,
129
- :form_params => form_params,
130
- :body => post_body,
131
- :auth_names => auth_names,
132
- :return_type => return_type
133
- )
134
-
135
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
136
- if @api_client.config.debugging
137
- @api_client.config.logger.debug "API called: TemplateControllerApi#delete_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
138
- end
139
- return data, status_code, headers
140
- end
141
-
142
- # Get all Templates in paginated format
143
- # @param [Hash] opts the optional parameters
144
- # @option opts [Integer] :page Optional page index in inbox list pagination (default to 0)
145
- # @option opts [Integer] :size Optional page size in inbox list pagination (default to 20)
146
- # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
147
- # @return [PageTemplateProjection]
148
- def get_all_templates(opts = {})
149
- data, _status_code, _headers = get_all_templates_with_http_info(opts)
150
- data
151
- end
152
-
153
- # Get all Templates in paginated format
154
- # @param [Hash] opts the optional parameters
155
- # @option opts [Integer] :page Optional page index in inbox list pagination
156
- # @option opts [Integer] :size Optional page size in inbox list pagination
157
- # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
158
- # @return [Array<(PageTemplateProjection, Integer, Hash)>] PageTemplateProjection data, response status code and response headers
159
- def get_all_templates_with_http_info(opts = {})
160
- if @api_client.config.debugging
161
- @api_client.config.logger.debug 'Calling API: TemplateControllerApi.get_all_templates ...'
162
- end
163
- allowable_values = ["ASC", "DESC"]
164
- if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
165
- fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
166
- end
167
- # resource path
168
- local_var_path = '/templates/paginated'
169
-
170
- # query parameters
171
- query_params = opts[:query_params] || {}
172
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
173
- query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
174
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
175
-
176
- # header parameters
177
- header_params = opts[:header_params] || {}
178
- # HTTP header 'Accept' (if needed)
179
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
180
-
181
- # form parameters
182
- form_params = opts[:form_params] || {}
183
-
184
- # http body (model)
185
- post_body = opts[:body]
186
-
187
- # return_type
188
- return_type = opts[:return_type] || 'PageTemplateProjection'
189
-
190
- # auth_names
191
- auth_names = opts[:auth_names] || ['API_KEY']
192
-
193
- new_options = opts.merge(
194
- :header_params => header_params,
195
- :query_params => query_params,
196
- :form_params => form_params,
197
- :body => post_body,
198
- :auth_names => auth_names,
199
- :return_type => return_type
200
- )
201
-
202
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
203
- if @api_client.config.debugging
204
- @api_client.config.logger.debug "API called: TemplateControllerApi#get_all_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
205
- end
206
- return data, status_code, headers
207
- end
208
-
209
- # Get Template
210
- # @param template_id [String] TemplateId
211
- # @param [Hash] opts the optional parameters
212
- # @return [TemplateDto]
213
- def get_template(template_id, opts = {})
214
- data, _status_code, _headers = get_template_with_http_info(template_id, opts)
215
- data
216
- end
217
-
218
- # Get Template
219
- # @param template_id [String] TemplateId
220
- # @param [Hash] opts the optional parameters
221
- # @return [Array<(TemplateDto, Integer, Hash)>] TemplateDto data, response status code and response headers
222
- def get_template_with_http_info(template_id, opts = {})
223
- if @api_client.config.debugging
224
- @api_client.config.logger.debug 'Calling API: TemplateControllerApi.get_template ...'
225
- end
226
- # verify the required parameter 'template_id' is set
227
- if @api_client.config.client_side_validation && template_id.nil?
228
- fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplateControllerApi.get_template"
229
- end
230
- # resource path
231
- local_var_path = '/templates/{TemplateId}'.sub('{' + 'TemplateId' + '}', CGI.escape(template_id.to_s))
232
-
233
- # query parameters
234
- query_params = opts[:query_params] || {}
235
-
236
- # header parameters
237
- header_params = opts[:header_params] || {}
238
- # HTTP header 'Accept' (if needed)
239
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
240
-
241
- # form parameters
242
- form_params = opts[:form_params] || {}
243
-
244
- # http body (model)
245
- post_body = opts[:body]
246
-
247
- # return_type
248
- return_type = opts[:return_type] || 'TemplateDto'
249
-
250
- # auth_names
251
- auth_names = opts[:auth_names] || ['API_KEY']
252
-
253
- new_options = opts.merge(
254
- :header_params => header_params,
255
- :query_params => query_params,
256
- :form_params => form_params,
257
- :body => post_body,
258
- :auth_names => auth_names,
259
- :return_type => return_type
260
- )
261
-
262
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
263
- if @api_client.config.debugging
264
- @api_client.config.logger.debug "API called: TemplateControllerApi#get_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
265
- end
266
- return data, status_code, headers
267
- end
268
-
269
- # Get all Templates
270
- # @param [Hash] opts the optional parameters
271
- # @return [Array<TemplateProjection>]
272
- def get_templates(opts = {})
273
- data, _status_code, _headers = get_templates_with_http_info(opts)
274
- data
275
- end
276
-
277
- # Get all Templates
278
- # @param [Hash] opts the optional parameters
279
- # @return [Array<(Array<TemplateProjection>, Integer, Hash)>] Array<TemplateProjection> data, response status code and response headers
280
- def get_templates_with_http_info(opts = {})
281
- if @api_client.config.debugging
282
- @api_client.config.logger.debug 'Calling API: TemplateControllerApi.get_templates ...'
283
- end
284
- # resource path
285
- local_var_path = '/templates'
286
-
287
- # query parameters
288
- query_params = opts[:query_params] || {}
289
-
290
- # header parameters
291
- header_params = opts[:header_params] || {}
292
- # HTTP header 'Accept' (if needed)
293
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
294
-
295
- # form parameters
296
- form_params = opts[:form_params] || {}
297
-
298
- # http body (model)
299
- post_body = opts[:body]
300
-
301
- # return_type
302
- return_type = opts[:return_type] || 'Array<TemplateProjection>'
303
-
304
- # auth_names
305
- auth_names = opts[:auth_names] || ['API_KEY']
306
-
307
- new_options = opts.merge(
308
- :header_params => header_params,
309
- :query_params => query_params,
310
- :form_params => form_params,
311
- :body => post_body,
312
- :auth_names => auth_names,
313
- :return_type => return_type
314
- )
315
-
316
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
317
- if @api_client.config.debugging
318
- @api_client.config.logger.debug "API called: TemplateControllerApi#get_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
319
- end
320
- return data, status_code, headers
321
- end
322
- end
323
- end
@@ -1,359 +0,0 @@
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: 67c9a1eda264be4cfe0bb2c76151f0aadf0862bc
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module MailSlurpClient
16
- class WaitForControllerApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Wait for conditions to be met
23
- # Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
24
- # @param [Hash] opts the optional parameters
25
- # @option opts [WaitForConditions] :wait_for_conditions Conditions to wait for
26
- # @return [Array<EmailPreview>]
27
- def wait_for(opts = {})
28
- data, _status_code, _headers = wait_for_with_http_info(opts)
29
- data
30
- end
31
-
32
- # Wait for conditions to be met
33
- # Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
34
- # @param [Hash] opts the optional parameters
35
- # @option opts [WaitForConditions] :wait_for_conditions Conditions to wait for
36
- # @return [Array<(Array<EmailPreview>, Integer, Hash)>] Array<EmailPreview> data, response status code and response headers
37
- def wait_for_with_http_info(opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for ...'
40
- end
41
- # resource path
42
- local_var_path = '/waitFor'
43
-
44
- # query parameters
45
- query_params = opts[:query_params] || {}
46
-
47
- # header parameters
48
- header_params = opts[:header_params] || {}
49
- # HTTP header 'Accept' (if needed)
50
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
51
- # HTTP header 'Content-Type'
52
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
53
-
54
- # form parameters
55
- form_params = opts[:form_params] || {}
56
-
57
- # http body (model)
58
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'wait_for_conditions'])
59
-
60
- # return_type
61
- return_type = opts[:return_type] || 'Array<EmailPreview>'
62
-
63
- # auth_names
64
- auth_names = opts[:auth_names] || ['API_KEY']
65
-
66
- new_options = opts.merge(
67
- :header_params => header_params,
68
- :query_params => query_params,
69
- :form_params => form_params,
70
- :body => post_body,
71
- :auth_names => auth_names,
72
- :return_type => return_type
73
- )
74
-
75
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
76
- if @api_client.config.debugging
77
- @api_client.config.logger.debug "API called: WaitForControllerApi#wait_for\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
- end
79
- return data, status_code, headers
80
- end
81
-
82
- # Wait for and return count number of emails
83
- # If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.
84
- # @param [Hash] opts the optional parameters
85
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
86
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
87
- # @option opts [Integer] :timeout Max milliseconds to wait
88
- # @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
89
- # @return [Array<EmailPreview>]
90
- def wait_for_email_count(opts = {})
91
- data, _status_code, _headers = wait_for_email_count_with_http_info(opts)
92
- data
93
- end
94
-
95
- # Wait for and return count number of emails
96
- # If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.
97
- # @param [Hash] opts the optional parameters
98
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
99
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
100
- # @option opts [Integer] :timeout Max milliseconds to wait
101
- # @option opts [Boolean] :unread_only Optional filter for unread only
102
- # @return [Array<(Array<EmailPreview>, Integer, Hash)>] Array<EmailPreview> data, response status code and response headers
103
- def wait_for_email_count_with_http_info(opts = {})
104
- if @api_client.config.debugging
105
- @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_email_count ...'
106
- end
107
- # resource path
108
- local_var_path = '/waitForEmailCount'
109
-
110
- # query parameters
111
- query_params = opts[:query_params] || {}
112
- query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
113
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
114
- query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
115
- query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
116
-
117
- # header parameters
118
- header_params = opts[:header_params] || {}
119
- # HTTP header 'Accept' (if needed)
120
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
121
-
122
- # form parameters
123
- form_params = opts[:form_params] || {}
124
-
125
- # http body (model)
126
- post_body = opts[:body]
127
-
128
- # return_type
129
- return_type = opts[:return_type] || 'Array<EmailPreview>'
130
-
131
- # auth_names
132
- auth_names = opts[:auth_names] || ['API_KEY']
133
-
134
- new_options = opts.merge(
135
- :header_params => header_params,
136
- :query_params => query_params,
137
- :form_params => form_params,
138
- :body => post_body,
139
- :auth_names => auth_names,
140
- :return_type => return_type
141
- )
142
-
143
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
144
- if @api_client.config.debugging
145
- @api_client.config.logger.debug "API called: WaitForControllerApi#wait_for_email_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
146
- end
147
- return data, status_code, headers
148
- end
149
-
150
- # Fetch inbox's latest email or if empty wait for an email to arrive
151
- # 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 such as waitForNthEmail or waitForEmailCount.
152
- # @param [Hash] opts the optional parameters
153
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
154
- # @option opts [Integer] :timeout Max milliseconds to wait
155
- # @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
156
- # @return [Email]
157
- def wait_for_latest_email(opts = {})
158
- data, _status_code, _headers = wait_for_latest_email_with_http_info(opts)
159
- data
160
- end
161
-
162
- # Fetch inbox&#39;s latest email or if empty wait for an email to arrive
163
- # 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 such as waitForNthEmail or waitForEmailCount.
164
- # @param [Hash] opts the optional parameters
165
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
166
- # @option opts [Integer] :timeout Max milliseconds to wait
167
- # @option opts [Boolean] :unread_only Optional filter for unread only
168
- # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
169
- def wait_for_latest_email_with_http_info(opts = {})
170
- if @api_client.config.debugging
171
- @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_latest_email ...'
172
- end
173
- # resource path
174
- local_var_path = '/waitForLatestEmail'
175
-
176
- # query parameters
177
- query_params = opts[:query_params] || {}
178
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
179
- query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
180
- query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
181
-
182
- # header parameters
183
- header_params = opts[:header_params] || {}
184
- # HTTP header 'Accept' (if needed)
185
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
186
-
187
- # form parameters
188
- form_params = opts[:form_params] || {}
189
-
190
- # http body (model)
191
- post_body = opts[:body]
192
-
193
- # return_type
194
- return_type = opts[:return_type] || 'Email'
195
-
196
- # auth_names
197
- auth_names = opts[:auth_names] || ['API_KEY']
198
-
199
- new_options = opts.merge(
200
- :header_params => header_params,
201
- :query_params => query_params,
202
- :form_params => form_params,
203
- :body => post_body,
204
- :auth_names => auth_names,
205
- :return_type => return_type
206
- )
207
-
208
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
209
- if @api_client.config.debugging
210
- @api_client.config.logger.debug "API called: WaitForControllerApi#wait_for_latest_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
211
- end
212
- return data, status_code, headers
213
- end
214
-
215
- # Wait or return list of emails that match simple matching patterns
216
- # Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options.
217
- # @param match_options [MatchOptions] matchOptions
218
- # @param [Hash] opts the optional parameters
219
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
220
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
221
- # @option opts [Integer] :timeout Max milliseconds to wait
222
- # @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
223
- # @return [Array<EmailPreview>]
224
- def wait_for_matching_email(match_options, opts = {})
225
- data, _status_code, _headers = wait_for_matching_email_with_http_info(match_options, opts)
226
- data
227
- end
228
-
229
- # Wait or return list of emails that match simple matching patterns
230
- # Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the &#x60;MatchOptions&#x60; object for options.
231
- # @param match_options [MatchOptions] matchOptions
232
- # @param [Hash] opts the optional parameters
233
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
234
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
235
- # @option opts [Integer] :timeout Max milliseconds to wait
236
- # @option opts [Boolean] :unread_only Optional filter for unread only
237
- # @return [Array<(Array<EmailPreview>, Integer, Hash)>] Array<EmailPreview> data, response status code and response headers
238
- def wait_for_matching_email_with_http_info(match_options, opts = {})
239
- if @api_client.config.debugging
240
- @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_matching_email ...'
241
- end
242
- # verify the required parameter 'match_options' is set
243
- if @api_client.config.client_side_validation && match_options.nil?
244
- fail ArgumentError, "Missing the required parameter 'match_options' when calling WaitForControllerApi.wait_for_matching_email"
245
- end
246
- # resource path
247
- local_var_path = '/waitForMatchingEmails'
248
-
249
- # query parameters
250
- query_params = opts[:query_params] || {}
251
- query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
252
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
253
- query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
254
- query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
255
-
256
- # header parameters
257
- header_params = opts[:header_params] || {}
258
- # HTTP header 'Accept' (if needed)
259
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
260
- # HTTP header 'Content-Type'
261
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
262
-
263
- # form parameters
264
- form_params = opts[:form_params] || {}
265
-
266
- # http body (model)
267
- post_body = opts[:body] || @api_client.object_to_http_body(match_options)
268
-
269
- # return_type
270
- return_type = opts[:return_type] || 'Array<EmailPreview>'
271
-
272
- # auth_names
273
- auth_names = opts[:auth_names] || ['API_KEY']
274
-
275
- new_options = opts.merge(
276
- :header_params => header_params,
277
- :query_params => query_params,
278
- :form_params => form_params,
279
- :body => post_body,
280
- :auth_names => auth_names,
281
- :return_type => return_type
282
- )
283
-
284
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
285
- if @api_client.config.debugging
286
- @api_client.config.logger.debug "API called: WaitForControllerApi#wait_for_matching_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
287
- end
288
- return data, status_code, headers
289
- end
290
-
291
- # Wait for or fetch the email with a given index in the inbox specified
292
- # If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.
293
- # @param [Hash] opts the optional parameters
294
- # @option opts [String] :inbox_id Id of the inbox you are fetching emails from
295
- # @option opts [Integer] :index Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index&#x3D;1
296
- # @option opts [Integer] :timeout Max milliseconds to wait for the nth email if not already present
297
- # @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
298
- # @return [Email]
299
- def wait_for_nth_email(opts = {})
300
- data, _status_code, _headers = wait_for_nth_email_with_http_info(opts)
301
- data
302
- end
303
-
304
- # Wait for or fetch the email with a given index in the inbox specified
305
- # If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.
306
- # @param [Hash] opts the optional parameters
307
- # @option opts [String] :inbox_id Id of the inbox you are fetching emails from
308
- # @option opts [Integer] :index Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index&#x3D;1
309
- # @option opts [Integer] :timeout Max milliseconds to wait for the nth email if not already present
310
- # @option opts [Boolean] :unread_only Optional filter for unread only
311
- # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
312
- def wait_for_nth_email_with_http_info(opts = {})
313
- if @api_client.config.debugging
314
- @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_nth_email ...'
315
- end
316
- # resource path
317
- local_var_path = '/waitForNthEmail'
318
-
319
- # query parameters
320
- query_params = opts[:query_params] || {}
321
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
322
- query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
323
- query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
324
- query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
325
-
326
- # header parameters
327
- header_params = opts[:header_params] || {}
328
- # HTTP header 'Accept' (if needed)
329
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
330
-
331
- # form parameters
332
- form_params = opts[:form_params] || {}
333
-
334
- # http body (model)
335
- post_body = opts[:body]
336
-
337
- # return_type
338
- return_type = opts[:return_type] || 'Email'
339
-
340
- # auth_names
341
- auth_names = opts[:auth_names] || ['API_KEY']
342
-
343
- new_options = opts.merge(
344
- :header_params => header_params,
345
- :query_params => query_params,
346
- :form_params => form_params,
347
- :body => post_body,
348
- :auth_names => auth_names,
349
- :return_type => return_type
350
- )
351
-
352
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
353
- if @api_client.config.debugging
354
- @api_client.config.logger.debug "API called: WaitForControllerApi#wait_for_nth_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
355
- end
356
- return data, status_code, headers
357
- end
358
- end
359
- end