mailosaur 7.2.0 → 7.3.2
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 +273 -12
- data/lib/Mailosaur/models/usage_account_limit.rb +16 -0
- data/lib/Mailosaur/models/usage_account_limits.rb +24 -0
- data/lib/Mailosaur/models/usage_transaction.rb +20 -0
- data/lib/Mailosaur/models/usage_transaction_list_result.rb +13 -0
- data/lib/Mailosaur/servers.rb +17 -0
- data/lib/Mailosaur/usage.rb +41 -0
- data/lib/Mailosaur/version.rb +1 -1
- data/lib/mailosaur.rb +10 -0
- metadata +22 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 056e993a519633fcca85156531e4eb18cc1643fa230d7f15f6239794b5529f97
|
4
|
+
data.tar.gz: de2d43526a0512c7f92882fa5b23ca0d462852f7b2123ada28e34c42b0ad6b9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f10d8c30b5b44f8a1fa19e2305599f8d5c48ab1e00e1c903cf4380d992e4c892b6a5e7637fe09b86016023545d70c357d5603802cdb6fb8e2169051f4ffa3e6d
|
7
|
+
data.tar.gz: b1a02d600af6526d11fffae86c94ea78c768a073489d3be996f803c943ba6f5a6223240933f2a6db07884fba239b633f95f87784b2d3ddb447c34b4a508805be
|
data/README.md
CHANGED
@@ -1,30 +1,291 @@
|
|
1
|
-
# Mailosaur Ruby
|
1
|
+
# [Mailosaur - Ruby library](https://mailosaur.com/) · [](https://github.com/mailosaur/mailosaur-ruby/actions)
|
2
2
|
|
3
|
-
|
3
|
+
Mailosaur lets you automate email and SMS tests as part of software development and QA.
|
4
4
|
|
5
|
-
|
5
|
+
- **Unlimited test email addresses for all** - every account gives users an unlimited number of test email addresses to test with.
|
6
|
+
- **End-to-end (e2e) email and SMS testing** Allowing you to set up end-to-end tests for password reset emails, account verification processes and MFA/one-time passcodes sent via text message.
|
7
|
+
- **Fake SMTP servers** Mailosaur also provides dummy SMTP servers to test with; allowing you to catch email in staging environments - preventing email being sent to customers by mistake.
|
6
8
|
|
7
|
-
##
|
9
|
+
## Get Started
|
10
|
+
|
11
|
+
This guide provides several key sections:
|
12
|
+
|
13
|
+
- [Get Started](#get-started)
|
14
|
+
- [Creating an account](#creating-an-account)
|
15
|
+
- [Test email addresses with Mailosaur](#test-email-addresses-with-mailosaur)
|
16
|
+
- [Find an email](#find-an-email)
|
17
|
+
- [Find an SMS message](#find-an-sms-message)
|
18
|
+
- [Testing plain text content](#testing-plain-text-content)
|
19
|
+
- [Testing HTML content](#testing-html-content)
|
20
|
+
- [Working with hyperlinks](#working-with-hyperlinks)
|
21
|
+
- [Working with attachments](#working-with-attachments)
|
22
|
+
- [Working with images and web beacons](#working-with-images-and-web-beacons)
|
23
|
+
- [Spam checking](#spam-checking)
|
24
|
+
|
25
|
+
You can find the full [Mailosaur documentation](https://mailosaur.com/docs/) on the website.
|
26
|
+
|
27
|
+
If you get stuck, just contact us at support@mailosaur.com.
|
28
|
+
|
29
|
+
### Installation
|
8
30
|
|
9
31
|
```
|
10
32
|
gem install mailosaur
|
11
33
|
```
|
12
34
|
|
13
|
-
|
35
|
+
Then import the library into your code. The value for `YOUR_API_KEY` is covered in the next step ([creating an account](#creating-an-account)):
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
require 'mailosaur'
|
39
|
+
mailosaur = Mailosaur::MailosaurClient.new("YOUR_API_KEY")
|
40
|
+
```
|
41
|
+
|
42
|
+
### API Reference
|
43
|
+
|
44
|
+
This library is powered by the Mailosaur [email & SMS testing API](https://mailosaur.com/docs/api/). You can easily check out the API itself by looking at our [API reference documentation](https://mailosaur.com/docs/api/) or via our Postman or Insomnia collections:
|
45
|
+
|
46
|
+
[](https://app.getpostman.com/run-collection/6961255-6cc72dff-f576-451a-9023-b82dec84f95d?action=collection%2Ffork&collection-url=entityId%3D6961255-6cc72dff-f576-451a-9023-b82dec84f95d%26entityType%3Dcollection%26workspaceId%3D386a4af1-4293-4197-8f40-0eb49f831325)
|
47
|
+
[](https://insomnia.rest/run/?label=Mailosaur&uri=https%3A%2F%2Fmailosaur.com%2Finsomnia.json)
|
48
|
+
|
49
|
+
## Creating an account
|
50
|
+
|
51
|
+
Create a [free trial account](https://mailosaur.com/app/signup) for Mailosaur via the website.
|
52
|
+
|
53
|
+
Once you have this, navigate to the [API tab](https://mailosaur.com/app/project/api) to find the following values:
|
54
|
+
|
55
|
+
- **Server ID** - Servers act like projects, which group your tests together. You need this ID whenever you interact with a server via the API.
|
56
|
+
- **Server Domain** - Every server has its own domain name. You'll need this to send email to your server.
|
57
|
+
- **API Key** - You can create an API key per server (recommended), or an account-level API key to use across your whole account. [Learn more about API keys](https://mailosaur.com/docs/managing-your-account/api-keys/).
|
14
58
|
|
15
|
-
|
59
|
+
## Test email addresses with Mailosaur
|
16
60
|
|
17
|
-
|
61
|
+
Mailosaur gives you an **unlimited number of test email addresses** - with no setup or coding required!
|
18
62
|
|
19
|
-
|
63
|
+
Here's how it works:
|
64
|
+
|
65
|
+
* When you create an account, you are given a server.
|
66
|
+
* Every server has its own **Server Domain** name (e.g. `abc123.mailosaur.net`)
|
67
|
+
* Any email address that ends with `@{YOUR_SERVER_DOMAIN}` will work with Mailosaur without any special setup. For example:
|
68
|
+
* `build-423@abc123.mailosaur.net`
|
69
|
+
* `john.smith@abc123.mailosaur.net`
|
70
|
+
* `rAnDoM63423@abc123.mailosaur.net`
|
71
|
+
* You can create more servers when you need them. Each one will have its own domain name.
|
72
|
+
|
73
|
+
***Can't use test email addresses?** You can also [use SMTP to test email](https://mailosaur.com/docs/email-testing/sending-to-mailosaur/#sending-via-smtp). By connecting your product or website to Mailosaur via SMTP, Mailosaur will catch all email your application sends, regardless of the email address.*
|
74
|
+
|
75
|
+
## Find an email
|
76
|
+
|
77
|
+
In automated tests you will want to wait for a new email to arrive. This library makes that easy with the `messages.get` method. Here's how you use it:
|
20
78
|
|
21
79
|
```ruby
|
22
|
-
require
|
23
|
-
|
80
|
+
require 'mailosaur'
|
81
|
+
|
82
|
+
mailosaur = Mailosaur::MailosaurClient.new("API_KEY")
|
83
|
+
|
84
|
+
# See https://mailosaur.com/app/project/api
|
85
|
+
server_id = "abc123"
|
86
|
+
server_domain = "abc123.mailosaur.net"
|
87
|
+
|
88
|
+
criteria = Mailosaur::Models::SearchCriteria.new()
|
89
|
+
criteria.sent_to = "anything@" + server_domain
|
90
|
+
|
91
|
+
email = mailosaur.messages.get(server_id, criteria)
|
92
|
+
|
93
|
+
puts(email.subject) # "Hello world!"
|
94
|
+
```
|
95
|
+
|
96
|
+
### What is this code doing?
|
97
|
+
|
98
|
+
1. Sets up an instance of `MailosaurClient` with your API key.
|
99
|
+
2. Waits for an email to arrive at the server with ID `abc123`.
|
100
|
+
3. Outputs the subject line of the email.
|
101
|
+
|
102
|
+
## Find an SMS message
|
103
|
+
|
104
|
+
**Important:** Trial accounts do not automatically have SMS access. Please contact our support team to enable a trial of SMS functionality.
|
105
|
+
|
106
|
+
If your account has [SMS testing](https://mailosaur.com/sms-testing/) enabled, you can reserve phone numbers to test with, then use the Mailosaur API in a very similar way to when testing email:
|
107
|
+
|
108
|
+
```ruby
|
109
|
+
require 'mailosaur'
|
110
|
+
|
111
|
+
mailosaur = Mailosaur::MailosaurClient.new("API_KEY")
|
112
|
+
|
113
|
+
server_id = "abc123"
|
114
|
+
|
115
|
+
criteria = Mailosaur::Models::SearchCriteria.new()
|
116
|
+
criteria.sent_to = "4471235554444"
|
117
|
+
|
118
|
+
sms = mailosaur.messages.get(server_id, criteria)
|
119
|
+
|
120
|
+
puts(sms.text.body)
|
121
|
+
```
|
122
|
+
|
123
|
+
## Testing plain text content
|
124
|
+
|
125
|
+
Most emails, and all SMS messages, should have a plain text body. Mailosaur exposes this content via the `text.body` property on an email or SMS message:
|
126
|
+
|
127
|
+
```ruby
|
128
|
+
puts(message.text.body) # "Hi Jason, ..."
|
129
|
+
|
130
|
+
if message.text.body.include? "Jason"
|
131
|
+
puts("Email contains 'Jason'")
|
132
|
+
end
|
133
|
+
```
|
134
|
+
|
135
|
+
### Extracting verification codes from plain text
|
136
|
+
|
137
|
+
You may have an email or SMS message that contains an account verification code, or some other one-time passcode. You can extract content like this using a simple regex.
|
138
|
+
|
139
|
+
Here is how to extract a 6-digit numeric code:
|
140
|
+
|
141
|
+
```ruby
|
142
|
+
puts(message.text.body) # "Your access code is 243546."
|
143
|
+
|
144
|
+
match = message.text.body.match(/([0-9]{6})/)
|
145
|
+
puts(match[0]) # "243546"
|
146
|
+
```
|
147
|
+
|
148
|
+
[Read more](https://mailosaur.com/docs/test-cases/text-content/)
|
149
|
+
|
150
|
+
## Testing HTML content
|
151
|
+
|
152
|
+
Most emails also have an HTML body, as well as the plain text content. You can access HTML content in a very similar way to plain text:
|
153
|
+
|
154
|
+
```ruby
|
155
|
+
puts(message.html.body) # "<html><head ..."
|
156
|
+
```
|
157
|
+
|
158
|
+
### Working with HTML using nokogiri
|
159
|
+
|
160
|
+
If you need to traverse the HTML content of an email. For example, finding an element via a CSS selector, you can use the [nokogiri](https://rubygems.org/gems/nokogiri) library.
|
161
|
+
|
162
|
+
```sh
|
163
|
+
gem install nokogiri
|
164
|
+
```
|
165
|
+
|
166
|
+
```ruby
|
167
|
+
require 'nokogiri'
|
168
|
+
|
169
|
+
# ...
|
170
|
+
|
171
|
+
@doc = Nokogiri::HTML(message.html.body)
|
172
|
+
el = @doc.css(".verification-code")
|
173
|
+
|
174
|
+
verification_code = el.text
|
175
|
+
|
176
|
+
puts verification_code # "542163"
|
177
|
+
```
|
178
|
+
|
179
|
+
[Read more](https://mailosaur.com/docs/test-cases/html-content/)
|
180
|
+
|
181
|
+
## Working with hyperlinks
|
182
|
+
|
183
|
+
When an email is sent with an HTML body, Mailosaur automatically extracts any hyperlinks found within anchor (`<a>`) and area (`<area>`) elements and makes these viable via the `html.links` array.
|
184
|
+
|
185
|
+
Each link has a text property, representing the display text of the hyperlink within the body, and an href property containing the target URL:
|
186
|
+
|
187
|
+
```ruby
|
188
|
+
# How many links?
|
189
|
+
puts(message.html.links.length) # 2
|
190
|
+
|
191
|
+
first_link = message.html.links[0]
|
192
|
+
puts(first_link.text) # "Google Search"
|
193
|
+
puts(first_link.href) # "https://www.google.com/"
|
194
|
+
```
|
195
|
+
|
196
|
+
**Important:** To ensure you always have valid emails. Mailosaur only extracts links that have been correctly marked up with `<a>` or `<area>` tags.
|
197
|
+
|
198
|
+
### Links in plain text (including SMS messages)
|
199
|
+
|
200
|
+
Mailosaur auto-detects links in plain text content too, which is especially useful for SMS testing:
|
201
|
+
|
202
|
+
```ruby
|
203
|
+
# How many links?
|
204
|
+
puts(message.text.links.length) # 2
|
205
|
+
|
206
|
+
first_link = message.text.links[0]
|
207
|
+
puts(first_link.href) # "https://www.google.com/"
|
208
|
+
```
|
209
|
+
|
210
|
+
## Working with attachments
|
211
|
+
|
212
|
+
If your email includes attachments, you can access these via the `attachments` property:
|
213
|
+
|
214
|
+
```ruby
|
215
|
+
# How many attachments?
|
216
|
+
puts(message.attachments.length) # 2
|
217
|
+
```
|
218
|
+
|
219
|
+
Each attachment contains metadata on the file name and content type:
|
220
|
+
|
221
|
+
```ruby
|
222
|
+
first_attachment = message.attachments[0]
|
223
|
+
puts(first_attachment.file_name) # "contract.pdf"
|
224
|
+
puts(first_attachment.content_type) # "application/pdf"
|
225
|
+
```
|
226
|
+
|
227
|
+
The `length` property returns the size of the attached file (in bytes):
|
228
|
+
|
229
|
+
```ruby
|
230
|
+
first_attachment = message.attachments[0]
|
231
|
+
puts(first_attachment.length) # 4028
|
232
|
+
```
|
233
|
+
|
234
|
+
## Working with images and web beacons
|
235
|
+
|
236
|
+
The `html.images` property of a message contains an array of images found within the HTML content of an email. The length of this array corresponds to the number of images found within an email:
|
237
|
+
|
238
|
+
```ruby
|
239
|
+
# How many images in the email?
|
240
|
+
puts(message.html.images.length) # 1
|
241
|
+
```
|
242
|
+
|
243
|
+
### Remotely-hosted images
|
244
|
+
|
245
|
+
Emails will often contain many images that are hosted elsewhere, such as on your website or product. It is recommended to check that these images are accessible by your recipients.
|
246
|
+
|
247
|
+
All images should have an alternative text description, which can be checked using the `alt` attribute.
|
248
|
+
|
249
|
+
```ruby
|
250
|
+
image = message.html.images[0]
|
251
|
+
puts(image.alt) # "Hot air balloon"
|
252
|
+
```
|
253
|
+
|
254
|
+
### Triggering web beacons
|
255
|
+
|
256
|
+
A web beacon is a small image that can be used to track whether an email has been opened by a recipient.
|
257
|
+
|
258
|
+
Because a web beacon is simply another form of remotely-hosted image, you can use the `src` attribute to perform an HTTP request to that address:
|
259
|
+
|
260
|
+
```ruby
|
261
|
+
image = message.html.images[0]
|
262
|
+
puts(image.src) # "https://example.com/s.png?abc123"
|
263
|
+
|
264
|
+
# Make an HTTP call to trigger the web beacon
|
265
|
+
uri = URI(image.src)
|
266
|
+
Net::HTTP.start(uri.host, uri.port,
|
267
|
+
:use_ssl => uri.scheme == 'https') do |http|
|
268
|
+
request = Net::HTTP::Get.new uri
|
269
|
+
|
270
|
+
response = http.request request # Net::HTTPResponse object
|
271
|
+
puts(response.code) # 200
|
272
|
+
end
|
273
|
+
```
|
274
|
+
|
275
|
+
## Spam checking
|
276
|
+
|
277
|
+
You can perform a [SpamAssassin](https://spamassassin.apache.org/) check against an email. The structure returned matches the [spam test object](https://mailosaur.com/docs/api/#spam):
|
278
|
+
|
279
|
+
```ruby
|
280
|
+
result = mailosaur.analysis.spam(message.id)
|
24
281
|
|
25
|
-
result
|
282
|
+
puts(result.score) # 0.5
|
26
283
|
|
27
|
-
|
284
|
+
for r in result.spam_filter_results.spam_assassin do
|
285
|
+
puts(r.rule)
|
286
|
+
puts(r.description)
|
287
|
+
puts(r.score)
|
288
|
+
end
|
28
289
|
```
|
29
290
|
|
30
291
|
## Development
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class UsageAccountLimit < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@limit = data['limit']
|
6
|
+
@current = data['current']
|
7
|
+
end
|
8
|
+
|
9
|
+
# @return [Integer] The limit.
|
10
|
+
attr_accessor :limit
|
11
|
+
|
12
|
+
# @return [Integer] The current usage.
|
13
|
+
attr_accessor :current
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class UsageAccountLimits < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@servers = Mailosaur::Models::UsageAccountLimit.new(data['servers'])
|
6
|
+
@users = Mailosaur::Models::UsageAccountLimit.new(data['users'])
|
7
|
+
@email = Mailosaur::Models::UsageAccountLimit.new(data['email'])
|
8
|
+
@sms = Mailosaur::Models::UsageAccountLimit.new(data['sms'])
|
9
|
+
end
|
10
|
+
|
11
|
+
# @return [UsageAccountLimit]
|
12
|
+
attr_accessor :servers
|
13
|
+
|
14
|
+
# @return [UsageAccountLimit]
|
15
|
+
attr_accessor :users
|
16
|
+
|
17
|
+
# @return [UsageAccountLimit]
|
18
|
+
attr_accessor :email
|
19
|
+
|
20
|
+
# @return [UsageAccountLimit]
|
21
|
+
attr_accessor :sms
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class UsageTransaction < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@timestamp = DateTime.parse(data['timestamp'])
|
6
|
+
@email = data['email']
|
7
|
+
@sms = data['sms']
|
8
|
+
end
|
9
|
+
|
10
|
+
# @return [DateTime] The datetime that this transaction occurred.
|
11
|
+
attr_accessor :timestamp
|
12
|
+
|
13
|
+
# @return [Integer] The count of emails.
|
14
|
+
attr_accessor :email
|
15
|
+
|
16
|
+
# @return [Integer] The count of SMS messages.
|
17
|
+
attr_accessor :sms
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
module Models
|
3
|
+
class UsageTransactionListResult < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@items = []
|
6
|
+
(data['items'] || []).each do |i| @items << Mailosaur::Models::UsageTransaction.new(i) end
|
7
|
+
end
|
8
|
+
|
9
|
+
# @return [Array<UsageTransaction>] The individual transactions the result.
|
10
|
+
attr_accessor :items
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/Mailosaur/servers.rb
CHANGED
@@ -60,6 +60,23 @@ module Mailosaur
|
|
60
60
|
Mailosaur::Models::Server.new(model)
|
61
61
|
end
|
62
62
|
|
63
|
+
#
|
64
|
+
# Retrieve server password
|
65
|
+
#
|
66
|
+
# Retrieves the password for use with SMTP and POP3 for a single server.
|
67
|
+
# Simply supply the unique identifier for the required server.
|
68
|
+
#
|
69
|
+
# @param id [String] The identifier of the server.
|
70
|
+
#
|
71
|
+
# @return [String] Server password.
|
72
|
+
#
|
73
|
+
def get_password(id)
|
74
|
+
response = conn.get 'api/servers/' + id + '/password'
|
75
|
+
@handle_http_error.call(response) unless response.status == 200
|
76
|
+
model = JSON.load(response.body)
|
77
|
+
model['value']
|
78
|
+
end
|
79
|
+
|
63
80
|
#
|
64
81
|
# Update a server
|
65
82
|
#
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Mailosaur
|
2
|
+
class Usage
|
3
|
+
#
|
4
|
+
# Creates and initializes a new instance of the Usage class.
|
5
|
+
# @param client connection.
|
6
|
+
#
|
7
|
+
def initialize(conn, handle_http_error)
|
8
|
+
@conn = conn
|
9
|
+
@handle_http_error = handle_http_error
|
10
|
+
end
|
11
|
+
|
12
|
+
# @return [Connection] the client connection.
|
13
|
+
attr_reader :conn
|
14
|
+
|
15
|
+
#
|
16
|
+
# Retrieve account usage limits.
|
17
|
+
#
|
18
|
+
# Details the current limits and usage for your account.
|
19
|
+
#
|
20
|
+
# @return [UsageAccountLimits] operation results.
|
21
|
+
#
|
22
|
+
def limits
|
23
|
+
response = conn.get 'api/usage/limits'
|
24
|
+
@handle_http_error.call(response) unless response.status == 200
|
25
|
+
model = JSON.load(response.body)
|
26
|
+
Mailosaur::Models::UsageAccountLimits.new(model)
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# List account transactions. Retrieves the last 31 days of transactional usage.
|
31
|
+
#
|
32
|
+
# @return [UsageTransactionListResult] operation results.
|
33
|
+
#
|
34
|
+
def transactions
|
35
|
+
response = conn.get 'api/usage/transactions'
|
36
|
+
@handle_http_error.call(response) unless response.status == 200
|
37
|
+
model = JSON.load(response.body)
|
38
|
+
Mailosaur::Models::UsageTransactionListResult.new(model)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/lib/Mailosaur/version.rb
CHANGED
data/lib/mailosaur.rb
CHANGED
@@ -13,6 +13,7 @@ module Mailosaur
|
|
13
13
|
autoload :Files, 'Mailosaur/files.rb'
|
14
14
|
autoload :Messages, 'Mailosaur/messages.rb'
|
15
15
|
autoload :Servers, 'Mailosaur/servers.rb'
|
16
|
+
autoload :Usage, 'Mailosaur/usage.rb'
|
16
17
|
autoload :MailosaurError, 'Mailosaur/mailosaur_error.rb'
|
17
18
|
|
18
19
|
module Models
|
@@ -33,6 +34,10 @@ module Mailosaur
|
|
33
34
|
autoload :ServerListResult, 'Mailosaur/models/server_list_result.rb'
|
34
35
|
autoload :SpamFilterResults, 'Mailosaur/models/spam_filter_results.rb'
|
35
36
|
autoload :ServerCreateOptions, 'Mailosaur/models/server_create_options.rb'
|
37
|
+
autoload :UsageAccountLimits, 'Mailosaur/models/usage_account_limits.rb'
|
38
|
+
autoload :UsageAccountLimit, 'Mailosaur/models/usage_account_limit.rb'
|
39
|
+
autoload :UsageTransactionListResult, 'Mailosaur/models/usage_transaction_list_result.rb'
|
40
|
+
autoload :UsageTransaction, 'Mailosaur/models/usage_transaction.rb'
|
36
41
|
autoload :BaseModel, 'Mailosaur/models/base_model.rb'
|
37
42
|
end
|
38
43
|
|
@@ -67,6 +72,11 @@ module Mailosaur
|
|
67
72
|
@servers ||= Servers.new(connection, method(:handle_http_error))
|
68
73
|
end
|
69
74
|
|
75
|
+
# @return [Usage] usage
|
76
|
+
def usage
|
77
|
+
@usage ||= Usage.new(connection, method(:handle_http_error))
|
78
|
+
end
|
79
|
+
|
70
80
|
private
|
71
81
|
|
72
82
|
def connection
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailosaur
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.2
|
4
|
+
version: 7.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mailosaur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "<="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.0'
|
20
17
|
- - ">="
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.9
|
19
|
+
version: '0.9'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "<="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '1.0'
|
30
27
|
- - ">="
|
31
28
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.9
|
29
|
+
version: '0.9'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: json
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "<="
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '3.0'
|
40
37
|
- - ">="
|
41
38
|
- !ruby/object:Gem::Version
|
42
39
|
version: 1.7.5
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '4'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - "<="
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '3.0'
|
50
47
|
- - ">="
|
51
48
|
- !ruby/object:Gem::Version
|
52
49
|
version: 1.7.5
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '4'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: mail
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -175,8 +175,13 @@ files:
|
|
175
175
|
- lib/Mailosaur/models/spam_analysis_result.rb
|
176
176
|
- lib/Mailosaur/models/spam_assassin_rule.rb
|
177
177
|
- lib/Mailosaur/models/spam_filter_results.rb
|
178
|
+
- lib/Mailosaur/models/usage_account_limit.rb
|
179
|
+
- lib/Mailosaur/models/usage_account_limits.rb
|
180
|
+
- lib/Mailosaur/models/usage_transaction.rb
|
181
|
+
- lib/Mailosaur/models/usage_transaction_list_result.rb
|
178
182
|
- lib/Mailosaur/module_definition.rb
|
179
183
|
- lib/Mailosaur/servers.rb
|
184
|
+
- lib/Mailosaur/usage.rb
|
180
185
|
- lib/Mailosaur/version.rb
|
181
186
|
- lib/mailosaur.rb
|
182
187
|
homepage: https://mailosaur.com/
|
@@ -203,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
208
|
- !ruby/object:Gem::Version
|
204
209
|
version: '0'
|
205
210
|
requirements: []
|
206
|
-
rubygems_version: 3.2.
|
211
|
+
rubygems_version: 3.2.22
|
207
212
|
signing_key:
|
208
213
|
specification_version: 4
|
209
214
|
summary: The Mailosaur Ruby library
|