mailslurp_client 7.0.8 → 7.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client.rb +12 -3
  3. metadata +11 -372
  4. data/Gemfile +0 -9
  5. data/LICENSE +0 -22
  6. data/Makefile +0 -3
  7. data/README.md +0 -239
  8. data/Rakefile +0 -10
  9. data/docs/AliasControllerApi.md +0 -337
  10. data/docs/AttachmentControllerApi.md +0 -126
  11. data/docs/AttachmentMetaData.md +0 -23
  12. data/docs/BasicAuthOptions.md +0 -19
  13. data/docs/BulkActionsControllerApi.md +0 -165
  14. data/docs/BulkSendEmailOptions.md +0 -19
  15. data/docs/CommonActionsControllerApi.md +0 -218
  16. data/docs/ContactControllerApi.md +0 -274
  17. data/docs/ContactDto.md +0 -31
  18. data/docs/ContactProjection.md +0 -27
  19. data/docs/CreateAnonymousAliasOptions.md +0 -17
  20. data/docs/CreateContactOptions.md +0 -31
  21. data/docs/CreateDomainOptions.md +0 -17
  22. data/docs/CreateGroupOptions.md +0 -19
  23. data/docs/CreateOwnedAliasOptions.md +0 -23
  24. data/docs/CreateTemplateOptions.md +0 -19
  25. data/docs/CreateWebhookOptions.md +0 -21
  26. data/docs/DomainControllerApi.md +0 -223
  27. data/docs/DomainDto.md +0 -29
  28. data/docs/DomainPreview.md +0 -21
  29. data/docs/Email.md +0 -49
  30. data/docs/EmailAnalysis.md +0 -25
  31. data/docs/EmailControllerApi.md +0 -740
  32. data/docs/EmailPreview.md +0 -31
  33. data/docs/EmailProjection.md +0 -33
  34. data/docs/FormControllerApi.md +0 -79
  35. data/docs/ForwardEmailOptions.md +0 -23
  36. data/docs/GroupContactsDto.md +0 -19
  37. data/docs/GroupControllerApi.md +0 -437
  38. data/docs/GroupDto.md +0 -23
  39. data/docs/GroupProjection.md +0 -23
  40. data/docs/HTMLValidationResult.md +0 -21
  41. data/docs/Inbox.md +0 -33
  42. data/docs/InboxControllerApi.md +0 -705
  43. data/docs/InboxProjection.md +0 -29
  44. data/docs/JsonNode.md +0 -59
  45. data/docs/MatchOption.md +0 -21
  46. data/docs/MatchOptions.md +0 -17
  47. data/docs/ModelAlias.md +0 -31
  48. data/docs/PageAlias.md +0 -37
  49. data/docs/PageContactProjection.md +0 -37
  50. data/docs/PageEmailPreview.md +0 -37
  51. data/docs/PageEmailProjection.md +0 -37
  52. data/docs/PageGroupProjection.md +0 -37
  53. data/docs/PageInboxProjection.md +0 -37
  54. data/docs/PageTemplateProjection.md +0 -37
  55. data/docs/PageWebhookProjection.md +0 -37
  56. data/docs/Pageable.md +0 -27
  57. data/docs/RawEmailJson.md +0 -17
  58. data/docs/SendEmailOptions.md +0 -45
  59. data/docs/SetInboxFavouritedOptions.md +0 -17
  60. data/docs/SimpleSendEmailOptions.md +0 -23
  61. data/docs/Sort.md +0 -21
  62. data/docs/TemplateControllerApi.md +0 -274
  63. data/docs/TemplateDto.md +0 -25
  64. data/docs/TemplateProjection.md +0 -25
  65. data/docs/TemplateVariable.md +0 -19
  66. data/docs/UnreadCount.md +0 -17
  67. data/docs/UpdateGroupContacts.md +0 -17
  68. data/docs/UpdateInboxOptions.md +0 -25
  69. data/docs/UploadAttachmentOptions.md +0 -21
  70. data/docs/ValidationDto.md +0 -19
  71. data/docs/ValidationMessage.md +0 -19
  72. data/docs/WaitForConditions.md +0 -29
  73. data/docs/WaitForControllerApi.md +0 -317
  74. data/docs/WebhookControllerApi.md +0 -339
  75. data/docs/WebhookDto.md +0 -33
  76. data/docs/WebhookProjection.md +0 -27
  77. data/docs/WebhookTestRequest.md +0 -23
  78. data/docs/WebhookTestResponse.md +0 -19
  79. data/docs/WebhookTestResult.md +0 -21
  80. data/git_push.sh +0 -58
  81. data/lib/mailslurp_client/api/alias_controller_api.rb +0 -405
  82. data/lib/mailslurp_client/api/attachment_controller_api.rb +0 -160
  83. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +0 -203
  84. data/lib/mailslurp_client/api/common_actions_controller_api.rb +0 -257
  85. data/lib/mailslurp_client/api/contact_controller_api.rb +0 -323
  86. data/lib/mailslurp_client/api/domain_controller_api.rb +0 -264
  87. data/lib/mailslurp_client/api/email_controller_api.rb +0 -852
  88. data/lib/mailslurp_client/api/form_controller_api.rb +0 -104
  89. data/lib/mailslurp_client/api/group_controller_api.rb +0 -519
  90. data/lib/mailslurp_client/api/inbox_controller_api.rb +0 -822
  91. data/lib/mailslurp_client/api/template_controller_api.rb +0 -323
  92. data/lib/mailslurp_client/api/wait_for_controller_api.rb +0 -359
  93. data/lib/mailslurp_client/api/webhook_controller_api.rb +0 -405
  94. data/lib/mailslurp_client/api_client.rb +0 -386
  95. data/lib/mailslurp_client/api_error.rb +0 -57
  96. data/lib/mailslurp_client/configuration.rb +0 -248
  97. data/lib/mailslurp_client/models/attachment_meta_data.rb +0 -238
  98. data/lib/mailslurp_client/models/basic_auth_options.rb +0 -226
  99. data/lib/mailslurp_client/models/bulk_send_email_options.rb +0 -219
  100. data/lib/mailslurp_client/models/contact_dto.rb +0 -288
  101. data/lib/mailslurp_client/models/contact_projection.rb +0 -261
  102. data/lib/mailslurp_client/models/create_anonymous_alias_options.rb +0 -208
  103. data/lib/mailslurp_client/models/create_contact_options.rb +0 -277
  104. data/lib/mailslurp_client/models/create_domain_options.rb +0 -208
  105. data/lib/mailslurp_client/models/create_group_options.rb +0 -220
  106. data/lib/mailslurp_client/models/create_owned_alias_options.rb +0 -238
  107. data/lib/mailslurp_client/models/create_template_options.rb +0 -225
  108. data/lib/mailslurp_client/models/create_webhook_options.rb +0 -227
  109. data/lib/mailslurp_client/models/domain_dto.rb +0 -296
  110. data/lib/mailslurp_client/models/domain_preview.rb +0 -240
  111. data/lib/mailslurp_client/models/email.rb +0 -376
  112. data/lib/mailslurp_client/models/email_analysis.rb +0 -248
  113. data/lib/mailslurp_client/models/email_preview.rb +0 -286
  114. data/lib/mailslurp_client/models/email_projection.rb +0 -307
  115. data/lib/mailslurp_client/models/forward_email_options.rb +0 -244
  116. data/lib/mailslurp_client/models/group_contacts_dto.rb +0 -227
  117. data/lib/mailslurp_client/models/group_dto.rb +0 -248
  118. data/lib/mailslurp_client/models/group_projection.rb +0 -248
  119. data/lib/mailslurp_client/models/html_validation_result.rb +0 -243
  120. data/lib/mailslurp_client/models/inbox.rb +0 -290
  121. data/lib/mailslurp_client/models/inbox_projection.rb +0 -272
  122. data/lib/mailslurp_client/models/json_node.rb +0 -429
  123. data/lib/mailslurp_client/models/match_option.rb +0 -274
  124. data/lib/mailslurp_client/models/match_options.rb +0 -210
  125. data/lib/mailslurp_client/models/model_alias.rb +0 -284
  126. data/lib/mailslurp_client/models/page_alias.rb +0 -298
  127. data/lib/mailslurp_client/models/page_contact_projection.rb +0 -298
  128. data/lib/mailslurp_client/models/page_email_preview.rb +0 -298
  129. data/lib/mailslurp_client/models/page_email_projection.rb +0 -298
  130. data/lib/mailslurp_client/models/page_group_projection.rb +0 -298
  131. data/lib/mailslurp_client/models/page_inbox_projection.rb +0 -298
  132. data/lib/mailslurp_client/models/page_template_projection.rb +0 -298
  133. data/lib/mailslurp_client/models/page_webhook_projection.rb +0 -298
  134. data/lib/mailslurp_client/models/pageable.rb +0 -251
  135. data/lib/mailslurp_client/models/raw_email_json.rb +0 -211
  136. data/lib/mailslurp_client/models/send_email_options.rb +0 -392
  137. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +0 -208
  138. data/lib/mailslurp_client/models/simple_send_email_options.rb +0 -237
  139. data/lib/mailslurp_client/models/sort.rb +0 -224
  140. data/lib/mailslurp_client/models/template_dto.rb +0 -269
  141. data/lib/mailslurp_client/models/template_projection.rb +0 -269
  142. data/lib/mailslurp_client/models/template_variable.rb +0 -259
  143. data/lib/mailslurp_client/models/unread_count.rb +0 -211
  144. data/lib/mailslurp_client/models/update_group_contacts.rb +0 -213
  145. data/lib/mailslurp_client/models/update_inbox_options.rb +0 -250
  146. data/lib/mailslurp_client/models/upload_attachment_options.rb +0 -228
  147. data/lib/mailslurp_client/models/validation_dto.rb +0 -217
  148. data/lib/mailslurp_client/models/validation_message.rb +0 -220
  149. data/lib/mailslurp_client/models/wait_for_conditions.rb +0 -316
  150. data/lib/mailslurp_client/models/webhook_dto.rb +0 -326
  151. data/lib/mailslurp_client/models/webhook_projection.rb +0 -277
  152. data/lib/mailslurp_client/models/webhook_test_request.rb +0 -284
  153. data/lib/mailslurp_client/models/webhook_test_response.rb +0 -215
  154. data/lib/mailslurp_client/models/webhook_test_result.rb +0 -235
  155. data/lib/mailslurp_client/version.rb +0 -15
  156. data/mailslurp_client.gemspec +0 -39
  157. data/spec/api/alias_controller_api_spec.rb +0 -107
  158. data/spec/api/attachment_controller_api_spec.rb +0 -61
  159. data/spec/api/bulk_actions_controller_api_spec.rb +0 -68
  160. data/spec/api/common_actions_controller_api_spec.rb +0 -129
  161. data/spec/api/contact_controller_api_spec.rb +0 -91
  162. data/spec/api/domain_controller_api_spec.rb +0 -82
  163. data/spec/api/email_controller_api_spec.rb +0 -162
  164. data/spec/api/form_controller_api_spec.rb +0 -54
  165. data/spec/api/group_controller_api_spec.rb +0 -126
  166. data/spec/api/inbox_controller_api_spec.rb +0 -172
  167. data/spec/api/template_controller_api_spec.rb +0 -91
  168. data/spec/api/wait_for_controller_api_spec.rb +0 -107
  169. data/spec/api/webhook_controller_api_spec.rb +0 -107
  170. data/spec/api_client_spec.rb +0 -226
  171. data/spec/configuration_spec.rb +0 -42
  172. data/spec/models/attachment_meta_data_spec.rb +0 -59
  173. data/spec/models/basic_auth_options_spec.rb +0 -47
  174. data/spec/models/bulk_send_email_options_spec.rb +0 -47
  175. data/spec/models/contact_dto_spec.rb +0 -83
  176. data/spec/models/contact_projection_spec.rb +0 -71
  177. data/spec/models/create_anonymous_alias_options_spec.rb +0 -41
  178. data/spec/models/create_contact_options_spec.rb +0 -83
  179. data/spec/models/create_domain_options_spec.rb +0 -41
  180. data/spec/models/create_group_options_spec.rb +0 -47
  181. data/spec/models/create_owned_alias_options_spec.rb +0 -59
  182. data/spec/models/create_template_options_spec.rb +0 -47
  183. data/spec/models/create_webhook_options_spec.rb +0 -53
  184. data/spec/models/domain_dto_spec.rb +0 -77
  185. data/spec/models/domain_preview_spec.rb +0 -53
  186. data/spec/models/email_analysis_spec.rb +0 -65
  187. data/spec/models/email_preview_spec.rb +0 -83
  188. data/spec/models/email_projection_spec.rb +0 -89
  189. data/spec/models/email_spec.rb +0 -137
  190. data/spec/models/forward_email_options_spec.rb +0 -59
  191. data/spec/models/group_contacts_dto_spec.rb +0 -47
  192. data/spec/models/group_dto_spec.rb +0 -59
  193. data/spec/models/group_projection_spec.rb +0 -59
  194. data/spec/models/html_validation_result_spec.rb +0 -53
  195. data/spec/models/inbox_projection_spec.rb +0 -77
  196. data/spec/models/inbox_spec.rb +0 -89
  197. data/spec/models/json_node_spec.rb +0 -171
  198. data/spec/models/match_option_spec.rb +0 -61
  199. data/spec/models/match_options_spec.rb +0 -41
  200. data/spec/models/model_alias_spec.rb +0 -83
  201. data/spec/models/page_alias_spec.rb +0 -101
  202. data/spec/models/page_contact_projection_spec.rb +0 -101
  203. data/spec/models/page_email_preview_spec.rb +0 -101
  204. data/spec/models/page_email_projection_spec.rb +0 -101
  205. data/spec/models/page_group_projection_spec.rb +0 -101
  206. data/spec/models/page_inbox_projection_spec.rb +0 -101
  207. data/spec/models/page_template_projection_spec.rb +0 -101
  208. data/spec/models/page_webhook_projection_spec.rb +0 -101
  209. data/spec/models/pageable_spec.rb +0 -71
  210. data/spec/models/raw_email_json_spec.rb +0 -41
  211. data/spec/models/send_email_options_spec.rb +0 -129
  212. data/spec/models/set_inbox_favourited_options_spec.rb +0 -41
  213. data/spec/models/simple_send_email_options_spec.rb +0 -59
  214. data/spec/models/sort_spec.rb +0 -53
  215. data/spec/models/template_dto_spec.rb +0 -65
  216. data/spec/models/template_projection_spec.rb +0 -65
  217. data/spec/models/template_variable_spec.rb +0 -51
  218. data/spec/models/unread_count_spec.rb +0 -41
  219. data/spec/models/update_group_contacts_spec.rb +0 -41
  220. data/spec/models/update_inbox_options_spec.rb +0 -65
  221. data/spec/models/upload_attachment_options_spec.rb +0 -53
  222. data/spec/models/validation_dto_spec.rb +0 -47
  223. data/spec/models/validation_message_spec.rb +0 -47
  224. data/spec/models/wait_for_conditions_spec.rb +0 -85
  225. data/spec/models/webhook_dto_spec.rb +0 -93
  226. data/spec/models/webhook_projection_spec.rb +0 -71
  227. data/spec/models/webhook_test_request_spec.rb +0 -63
  228. data/spec/models/webhook_test_response_spec.rb +0 -47
  229. data/spec/models/webhook_test_result_spec.rb +0 -53
  230. data/spec/spec_helper.rb +0 -111
