mailosaur 5.0.2 → 5.0.20
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 +5 -5
- data/LICENSE +1 -1
- data/README.md +0 -39
- data/lib/Mailosaur/analysis.rb +14 -161
- data/lib/Mailosaur/files.rb +21 -253
- data/lib/Mailosaur/messages.rb +63 -567
- data/lib/Mailosaur/models/attachment.rb +10 -77
- data/lib/Mailosaur/models/base_model.rb +16 -0
- data/lib/Mailosaur/models/forwarding_rule.rb +8 -61
- data/lib/Mailosaur/models/image.rb +6 -45
- data/lib/Mailosaur/models/link.rb +6 -45
- data/lib/Mailosaur/models/message.rb +21 -173
- data/lib/Mailosaur/models/message_address.rb +7 -53
- data/lib/Mailosaur/models/message_content.rb +9 -71
- data/lib/Mailosaur/models/message_header.rb +6 -45
- data/lib/Mailosaur/models/message_list_result.rb +6 -45
- data/lib/Mailosaur/models/message_summary.rb +20 -162
- data/lib/Mailosaur/models/metadata.rb +6 -45
- data/lib/Mailosaur/models/search_criteria.rb +7 -53
- data/lib/Mailosaur/models/server.rb +11 -94
- data/lib/Mailosaur/models/server_create_options.rb +5 -37
- data/lib/Mailosaur/models/server_list_result.rb +6 -45
- data/lib/Mailosaur/models/spam_analysis_result.rb +7 -48
- data/lib/Mailosaur/models/spam_assassin_rule.rb +7 -53
- data/lib/Mailosaur/models/spam_filter_results.rb +6 -46
- data/lib/Mailosaur/module_definition.rb +0 -5
- data/lib/Mailosaur/servers.rb +52 -465
- data/lib/Mailosaur/version.rb +1 -6
- data/lib/mailosaur.rb +32 -16
- metadata +49 -42
- data/lib/Mailosaur/mailosaur_base_client.rb +0 -120
@@ -1,52 +1,13 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
1
|
module Mailosaur
|
7
2
|
module Models
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
3
|
+
class Metadata < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@headers = []
|
6
|
+
(data['headers'] || []).each do | i | @headers << Mailosaur::Models::MessageHeader.new(i) end
|
7
|
+
end
|
8
|
+
|
12
9
|
# @return [Array<MessageHeader>] Email headers.
|
13
10
|
attr_accessor :headers
|
14
|
-
|
15
|
-
|
16
|
-
#
|
17
|
-
# Mapper for Metadata class as Ruby Hash.
|
18
|
-
# This will be used for serialization/deserialization.
|
19
|
-
#
|
20
|
-
def self.mapper()
|
21
|
-
{
|
22
|
-
client_side_validation: true,
|
23
|
-
required: false,
|
24
|
-
serialized_name: 'Metadata',
|
25
|
-
type: {
|
26
|
-
name: 'Composite',
|
27
|
-
class_name: 'Metadata',
|
28
|
-
model_properties: {
|
29
|
-
headers: {
|
30
|
-
client_side_validation: true,
|
31
|
-
required: false,
|
32
|
-
serialized_name: 'headers',
|
33
|
-
type: {
|
34
|
-
name: 'Sequence',
|
35
|
-
element: {
|
36
|
-
client_side_validation: true,
|
37
|
-
required: false,
|
38
|
-
serialized_name: 'MessageHeaderElementType',
|
39
|
-
type: {
|
40
|
-
name: 'Composite',
|
41
|
-
class_name: 'MessageHeader'
|
42
|
-
}
|
43
|
-
}
|
44
|
-
}
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
}
|
49
|
-
end
|
50
11
|
end
|
51
12
|
end
|
52
13
|
end
|
@@ -1,15 +1,12 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
1
|
module Mailosaur
|
7
2
|
module Models
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
class SearchCriteria < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@sent_to = data['sentTo']
|
6
|
+
@subject = data['subject']
|
7
|
+
@body = data['body']
|
8
|
+
end
|
9
|
+
|
13
10
|
# @return [String] The full email address to which the target email was
|
14
11
|
# sent.
|
15
12
|
attr_accessor :sent_to
|
@@ -21,49 +18,6 @@ module Mailosaur
|
|
21
18
|
# @return [String] The value to seek within the target email's HTML or
|
22
19
|
# text body.
|
23
20
|
attr_accessor :body
|
24
|
-
|
25
|
-
|
26
|
-
#
|
27
|
-
# Mapper for SearchCriteria class as Ruby Hash.
|
28
|
-
# This will be used for serialization/deserialization.
|
29
|
-
#
|
30
|
-
def self.mapper()
|
31
|
-
{
|
32
|
-
client_side_validation: true,
|
33
|
-
required: false,
|
34
|
-
serialized_name: 'SearchCriteria',
|
35
|
-
type: {
|
36
|
-
name: 'Composite',
|
37
|
-
class_name: 'SearchCriteria',
|
38
|
-
model_properties: {
|
39
|
-
sent_to: {
|
40
|
-
client_side_validation: true,
|
41
|
-
required: false,
|
42
|
-
serialized_name: 'sentTo',
|
43
|
-
type: {
|
44
|
-
name: 'String'
|
45
|
-
}
|
46
|
-
},
|
47
|
-
subject: {
|
48
|
-
client_side_validation: true,
|
49
|
-
required: false,
|
50
|
-
serialized_name: 'subject',
|
51
|
-
type: {
|
52
|
-
name: 'String'
|
53
|
-
}
|
54
|
-
},
|
55
|
-
body: {
|
56
|
-
client_side_validation: true,
|
57
|
-
required: false,
|
58
|
-
serialized_name: 'body',
|
59
|
-
type: {
|
60
|
-
name: 'String'
|
61
|
-
}
|
62
|
-
}
|
63
|
-
}
|
64
|
-
}
|
65
|
-
}
|
66
|
-
end
|
67
21
|
end
|
68
22
|
end
|
69
23
|
end
|
@@ -1,15 +1,16 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
1
|
module Mailosaur
|
7
2
|
module Models
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
class Server < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@id = data['id']
|
6
|
+
@password = data['password']
|
7
|
+
@name = data['name']
|
8
|
+
@users = data['users']
|
9
|
+
@messages = data['messages']
|
10
|
+
@forwarding_rules = []
|
11
|
+
(data['forwardingRules'] || []).each do | i | @forwarding_rules << Mailosaur::Models::ForwardingRule.new(i) end
|
12
|
+
end
|
13
|
+
|
13
14
|
# @return [String] Unique identifier for the server. Used as username for
|
14
15
|
# SMTP/POP3 authentication.
|
15
16
|
attr_accessor :id
|
@@ -29,90 +30,6 @@ module Mailosaur
|
|
29
30
|
# @return [Array<ForwardingRule>] The rules used to manage email
|
30
31
|
# forwarding for this server.
|
31
32
|
attr_accessor :forwarding_rules
|
32
|
-
|
33
|
-
|
34
|
-
#
|
35
|
-
# Mapper for Server class as Ruby Hash.
|
36
|
-
# This will be used for serialization/deserialization.
|
37
|
-
#
|
38
|
-
def self.mapper()
|
39
|
-
{
|
40
|
-
client_side_validation: true,
|
41
|
-
required: false,
|
42
|
-
serialized_name: 'Server',
|
43
|
-
type: {
|
44
|
-
name: 'Composite',
|
45
|
-
class_name: 'Server',
|
46
|
-
model_properties: {
|
47
|
-
id: {
|
48
|
-
client_side_validation: true,
|
49
|
-
required: false,
|
50
|
-
serialized_name: 'id',
|
51
|
-
type: {
|
52
|
-
name: 'String'
|
53
|
-
}
|
54
|
-
},
|
55
|
-
password: {
|
56
|
-
client_side_validation: true,
|
57
|
-
required: false,
|
58
|
-
serialized_name: 'password',
|
59
|
-
type: {
|
60
|
-
name: 'String'
|
61
|
-
}
|
62
|
-
},
|
63
|
-
name: {
|
64
|
-
client_side_validation: true,
|
65
|
-
required: false,
|
66
|
-
serialized_name: 'name',
|
67
|
-
type: {
|
68
|
-
name: 'String'
|
69
|
-
}
|
70
|
-
},
|
71
|
-
users: {
|
72
|
-
client_side_validation: true,
|
73
|
-
required: false,
|
74
|
-
serialized_name: 'users',
|
75
|
-
type: {
|
76
|
-
name: 'Sequence',
|
77
|
-
element: {
|
78
|
-
client_side_validation: true,
|
79
|
-
required: false,
|
80
|
-
serialized_name: 'UuidElementType',
|
81
|
-
type: {
|
82
|
-
name: 'String'
|
83
|
-
}
|
84
|
-
}
|
85
|
-
}
|
86
|
-
},
|
87
|
-
messages: {
|
88
|
-
client_side_validation: true,
|
89
|
-
required: false,
|
90
|
-
serialized_name: 'messages',
|
91
|
-
type: {
|
92
|
-
name: 'Number'
|
93
|
-
}
|
94
|
-
},
|
95
|
-
forwarding_rules: {
|
96
|
-
client_side_validation: true,
|
97
|
-
required: false,
|
98
|
-
serialized_name: 'forwardingRules',
|
99
|
-
type: {
|
100
|
-
name: 'Sequence',
|
101
|
-
element: {
|
102
|
-
client_side_validation: true,
|
103
|
-
required: false,
|
104
|
-
serialized_name: 'ForwardingRuleElementType',
|
105
|
-
type: {
|
106
|
-
name: 'Composite',
|
107
|
-
class_name: 'ForwardingRule'
|
108
|
-
}
|
109
|
-
}
|
110
|
-
}
|
111
|
-
}
|
112
|
-
}
|
113
|
-
}
|
114
|
-
}
|
115
|
-
end
|
116
33
|
end
|
117
34
|
end
|
118
35
|
end
|
@@ -1,44 +1,12 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
1
|
module Mailosaur
|
7
2
|
module Models
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
class ServerCreateOptions < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@name = data['name']
|
6
|
+
end
|
7
|
+
|
13
8
|
# @return [String] A name used to identify the server.
|
14
9
|
attr_accessor :name
|
15
|
-
|
16
|
-
|
17
|
-
#
|
18
|
-
# Mapper for ServerCreateOptions class as Ruby Hash.
|
19
|
-
# This will be used for serialization/deserialization.
|
20
|
-
#
|
21
|
-
def self.mapper()
|
22
|
-
{
|
23
|
-
client_side_validation: true,
|
24
|
-
required: false,
|
25
|
-
serialized_name: 'ServerCreateOptions',
|
26
|
-
type: {
|
27
|
-
name: 'Composite',
|
28
|
-
class_name: 'ServerCreateOptions',
|
29
|
-
model_properties: {
|
30
|
-
name: {
|
31
|
-
client_side_validation: true,
|
32
|
-
required: false,
|
33
|
-
serialized_name: 'name',
|
34
|
-
type: {
|
35
|
-
name: 'String'
|
36
|
-
}
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
40
|
-
}
|
41
|
-
end
|
42
10
|
end
|
43
11
|
end
|
44
12
|
end
|
@@ -1,54 +1,15 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
1
|
module Mailosaur
|
7
2
|
module Models
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
3
|
+
class ServerListResult < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@items = []
|
6
|
+
(data['items'] || []).each do | i | @items << Mailosaur::Models::Server.new(i) end
|
7
|
+
end
|
8
|
+
|
12
9
|
# @return [Array<Server>] The individual servers forming the result.
|
13
10
|
# Servers are returned sorted by creation date, with the most
|
14
11
|
# recently-created server appearing first.
|
15
12
|
attr_accessor :items
|
16
|
-
|
17
|
-
|
18
|
-
#
|
19
|
-
# Mapper for ServerListResult class as Ruby Hash.
|
20
|
-
# This will be used for serialization/deserialization.
|
21
|
-
#
|
22
|
-
def self.mapper()
|
23
|
-
{
|
24
|
-
client_side_validation: true,
|
25
|
-
required: false,
|
26
|
-
serialized_name: 'ServerListResult',
|
27
|
-
type: {
|
28
|
-
name: 'Composite',
|
29
|
-
class_name: 'ServerListResult',
|
30
|
-
model_properties: {
|
31
|
-
items: {
|
32
|
-
client_side_validation: true,
|
33
|
-
required: false,
|
34
|
-
serialized_name: 'items',
|
35
|
-
type: {
|
36
|
-
name: 'Sequence',
|
37
|
-
element: {
|
38
|
-
client_side_validation: true,
|
39
|
-
required: false,
|
40
|
-
serialized_name: 'ServerElementType',
|
41
|
-
type: {
|
42
|
-
name: 'Composite',
|
43
|
-
class_name: 'Server'
|
44
|
-
}
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}
|
50
|
-
}
|
51
|
-
end
|
52
13
|
end
|
53
14
|
end
|
54
15
|
end
|
@@ -1,56 +1,15 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
1
|
module Mailosaur
|
7
2
|
module Models
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
class SpamAnalysisResult < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@spam_filter_results = Mailosaur::Models::SpamFilterResults.new(data['spamFilterResults'])
|
6
|
+
@score = data['score']
|
7
|
+
end
|
8
|
+
|
9
|
+
attr_accessor :spam_filter_results
|
15
10
|
|
16
11
|
# @return [Float]
|
17
12
|
attr_accessor :score
|
18
|
-
|
19
|
-
|
20
|
-
#
|
21
|
-
# Mapper for SpamAnalysisResult class as Ruby Hash.
|
22
|
-
# This will be used for serialization/deserialization.
|
23
|
-
#
|
24
|
-
def self.mapper()
|
25
|
-
{
|
26
|
-
client_side_validation: true,
|
27
|
-
required: false,
|
28
|
-
serialized_name: 'SpamAnalysisResult',
|
29
|
-
type: {
|
30
|
-
name: 'Composite',
|
31
|
-
class_name: 'SpamAnalysisResult',
|
32
|
-
model_properties: {
|
33
|
-
spam_filter_results: {
|
34
|
-
client_side_validation: true,
|
35
|
-
required: false,
|
36
|
-
serialized_name: 'spamFilterResults',
|
37
|
-
type: {
|
38
|
-
name: 'Composite',
|
39
|
-
class_name: 'SpamFilterResults'
|
40
|
-
}
|
41
|
-
},
|
42
|
-
score: {
|
43
|
-
client_side_validation: true,
|
44
|
-
required: false,
|
45
|
-
serialized_name: 'score',
|
46
|
-
type: {
|
47
|
-
name: 'Double'
|
48
|
-
}
|
49
|
-
}
|
50
|
-
}
|
51
|
-
}
|
52
|
-
}
|
53
|
-
end
|
54
13
|
end
|
55
14
|
end
|
56
15
|
end
|
@@ -1,15 +1,12 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
1
|
module Mailosaur
|
7
2
|
module Models
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
class SpamAssassinRule < BaseModel
|
4
|
+
def initialize(data = {})
|
5
|
+
@score = data['score']
|
6
|
+
@rule = data['rule']
|
7
|
+
@description = data['description']
|
8
|
+
end
|
9
|
+
|
13
10
|
# @return [Float]
|
14
11
|
attr_accessor :score
|
15
12
|
|
@@ -18,49 +15,6 @@ module Mailosaur
|
|
18
15
|
|
19
16
|
# @return [String]
|
20
17
|
attr_accessor :description
|
21
|
-
|
22
|
-
|
23
|
-
#
|
24
|
-
# Mapper for SpamAssassinRule class as Ruby Hash.
|
25
|
-
# This will be used for serialization/deserialization.
|
26
|
-
#
|
27
|
-
def self.mapper()
|
28
|
-
{
|
29
|
-
client_side_validation: true,
|
30
|
-
required: false,
|
31
|
-
serialized_name: 'SpamAssassinRule',
|
32
|
-
type: {
|
33
|
-
name: 'Composite',
|
34
|
-
class_name: 'SpamAssassinRule',
|
35
|
-
model_properties: {
|
36
|
-
score: {
|
37
|
-
client_side_validation: true,
|
38
|
-
required: false,
|
39
|
-
serialized_name: 'score',
|
40
|
-
type: {
|
41
|
-
name: 'Double'
|
42
|
-
}
|
43
|
-
},
|
44
|
-
rule: {
|
45
|
-
client_side_validation: true,
|
46
|
-
required: false,
|
47
|
-
serialized_name: 'rule',
|
48
|
-
type: {
|
49
|
-
name: 'String'
|
50
|
-
}
|
51
|
-
},
|
52
|
-
description: {
|
53
|
-
client_side_validation: true,
|
54
|
-
required: false,
|
55
|
-
serialized_name: 'description',
|
56
|
-
type: {
|
57
|
-
name: 'String'
|
58
|
-
}
|
59
|
-
}
|
60
|
-
}
|
61
|
-
}
|
62
|
-
}
|
63
|
-
end
|
64
18
|
end
|
65
19
|
end
|
66
20
|
end
|