mailslurp_client 8.3.0 → 8.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -2
- data/lib/mailslurp_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73a7a6bce5d2930743647f53b1b93e19ea81179b32de56b6bd3c7a0d4ca84e62
|
4
|
+
data.tar.gz: 6f02b97e47c2f56c52e9c0eb68351c5a24b7b646b56dd0cdd7ac4efd4bf82801
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 819cfdb8b68c76a89130bef694eaabd2db78e98d1205f7258fb1bee9f1696ca751bcc2a9c50099779a24110997f27f559b2632b1bc0a6292416b4f6fafdad65b
|
7
|
+
data.tar.gz: d878ffa757ae2fd463ac0b5a59db2ae7433abf85925186d21ba780b0cd73c23b648759b3a010f08dfe630a999bddf2a503a7f08deba97ed2a46f26246e7136fc
|
data/README.md
CHANGED
@@ -41,7 +41,7 @@ gem install mailslurp_client
|
|
41
41
|
Or in your `Gemfile`:
|
42
42
|
|
43
43
|
```ruby
|
44
|
-
gem 'mailslurp_client', '~> 8.
|
44
|
+
gem 'mailslurp_client', '~> 8.3', '>= 8.3.0'
|
45
45
|
```
|
46
46
|
|
47
47
|
And then run bundler install:
|
@@ -90,6 +90,35 @@ it 'can create email addresses' do
|
|
90
90
|
end
|
91
91
|
```
|
92
92
|
|
93
|
+
#### More options
|
94
|
+
The `create_inbox` method has some limitations in the Ruby client. To create inboxes with more options use the alternative
|
95
|
+
`create_inbox_with_options` method. (This uses a request body instead of query parameters.)
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
it 'can an inbox with tags' do
|
99
|
+
inbox_controller = MailSlurpClient::InboxControllerApi.new
|
100
|
+
# create an inbox with tags
|
101
|
+
inbox = inbox_controller.create_inbox_with_options({
|
102
|
+
tags: ['t1','t2'],
|
103
|
+
description: "test with tags",
|
104
|
+
name: "test name"
|
105
|
+
})
|
106
|
+
|
107
|
+
# has tags
|
108
|
+
expect(inbox.id).to be_truthy
|
109
|
+
expect(inbox.description).to be_truthy
|
110
|
+
expect(inbox.name).to be_truthy
|
111
|
+
expect(inbox.tags).to include('t1')
|
112
|
+
expect(inbox.tags).to include('t2')
|
113
|
+
|
114
|
+
# can update tags
|
115
|
+
inbox_updated = inbox_controller.update_inbox(inbox.id, {
|
116
|
+
tags: ['newtag']
|
117
|
+
})
|
118
|
+
expect(inbox_updated.tags).to eq(['newtag'])
|
119
|
+
end
|
120
|
+
```
|
121
|
+
|
93
122
|
### List inboxes
|
94
123
|
|
95
124
|
Inboxes you create can be listed in a paginated way.
|
@@ -234,7 +263,7 @@ email = wait_controller.wait_for_latest_email(wait_opts)
|
|
234
263
|
# find the attachments on the email object
|
235
264
|
expect(email.attachments.size).to be(1)
|
236
265
|
|
237
|
-
# download the attachment
|
266
|
+
# download the attachment as base64 (easier than byte arrays for ruby client)
|
238
267
|
email_controller = MailSlurpClient::EmailControllerApi.new
|
239
268
|
downloaded_attachment = email_controller.download_attachment_base64(email.attachments[0], email.id)
|
240
269
|
|