@@ -1,91 +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 ## Basic Concepts ### Inboxes Inboxes have real email addresses that can send and receive emails. You can create inboxes with specific email addresses (using custom domains). You can also use randomly assigned MailSlurp addresses as unique, disposable test addresses. See the InboxController or [inbox and email address guide](https://www.mailslurp.com/guides/) for more information. ### Receive Emails You can receive emails in a number of ways. You can fetch emails and attachments directly from an inbox. Or you can use `waitFor` endpoints to hold a connection open until an email is received that matches given criteria (such as subject or body content). You can also use webhooks to have emails from multiple inboxes forwarded to your server via HTTP POST. InboxController methods with `waitFor` in the name have a long timeout period and instruct MailSlurp to wait until an expected email is received. You can set conditions on email counts, subject or body matches, and more. Most receive methods only return an email ID and not the full email (to keep response sizes low). To fetch the full body or attachments for an email use the email's ID with EmailController endpoints. See the InboxController or [receiving emails guide](https://www.mailslurp.com/guides/) for more information. ### Send Emails You can send templated HTML emails in several ways. You must first create an inbox to send an email. An inbox can have a specific address or a randomly assigned one. You can send emails from an inbox using `to`, `cc`, and `bcc` recipient lists or with contacts and contact groups. Emails can contain plain-text or HTML bodies. You can also use email templates that support [moustache](https://mustache.github.io/) template variables. You can send attachments by first posting files to the AttachmentController and then using the returned IDs in the `attachments` field of the send options. See the InboxController or [sending emails guide](https://www.mailslurp.com/guides/) for more information. ### Templates MailSlurp emails support templates. You can create templates in the dashboard or API that contain [moustache](https://mustache.github.io/) style variables: for instance `Hello {{name}}`. Then when sending emails you can pass a map of variables names and values to be used. Additionally, when sending emails with contact groups you can use properties of the contact in your templates like `{{firstName}}` and `{{lastName}}`. > You can do a lot more with MailSlurp so see the included documentation for more information.
5
-
6
- The version of the OpenAPI document: 6.5.2
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for MailSlurpClient::TemplateControllerApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'TemplateControllerApi' do
20
- before do
21
- # run before each test
22
- @api_instance = MailSlurpClient::TemplateControllerApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of TemplateControllerApi' do
30
- it 'should create an instance of TemplateControllerApi' do
31
- expect(@api_instance).to be_instance_of(MailSlurpClient::TemplateControllerApi)
32
- end
33
- end
34
-
35
- # unit tests for create_template
36
- # Create a Template
37
- # @param create_template_options createTemplateOptions
38
- # @param [Hash] opts the optional parameters
39
- # @return [TemplateDto]
40
- describe 'create_template test' do
41
- it 'should work' do
42
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
- end
44
- end
45
-
46
- # unit tests for delete_template
47
- # Delete Template
48
- # @param template_id TemplateId
49
- # @param [Hash] opts the optional parameters
50
- # @return [nil]
51
- describe 'delete_template test' do
52
- it 'should work' do
53
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
- end
55
- end
56
-
57
- # unit tests for get_all_templates
58
- # Get all Templates in paginated format
59
- # @param [Hash] opts the optional parameters
60
- # @option opts [Integer] :page Optional page index in inbox list pagination
61
- # @option opts [Integer] :size Optional page size in inbox list pagination
62
- # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
63
- # @return [PageTemplateProjection]
64
- describe 'get_all_templates test' do
65
- it 'should work' do
66
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
- end
68
- end
69
-
70
- # unit tests for get_template
71
- # Get Template
72
- # @param template_id TemplateId
73
- # @param [Hash] opts the optional parameters
74
- # @return [TemplateDto]
75
- describe 'get_template test' do
76
- it 'should work' do
77
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
78
- end
79
- end
80
-
81
- # unit tests for get_templates
82
- # Get all Templates
83
- # @param [Hash] opts the optional parameters
84
- # @return [Array<TemplateProjection>]
85
- describe 'get_templates test' do
86
- it 'should work' do
87
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
88
- end
89
- end
90
-
91
- end
@@ -1,107 +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 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for MailSlurpClient::WaitForControllerApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'WaitForControllerApi' do
20
- before do
21
- # run before each test
22
- @api_instance = MailSlurpClient::WaitForControllerApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of WaitForControllerApi' do
30
- it 'should create an instance of WaitForControllerApi' do
31
- expect(@api_instance).to be_instance_of(MailSlurpClient::WaitForControllerApi)
32
- end
33
- end
34
-
35
- # unit tests for wait_for
36
- # Wait for conditions to be met
37
- # Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
38
- # @param [Hash] opts the optional parameters
39
- # @option opts [WaitForConditions] :wait_for_conditions Conditions to wait for
40
- # @return [Array<EmailPreview>]
41
- describe 'wait_for test' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- # unit tests for wait_for_email_count
48
- # Wait for and return count number of emails
49
- # 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.
50
- # @param [Hash] opts the optional parameters
51
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
52
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
53
- # @option opts [Integer] :timeout Max milliseconds to wait
54
- # @option opts [Boolean] :unread_only Optional filter for unread only
55
- # @return [Array<EmailPreview>]
56
- describe 'wait_for_email_count test' do
57
- it 'should work' do
58
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
59
- end
60
- end
61
-
62
- # unit tests for wait_for_latest_email
63
- # Fetch inbox&#39;s latest email or if empty wait for an email to arrive
64
- # 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.
65
- # @param [Hash] opts the optional parameters
66
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
67
- # @option opts [Integer] :timeout Max milliseconds to wait
68
- # @option opts [Boolean] :unread_only Optional filter for unread only
69
- # @return [Email]
70
- describe 'wait_for_latest_email test' do
71
- it 'should work' do
72
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
73
- end
74
- end
75
-
76
- # unit tests for wait_for_matching_email
77
- # Wait or return list of emails that match simple matching patterns
78
- # 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.
79
- # @param match_options matchOptions
80
- # @param [Hash] opts the optional parameters
81
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
82
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
83
- # @option opts [Integer] :timeout Max milliseconds to wait
84
- # @option opts [Boolean] :unread_only Optional filter for unread only
85
- # @return [Array<EmailPreview>]
86
- describe 'wait_for_matching_email test' do
87
- it 'should work' do
88
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
89
- end
90
- end
91
-
92
- # unit tests for wait_for_nth_email
93
- # Wait for or fetch the email with a given index in the inbox specified
94
- # 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.
95
- # @param [Hash] opts the optional parameters
96
- # @option opts [String] :inbox_id Id of the inbox you are fetching emails from
97
- # @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
98
- # @option opts [Integer] :timeout Max milliseconds to wait for the nth email if not already present
99
- # @option opts [Boolean] :unread_only Optional filter for unread only
100
- # @return [Email]
101
- describe 'wait_for_nth_email test' do
102
- it 'should work' do
103
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
- end
105
- end
106
-
107
- end
@@ -1,107 +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 ## Basic Concepts ### Inboxes Inboxes have real email addresses that can send and receive emails. You can create inboxes with specific email addresses (using custom domains). You can also use randomly assigned MailSlurp addresses as unique, disposable test addresses. See the InboxController or [inbox and email address guide](https://www.mailslurp.com/guides/) for more information. ### Receive Emails You can receive emails in a number of ways. You can fetch emails and attachments directly from an inbox. Or you can use `waitFor` endpoints to hold a connection open until an email is received that matches given criteria (such as subject or body content). You can also use webhooks to have emails from multiple inboxes forwarded to your server via HTTP POST. InboxController methods with `waitFor` in the name have a long timeout period and instruct MailSlurp to wait until an expected email is received. You can set conditions on email counts, subject or body matches, and more. Most receive methods only return an email ID and not the full email (to keep response sizes low). To fetch the full body or attachments for an email use the email's ID with EmailController endpoints. See the InboxController or [receiving emails guide](https://www.mailslurp.com/guides/) for more information. ### Send Emails You can send templated HTML emails in several ways. You must first create an inbox to send an email. An inbox can have a specific address or a randomly assigned one. You can send emails from an inbox using `to`, `cc`, and `bcc` recipient lists or with contacts and contact groups. Emails can contain plain-text or HTML bodies. You can also use email templates that support [moustache](https://mustache.github.io/) template variables. You can send attachments by first posting files to the AttachmentController and then using the returned IDs in the `attachments` field of the send options. See the InboxController or [sending emails guide](https://www.mailslurp.com/guides/) for more information. ### Templates MailSlurp emails support templates. You can create templates in the dashboard or API that contain [moustache](https://mustache.github.io/) style variables: for instance `Hello {{name}}`. Then when sending emails you can pass a map of variables names and values to be used. Additionally, when sending emails with contact groups you can use properties of the contact in your templates like `{{firstName}}` and `{{lastName}}`. > You can do a lot more with MailSlurp so see the included documentation for more information.
5
-
6
- The version of the OpenAPI document: 6.5.2
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for MailSlurpClient::WebhookControllerApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'WebhookControllerApi' do
20
- before do
21
- # run before each test
22
- @api_instance = MailSlurpClient::WebhookControllerApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of WebhookControllerApi' do
30
- it 'should create an instance of WebhookControllerApi' do
31
- expect(@api_instance).to be_instance_of(MailSlurpClient::WebhookControllerApi)
32
- end
33
- end
34
-
35
- # unit tests for create_webhook
36
- # Attach a WebHook URL to an inbox
37
- # Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.
38
- # @param inbox_id inboxId
39
- # @param webhook_options webhookOptions
40
- # @param [Hash] opts the optional parameters
41
- # @return [WebhookDto]
42
- describe 'create_webhook test' do
43
- it 'should work' do
44
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
- end
46
- end
47
-
48
- # unit tests for delete_webhook
49
- # Delete and disable a Webhook for an Inbox
50
- # @param inbox_id inboxId
51
- # @param webhook_id webhookId
52
- # @param [Hash] opts the optional parameters
53
- # @return [nil]
54
- describe 'delete_webhook test' do
55
- it 'should work' do
56
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
57
- end
58
- end
59
-
60
- # unit tests for get_all_webhooks
61
- # List Webhooks Paginated
62
- # List webhooks in paginated form. Allows for page index, page size, and sort direction.
63
- # @param [Hash] opts the optional parameters
64
- # @option opts [Integer] :page Optional page index in inbox list pagination
65
- # @option opts [Integer] :size Optional page size in inbox list pagination
66
- # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
67
- # @return [PageWebhookProjection]
68
- describe 'get_all_webhooks test' do
69
- it 'should work' do
70
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
71
- end
72
- end
73
-
74
- # unit tests for get_webhook
75
- # Get a webhook for an Inbox
76
- # @param webhook_id webhookId
77
- # @param [Hash] opts the optional parameters
78
- # @return [WebhookDto]
79
- describe 'get_webhook test' do
80
- it 'should work' do
81
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
82
- end
83
- end
84
-
85
- # unit tests for get_webhooks
86
- # Get all Webhooks for an Inbox
87
- # @param inbox_id inboxId
88
- # @param [Hash] opts the optional parameters
89
- # @return [Array<WebhookDto>]
90
- describe 'get_webhooks test' do
91
- it 'should work' do
92
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
93
- end
94
- end
95
-
96
- # unit tests for send_test_data
97
- # Send webhook test data
98
- # @param webhook_id webhookId
99
- # @param [Hash] opts the optional parameters
100
- # @return [WebhookTestResult]
101
- describe 'send_test_data test' do
102
- it 'should work' do
103
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
- end
105
- end
106
-
107
- end
@@ -1,226 +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 ## Basic Concepts ### Inboxes Inboxes have real email addresses that can send and receive emails. You can create inboxes with specific email addresses (using custom domains). You can also use randomly assigned MailSlurp addresses as unique, disposable test addresses. See the InboxController or [inbox and email address guide](https://www.mailslurp.com/guides/) for more information. ### Receive Emails You can receive emails in a number of ways. You can fetch emails and attachments directly from an inbox. Or you can use `waitFor` endpoints to hold a connection open until an email is received that matches given criteria (such as subject or body content). You can also use webhooks to have emails from multiple inboxes forwarded to your server via HTTP POST. InboxController methods with `waitFor` in the name have a long timeout period and instruct MailSlurp to wait until an expected email is received. You can set conditions on email counts, subject or body matches, and more. Most receive methods only return an email ID and not the full email (to keep response sizes low). To fetch the full body or attachments for an email use the email's ID with EmailController endpoints. See the InboxController or [receiving emails guide](https://www.mailslurp.com/guides/) for more information. ### Send Emails You can send templated HTML emails in several ways. You must first create an inbox to send an email. An inbox can have a specific address or a randomly assigned one. You can send emails from an inbox using `to`, `cc`, and `bcc` recipient lists or with contacts and contact groups. Emails can contain plain-text or HTML bodies. You can also use email templates that support [moustache](https://mustache.github.io/) template variables. You can send attachments by first posting files to the AttachmentController and then using the returned IDs in the `attachments` field of the send options. See the InboxController or [sending emails guide](https://www.mailslurp.com/guides/) for more information. ### Templates MailSlurp emails support templates. You can create templates in the dashboard or API that contain [moustache](https://mustache.github.io/) style variables: for instance `Hello {{name}}`. Then when sending emails you can pass a map of variables names and values to be used. Additionally, when sending emails with contact groups you can use properties of the contact in your templates like `{{firstName}}` and `{{lastName}}`. > You can do a lot more with MailSlurp so see the included documentation for more information.
5
-
6
- The version of the OpenAPI document: 6.5.2
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
-
15
- describe MailSlurpClient::ApiClient do
16
- context 'initialization' do
17
- context 'URL stuff' do
18
- context 'host' do
19
- it 'removes http from host' do
20
- MailSlurpClient.configure { |c| c.host = 'http://example.com' }
21
- expect(MailSlurpClient::Configuration.default.host).to eq('example.com')
22
- end
23
-
24
- it 'removes https from host' do
25
- MailSlurpClient.configure { |c| c.host = 'https://wookiee.com' }
26
- expect(MailSlurpClient::ApiClient.default.config.host).to eq('wookiee.com')
27
- end
28
-
29
- it 'removes trailing path from host' do
30
- MailSlurpClient.configure { |c| c.host = 'hobo.com/v4' }
31
- expect(MailSlurpClient::Configuration.default.host).to eq('hobo.com')
32
- end
33
- end
34
-
35
- context 'base_path' do
36
- it "prepends a slash to base_path" do
37
- MailSlurpClient.configure { |c| c.base_path = 'v4/dog' }
38
- expect(MailSlurpClient::Configuration.default.base_path).to eq('/v4/dog')
39
- end
40
-
41
- it "doesn't prepend a slash if one is already there" do
42
- MailSlurpClient.configure { |c| c.base_path = '/v4/dog' }
43
- expect(MailSlurpClient::Configuration.default.base_path).to eq('/v4/dog')
44
- end
45
-
46
- it "ends up as a blank string if nil" do
47
- MailSlurpClient.configure { |c| c.base_path = nil }
48
- expect(MailSlurpClient::Configuration.default.base_path).to eq('')
49
- end
50
- end
51
- end
52
- end
53
-
54
- describe 'params_encoding in #build_request' do
55
- let(:config) { MailSlurpClient::Configuration.new }
56
- let(:api_client) { MailSlurpClient::ApiClient.new(config) }
57
-
58
- it 'defaults to nil' do
59
- expect(MailSlurpClient::Configuration.default.params_encoding).to eq(nil)
60
- expect(config.params_encoding).to eq(nil)
61
-
62
- request = api_client.build_request(:get, '/test')
63
- expect(request.options[:params_encoding]).to eq(nil)
64
- end
65
-
66
- it 'can be customized' do
67
- config.params_encoding = :multi
68
- request = api_client.build_request(:get, '/test')
69
- expect(request.options[:params_encoding]).to eq(:multi)
70
- end
71
- end
72
-
73
- describe 'timeout in #build_request' do
74
- let(:config) { MailSlurpClient::Configuration.new }
75
- let(:api_client) { MailSlurpClient::ApiClient.new(config) }
76
-
77
- it 'defaults to 0' do
78
- expect(MailSlurpClient::Configuration.default.timeout).to eq(0)
79
- expect(config.timeout).to eq(0)
80
-
81
- request = api_client.build_request(:get, '/test')
82
- expect(request.options[:timeout]).to eq(0)
83
- end
84
-
85
- it 'can be customized' do
86
- config.timeout = 100
87
- request = api_client.build_request(:get, '/test')
88
- expect(request.options[:timeout]).to eq(100)
89
- end
90
- end
91
-
92
- describe '#deserialize' do
93
- it "handles Array<Integer>" do
94
- api_client = MailSlurpClient::ApiClient.new
95
- headers = { 'Content-Type' => 'application/json' }
96
- response = double('response', headers: headers, body: '[12, 34]')
97
- data = api_client.deserialize(response, 'Array<Integer>')
98
- expect(data).to be_instance_of(Array)
99
- expect(data).to eq([12, 34])
100
- end
101
-
102
- it 'handles Array<Array<Integer>>' do
103
- api_client = MailSlurpClient::ApiClient.new
104
- headers = { 'Content-Type' => 'application/json' }
105
- response = double('response', headers: headers, body: '[[12, 34], [56]]')
106
- data = api_client.deserialize(response, 'Array<Array<Integer>>')
107
- expect(data).to be_instance_of(Array)
108
- expect(data).to eq([[12, 34], [56]])
109
- end
110
-
111
- it 'handles Hash<String, String>' do
112
- api_client = MailSlurpClient::ApiClient.new
113
- headers = { 'Content-Type' => 'application/json' }
114
- response = double('response', headers: headers, body: '{"message": "Hello"}')
115
- data = api_client.deserialize(response, 'Hash<String, String>')
116
- expect(data).to be_instance_of(Hash)
117
- expect(data).to eq(:message => 'Hello')
118
- end
119
- end
120
-
121
- describe "#object_to_hash" do
122
- it 'ignores nils and includes empty arrays' do
123
- # uncomment below to test object_to_hash for model
124
- # api_client = MailSlurpClient::ApiClient.new
125
- # _model = MailSlurpClient::ModelName.new
126
- # update the model attribute below
127
- # _model.id = 1
128
- # update the expected value (hash) below
129
- # expected = {id: 1, name: '', tags: []}
130
- # expect(api_client.object_to_hash(_model)).to eq(expected)
131
- end
132
- end
133
-
134
- describe '#build_collection_param' do
135
- let(:param) { ['aa', 'bb', 'cc'] }
136
- let(:api_client) { MailSlurpClient::ApiClient.new }
137
-
138
- it 'works for csv' do
139
- expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
140
- end
141
-
142
- it 'works for ssv' do
143
- expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
144
- end
145
-
146
- it 'works for tsv' do
147
- expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
148
- end
149
-
150
- it 'works for pipes' do
151
- expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
152
- end
153
-
154
- it 'works for multi' do
155
- expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
156
- end
157
-
158
- it 'fails for invalid collection format' do
159
- expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
160
- end
161
- end
162
-
163
- describe '#json_mime?' do
164
- let(:api_client) { MailSlurpClient::ApiClient.new }
165
-
166
- it 'works' do
167
- expect(api_client.json_mime?(nil)).to eq false
168
- expect(api_client.json_mime?('')).to eq false
169
-
170
- expect(api_client.json_mime?('application/json')).to eq true
171
- expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
172
- expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
173
-
174
- expect(api_client.json_mime?('application/xml')).to eq false
175
- expect(api_client.json_mime?('text/plain')).to eq false
176
- expect(api_client.json_mime?('application/jsonp')).to eq false
177
- end
178
- end
179
-
180
- describe '#select_header_accept' do
181
- let(:api_client) { MailSlurpClient::ApiClient.new }
182
-
183
- it 'works' do
184
- expect(api_client.select_header_accept(nil)).to be_nil
185
- expect(api_client.select_header_accept([])).to be_nil
186
-
187
- expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
188
- expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
189
- expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
190
-
191
- expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
192
- expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
193
- end
194
- end
195
-
196
- describe '#select_header_content_type' do
197
- let(:api_client) { MailSlurpClient::ApiClient.new }
198
-
199
- it 'works' do
200
- expect(api_client.select_header_content_type(nil)).to eq('application/json')
201
- expect(api_client.select_header_content_type([])).to eq('application/json')
202
-
203
- expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
204
- expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
205
- expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
206
- expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
207
- expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
208
- end
209
- end
210
-
211
- describe '#sanitize_filename' do
212
- let(:api_client) { MailSlurpClient::ApiClient.new }
213
-
214
- it 'works' do
215
- expect(api_client.sanitize_filename('sun')).to eq('sun')
216
- expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
217
- expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
218
- expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
219
- expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
220
- expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
221
- expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
222
- expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
223
- expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
224
- end
225
- end
226
- end