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/Gemfile.lock DELETED
@@ -1,79 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- mailslurp_client (5.0.0)
5
- json (~> 2.1, >= 2.1.0)
6
- typhoeus (~> 1.0, >= 1.0.1)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- ZenTest (4.11.1)
12
- addressable (2.5.2)
13
- public_suffix (>= 2.0.2, < 4.0)
14
- autotest (4.4.6)
15
- ZenTest (>= 4.4.1)
16
- autotest-fsevent (0.2.14)
17
- sys-uname
18
- autotest-growl (0.2.16)
19
- autotest-rails-pure (4.1.2)
20
- byebug (10.0.2)
21
- coderay (1.1.2)
22
- crack (0.4.3)
23
- safe_yaml (~> 1.0.0)
24
- diff-lcs (1.3)
25
- ethon (0.11.0)
26
- ffi (>= 1.3.0)
27
- ffi (1.9.25)
28
- hashdiff (0.3.7)
29
- json (2.1.0)
30
- method_source (0.9.0)
31
- pry (0.11.3)
32
- coderay (~> 1.1.0)
33
- method_source (~> 0.9.0)
34
- pry-byebug (3.6.0)
35
- byebug (~> 10.0)
36
- pry (~> 0.10)
37
- public_suffix (3.0.3)
38
- rake (12.0.0)
39
- rspec (3.8.0)
40
- rspec-core (~> 3.8.0)
41
- rspec-expectations (~> 3.8.0)
42
- rspec-mocks (~> 3.8.0)
43
- rspec-core (3.8.0)
44
- rspec-support (~> 3.8.0)
45
- rspec-expectations (3.8.1)
46
- diff-lcs (>= 1.2.0, < 2.0)
47
- rspec-support (~> 3.8.0)
48
- rspec-mocks (3.8.0)
49
- diff-lcs (>= 1.2.0, < 2.0)
50
- rspec-support (~> 3.8.0)
51
- rspec-support (3.8.0)
52
- safe_yaml (1.0.4)
53
- sys-uname (1.0.3)
54
- ffi (>= 1.0.0)
55
- typhoeus (1.3.0)
56
- ethon (>= 0.9.0)
57
- vcr (3.0.3)
58
- webmock (1.24.6)
59
- addressable (>= 2.3.6)
60
- crack (>= 0.3.2)
61
- hashdiff
62
-
63
- PLATFORMS
64
- ruby
65
-
66
- DEPENDENCIES
67
- autotest (~> 4.4, >= 4.4.6)
68
- autotest-fsevent (~> 0.2, >= 0.2.12)
69
- autotest-growl (~> 0.2, >= 0.2.16)
70
- autotest-rails-pure (~> 4.1, >= 4.1.2)
71
- mailslurp_client!
72
- pry-byebug
73
- rake (~> 12.0.0)
74
- rspec (~> 3.6, >= 3.6.0)
75
- vcr (~> 3.0, >= 3.0.1)
76
- webmock (~> 1.24, >= 1.24.3)
77
-
78
- BUNDLED WITH
79
- 1.16.1
@@ -1,499 +0,0 @@
1
- # MailSlurpClient::CommonOperationsApi
2
-
3
- All URIs are relative to *https://api.mailslurp.com*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**create_new_email_address**](CommonOperationsApi.md#create_new_email_address) | **POST** /newEmailAddress | Create new email address
8
- [**delete_email**](CommonOperationsApi.md#delete_email) | **DELETE** /deleteEmail | Delete an email
9
- [**delete_email_address**](CommonOperationsApi.md#delete_email_address) | **DELETE** /deleteEmailAddress | Delete email address and its emails
10
- [**empty_inbox**](CommonOperationsApi.md#empty_inbox) | **DELETE** /emptyInbox | Delete all emails in an inbox
11
- [**send_email_simple**](CommonOperationsApi.md#send_email_simple) | **POST** /sendEmail | Send an email from a random email address
12
- [**wait_for_email_count**](CommonOperationsApi.md#wait_for_email_count) | **GET** /waitForEmailCount | Wait for and return count number of emails
13
- [**wait_for_latest_email**](CommonOperationsApi.md#wait_for_latest_email) | **GET** /waitForLatestEmail | Fetch inbox&#39;s latest email or if empty wait for email to arrive
14
- [**wait_for_matching_email**](CommonOperationsApi.md#wait_for_matching_email) | **POST** /waitForMatchingEmails | Wait or return list of emails that match simple matching patterns
15
- [**wait_for_nth_email**](CommonOperationsApi.md#wait_for_nth_email) | **GET** /waitForNthEmail | Wait for or fetch the email with a given index in the inbox specified
16
-
17
-
18
- # **create_new_email_address**
19
- > Inbox create_new_email_address
20
-
21
- Create new email address
22
-
23
- Returns an Inbox with an `id` and an `emailAddress`
24
-
25
- ### Example
26
- ```ruby
27
- # load the gem
28
- require 'mailslurp_client'
29
- # setup authorization
30
- MailSlurpClient.configure do |config|
31
- # Configure API key authorization: API_KEY
32
- config.api_key['x-api-key'] = 'YOUR API KEY'
33
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
34
- #config.api_key_prefix['x-api-key'] = 'Bearer'
35
- end
36
-
37
- api_instance = MailSlurpClient::CommonOperationsApi.new
38
-
39
- begin
40
- #Create new email address
41
- result = api_instance.create_new_email_address
42
- p result
43
- rescue MailSlurpClient::ApiError => e
44
- puts "Exception when calling CommonOperationsApi->create_new_email_address: #{e}"
45
- end
46
- ```
47
-
48
- ### Parameters
49
- This endpoint does not need any parameter.
50
-
51
- ### Return type
52
-
53
- [**Inbox**](Inbox.md)
54
-
55
- ### Authorization
56
-
57
- [API_KEY](../README.md#API_KEY)
58
-
59
- ### HTTP request headers
60
-
61
- - **Content-Type**: Not defined
62
- - **Accept**: application/json
63
-
64
-
65
-
66
- # **delete_email**
67
- > delete_email(email_id)
68
-
69
- Delete an email
70
-
71
- Deletes an email
72
-
73
- ### Example
74
- ```ruby
75
- # load the gem
76
- require 'mailslurp_client'
77
- # setup authorization
78
- MailSlurpClient.configure do |config|
79
- # Configure API key authorization: API_KEY
80
- config.api_key['x-api-key'] = 'YOUR API KEY'
81
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
82
- #config.api_key_prefix['x-api-key'] = 'Bearer'
83
- end
84
-
85
- api_instance = MailSlurpClient::CommonOperationsApi.new
86
- email_id = 'email_id_example' # String | emailId
87
-
88
- begin
89
- #Delete an email
90
- api_instance.delete_email(email_id)
91
- rescue MailSlurpClient::ApiError => e
92
- puts "Exception when calling CommonOperationsApi->delete_email: #{e}"
93
- end
94
- ```
95
-
96
- ### Parameters
97
-
98
- Name | Type | Description | Notes
99
- ------------- | ------------- | ------------- | -------------
100
- **email_id** | [**String**](.md)| emailId |
101
-
102
- ### Return type
103
-
104
- nil (empty response body)
105
-
106
- ### Authorization
107
-
108
- [API_KEY](../README.md#API_KEY)
109
-
110
- ### HTTP request headers
111
-
112
- - **Content-Type**: Not defined
113
- - **Accept**: Not defined
114
-
115
-
116
-
117
- # **delete_email_address**
118
- > delete_email_address(inbox_id)
119
-
120
- Delete email address and its emails
121
-
122
- Deletes an inbox
123
-
124
- ### Example
125
- ```ruby
126
- # load the gem
127
- require 'mailslurp_client'
128
- # setup authorization
129
- MailSlurpClient.configure do |config|
130
- # Configure API key authorization: API_KEY
131
- config.api_key['x-api-key'] = 'YOUR API KEY'
132
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
133
- #config.api_key_prefix['x-api-key'] = 'Bearer'
134
- end
135
-
136
- api_instance = MailSlurpClient::CommonOperationsApi.new
137
- inbox_id = 'inbox_id_example' # String | inboxId
138
-
139
- begin
140
- #Delete email address and its emails
141
- api_instance.delete_email_address(inbox_id)
142
- rescue MailSlurpClient::ApiError => e
143
- puts "Exception when calling CommonOperationsApi->delete_email_address: #{e}"
144
- end
145
- ```
146
-
147
- ### Parameters
148
-
149
- Name | Type | Description | Notes
150
- ------------- | ------------- | ------------- | -------------
151
- **inbox_id** | [**String**](.md)| inboxId |
152
-
153
- ### Return type
154
-
155
- nil (empty response body)
156
-
157
- ### Authorization
158
-
159
- [API_KEY](../README.md#API_KEY)
160
-
161
- ### HTTP request headers
162
-
163
- - **Content-Type**: Not defined
164
- - **Accept**: Not defined
165
-
166
-
167
-
168
- # **empty_inbox**
169
- > empty_inbox(inbox_id)
170
-
171
- Delete all emails in an inbox
172
-
173
- Deletes all emails
174
-
175
- ### Example
176
- ```ruby
177
- # load the gem
178
- require 'mailslurp_client'
179
- # setup authorization
180
- MailSlurpClient.configure do |config|
181
- # Configure API key authorization: API_KEY
182
- config.api_key['x-api-key'] = 'YOUR API KEY'
183
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
184
- #config.api_key_prefix['x-api-key'] = 'Bearer'
185
- end
186
-
187
- api_instance = MailSlurpClient::CommonOperationsApi.new
188
- inbox_id = 'inbox_id_example' # String | inboxId
189
-
190
- begin
191
- #Delete all emails in an inbox
192
- api_instance.empty_inbox(inbox_id)
193
- rescue MailSlurpClient::ApiError => e
194
- puts "Exception when calling CommonOperationsApi->empty_inbox: #{e}"
195
- end
196
- ```
197
-
198
- ### Parameters
199
-
200
- Name | Type | Description | Notes
201
- ------------- | ------------- | ------------- | -------------
202
- **inbox_id** | [**String**](.md)| inboxId |
203
-
204
- ### Return type
205
-
206
- nil (empty response body)
207
-
208
- ### Authorization
209
-
210
- [API_KEY](../README.md#API_KEY)
211
-
212
- ### HTTP request headers
213
-
214
- - **Content-Type**: Not defined
215
- - **Accept**: Not defined
216
-
217
-
218
-
219
- # **send_email_simple**
220
- > send_email_simple(send_email_options)
221
-
222
- Send an email from a random email address
223
-
224
- To specify an email address first create an inbox and use that with the other send email methods
225
-
226
- ### Example
227
- ```ruby
228
- # load the gem
229
- require 'mailslurp_client'
230
- # setup authorization
231
- MailSlurpClient.configure do |config|
232
- # Configure API key authorization: API_KEY
233
- config.api_key['x-api-key'] = 'YOUR API KEY'
234
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
235
- #config.api_key_prefix['x-api-key'] = 'Bearer'
236
- end
237
-
238
- api_instance = MailSlurpClient::CommonOperationsApi.new
239
- send_email_options = MailSlurpClient::SendEmailOptions.new # SendEmailOptions | sendEmailOptions
240
-
241
- begin
242
- #Send an email from a random email address
243
- api_instance.send_email_simple(send_email_options)
244
- rescue MailSlurpClient::ApiError => e
245
- puts "Exception when calling CommonOperationsApi->send_email_simple: #{e}"
246
- end
247
- ```
248
-
249
- ### Parameters
250
-
251
- Name | Type | Description | Notes
252
- ------------- | ------------- | ------------- | -------------
253
- **send_email_options** | [**SendEmailOptions**](SendEmailOptions.md)| sendEmailOptions |
254
-
255
- ### Return type
256
-
257
- nil (empty response body)
258
-
259
- ### Authorization
260
-
261
- [API_KEY](../README.md#API_KEY)
262
-
263
- ### HTTP request headers
264
-
265
- - **Content-Type**: application/json
266
- - **Accept**: Not defined
267
-
268
-
269
-
270
- # **wait_for_email_count**
271
- > Array&lt;EmailPreview&gt; wait_for_email_count(opts)
272
-
273
- Wait for and return count number of emails
274
-
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
-
277
- ### Example
278
- ```ruby
279
- # load the gem
280
- require 'mailslurp_client'
281
- # setup authorization
282
- MailSlurpClient.configure do |config|
283
- # Configure API key authorization: API_KEY
284
- config.api_key['x-api-key'] = 'YOUR API KEY'
285
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
286
- #config.api_key_prefix['x-api-key'] = 'Bearer'
287
- end
288
-
289
- api_instance = MailSlurpClient::CommonOperationsApi.new
290
- opts = {
291
- count: 56, # Integer | Number of emails to wait for. Must be greater that 1
292
- inbox_id: 'inbox_id_example', # String | Id of the inbox we are fetching emails from
293
- timeout: 56 # Integer | Max milliseconds to wait
294
- }
295
-
296
- begin
297
- #Wait for and return count number of emails
298
- result = api_instance.wait_for_email_count(opts)
299
- p result
300
- rescue MailSlurpClient::ApiError => e
301
- puts "Exception when calling CommonOperationsApi->wait_for_email_count: #{e}"
302
- end
303
- ```
304
-
305
- ### Parameters
306
-
307
- Name | Type | Description | Notes
308
- ------------- | ------------- | ------------- | -------------
309
- **count** | **Integer**| Number of emails to wait for. Must be greater that 1 | [optional]
310
- **inbox_id** | [**String**](.md)| Id of the inbox we are fetching emails from | [optional]
311
- **timeout** | **Integer**| Max milliseconds to wait | [optional]
312
-
313
- ### Return type
314
-
315
- [**Array&lt;EmailPreview&gt;**](EmailPreview.md)
316
-
317
- ### Authorization
318
-
319
- [API_KEY](../README.md#API_KEY)
320
-
321
- ### HTTP request headers
322
-
323
- - **Content-Type**: Not defined
324
- - **Accept**: application/json
325
-
326
-
327
-
328
- # **wait_for_latest_email**
329
- > Email wait_for_latest_email(opts)
330
-
331
- Fetch inbox's latest email or if empty wait for email to arrive
332
-
333
- 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.
334
-
335
- ### Example
336
- ```ruby
337
- # load the gem
338
- require 'mailslurp_client'
339
- # setup authorization
340
- MailSlurpClient.configure do |config|
341
- # Configure API key authorization: API_KEY
342
- config.api_key['x-api-key'] = 'YOUR API KEY'
343
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
344
- #config.api_key_prefix['x-api-key'] = 'Bearer'
345
- end
346
-
347
- api_instance = MailSlurpClient::CommonOperationsApi.new
348
- opts = {
349
- inbox_id: 'inbox_id_example', # String | Id of the inbox we are fetching emails from
350
- timeout: 56 # Integer | Max milliseconds to wait
351
- }
352
-
353
- begin
354
- #Fetch inbox's latest email or if empty wait for email to arrive
355
- result = api_instance.wait_for_latest_email(opts)
356
- p result
357
- rescue MailSlurpClient::ApiError => e
358
- puts "Exception when calling CommonOperationsApi->wait_for_latest_email: #{e}"
359
- end
360
- ```
361
-
362
- ### Parameters
363
-
364
- Name | Type | Description | Notes
365
- ------------- | ------------- | ------------- | -------------
366
- **inbox_id** | [**String**](.md)| Id of the inbox we are fetching emails from | [optional]
367
- **timeout** | **Integer**| Max milliseconds to wait | [optional]
368
-
369
- ### Return type
370
-
371
- [**Email**](Email.md)
372
-
373
- ### Authorization
374
-
375
- [API_KEY](../README.md#API_KEY)
376
-
377
- ### HTTP request headers
378
-
379
- - **Content-Type**: Not defined
380
- - **Accept**: application/json
381
-
382
-
383
-
384
- # **wait_for_matching_email**
385
- > Array&lt;EmailPreview&gt; wait_for_matching_email(match_options, opts)
386
-
387
- Wait or return list of emails that match simple matching patterns
388
-
389
- Results must also meet provided count. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM.
390
-
391
- ### Example
392
- ```ruby
393
- # load the gem
394
- require 'mailslurp_client'
395
- # setup authorization
396
- MailSlurpClient.configure do |config|
397
- # Configure API key authorization: API_KEY
398
- config.api_key['x-api-key'] = 'YOUR API KEY'
399
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
400
- #config.api_key_prefix['x-api-key'] = 'Bearer'
401
- end
402
-
403
- api_instance = MailSlurpClient::CommonOperationsApi.new
404
- match_options = MailSlurpClient::MatchOptions.new # MatchOptions | matchOptions
405
- opts = {
406
- count: 56, # Integer | Number of emails to wait for. Must be greater that 1
407
- inbox_id: 'inbox_id_example', # String | Id of the inbox we are fetching emails from
408
- timeout: 56 # Integer | Max milliseconds to wait
409
- }
410
-
411
- begin
412
- #Wait or return list of emails that match simple matching patterns
413
- result = api_instance.wait_for_matching_email(match_options, opts)
414
- p result
415
- rescue MailSlurpClient::ApiError => e
416
- puts "Exception when calling CommonOperationsApi->wait_for_matching_email: #{e}"
417
- end
418
- ```
419
-
420
- ### Parameters
421
-
422
- Name | Type | Description | Notes
423
- ------------- | ------------- | ------------- | -------------
424
- **match_options** | [**MatchOptions**](MatchOptions.md)| matchOptions |
425
- **count** | **Integer**| Number of emails to wait for. Must be greater that 1 | [optional]
426
- **inbox_id** | [**String**](.md)| Id of the inbox we are fetching emails from | [optional]
427
- **timeout** | **Integer**| Max milliseconds to wait | [optional]
428
-
429
- ### Return type
430
-
431
- [**Array&lt;EmailPreview&gt;**](EmailPreview.md)
432
-
433
- ### Authorization
434
-
435
- [API_KEY](../README.md#API_KEY)
436
-
437
- ### HTTP request headers
438
-
439
- - **Content-Type**: application/json
440
- - **Accept**: application/json
441
-
442
-
443
-
444
- # **wait_for_nth_email**
445
- > Email wait_for_nth_email(opts)
446
-
447
- Wait for or fetch the email with a given index in the inbox specified
448
-
449
- ### Example
450
- ```ruby
451
- # load the gem
452
- require 'mailslurp_client'
453
- # setup authorization
454
- MailSlurpClient.configure do |config|
455
- # Configure API key authorization: API_KEY
456
- config.api_key['x-api-key'] = 'YOUR API KEY'
457
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
458
- #config.api_key_prefix['x-api-key'] = 'Bearer'
459
- end
460
-
461
- api_instance = MailSlurpClient::CommonOperationsApi.new
462
- opts = {
463
- inbox_id: 'inbox_id_example', # String | Id of the inbox we are fetching emails from
464
- index: 56, # Integer | Zero based index of the email to wait for
465
- timeout: 56 # Integer | Max milliseconds to wait
466
- }
467
-
468
- begin
469
- #Wait for or fetch the email with a given index in the inbox specified
470
- result = api_instance.wait_for_nth_email(opts)
471
- p result
472
- rescue MailSlurpClient::ApiError => e
473
- puts "Exception when calling CommonOperationsApi->wait_for_nth_email: #{e}"
474
- end
475
- ```
476
-
477
- ### Parameters
478
-
479
- Name | Type | Description | Notes
480
- ------------- | ------------- | ------------- | -------------
481
- **inbox_id** | [**String**](.md)| Id of the inbox we are fetching emails from | [optional]
482
- **index** | **Integer**| Zero based index of the email to wait for | [optional]
483
- **timeout** | **Integer**| Max milliseconds to wait | [optional]
484
-
485
- ### Return type
486
-
487
- [**Email**](Email.md)
488
-
489
- ### Authorization
490
-
491
- [API_KEY](../README.md#API_KEY)
492
-
493
- ### HTTP request headers
494
-
495
- - **Content-Type**: Not defined
496
- - **Accept**: application/json
497
-
498
-
499
-